/* ============================================
   ClassChat - Light Theme with Glassmorphism
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  --primary: #6366F1;
  --primary-light: #818CF8;
  --primary-dark: #4F46E5;
  --secondary: #8B5CF6;
  --accent: #EC4899;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;

  --bg-main: #F0F2F5;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --bg-glass-hover: rgba(255, 255, 255, 0.75);
  --bg-video: #1a1a2e;

  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;

  --border-color: rgba(255, 255, 255, 0.5);
  --border-subtle: rgba(148, 163, 184, 0.2);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Animated Background ---- */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out;
}

.bg-circle-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #C7D2FE, #DDD6FE);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.bg-circle-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #FBCFE8, #F9A8D4);
  bottom: -10%;
  left: -5%;
  animation-delay: -5s;
}

.bg-circle-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #A5F3FC, #99F6E4);
  top: 40%;
  left: 30%;
  animation-delay: -10s;
}

.bg-circle-4 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #FDE68A, #FCA5A5);
  top: 20%;
  right: 20%;
  animation-delay: -15s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(30px, -30px) scale(1.05);
  }

  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }

  75% {
    transform: translate(20px, 10px) scale(1.02);
  }
}

/* ---- Glassmorphism ---- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.glass-card-mini {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.glass-bar {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

/* ===== LOBBY PAGE ===== */
.lobby-body {
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.lobby-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo */
.lobby-header {
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 8px;
}

.logo-icon {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
  }

  50% {
    filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.5));
  }
}

.logo-text {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.lobby-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Card */
.lobby-card {
  width: 100%;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: var(--font);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.input-wrapper input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-wrapper input:focus~.input-icon,
.input-wrapper input:focus+.input-icon {
  color: var(--primary);
}

/* Shake animation */
.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-8px);
  }

  40% {
    transform: translateX(8px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-primary.loading::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-secondary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  white-space: nowrap;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Join row */
.join-row {
  display: flex;
  gap: 10px;
}

.join-row .input-wrapper {
  flex: 1;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  text-align: center;
  transition: var(--transition);
}

.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-item span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Footer */
.lobby-footer {
  text-align: center;
}

.lobby-footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* ===== ROOM PAGE ===== */
.room-body {
  background: var(--bg-main);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.room-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* Room Header */
.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
  z-index: 10;
  min-height: 52px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-small {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.header-center {
  display: flex;
  align-items: center;
}

.room-info {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.08);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.room-id-display {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.btn-icon:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.btn-copy.copied {
  color: var(--success);
}

.participant-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.06);
  border-radius: var(--radius-full);
}

.chat-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }

  80% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* Room Main */
.room-main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Video Grid */
.video-grid {
  flex: 1;
  display: grid;
  gap: 10px;
  padding: 10px;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  overflow: hidden;
  transition: var(--transition);
}

/* Dynamic grid layout based on number of videos */
.video-grid.grid-1 {
  grid-template-columns: 1fr;
}

.video-grid.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.video-grid.grid-3 {
  grid-template-columns: 1fr 1fr;
}

.video-grid.grid-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.video-grid.grid-5,
.video-grid.grid-6 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.video-grid.grid-7,
.video-grid.grid-8,
.video-grid.grid-9 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
}

/* === Screen Share Presentation Mode === */
.video-grid.has-screen-share {
  grid-template-columns: 1fr 180px;
  grid-template-rows: 1fr;
  gap: 8px;
}

/* Video Tile */
.video-tile {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-video);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  animation: tileIn 0.4s ease-out;
}

@keyframes tileIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.video-tile:hover {
  box-shadow: var(--shadow-lg);
}

.video-tile.screen-share {
  grid-column: 1;
  grid-row: 1 / -1;
  border: 2px solid var(--primary);
  order: -1;
}

/* Thumbnail strip for non-sharing tiles in presentation mode */
.video-grid.has-screen-share .video-tile:not(.screen-share) {
  grid-column: 2;
  min-height: 120px;
  max-height: 140px;
}

.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-tile.screen-share video {
  object-fit: contain;
  background: #000;
}

.video-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.video-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.video-indicators {
  display: flex;
  gap: 4px;
}

.indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  color: white;
}

.indicator.muted {
  background: var(--danger);
}

/* Video Off Overlay */
.video-off-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2d2b55, #1a1a2e);
  z-index: 1;
}

.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* Chat Panel */
.chat-panel {
  width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border-top: none;
  border-bottom: none;
  border-right: none;
  transition: width 0.3s ease;
}

.chat-panel.open {
  width: 340px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.chat-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.chat-sender {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.chat-sender.self {
  color: var(--secondary);
}

.chat-time {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.chat-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
  background: rgba(99, 102, 241, 0.06);
  padding: 6px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  word-break: break-word;
}

.chat-message.self .chat-text {
  background: rgba(139, 92, 246, 0.08);
  border-radius: var(--radius-sm) 0 var(--radius-sm) var(--radius-sm);
}

.chat-system {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 0;
  font-style: italic;
}

/* Chat Input */
.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-subtle);
}

.chat-input input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-family: var(--font);
  background: rgba(255, 255, 255, 0.8);
  outline: none;
  transition: var(--transition);
  color: var(--text-primary);
}

.chat-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-send {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-send:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* Controls Bar */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 0;
  border-bottom: none;
  border-left: none;
  border-right: none;
  z-index: 10;
  gap: 16px;
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.06);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  min-width: 64px;
}

.control-btn:hover {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
}

.control-btn.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.control-btn.off {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
}

.control-btn.off:hover {
  background: rgba(239, 68, 68, 0.15);
}

.control-btn.sharing {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.control-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.control-label {
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font);
}

.leave-btn {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  margin-left: 16px;
}

.leave-btn:hover {
  background: var(--danger);
  color: white;
  transform: scale(1.05);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 64px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  animation: toastIn 0.3s ease-out;
  border-left: 3px solid var(--primary);
}

.toast.toast-out {
  animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .lobby-container {
    max-width: 100%;
    padding: 0 8px;
  }

  .lobby-card {
    padding: 24px 20px;
  }

  .logo-text {
    font-size: 1.6rem;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .feature-item {
    padding: 12px 4px;
  }

  /* Room */
  .room-header {
    padding: 6px 12px;
  }

  .logo-small span {
    display: none;
  }

  .room-info {
    padding: 3px 8px;
  }

  .room-id-display {
    font-size: 0.75rem;
  }

  .chat-panel.open {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 340px;
    z-index: 20;
    border-radius: 0;
  }

  .video-grid {
    gap: 6px;
    padding: 6px;
    padding-bottom: 80px;
  }

  .video-grid.grid-2 {
    grid-template-columns: 1fr;
  }

  .video-grid.has-screen-share {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .video-grid.has-screen-share .video-tile.screen-share {
    grid-column: 1;
    grid-row: 1;
  }

  .video-grid.has-screen-share .video-tile:not(.screen-share) {
    grid-column: 1;
    min-height: 80px;
    max-height: 100px;
  }

  .controls-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
    z-index: 30;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
  }

  .controls-group {
    gap: 4px;
  }

  .control-btn {
    padding: 8px 10px;
    min-width: 52px;
  }

  .control-label {
    font-size: 0.6rem;
  }

  .leave-btn {
    margin-left: 8px;
  }

  .avatar-circle {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .join-row {
    flex-direction: column;
  }

  .feature-icon {
    width: 36px;
    height: 36px;
  }

  .feature-icon svg {
    width: 18px;
    height: 18px;
  }

  .header-center {
    display: none;
  }
}