@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --primary: #C2B280;
  --primary-light: #E8D5B7;
  --primary-dark: #F5E6CC;
  --secondary: #8B7355;
  --secondary-light: #FFFDE7;
  --accent: #EC4899;
  --success: #10B981;
  --danger: #EF4444;
  --bg: #0F0E17;
  --bg-surface: #1A1929;
  --bg-card: #232136;
  --bg-elevated: #2D2B4A;
  --text: #FFFFFE;
  --text-muted: #A7A7BE;
  --text-dim: #6B6B80;
  --border: #3A3855;
  --glow-primary: rgba(108, 60, 225, 0.3);
  --glow-secondary: rgba(245, 158, 11, 0.3);
  --glow-accent: rgba(236, 72, 153, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Fredoka', sans-serif;
}

::selection {
  background: var(--primary);
  color: var(--text);
}

/* Loading Screen */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1rem;
}

.loading-dots {
  display: flex;
  gap: 8px;
}

.loading-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  animation: bounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Role Selection */
.role-select-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at 20% 50%, var(--glow-primary) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, var(--glow-accent) 0%, transparent 50%),
    var(--bg);
}

.role-select-container {
  max-width: 560px;
  width: 100%;
  text-align: center;
}

.logo-area {
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.logo-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 20px var(--glow-primary));
}

.logo-area h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.role-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  color: var(--text);
  font-family: inherit;
  animation: fadeInUp 0.6s ease-out both;
}

.role-card:nth-child(1) { animation-delay: 0.15s; }
.role-card:nth-child(2) { animation-delay: 0.25s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.host-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 8px 30px var(--glow-primary);
}

.player-card:hover {
  border-color: var(--secondary);
  box-shadow: 0 8px 30px var(--glow-secondary);
}

.role-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.role-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.role-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* App Container */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon-sm {
  font-size: 1.5rem;
}

.header-left h1 {
  font-size: 1.25rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.role-badge {
  background: var(--bg-elevated);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.app-main {
  flex: 1;
  padding: 1.5rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
  font-family: 'Fredoka', sans-serif;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--glow-primary);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Fredoka', sans-serif;
}

.btn-danger:hover {
  opacity: 0.85;
}

/* Tab Bar */
.tab-bar {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-surface);
  padding: 0.35rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  padding: 0.6rem 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Fredoka', sans-serif;
}

.tab-btn.active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.tab-btn:hover:not(.active) {
  color: var(--text);
}

/* Host Setup */
.setup-panel {
  animation: fadeInUp 0.4s ease-out;
}

.setup-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.pool-toggle {
  margin-bottom: 1rem;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.toggle-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.custom-pool-input {
  margin-bottom: 1.25rem;
}

.custom-pool-input label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.custom-pool-input textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.custom-pool-input textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--glow-primary);
}

.pool-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.default-pool-info {
  background: var(--bg-surface);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--primary);
}

.default-pool-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.warning-text {
  color: var(--secondary);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* Call Panel */
.call-panel {
  animation: fadeInUp 0.4s ease-out;
}

.current-call-area {
  text-align: center;
  margin-bottom: 2rem;
}

.current-call-display {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 200px;
  box-shadow: 0 0 40px var(--glow-primary);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--glow-primary); }
  50% { box-shadow: 0 0 50px var(--glow-primary), 0 0 80px rgba(108,60,225,0.1); }
}

.current-call-display.waiting {
  border-color: var(--border);
  box-shadow: none;
  animation: none;
}

.call-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.call-value {
  font-family: 'Fredoka', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.call-stats {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.call-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.call-btn {
  min-width: 200px;
}

.called-items-grid h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.called-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.called-chip {
  background: var(--bg-elevated);
  color: var(--secondary-light);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Fredoka', sans-serif;
  border: 1px solid var(--border);
  animation: chipIn 0.3s ease-out both;
}

@keyframes chipIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Players Panel */
.players-panel h2,
.winners-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  animation: fadeInUp 0.3s ease-out both;
}

.player-item:nth-child(1) { animation-delay: 0s; }
.player-item:nth-child(2) { animation-delay: 0.05s; }
.player-item:nth-child(3) { animation-delay: 0.1s; }
.player-item:nth-child(4) { animation-delay: 0.15s; }
.player-item:nth-child(5) { animation-delay: 0.2s; }

.player-name {
  font-weight: 600;
}

.player-marks {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.winner-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.winner-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--secondary);
  box-shadow: 0 4px 15px var(--glow-secondary);
  animation: fadeInUp 0.4s ease-out both;
}

.winner-item:nth-child(1) { animation-delay: 0s; }
.winner-item:nth-child(2) { animation-delay: 0.1s; }
.winner-item:nth-child(3) { animation-delay: 0.2s; }

.winner-rank {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
}

.winner-name {
  font-weight: 600;
  flex: 1;
}

.winner-pattern {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.6;
}

/* Player Waiting */
.player-waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.waiting-content {
  text-align: center;
  animation: fadeInUp 0.5s ease-out;
}

.waiting-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
  animation: bounce 1.5s ease-in-out infinite;
}

.waiting-content h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.player-name-display {
  margin-top: 1rem;
  color: var(--text-dim);
}

/* Player View */
.player-view {
  position: relative;
}

.call-ticker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 20px var(--glow-primary);
}

.ticker-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.ticker-value {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-light);
}

.ticker-count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Bingo Card */
.card-container {
  margin-bottom: 1.5rem;
}

.bingo-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 2px solid var(--border);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.bingo-header-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.bingo-header-cell {
  text-align: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  color: white;
  letter-spacing: 0.05em;
}

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
}

.bingo-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  padding: 0;
}

.bingo-cell:hover:not(:disabled):not(.marked) {
  border-color: var(--primary-light);
  background: var(--bg-elevated);
}

.bingo-cell.callable {
  border-color: var(--secondary);
  background: rgba(245, 158, 11, 0.08);
  animation: subtlePulse 1.5s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 12px var(--glow-secondary); }
}

.bingo-cell.current-highlight {
  border-color: var(--secondary-light);
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 15px var(--glow-secondary);
}

.bingo-cell.marked {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary-light);
  color: white;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.bingo-cell.free-cell {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  border-color: var(--secondary);
  color: white;
  cursor: default;
}

.bingo-cell.disabled {
  cursor: default;
}

.cell-text {
  font-size: 0.85rem;
  line-height: 1;
  z-index: 1;
}

.cell-stamp {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.3;
  font-weight: 700;
}

/* Bingo Banner */
.bingo-banner {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.25rem;
  animation: celebrateIn 0.5s ease-out;
}

@keyframes celebrateIn {
  from { opacity: 0; transform: scale(0.8) rotate(-2deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.bingo-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  display: block;
  letter-spacing: 0.15em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.bingo-banner p {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

/* Called History (Player) */
.called-history {
  margin-top: 1rem;
}

.called-history h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.history-chip {
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: 'Fredoka', sans-serif;
  border: 1px solid var(--border);
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  background: var(--color);
  border-radius: 2px;
  animation: confettiFall 3s ease-in forwards;
  animation-delay: var(--delay);
  opacity: 0;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg);
  }
}

/* Lobby */
.lobby-screen {
  padding: 1.5rem;
}

.lobby-players {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lobby-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

/* Responsive */
@media (max-width: 640px) {
  .role-cards {
    grid-template-columns: 1fr;
  }

  .role-card {
    padding: 1.5rem 1.25rem;
  }

  .role-emoji {
    font-size: 2.5rem;
  }

  .app-header {
    padding: 0.6rem 1rem;
  }

  .header-left h1 {
    font-size: 1rem;
  }

  .app-main {
    padding: 1rem;
  }

  .tab-bar {
    gap: 0.15rem;
    padding: 0.25rem;
  }

  .tab-btn {
    padding: 0.5rem 0.5rem;
    font-size: 0.75rem;
  }

  .call-value {
    font-size: 2.5rem;
  }

  .current-call-display {
    padding: 1.5rem;
  }

  .bingo-card {
    padding: 0.5rem;
  }

  .bingo-header-cell {
    font-size: 1rem;
    padding: 0.35rem;
  }

  .bingo-grid {
    gap: 0.25rem;
  }

  .cell-text {
    font-size: 0.7rem;
  }

  .cell-stamp {
    font-size: 1.1rem;
  }

  .ticker-value {
    font-size: 1.2rem;
  }

  .bingo-text {
    font-size: 1.5rem;
  }

  .call-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .call-btn {
    min-width: unset;
  }
}

@media (max-width: 380px) {
  .bingo-header-cell {
    font-size: 0.85rem;
    padding: 0.25rem;
  }

  .cell-text {
    font-size: 0.6rem;
  }
}
```

<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to Bingo Night! Choose your role — Host to run the game, or Player to join and play.", "view": "any", "highlight_selector": ".role-cards", "wait_for": "user_interaction"},
  {"step": 2, "narration": "As the Host, go to the Setup tab. You can use the standard B-I-N-G-O number pool or enter your own custom words.", "view": "host", "highlight_selector": ".setup-panel", "wait_for": "tap_to_continue"},
  {"step": 3, "narration": "Click 'Start New Game' to generate the game. Players will automatically receive their unique bingo cards.", "view": "host", "highlight_selector": ".btn-large", "wait_for": "user_interaction"},
  {"step": 4, "narration": "Switch to the Call Board tab. Press 'Call Next' to randomly draw and announce an item. The current call lights up with a glowing display.", "view": "host", "highlight_selector": ".call-btn", "wait_for": "user_interaction"},
  {"step": 5, "narration": "As a Player, your unique bingo card appears automatically. Called items highlight in gold — tap them to mark!", "view": "player", "highlight_selector": ".bingo-card", "wait_for": "tap_to_continue"},
  {"step": 6, "narration": "When you complete a row, column, or diagonal, BINGO is detected automatically with confetti and a victory banner!", "view": "player", "highlight_selector": ".bingo-banner", "wait_for": "tap_to_continue"},
  {"step": 7, "narration": "The Host can track all connected players in the Players tab and see winners in the Winners tab. Have fun!", "view": "host", "highlight_selector": ".tab-bar", "wait_for": "tap_to_continue"}
]
-->

.lobby-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.lobby-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.lobby-room-controls {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.room-select-wrap label,
.room-create-wrap label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.room-select,
.room-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.75rem 0.9rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

.room-select:focus,
.room-input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--glow-primary);
}

.room-create-row {
  display: flex;
  gap: 0.75rem;
}

.room-create-row .btn-primary {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .room-create-row {
    flex-direction: column;
  }
}

.lobby-presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.lobby-presence-badge .online-dot {
  width: 8px;
  height: 8px;
}

.call-timer-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.call-timer-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.call-timer-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.call-timer-value {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.25rem;
  color: var(--secondary-light);
}

.call-timer-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.call-interval-control {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.call-interval-control input[type="range"] {
  width: 160px;
  accent-color: var(--primary-light);
}

@media (max-width: 640px) {
  .call-timer-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .call-timer-controls {
    width: 100%;
    justify-content: space-between;
  }

  .call-interval-control {
    width: 100%;
    flex-wrap: wrap;
  }

  .call-interval-control input[type="range"] {
    width: 100%;
  }
}

.room-invite-wrap {
  display: grid;
  gap: 0.5rem;
}

.room-invite-box {
  display: grid;
  gap: 0.75rem;
}

.room-invite-input {
  width: 100%;
}

.room-invite-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.room-share-btn {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
}

.room-invite-help {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.room-invite-status {
  color: var(--secondary-light);
  font-size: 0.85rem;
  font-weight: 500;
}

@media (max-width: 640px) {
  .room-invite-actions {
    flex-direction: column;
  }
}

.host-view {
  position: relative;
}

.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  background: var(--color);
  border-radius: 2px;
  animation: confettiFall 3s ease-in forwards;
  animation-delay: var(--delay);
  opacity: 0;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg);
  }
}
