/**
 * room.css — Modern, Clean & High-UX 2026 Room System Styles
 * MultiTyping.in | Real-Time Multiplayer Typing Battle Rooms & Student Chat
 * Architecture: Clean Light Theme (Default) + Sleek Dark Mode, Fixed-Height Chat with Scroll, Modern Race Tracks
 */

/* ═══════════════════════════════════════════════════════════════════════════
   1. DESIGN SYSTEM TOKENS & DUAL-THEME VARIABLES
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* ── Light Theme Palette (Default — Modern, Crisp & Clean) ───────────── */
  --c-bg:            #f8fafc;
  --c-surface:       #ffffff;
  --c-surface2:      #f1f5f9;
  --c-surface3:      #e2e8f0;
  --c-surface-glass: rgba(255, 255, 255, 0.92);

  --c-border:        #e2e8f0;
  --c-border-light:  #cbd5e1;
  --c-border-accent: rgba(99, 102, 241, 0.35);

  /* Brand & Status Colors */
  --c-primary:       #6366f1;
  --c-primary-h:     #4f46e5;
  --c-primary-d:     #4338ca;
  --c-primary-glow:  rgba(99, 102, 241, 0.22);

  --c-blue:          #2563eb;
  --c-blue-h:        #3b82f6;
  --c-purple:        #7c3aed;
  --c-pink:          #db2777;
  --c-cyan:          #0891b2;

  --c-accent:        #d97706;
  --c-accent-h:      #b45309;
  --c-success:       #059669;
  --c-success-h:     #10b981;
  --c-danger:        #dc2626;
  --c-warning:       #ea580c;

  /* Typography Colors (High Contrast) */
  --c-text:          #0f172a;
  --c-text-soft:     #334155;
  --c-muted:         #64748b;
  --c-subtle:        #94a3b8;

  /* Typography */
  --font:            'Inter', system-ui, -apple-system, sans-serif;
  --font-heading:    'Outfit', 'Poppins', 'Inter', sans-serif;
  --font-mono:       'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Border Radii */
  --radius-xs:       8px;
  --radius-sm:       12px;
  --radius:          16px;
  --radius-lg:       22px;
  --radius-xl:       28px;
  --radius-full:     9999px;

  /* Shadows */
  --shadow-sm:       0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-md:       0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg:       0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow:     0 0 24px var(--c-primary-glow);

  /* Transitions */
  --trans-fast:      0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --trans:           0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Gradients */
  --grad-primary:    linear-gradient(135deg, #6366f1, #8b5cf6);
  --grad-accent:     linear-gradient(135deg, #f59e0b, #ef4444);
  --grad-chat:       linear-gradient(135deg, #3b82f6, #6366f1);
  --grad-green:      linear-gradient(135deg, #10b981, #059669);
}

/* ── Dark Theme Overrides (When body has .dark-mode) ──────────────────────── */
body.dark-mode {
  --c-bg:            #070b14;
  --c-surface:       #0f172a;
  --c-surface2:      #162036;
  --c-surface3:      #1e293b;
  --c-surface-glass: rgba(15, 23, 42, 0.88);

  --c-border:        rgba(255, 255, 255, 0.08);
  --c-border-light:  rgba(255, 255, 255, 0.14);
  --c-border-accent: rgba(99, 102, 241, 0.4);

  --c-primary-h:     #818cf8;
  --c-primary-glow:  rgba(99, 102, 241, 0.35);

  --c-accent:        #f59e0b;
  --c-accent-h:      #fcd34d;
  --c-success:       #10b981;
  --c-success-h:     #34d399;

  --c-text:          #f8fafc;
  --c-text-soft:     #cbd5e1;
  --c-muted:         #94a3b8;
  --c-subtle:        #64748b;

  --shadow-sm:       0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md:       0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg:       0 16px 40px rgba(0, 0, 0, 0.6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. GLOBAL ROOM CONTAINER & RESET
   ═══════════════════════════════════════════════════════════════════════════ */
.room-arena-wrapper,
.chat-lounge-wrapper,
.lobby-content-wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  box-sizing: border-box;
  color: var(--c-text);
  font-family: var(--font);
}

/* Base link fix */
.room-topbar a,
.room-arena-wrapper a,
.chat-lounge-wrapper a,
.lobby-content-wrap a {
  color: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. TOPBAR & ROOM SUB-HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.room-topbar {
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
}

.topbar-logo {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 900;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 6px;
}

.room-topbar-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--c-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Navigation Links in Lobby Topbar */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.topbar-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-soft) !important;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  text-decoration: none;
  transition: all var(--trans);
  box-shadow: var(--shadow-sm);
}

.topbar-nav a:hover {
  color: var(--c-primary) !important;
  border-color: var(--c-primary);
  background: var(--c-surface2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--c-primary-glow);
}

.topbar-nav a.active {
  background: var(--grad-primary);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--c-primary-glow);
}

.topbar-nav .btn-create-nav {
  background: var(--grad-green);
  color: #ffffff !important;
  border-color: transparent;
}
.topbar-nav .btn-create-nav:hover {
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-soft) !important;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--trans);
  box-shadow: var(--shadow-sm);
}
.back-btn:hover {
  color: var(--c-primary) !important;
  border-color: var(--c-primary);
  background: var(--c-surface2);
  transform: translateX(-2px);
}

/* User Nickname Topbar Pill */
.user-nick-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
  cursor: pointer;
  transition: all var(--trans);
  box-shadow: var(--shadow-sm);
}
.user-nick-pill:hover {
  border-color: var(--c-primary);
  background: var(--c-surface2);
  box-shadow: 0 0 12px var(--c-primary-glow);
  transform: translateY(-1px);
}

/* Room / Invite Code Box in Topbar */
.topbar-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--trans);
  box-shadow: var(--shadow-sm);
}
.topbar-code:hover {
  border-color: var(--c-accent);
  background: var(--c-surface2);
}
.topbar-code-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--c-muted);
}
.topbar-code-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--c-accent);
}

/* Live Candidates Pill */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.1);
  color: var(--c-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-success);
  box-shadow: 0 0 8px var(--c-success);
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.85); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. BATTLE ARENA LAYOUT (CENTER TYPING + SIDEBAR CHAT)
   ═══════════════════════════════════════════════════════════════════════════ */
.room-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 1100px) {
  .room-layout {
    grid-template-columns: 1fr;
  }
}

.left-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.right-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
}
@media (max-width: 1100px) {
  .right-col {
    position: static;
    max-height: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. CANDIDATE LIVE TRACKS & PROGRESS BOARD
   ═══════════════════════════════════════════════════════════════════════════ */
.players-board {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.players-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.players-board-head h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.online-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--c-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 800;
}

/* Player Track Rows */
.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  transition: all var(--trans);
}
.player-row:hover {
  border-color: var(--c-border-light);
  transform: translateY(-1px);
}

/* Current user self row */
.player-row--me {
  border-color: var(--c-primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.04));
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.15);
}

.player-row--done {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}

.player-rank {
  font-size: 17px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  font-weight: 800;
}

.player-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.player-name {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--c-text);
}

/* Glowing (You) Tag */
.player-you-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--grad-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  animation: pulse-you 2s infinite;
}
@keyframes pulse-you {
  0%, 100% { box-shadow: 0 0 8px rgba(99, 102, 241, 0.4); transform: scale(1); }
  50%      { box-shadow: 0 0 16px rgba(99, 102, 241, 0.8); transform: scale(1.06); }
}

.player-finished-badge {
  background: rgba(16, 185, 129, 0.14);
  color: var(--c-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Progress track with animated car */
.player-progress-track {
  height: 8px;
  background: var(--c-surface3);
  border-radius: var(--radius-full);
  position: relative;
  overflow: visible;
  margin-top: 4px;
}
.player-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #f59e0b);
  border-radius: var(--radius-full);
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 8px;
}
.player-car {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.6));
  transition: left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.player-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.player-wpm-badge {
  text-align: center;
  min-width: 54px;
}
.player-wpm {
  display: block;
  font-size: 19px;
  font-weight: 900;
  color: var(--c-accent);
  line-height: 1;
}
.player-wpm-badge small {
  font-size: 9px;
  color: var(--c-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.player-acc-badge {
  text-align: center;
  min-width: 42px;
}
.player-acc {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--c-text-soft);
  line-height: 1;
}
.player-acc-badge small {
  font-size: 9px;
  color: var(--c-muted);
  font-weight: 700;
  text-transform: uppercase;
}

/* Waiting Lounge Chips */
.waiting-players-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0;
}
.waiting-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
}
.waiting-chip--me {
  border-color: var(--c-primary);
  background: rgba(99, 102, 241, 0.08);
}
.waiting-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. TYPING ARENA (STATS + PASSAGE + INPUT)
   ═══════════════════════════════════════════════════════════════════════════ */
.typing-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.typing-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.typing-section-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
}

/* Live Stats Row (4 Metric Cards) */
.stats-bar-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  min-width: 80px;
  flex: 1;
  transition: all var(--trans);
}
.stat-box:hover {
  border-color: var(--c-border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.stat-box-val {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
}
.stat-val-wpm      { color: var(--c-accent); }
.stat-val-netwpm   { color: var(--c-primary); }
.stat-val-accuracy { color: var(--c-success); }
.stat-val-time     { color: var(--c-muted); }
.stat-box-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--c-muted);
  margin-top: 4px;
}

/* My Progress Bar */
.my-progress-wrap {
  height: 8px;
  background: var(--c-surface3);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.my-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #10b981);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.3s ease;
}

/* Text Passage Display */
.text-display-wrap {
  flex: 1;
  overflow-y: auto;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 2.2;
  min-height: 140px;
  max-height: 260px;
  scrollbar-width: thin;
  scrollbar-color: var(--c-border-light) transparent;
  user-select: none;
  scroll-behavior: smooth;
  letter-spacing: 0.4px;
}

/* Character highlight states */
.tch {
  border-radius: 2px;
  transition: color 0.05s, background 0.05s;
}
.tch.correct {
  color: var(--c-success);
  font-weight: 600;
}
.tch.incorrect {
  background: rgba(239, 68, 68, 0.18);
  color: var(--c-danger);
  border-radius: 3px;
  font-weight: 700;
  padding: 0 1px;
}
.tch.cursor {
  border-left: 2.5px solid var(--c-primary);
  background: rgba(99, 102, 241, 0.15);
  animation: cursor-blink 0.8s step-end infinite;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; border-color: var(--c-primary); }
  50%      { opacity: 0.2; }
}

/* Typing Input Textarea */
.typing-input-wrap {
  position: relative;
}
.typing-input {
  width: 100%;
  background: var(--c-surface2);
  border: 2px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--c-text);
  font-size: 16px;
  font-family: var(--font-mono);
  line-height: 1.5;
  outline: none;
  resize: none;
  transition: border-color var(--trans), box-shadow var(--trans);
  box-sizing: border-box;
}
.typing-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
  background: var(--c-surface);
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. INSTAGRAM-STYLE CHAT PANEL (FIXED HEIGHT + INTERNAL SCROLL)
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-panel {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 520px;
  max-height: 520px;
  min-height: 500px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.chat-panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--c-surface);
}
.chat-panel-head h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--c-text);
}

.chat-mute-btn {
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--trans);
}
.chat-mute-btn:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

/* Messages List with Custom Smooth Scrollbar */
.chat-messages-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  max-height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.4) var(--c-surface2);
  scroll-behavior: smooth;
}
.chat-messages-list::-webkit-scrollbar {
  width: 6px;
}
.chat-messages-list::-webkit-scrollbar-track {
  background: var(--c-surface2);
  border-radius: 99px;
}
.chat-messages-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
  border-radius: 99px;
}
.chat-messages-list::-webkit-scrollbar-thumb:hover {
  background: #4f46e5;
}

/* Message Bubbles */
.msg-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.msg-wrap--own {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.msg-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 76%;
}
.msg-sender {
  font-size: 10px;
  font-weight: 800;
  color: var(--c-muted);
  padding: 0 4px;
}

/* Reply Quote Box */
.msg-reply-quote {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid var(--c-primary);
  border-radius: 3px 8px 8px 3px;
  padding: 5px 10px;
  margin-bottom: 4px;
  font-size: 11px;
}
.reply-name {
  font-weight: 800;
  color: var(--c-primary);
  font-size: 10px;
  display: block;
}
.reply-text {
  color: var(--c-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* Message Bubble */
.msg-bubble {
  padding: 9px 14px;
  border-radius: 18px;
  word-break: break-word;
  line-height: 1.5;
  position: relative;
  cursor: default;
  font-size: 13.5px;
  transition: all var(--trans);
}
.msg-bubble--own {
  background: var(--grad-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.msg-bubble--other {
  background: var(--c-surface2);
  color: var(--c-text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--c-border);
}
.msg-bubble--deleted {
  background: var(--c-surface2) !important;
  color: var(--c-muted) !important;
  border: 1px dashed var(--c-border-light) !important;
  box-shadow: none !important;
}
.msg-deleted-text {
  font-size: 12.5px;
  color: var(--c-muted);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Message Actions Toolbar (Reply, React, Delete) */
.msg-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(2px);
  transition: all 0.18s ease;
  padding: 2px 4px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  width: fit-content;
  margin-top: 2px;
}
.msg-wrap--own .msg-actions {
  margin-left: auto;
}
.msg-wrap:hover .msg-actions,
.msg-wrap:focus-within .msg-actions {
  opacity: 1;
  transform: translateY(0);
}
.msg-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 12px;
  color: var(--c-muted);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.msg-action-btn:hover {
  background: var(--c-surface3);
  color: var(--c-text);
  transform: scale(1.18);
}
.msg-action-btn--delete:hover {
  background: rgba(220, 38, 38, 0.12);
  color: var(--c-danger);
}

/* @Mention Badges in Chat */
.chat-mention {
  display: inline-block;
  background: rgba(99, 102, 241, 0.12);
  color: var(--c-primary);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  margin: 0 2px;
  font-size: 0.95em;
  transition: all 0.15s ease;
}
.msg-bubble--own .chat-mention {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.chat-mention--me {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(239, 68, 68, 0.22)) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-weight: 800;
  animation: mentionPulse 2s infinite;
}
@keyframes mentionPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
}

/* @Mention Autocomplete Dropdown */
.chat-mention-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 14px;
  right: 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  padding: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mention-header {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--c-muted);
  padding: 4px 10px;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mention-item:hover,
.mention-item--active {
  background: var(--c-surface2);
  border-color: var(--c-primary);
}
.mention-item--active {
  background: rgba(99, 102, 241, 0.08);
}
.mention-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mention-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
}

/* Smooth Highlight Pulse when jumping to message */
.msg-highlight-pulse {
  animation: msgPulseHighlight 1.5s ease-out;
}
@keyframes msgPulseHighlight {
  0% { transform: scale(1.03); filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.6)); }
  100% { transform: scale(1); filter: none; }
}

.msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
}
.msg-time {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
}
.msg-bubble--other .msg-time {
  color: var(--c-muted);
}
.msg-ticks {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 800;
}
.msg-ticks--seen {
  color: #93c5fd;
}

/* Reactions */
.msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 7px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-full);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--trans);
  box-shadow: var(--shadow-sm);
}
.reaction-chip:hover {
  border-color: var(--c-primary);
  transform: scale(1.15);
}
.rc {
  font-size: 10px;
  font-weight: 800;
  color: var(--c-muted);
}

/* Typing Indicator Banner */
.typing-banner {
  padding: 6px 16px;
  font-size: 11px;
  color: var(--c-muted);
  font-weight: 600;
  border-top: 1px solid var(--c-border);
  display: none;
  background: var(--c-surface);
  flex-shrink: 0;
}

/* Reply Bar */
.chat-reply-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(99, 102, 241, 0.06);
  border-top: 1px solid rgba(99, 102, 241, 0.15);
  flex-shrink: 0;
}
.reply-preview-name {
  font-size: 11px;
  font-weight: 800;
  color: var(--c-primary);
  display: block;
}
.reply-preview-text {
  font-size: 11px;
  color: var(--c-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 220px;
}
.reply-cancel-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c-border);
  color: var(--c-muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  cursor: pointer;
}

/* Quick Emojis Bar */
.quick-emojis-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--c-border);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.quick-emojis-bar::-webkit-scrollbar { display: none; }
.emoji-chip {
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 16px;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: all var(--trans);
  flex-shrink: 0;
}
.emoji-chip:hover {
  border-color: var(--c-primary);
  transform: scale(1.2);
  background: var(--c-surface3);
}

/* Chat Input Area */
.chat-input-area {
  padding: 10px 14px;
  border-top: 1px solid var(--c-border);
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--c-surface);
  flex-shrink: 0;
}
.chat-textarea {
  flex: 1;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--c-text);
  font-size: 13.5px;
  font-family: var(--font);
  line-height: 1.4;
  resize: none;
  outline: none;
  transition: border-color var(--trans);
}
.chat-textarea:focus {
  border-color: var(--c-primary);
  background: var(--c-surface);
}
.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--trans);
  flex-shrink: 0;
  border: none;
}
.chat-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px var(--c-primary-glow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. LOBBY HERO & ROOM CARDS GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.room-lobby-hero {
  padding: 40px 0 30px;
  text-align: center;
}
.room-lobby-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--c-primary);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 16px;
}
.room-lobby-title {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--c-text);
}
.text-grad {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.room-lobby-subtitle {
  color: var(--c-muted);
  font-size: 15px;
  max-width: 680px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.quick-join-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto 28px;
  gap: 8px;
}
.quick-join-input {
  flex: 1;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  color: var(--c-text);
  font-size: 15px;
  font-family: var(--font-mono);
  font-weight: 700;
  outline: none;
  text-transform: uppercase;
  transition: all var(--trans);
  box-shadow: var(--shadow-sm);
}
.quick-join-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}
.quick-join-btn {
  background: var(--grad-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--trans);
  box-shadow: 0 4px 14px var(--c-primary-glow);
}
.quick-join-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--c-primary-glow);
}

/* Stats Strip */
.stats-strip {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 10px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stat-pill-val {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 900;
  color: var(--c-text);
}
.stat-pill-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* Category Tabs */
.cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--trans);
  box-shadow: var(--shadow-sm);
}
.cat-tab:hover {
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.cat-tab.active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--c-primary-glow);
}

/* Grid & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1000px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.room-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all var(--trans);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.room-card:hover {
  border-color: var(--c-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 20px var(--c-primary-glow);
}
.room-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.room-card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--c-text);
}
.room-meta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.room-invite-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--c-surface2);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-xs);
  padding: 6px 12px;
}
.room-invite-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--c-muted);
}
.room-invite-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--c-accent);
}
.room-invite-copy {
  background: none;
  border: none;
  color: var(--c-primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.room-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--c-border);
}
.btn-join {
  background: var(--grad-primary);
  color: #ffffff !important;
  padding: 7px 16px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: all var(--trans);
  box-shadow: 0 2px 8px var(--c-primary-glow);
}
.btn-join:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--c-primary-glow);
}

/* Student Chat Lounge Sidebar Card */
.student-chat-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-decoration: none;
  color: inherit;
  transition: all var(--trans);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.student-chat-card:hover {
  border-color: var(--c-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 20px var(--c-primary-glow);
}
.student-chat-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.student-chat-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 8px 0;
}
.student-chat-desc {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Sidebar Leaderboard Card */
.sidebar-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sidebar-card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-card-body {
  padding: 12px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.badge-ssc     { background: rgba(245, 158, 11, 0.12); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-railway { background: rgba(59, 130, 246, 0.12); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-banking { background: rgba(16, 185, 129, 0.12); color: #059669; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-hc      { background: rgba(236, 72, 153, 0.12); color: #db2777; border: 1px solid rgba(236, 72, 153, 0.3); }
.badge-cpct    { background: rgba(139, 92, 246, 0.12); color: #7c3aed; border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-state   { background: rgba(6, 182, 212, 0.12); color: #0891b2; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-defence { background: rgba(34, 197, 94, 0.12); color: #16a34a; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-general { background: var(--c-surface2); color: var(--c-muted); border: 1px solid var(--c-border); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--trans);
}
.btn-primary {
  background: var(--grad-primary);
  color: #fff !important;
  box-shadow: 0 4px 16px var(--c-primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}
.btn-secondary {
  background: var(--c-surface2);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn-secondary:hover {
  border-color: var(--c-primary);
  background: var(--c-surface3);
}
.btn-chat {
  background: var(--grad-chat);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}
.btn-chat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
}
.btn-full { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 16px; }

/* ═══════════════════════════════════════════════════════════════════════════
   9. MODALS & RESULTS
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-lg);
}
.modal-sm { max-width: 420px; }

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.modal-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--c-border);
}
.modal-title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 900;
  color: var(--c-text);
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-surface2);
  color: var(--c-muted);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans);
  border: none;
}
.modal-close:hover {
  background: var(--c-border);
  color: var(--c-text);
}
.modal-body {
  padding: 24px;
}

.nickname-modal-icon {
  font-size: 48px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.4));
}
.nickname-input {
  width: 100%;
  background: var(--c-surface2);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--c-text);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  outline: none;
  margin-bottom: 16px;
  transition: all var(--trans);
  box-sizing: border-box;
}
.nickname-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  background: var(--c-surface);
}

/* Results Modal */
.results-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.results-modal.active { display: flex; }

.results-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-accent);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  width: 100%;
  max-width: 520px;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 40px var(--c-primary-glow);
  animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.results-trophy {
  font-size: 56px;
  margin-bottom: 14px;
}
.results-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--c-text);
}
.results-sub {
  color: var(--c-muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.results-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.res-stat {
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 12px;
}
.res-stat-val {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  display: block;
}
.res-stat-val--wpm  { color: var(--c-accent); }
.res-stat-val--nwpm { color: var(--c-primary); }
.res-stat-val--acc  { color: var(--c-success); }
.res-stat-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-top: 4px;
}
.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   10. ADSENSE SLOTS & TOASTS
   ═══════════════════════════════════════════════════════════════════════════ */
.ad-slot-room-top {
  margin: 14px auto 8px;
  max-width: 1440px;
  padding: 0 20px;
  text-align: center;
  min-height: 90px;
  overflow: hidden;
  contain: layout size style;
  box-sizing: border-box;
}
.ad-slot-room-sidebar {
  margin-top: 14px;
  text-align: center;
  min-height: 250px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 10px;
  overflow: hidden;
  contain: layout size style;
  box-shadow: var(--shadow-sm);
}
.ad-slot-room-bottom {
  margin: 24px auto;
  max-width: 1440px;
  padding: 0 20px;
  text-align: center;
  min-height: 90px;
  overflow: hidden;
  contain: layout size style;
  box-sizing: border-box;
}

.room-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 999999;
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.room-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
