/* ===================================================================================
//
//                               Lobby Styles
//
// =================================================================================== */

/* Variables are now in style.css */

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 20px;
  direction: rtl;
}

#lobby-container {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
}

/* Header Styles */
.lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.user-profile {
  position: relative;
}

#user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--glass-border);
}

.dashboard-popup {
  display: none; /* Initially hidden */
  position: absolute;
  top: 60px;
  right: 0;
  width: 250px;
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 10px;
  padding: 15px;
  z-index: 100;
  color: var(--text-color);
}

.dashboard-popup.show {
    display: block;
}

.dashboard-popup h4 {
  margin: 0 0 10px 0;
  color: var(--primary-glow);
}

.dashboard-popup p {
  margin: 5px 0;
  font-size: 0.9em;
}

.dashboard-popup a {
  display: block;
  margin-top: 10px;
  color: var(--interactive-blue);
  text-decoration: none;
}
.dashboard-popup a:hover {
  text-decoration: underline;
}


/* Main Content */
main {
  padding-top: 20px;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-actions h2 {
    color: var(--text-color);
    margin: 0;
}

#create-room-btn {
  background: linear-gradient(45deg, var(--primary-glow), var(--secondary-glow));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(149, 7, 64, 0.5);
}

#create-room-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(149, 7, 64, 0.8);
}

#create-room-btn i {
    margin-right: 8px;
}

/* Room List */
.room-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.room-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  min-height: 180px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Align content to the bottom */
  padding: 20px;
  cursor: pointer;
}

.room-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 10%, rgba(0,0,0,0.1) 60%);
  z-index: 1;
  transition: all 0.3s ease;
}

.room-card:hover {
  transform: translateY(-5px) scale(1.03);
  border-color: var(--primary-glow);
  box-shadow: 0 0 25px rgba(149, 7, 64, 0.6);
}

.room-card:hover::before {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 50%);
}

/* Assigning different backgrounds to the first 3 rooms */
.room-card:nth-child(1) {
    background-image: url('https://images.unsplash.com/photo-1528459801416-a9e53bbf4e17?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1074&q=80');
}
.room-card:nth-child(2) {
    background-image: url('https://images.unsplash.com/photo-1519677100203-a0e668c97489?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80');
}
.room-card:nth-child(3) {
    background-image: url('https://images.unsplash.com/photo-1507525428034-b723a996f3d1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80');
}

.room-card > * {
    position: relative;
    z-index: 2;
}

.room-info h3 {
  margin: 0 0 5px 0;
  color: #fff;
  font-size: 1.4em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.7);
}

.room-info .room-topic {
  margin: 0;
  font-size: 0.9em;
  color: #ddd;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

.room-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.user-count {
  font-size: 0.9em;
  font-weight: 600;
  background: rgba(0,0,0,0.4);
  padding: 5px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
}

.user-count i {
    margin-left: 6px;
    color: #0f0; /* Green light for online users */
}

.join-btn {
  background-color: transparent;
  color: white;
  border: 2px solid white;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
}

.join-btn:hover {
  background-color: white;
  color: black;
}

/* Audio Controls */
.audio-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.control-button:hover {
    background: var(--primary-glow);
    border-color: var(--primary-glow);
}

.control-button.muted {
    background: var(--secondary-glow);
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}


.volume-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.volume-container i {
    font-size: 1em;
    color: #ccc;
}

#volume-slider {
    width: 100px;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: #555;
    outline: none;
    border-radius: 5px;
    transition: opacity 0.2s;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  background: var(--interactive-blue);
  cursor: pointer;
  border-radius: 50%;
}

#volume-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  background: var(--interactive-blue);
  cursor: pointer;
  border-radius: 50%;
}

#volume-percentage {
    font-size: 0.9em;
    min-width: 40px;
    text-align: left;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}

#volume-percentage.show {
    opacity: 1;
}
