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

:root {
  --obsidian: #09090d;
  --graphite: #181a1f;
  --chrome: #d9dde7;
  --white: #f6f7fa;
  --neon-cyan: #48f8ff;
  --neon-violet: #bf5bff;
  --neon-purple: #bf5bff;
  --danger: #ff4f7a;
  --success: #34d399;
  --gold: #fbbf24;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --bg-deep: #0c0f14;
  --text-primary: #f6f7fa;
}

* { box-sizing: border-box; }

html {
  background: #06070b;
  overscroll-behavior: none;
}

body {
  margin: 0;
  font-family: "Orbitron", "Eurostile", "Segoe UI", sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 20% 20%, rgba(191, 91, 255, 0.2), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(72, 248, 255, 0.15), transparent 30%),
    linear-gradient(145deg, #06070b, #10131a 70%);
  background-attachment: fixed;
  color: var(--white);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

.noise {
  position: fixed; inset: 0; pointer-events: none; opacity: 0.04;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 4px 4px;
}

.app-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 14px 32px;
  padding-top: max(16px, env(safe-area-inset-top, 16px));
  padding-bottom: max(32px, env(safe-area-inset-bottom, 32px));
  padding-left: max(14px, env(safe-area-inset-left, 14px));
  padding-right: max(14px, env(safe-area-inset-right, 14px));
  min-height: 100vh;
  min-height: 100dvh;
}

/* ═══════════════════════════════
   SCREEN SYSTEM
   ═══════════════════════════════ */
.screen.hidden { display: none !important; }

/* ═══════════════════════════════
   MODE MENU
   ═══════════════════════════════ */
.menu-header {
  text-align: center;
  padding: 28px 0 22px;
}

.menu-logo {
  display: block;
  margin: 0 auto 10px;
  width: clamp(100px, 28vw, 160px);
  height: auto;
  border-radius: 24px;
  box-shadow: 0 0 30px rgba(72, 248, 255, 0.2), 0 0 60px rgba(191, 91, 255, 0.12);
}

.menu-title {
  margin: 8px 0 6px;
  font-size: clamp(1.6rem, 6.5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 20px rgba(72, 248, 255, 0.25),
    0 0 40px rgba(191, 91, 255, 0.18);
}

.menu-sub {
  margin: 0;
  font-size: clamp(0.72rem, 2.2vw, 0.88rem);
  color: rgba(246, 247, 250, 0.6);
  letter-spacing: 0.04em;
}

.mode-toggle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mode-toggle {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 340px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.mode-toggle-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(72, 248, 255, 0.18), rgba(72, 248, 255, 0.08));
  border: 1px solid rgba(72, 248, 255, 0.5);
  box-shadow: 0 0 20px rgba(72, 248, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}
.mode-toggle-indicator.right {
  transform: translateX(100%);
}

.mode-toggle-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.mode-toggle-btn svg {
  transition: color 0.3s, filter 0.3s;
}
.mode-toggle-btn.active {
  color: var(--neon-cyan);
}
.mode-toggle-btn.active svg {
  filter: drop-shadow(0 0 6px rgba(72, 248, 255, 0.4));
}
.mode-toggle-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.65);
}

.mode-toggle-desc {
  margin: 0;
  font-size: 0.7rem;
  color: rgba(246, 247, 250, 0.45);
  letter-spacing: 0.04em;
  text-align: center;
  min-height: 1.4em;
  transition: opacity 0.25s;
}

.btn-go-mode {
  width: 100%;
  max-width: 340px;
  margin-top: 4px;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--neon-cyan), #3dd6e0);
  color: #06070b;
  border: none;
  box-shadow: 0 4px 24px rgba(72, 248, 255, 0.25), 0 0 0 1px rgba(72, 248, 255, 0.15);
  transition: transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
}
.btn-go-mode:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(72, 248, 255, 0.35), 0 0 0 1px rgba(72, 248, 255, 0.3);
}
.btn-go-mode:active {
  transform: scale(0.97);
}

.btn-how-to-play {
  display: block;
  margin: 18px auto 0;
  padding: 8px 24px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--chrome);
  background: transparent;
  border: 1px solid rgba(217, 221, 231, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-how-to-play:hover,
.btn-how-to-play:active {
  color: var(--neon-cyan);
  border-color: rgba(72, 248, 255, 0.4);
  background: rgba(72, 248, 255, 0.06);
}

.rules-dialog {
  text-align: left;
  padding: 24px 22px !important;
  max-height: 80vh;
  overflow-y: auto;
}
.rules-heading {
  text-align: center;
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(72, 248, 255, 0.3);
}
.rules-section {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(72, 248, 255, 0.08);
}
.rules-section-title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--neon-violet);
}
.rules-text {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--chrome);
  line-height: 1.6;
}
.rules-text strong { color: var(--white); }
.rules-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--chrome);
  line-height: 1.7;
}
.rules-list strong { color: var(--white); }

/* ═══════════════════════════════
   SETUP SCREEN
   ═══════════════════════════════ */
.setup-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
}
.setup-top .setup-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-back {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: var(--neon-cyan);
  padding: 8px 14px;
  min-height: 40px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s, transform 0.1s;
}
.btn-back:active { transform: scale(0.95); background: rgba(255,255,255,0.06); }

.btn-lobby-mute {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, transform 0.15s;
}
.btn-lobby-mute:active { transform: scale(0.9); background: rgba(255,255,255,0.12); }

.btn-game-mute {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 8px;
  transition: background 0.2s, transform 0.15s;
  z-index: 2;
}
.btn-game-mute:active { transform: scale(0.9); background: rgba(255,255,255,0.12); }

.speaker-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.btn-speaker {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--chrome);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn-speaker.active {
  background: var(--neon-cyan);
  color: #06070b;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(72,248,255,0.25);
}
.btn-speaker:not(.active):hover { background: rgba(255,255,255,0.1); }
.setup-sublabel {
  font-size: 0.62rem;
  color: var(--chrome);
  opacity: 0.6;
  margin: 0;
}

.room-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.75rem;
  position: relative;
}
.btn-kick {
  margin-left: auto;
  background: none;
  border: 1px solid rgba(255,80,80,0.3);
  color: var(--danger);
  border-radius: 4px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
}
.btn-kick:hover { opacity: 1; background: rgba(255,80,80,0.1); }

.setup-heading {
  margin: 0;
  font-size: clamp(0.95rem, 3vw, 1.2rem);
  letter-spacing: 0.1em;
}

.setup-block {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

.setup-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
}

.setup-info {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: rgba(246,247,250,0.6);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
  transition: color 0.3s;
}

/* ── Setup Playlist Preview ── */
.playlist-btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.playlist-btn-row .btn-full { flex: 1; }
.playlist-help-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(72, 248, 255, 0.5);
  background: rgba(72, 248, 255, 0.1);
  color: var(--neon-cyan);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.playlist-help-btn:hover,
.playlist-help-btn:active {
  background: rgba(72, 248, 255, 0.25);
  border-color: var(--neon-cyan);
  transform: scale(1.1);
}
.playlist-help-tip.hidden { display: none; }
.playlist-help-tip {
  position: relative;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(72, 248, 255, 0.08), rgba(191, 91, 255, 0.06));
  border: 1px solid rgba(72, 248, 255, 0.25);
  backdrop-filter: blur(8px);
  animation: helpSlideIn 0.25s ease-out;
}
@keyframes helpSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.playlist-help-arrow {
  position: absolute;
  top: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: rgba(72, 248, 255, 0.1);
  border-left: 1px solid rgba(72, 248, 255, 0.25);
  border-top: 1px solid rgba(72, 248, 255, 0.25);
  transform: rotate(45deg);
}
.playlist-help-heading {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--neon-cyan);
  text-transform: uppercase;
}
.playlist-help-steps {
  margin: 0;
  padding-left: 22px;
  list-style: none;
  counter-reset: step;
}
.playlist-help-steps li {
  counter-increment: step;
  position: relative;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--chrome);
  line-height: 1.7;
  padding-left: 4px;
  margin-bottom: 6px;
}
.playlist-help-steps li::before {
  content: counter(step);
  position: absolute;
  left: -20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(72, 248, 255, 0.15);
  color: var(--neon-cyan);
  font-size: 0.52rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 1px;
}
.playlist-help-steps li strong {
  color: var(--white);
}
.help-dots {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 0.75rem;
  line-height: 1;
  vertical-align: middle;
}

.setup-playlist-list {
  margin-bottom: 10px;
}
.setup-pl-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: rgba(72, 248, 255, 0.06);
  border: 1px solid rgba(72, 248, 255, 0.12);
  font-size: 0.72rem;
  filter: blur(4px);
  user-select: none;
  -webkit-user-select: none;
}
.setup-pl-name {
  color: var(--white);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}
.setup-pl-count {
  color: var(--neon-cyan);
  font-weight: 400;
  white-space: nowrap;
}

/* ── Playlist Modal Added List ── */
.playlist-added-list {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(72, 248, 255, 0.04);
  border: 1px solid rgba(72, 248, 255, 0.12);
}
.playlist-added-list:empty {
  display: none;
}
.playlist-added-title {
  margin: 0 0 8px;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
}
.playlist-added-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  font-size: 0.7rem;
  color: rgba(246,247,250,0.8);
  filter: blur(4px);
  user-select: none;
  -webkit-user-select: none;
}
.playlist-added-num {
  color: var(--neon-cyan);
  font-weight: 900;
  font-size: 0.6rem;
  min-width: 16px;
  filter: none;
}
.playlist-added-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playlist-added-count {
  color: var(--success);
  font-weight: 700;
  white-space: nowrap;
  filter: none;
}
.playlist-added-total {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.03em;
}

.player-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.player-row {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 12px;
}

.player-avatar-pick {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 2px dashed rgba(255,255,255,0.2);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.player-avatar-pick:has(.player-avatar-img.uploaded) { border-style: solid; border-color: var(--gold); }
.player-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.player-avatar-img.hidden { display: none; }
.player-avatar-placeholder { font-size: 1rem; color: rgba(255,255,255,0.35); pointer-events: none; }
.player-avatar-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.player-row input[type="text"] {
  flex: 1;
  padding: 8px 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #f6f7fa;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
}

.player-row input[type="text"]:focus {
  outline: none;
}

.btn-remove-player {
  width: 28px; height: 28px;
  border: 0; border-radius: 8px;
  background: rgba(255, 79, 122, 0.15);
  color: var(--danger);
  font-size: 1rem;
  cursor: pointer;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.btn-remove-player:hover { background: rgba(255, 79, 122, 0.3); }

/* ── Artist search autocomplete ── */
.artist-search-wrap { position: relative; }

.artist-dropdown {
  position: fixed;
  z-index: 100000;
  background: #141822;
  border: 1px solid rgba(72, 248, 255, 0.3);
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.05) inset;
}
.artist-dropdown.hidden { display: none; }

.artist-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.artist-dd-item:hover, .artist-dd-item.active {
  background: rgba(72, 248, 255, 0.08);
}
.artist-dd-img {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
}
.artist-dd-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.artist-dd-fans {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-left: auto;
}

/* ── Artist tags ── */
.artist-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.artist-tags:empty { display: none; }

.artist-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(72, 248, 255, 0.12), rgba(191, 91, 255, 0.08));
  border: 1px solid rgba(72, 248, 255, 0.3);
  border-radius: 24px;
  padding: 6px 12px 6px 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(72, 248, 255, 0.1);
  animation: tagPop 0.25s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes tagPop {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.artist-tag-img {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(72, 248, 255, 0.3);
}
.artist-tag-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(72, 248, 255, 0.12);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.artist-tag-name {
  letter-spacing: 0.02em;
}
.artist-tag-remove {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  line-height: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.artist-tag-remove:hover {
  color: #fff;
  background: var(--danger);
}

/* ═══════════════════════════════
   GAME SCREEN
   ═══════════════════════════════ */
.turn-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 0 0 14px 14px;
  margin: 0 -14px 12px;
  border: 1px solid rgba(72, 248, 255, 0.25);
  background: linear-gradient(165deg, rgba(14, 17, 25, 0.99), rgba(8, 10, 15, 0.99));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.turn-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.turn-label {
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: rgba(246,247,250,0.5);
}

.turn-name {
  margin: 2px 0 0;
  font-size: clamp(0.9rem, 3.5vw, 1.2rem);
  font-weight: 900;
  color: var(--neon-cyan);
  letter-spacing: 0.04em;
}

.turn-chips {
  margin: 2px 0 0;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold);
  text-align: right;
}

/* ── Game Card ── */
.game-card {
  position: relative;
  min-height: 200px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(72, 248, 255, 0.3);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(14px) brightness(0.4);
  transform: scale(1.2);
}

.game-card-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(191, 91, 255, 0.12), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(72, 248, 255, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(9,9,13,0.2), rgba(9,9,13,0.7) 60%, rgba(9,9,13,0.92));
}

.game-card-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 28px 20px;
}

.gc-round {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: rgba(246,247,250,0.5);
}

.gc-main {
  margin: 8px 0;
  font-size: clamp(2.4rem, 10vw, 4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(72, 248, 255, 0.3);
  min-height: 94px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gc-sub {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(246,247,250,0.7);
}

.gc-year {
  font-size: clamp(2.6rem, 10vw, 4.2rem);
  background: linear-gradient(180deg, #ffffff 5%, #c7cfdd 50%, #7f8ca3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gc-artist {
  font-size: 1rem;
  color: #f6f7fa;
  letter-spacing: 0.06em;
}

.gc-song {
  font-size: 0.9rem;
  color: #dbe1ec;
}

/* ── Phase Actions ── */
.phase-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.phase-actions .btn { width: 100%; text-align: center; }
.phase-actions .btn-full { grid-column: 1 / -1; }

/* ── Timeline ── */
.timeline-section {
  margin-bottom: 14px;
  padding: 14px 10px;
  border: 1px solid rgba(72, 248, 255, 0.18);
  max-width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(165deg, rgba(14, 17, 25, 0.7), rgba(8, 10, 15, 0.8));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}

.tl-heading {
  margin: 0 0 10px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(72, 248, 255, 0.25);
  font-weight: 700;
}

.timeline-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(72, 248, 255, 0.2) transparent;
}
.timeline-scroll::-webkit-scrollbar { height: 4px; }
.timeline-scroll::-webkit-scrollbar-track { background: transparent; }
.timeline-scroll::-webkit-scrollbar-thumb {
  background: rgba(72, 248, 255, 0.2);
  border-radius: 4px;
}

.timeline-track {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 110px;
  padding: 4px 0;
}

.tl-empty {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(246,247,250,0.35);
  padding: 24px 16px;
  width: 100%;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.tl-card {
  flex-shrink: 0;
  width: 100px;
  padding: 0;
  border-radius: 12px;
  text-align: center;
  border: 1.5px solid rgba(72, 248, 255, 0.2);
  background: linear-gradient(160deg, #1c2130, #0f141c);
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255,255,255,0.06) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tl-card:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(72, 248, 255, 0.1);
  border-color: rgba(72, 248, 255, 0.35);
}

.tl-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(4px) brightness(0.4) saturate(1.2);
  transform: scale(1.15);
}

.tl-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(9, 9, 13, 0.1) 0%,
    rgba(9, 9, 13, 0.3) 40%,
    rgba(9, 9, 13, 0.85) 100%);
  pointer-events: none;
}

.tl-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding: 10px 8px 12px;
}

.tl-card-year {
  margin: 0 0 4px;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fff 0%, #e0e4ec 40%, #a0aab8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
  line-height: 1;
}

.tl-card-artist {
  margin: 0;
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(246,247,250,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.03em;
  width: 100%;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.tl-card-song {
  margin: 2px 0 0;
  font-size: 0.52rem;
  font-weight: 400;
  color: rgba(246,247,250,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Timeline slots (gaps for placement) */
.tl-slot {
  flex-shrink: 0;
  width: 44px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.tl-slot-active {
  cursor: pointer;
  touch-action: manipulation;
}

.tl-slot-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px dashed rgba(72, 248, 255, 0.3);
  background: rgba(72, 248, 255, 0.04);
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  color: rgba(72, 248, 255, 0.5);
  font-size: 1.2rem;
  display: grid; place-items: center;
  box-sizing: border-box;
  -webkit-appearance: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tl-slot-active .tl-slot-btn {
  border-color: rgba(72, 248, 255, 0.45);
  background: rgba(72, 248, 255, 0.06);
  animation: slotBreath 2.5s ease-in-out infinite;
}
@keyframes slotBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(72, 248, 255, 0); transform: scale(1); }
  50% { box-shadow: 0 0 12px rgba(72, 248, 255, 0.15); transform: scale(1.08); }
}

.tl-slot-active .tl-slot-btn:hover {
  border-color: var(--neon-cyan);
  background: rgba(72, 248, 255, 0.15);
  color: var(--neon-cyan);
  box-shadow: 0 0 18px rgba(72, 248, 255, 0.3);
  transform: scale(1.2);
  animation: none;
}

.tl-slot-selected .tl-slot-btn {
  border-color: var(--neon-violet);
  background: rgba(191, 91, 255, 0.25);
  color: var(--neon-violet);
  box-shadow: 0 0 20px rgba(191, 91, 255, 0.4);
  transform: scale(1.25);
  animation: none;
  border-style: solid;
}

.tl-slot-blocked {
  opacity: 0.3 !important;
  pointer-events: none !important;
  cursor: not-allowed;
}
.tl-slot-blocked .tl-slot-btn {
  border-color: rgba(246, 247, 250, 0.12) !important;
  background: rgba(246, 247, 250, 0.03) !important;
  color: rgba(246, 247, 250, 0.25) !important;
  font-size: 0.85rem;
  cursor: not-allowed;
  animation: none !important;
}

.tl-slot-placed .tl-slot-btn {
  border-color: var(--neon-cyan);
  background: rgba(72, 248, 255, 0.4);
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  color: var(--neon-cyan);
  border-style: solid;
  border-width: 2px;
  font-size: 1.15rem;
  box-sizing: border-box;
  animation: placePulse 1.5s ease-in-out infinite;
}
.tl-slot-bet .tl-slot-btn {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.35);
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  color: var(--gold);
  border-style: solid;
  border-width: 2px;
  font-size: 1.15rem;
  box-sizing: border-box;
  animation: chipPulse 1.5s ease-in-out infinite;
}
.tl-slot-placed.tl-slot-bet .tl-slot-btn {
  border-color: var(--neon-cyan);
  background: linear-gradient(135deg, rgba(72, 248, 255, 0.4), rgba(251, 191, 36, 0.35));
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  animation: placePulse 1.5s ease-in-out infinite;
}
.tl-place-badge {
  position: absolute;
  top: calc(50% + 34px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(72, 248, 255, 0.4);
}
.tl-bet-badge {
  position: absolute;
  top: calc(50% + 34px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}
.tl-place-badge + .tl-bet-badge {
  top: calc(50% + 46px);
}
@keyframes chipPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(251, 191, 36, 0.2); }
  50% { box-shadow: 0 0 16px rgba(251, 191, 36, 0.5); }
}
@keyframes placePulse {
  0%, 100% { box-shadow: 0 0 6px rgba(72, 248, 255, 0.2); }
  50% { box-shadow: 0 0 16px rgba(72, 248, 255, 0.5); }
}

.tl-connector {
  flex-shrink: 0;
  width: 6px;
  height: 2px;
  background: linear-gradient(90deg, rgba(72, 248, 255, 0.08), rgba(72, 248, 255, 0.2), rgba(72, 248, 255, 0.08));
  border-radius: 1px;
}

/* ── Scoreboard ── */
.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.sb-player {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sb-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.streak-badge.fire {
  background: rgba(255, 80, 0, 0.2);
  color: #ff5500;
  animation: streakPulse 0.8s ease-in-out infinite alternate;
}
.streak-badge.legend {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 140, 0, 0.25));
  color: #ffd700;
  animation: streakPulse 0.6s ease-in-out infinite alternate;
}
@keyframes streakPulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.sb-player.sb-active {
  border-color: rgba(72, 248, 255, 0.35);
  background: rgba(72, 248, 255, 0.04);
}

.sb-player.sb-left {
  opacity: 0.35;
}

.sb-name {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: rgba(246,247,250,0.7);
}

.sb-stats {
  margin: 4px 0 0;
  font-size: 0.62rem;
  color: rgba(246,247,250,0.45);
}

.sb-chips {
  color: var(--gold);
  font-weight: 700;
}

.sb-cards {
  color: var(--neon-cyan);
}

/* ── Game Footer ── */
.game-footer {
  text-align: center;
  padding-top: 8px;
}

/* ═══════════════════════════════
   GENERAL BUTTONS
   ═══════════════════════════════ */
.btn {
  border: 0;
  border-radius: 12px;
  padding: 14px 14px;
  min-height: 48px;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-transform: uppercase;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
}
.btn.btn-hero-playlist,
.btn.btn-success,
.btn.btn-gold,
.btn.btn-share-whatsapp,
.btn.btn-go-mode,
.btn.btn-hero-ready.ready-active {
  color: #06070b;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: scale(0.96); filter: brightness(0.92); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 14px;
  border-radius: 14px;
  font-size: 0.78rem;
  min-height: 52px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.btn-hero-playlist {
  background: linear-gradient(135deg, #48f8ff, #0891b2);
  color: #06070b;
  box-shadow: 0 4px 18px rgba(72, 248, 255, 0.25);
}
.btn-hero-playlist:hover:not(:disabled) {
  background: linear-gradient(135deg, #6afaff, #0ea5c9);
  box-shadow: 0 6px 24px rgba(72, 248, 255, 0.35);
}

.btn-hero-reveal {
  background: linear-gradient(135deg, var(--neon-violet), #6a2dcc);
  box-shadow: 0 4px 18px rgba(191, 91, 255, 0.25);
}
.btn-hero-reveal:hover:not(:disabled) {
  background: linear-gradient(135deg, #d070ff, #7a3de0);
  box-shadow: 0 6px 24px rgba(191, 91, 255, 0.35);
}
@keyframes reveal-pulse {
  0%   { box-shadow: 0 0 8px rgba(191,91,255,0.4), 0 0 20px rgba(191,91,255,0.15); }
  50%  { box-shadow: 0 0 18px rgba(191,91,255,0.7), 0 0 40px rgba(191,91,255,0.3), 0 0 60px rgba(72,248,255,0.12); }
  100% { box-shadow: 0 0 8px rgba(191,91,255,0.4), 0 0 20px rgba(191,91,255,0.15); }
}
.btn-reveal-ready {
  animation: reveal-pulse 1.5s ease-in-out infinite;
}

.start-row {
  position: relative;
}
.start-hint {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ff4d4d;
  margin: 4px 0 0;
  min-height: 1em;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 77, 77, 0.4);
}

.btn-primary { background: linear-gradient(90deg, var(--neon-violet), #7950ff); }
.btn-secondary { background: #22252f; }
.btn-scan {
  background: linear-gradient(90deg, #1f2d3c, #274f6d);
  box-shadow: 0 0 0 1px rgba(191, 91, 255, 0.35) inset;
}
.btn-success {
  background: linear-gradient(135deg, #059669, #047857);
  color: #06070b;
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.2);
}
.btn-gold {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #06070b;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.2);
}
.btn-danger {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}
.btn-banner-leave {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 5px 16px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
}
.btn-share-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #06070b;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.2);
  margin-top: 10px;
  font-size: 0.85rem;
}
.btn-share-whatsapp:hover:not(:disabled) {
  background: linear-gradient(135deg, #2ee872, #1aa06b);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.btn-clue {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}
.btn-clue:disabled {
  background: #2a2040;
  box-shadow: none;
}

.btn-full { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.68rem; border-radius: 8px; }

.btn-loaded {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(52, 211, 153, 0.08));
  border: 1.5px solid rgba(52, 211, 153, 0.4);
  color: var(--success);
  cursor: default;
  opacity: 1 !important;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.1);
}
.btn-loaded:disabled {
  opacity: 1 !important;
}

/* ── Clue Area ── */
.clue-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px;
  margin-bottom: 8px;
}
.clue-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 10px;
  padding: 8px 12px;
  animation: clueReveal 0.4s ease-out;
}
.clue-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.clue-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(191, 91, 255, 0.8);
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 70px;
}
.clue-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.12em;
  font-family: 'Courier New', monospace;
}
@keyframes clueReveal {
  from { opacity: 0; transform: translateY(-8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════
   MODALS
   ═══════════════════════════════ */
.scan-modal {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.78);
  z-index: 9999;
}
.scan-modal.hidden { display: none; }

.scan-dialog {
  width: min(94vw, 460px);
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  padding: 0;
  background: #0f131b;
  border: 1px solid rgba(72, 248, 255, 0.35);
}
.scan-dialog-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 8px;
}
.scan-dialog > .scan-actions {
  flex: 0 0 auto;
  padding: 8px 16px 16px;
  background: #0f131b;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.scan-title {
  margin: 0 0 10px;
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
  font-size: 0.85rem;
}

.scan-video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: #07090d;
  border: 1px solid rgba(255,255,255,0.15);
}

.scan-status {
  margin: 10px 0;
  font-size: 0.78rem;
  color: rgba(246,247,250,0.9);
}

.playlist-input {
  width: 100%;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #0b1018;
  color: #f6f7fa;
  font-family: inherit;
  font-size: 16px;
  min-height: 48px;
}
.playlist-textarea {
  resize: vertical;
  min-height: 80px;
  max-height: 200px;
  line-height: 1.5;
  font-size: 14px;
}

.playlist-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
}
.playlist-loader.hidden { display: none; }

.loader-progress-wrap {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid rgba(72, 248, 255, 0.12);
}
.loader-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet));
  box-shadow: 0 0 12px rgba(72, 248, 255, 0.4);
  transition: width 0.4s ease;
  position: relative;
}
.loader-progress-bar.indeterminate {
  width: 30% !important;
  animation: progressIndeterminate 1.5s ease-in-out infinite;
}
@keyframes progressIndeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.loader-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(72, 248, 255, 0.15);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin { to { transform: rotate(360deg); } }

.loader-text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--neon-cyan);
  letter-spacing: 0.06em;
  text-align: center;
}

.scan-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

#scan-file-input { display: none; }

.guess-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.guess-input-row .guess-input {
  margin-bottom: 0;
}
.btn-voice-mic {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-voice-mic:active { transform: scale(0.9); }
.btn-voice-mic.recording {
  background: rgba(255, 50, 50, 0.25);
  border-color: var(--danger);
  box-shadow: 0 0 12px rgba(255,50,50,0.4);
  animation: voice-pulse 1s ease-in-out infinite;
}
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255,50,50,0.3); }
  50% { box-shadow: 0 0 18px rgba(255,50,50,0.6); }
}
.guess-input {
  width: 100%;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #0b1018;
  color: #f6f7fa;
  font-family: inherit;
  font-size: 16px;
  min-height: 48px;
}
.guess-input:focus {
  outline: none;
  border-color: var(--neon-violet);
  box-shadow: 0 0 0 2px rgba(191, 91, 255, 0.15);
}

.guess-feedback {
  margin: 14px 0 10px;
  padding: 16px;
  border-radius: 14px;
  text-align: center;
  animation: fadeUp 0.35s ease-out;
}
.guess-feedback.hidden {
  display: none;
}
.guess-feedback.guess-correct {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.06));
  border: 1.5px solid var(--success);
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.25);
}
.guess-feedback.guess-wrong {
  background: linear-gradient(135deg, rgba(255, 79, 122, 0.2), rgba(255, 79, 122, 0.06));
  border: 1.5px solid var(--danger);
  box-shadow: 0 0 24px rgba(255, 79, 122, 0.25);
}
.guess-feedback-emoji {
  font-size: 2.4rem;
  margin-bottom: 6px;
  animation: emojiPop 0.4s ease-out;
}
.guess-feedback-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}
.guess-correct .guess-feedback-text { color: var(--success); text-shadow: 0 0 10px rgba(52, 211, 153, 0.5); }
.guess-wrong .guess-feedback-text { color: var(--danger); text-shadow: 0 0 10px rgba(255, 79, 122, 0.5); }

.guess-timer-bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(246, 247, 250, 0.1);
  overflow: hidden;
}
.guess-timer-fill {
  height: 100%;
  border-radius: 2px;
  width: 100%;
  transform-origin: left;
  transition: transform 3s linear;
}
.guess-correct .guess-timer-fill { background: var(--success); }
.guess-wrong .guess-timer-fill { background: var(--danger); }
.guess-timer-fill.shrinking { transform: scaleX(0); }

.bet-timeline-wrap {
  margin: 14px 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(72, 248, 255, 0.08);
}

/* ── Result Celebration Modal ── */
.result-dialog {
  padding: 14px 14px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 92vh;
  max-height: 92dvh;
  position: relative;
}
.result-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 15, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 0;
  border-radius: inherit;
}
.result-dialog > * {
  position: relative;
  z-index: 1;
}

.result-emoji-wrap {
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1;
  margin: 2px 0 2px;
  animation: emojiPop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  filter: drop-shadow(0 0 20px rgba(72, 248, 255, 0.3));
}

.result-big-title {
  margin: 4px 0 4px;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 900;
  animation: titleSlam 0.45s cubic-bezier(0.2, 1.5, 0.4, 1) both 0.15s;
}

.result-card {
  position: relative;
  width: 50%;
  max-width: 180px;
  aspect-ratio: 3 / 4;
  margin: 4px auto 6px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(72, 248, 255, 0.35);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 16px rgba(72,248,255,0.12);
  animation: fadeUp 0.45s ease both 0.2s;
}
.rc-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.rc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9,9,13,0.15) 0%, rgba(9,9,13,0.65) 55%, rgba(9,9,13,0.92) 100%);
}
.rc-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding: 16px 12px;
  text-align: center;
}
.rc-year {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--neon-cyan);
  text-shadow: 0 0 18px rgba(72,248,255,0.5), 0 2px 6px rgba(0,0,0,0.6);
  line-height: 1;
  margin-bottom: 6px;
}
.rc-artist {
  font-size: clamp(0.7rem, 2.8vw, 0.9rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  line-height: 1.2;
}
.rc-song {
  font-size: clamp(0.58rem, 2.2vw, 0.75rem);
  font-weight: 400;
  color: rgba(246,247,250,0.7);
  letter-spacing: 0.03em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  line-height: 1.2;
  margin-top: 2px;
}

.result-big-sub {
  margin: 2px 0 6px;
  font-size: clamp(0.75rem, 2.5vw, 0.95rem);
  color: rgba(246,247,250,0.85);
  font-weight: 400;
  animation: fadeUp 0.4s ease both 0.3s;
}

.result-celebrate {
  border-color: var(--success) !important;
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.25) inset,
    0 0 60px rgba(52, 211, 153, 0.15),
    0 22px 60px rgba(0, 0, 0, 0.7) !important;
}
.result-celebrate .result-big-title {
  text-shadow: 0 0 30px rgba(52, 211, 153, 0.5), 0 0 60px rgba(52, 211, 153, 0.25);
}

.result-fail {
  border-color: var(--danger) !important;
  box-shadow:
    0 0 0 1px rgba(255, 79, 122, 0.25) inset,
    0 0 40px rgba(255, 79, 122, 0.1),
    0 22px 60px rgba(0, 0, 0, 0.7) !important;
  animation: shake 0.45s ease both;
}
.result-fail .result-big-title {
  text-shadow: 0 0 30px rgba(255, 79, 122, 0.5), 0 0 60px rgba(255, 79, 122, 0.2);
}

.result-details {
  margin: 6px 0 2px;
  text-align: left;
  font-size: 0.75rem;
  color: rgba(246,247,250,0.75);
  line-height: 1.5;
}

.result-details p {
  margin: 3px 0;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}
.result-chip { color: var(--gold); font-weight: 700; }
.result-correct { color: var(--success); font-weight: 700; }
.result-wrong { color: var(--danger); font-weight: 700; }

/* ── Share Row (game-over) ── */
.result-share-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0 4px;
}
.result-share-row.hidden { display: none; }
.btn-share-result, .btn-copy-result, .btn-challenge-friend {
  padding: 8px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: transform 0.15s, opacity 0.15s;
}
.btn-share-result {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
  color: #06070b;
}
.btn-copy-result {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-challenge-friend {
  background: linear-gradient(135deg, var(--gold), #ff9800);
  color: #06070b;
}
.btn-share-result:active, .btn-copy-result:active, .btn-challenge-friend:active {
  transform: scale(0.96);
}

.result-modal-timer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(246, 247, 250, 0.08);
  border-radius: 0 0 18px 18px;
  overflow: hidden;
}
.result-modal-timer-fill {
  height: 100%;
  width: 100%;
  transform-origin: left;
  background: var(--neon-cyan);
  border-radius: 0 0 18px 18px;
  transition: none;
}
.result-modal-timer-fill.running {
  transition: transform 15s linear;
  transform: scaleX(0);
}
.result-celebrate .result-modal-timer-fill { background: var(--success); }
.result-fail .result-modal-timer-fill { background: var(--danger); }

/* ── Confetti ── */
.confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.confetti-piece {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.9;
  animation: confettiFall 2s ease-in forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg) scale(0.5); opacity: 0; }
}
@keyframes emojiPop {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes titleSlam {
  0% { transform: scale(2.5) translateY(-10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes fadeUp {
  0% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-8px) rotate(-1deg); }
  30% { transform: translateX(8px) rotate(1deg); }
  45% { transform: translateX(-6px); }
  60% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

/* ── Turn Timer Bar ── */
.turn-timer-bar {
  position: relative;
  height: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 5px;
  overflow: hidden;
  margin: 4px 0 8px;
}
.turn-timer-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--neon-cyan);
  border-radius: 5px;
  transition: width 1s linear, background 0.3s;
  width: 100%;
  box-shadow: 0 0 6px var(--neon-cyan);
}
.turn-timer-fill.warning { background: var(--gold); }
.turn-timer-fill.critical { background: var(--danger); animation: timer-pulse 0.5s ease-in-out infinite; }
@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
/* ── Digital Clock Timer ── */
.turn-timer-clock {
  text-align: center;
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(72,248,255,0.5), 0 0 30px rgba(72,248,255,0.2);
  padding: 4px 0 8px;
  line-height: 1;
  display: none;
}
.turn-timer-clock.warning {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(251,191,36,0.5), 0 0 30px rgba(251,191,36,0.2);
}
.turn-timer-clock.critical {
  color: var(--danger);
  text-shadow: 0 0 12px rgba(239,68,68,0.6), 0 0 30px rgba(239,68,68,0.3);
  animation: timer-pulse 0.5s ease-in-out infinite;
}
.turn-timer-text-unused {
  display: none;
}

/* ── Cards to Win slider ── */
.cards-to-win-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cards-to-win-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.12);
  outline: none;
}
.cards-to-win-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--neon-cyan);
  cursor: pointer;
  border: 2px solid #06070b;
}
.cards-to-win-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--neon-cyan);
  cursor: pointer;
  border: 2px solid #06070b;
}
.cards-to-win-val {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--neon-cyan);
  min-width: 28px;
  text-align: center;
}

/* ── Daily Challenge ── */

/* Menu button */
.btn-daily {
  position: relative;
  display: block;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ff9800 100%);
  color: #06070b;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 0.84rem;
  margin: 14px auto 0;
  letter-spacing: 0.06em;
  border: none;
  cursor: pointer;
  width: fit-content;
  min-width: 220px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.25s;
  box-shadow: 0 4px 20px rgba(251,191,36,0.3);
}
.btn-daily:hover { box-shadow: 0 6px 28px rgba(251,191,36,0.45); }
.btn-daily:active { transform: scale(0.97); }
.daily-streak-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 900;
  border-radius: 10px;
  padding: 2px 7px;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Daily header */
.daily-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 8px;
}
.daily-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--gold);
  margin: 0;
  display: flex;
  align-items: center;
}

/* Daily body */
.daily-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 4px 20px 28px;
  text-align: center;
}
.daily-info { max-width: 360px; }

/* Day badge */
.daily-day-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}
.daily-day-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--neon-cyan);
  line-height: 1;
  text-shadow: 0 0 20px rgba(72,248,255,0.35);
}
.daily-day-sub {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(246,247,250,0.45);
  margin-top: 2px;
}
.daily-desc {
  font-size: 0.78rem;
  color: rgba(246,247,250,0.6);
  margin: 0;
  line-height: 1.6;
}

/* Stats panel */
.daily-stats-panel {
  display: flex;
  gap: 0;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px 0;
  width: 100%;
  max-width: 320px;
}
.daily-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.daily-stat + .daily-stat {
  border-left: 1px solid rgba(255,255,255,0.08);
}
.daily-stat-val {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
}
.daily-stat-streak { color: var(--gold); }
.daily-stat-lbl {
  font-size: 0.58rem;
  color: rgba(246,247,250,0.45);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* Histogram */
.daily-histogram {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 300px;
}
.daily-histo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
}
.daily-histo-label {
  width: 28px;
  text-align: right;
  font-weight: 700;
  font-size: 0.65rem;
  color: rgba(246,247,250,0.55);
}
.daily-histo-bar {
  height: 20px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet));
  opacity: 0.8;
  min-width: 4px;
  transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.daily-histo-count {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(246,247,250,0.45);
}

/* Play button */
.btn-daily-play {
  background: linear-gradient(135deg, #fbbf24 0%, #ff9800 100%);
  color: #06070b;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s;
  box-shadow: 0 4px 18px rgba(251,191,36,0.3);
}
.btn-daily-play:hover { box-shadow: 0 6px 24px rgba(251,191,36,0.45); }
.btn-daily-play:active { transform: scale(0.97); }
.btn-daily-play:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* Already played + countdown */
.daily-already-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.daily-already-wrap.hidden { display: none; }
.daily-already {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 700;
  margin: 0;
}
.daily-countdown {
  font-size: 0.72rem;
  color: rgba(246,247,250,0.5);
  margin: 0;
}
#daily-countdown-time {
  font-weight: 700;
  color: var(--neon-cyan);
  font-variant-numeric: tabular-nums;
}

/* Daily game layout — fit everything in one screen */
#screen-daily-game:not(.hidden) {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}
#screen-daily-game .game-card {
  min-height: 120px;
  max-height: 24vh;
  flex-shrink: 1;
  margin-bottom: 6px;
}
#screen-daily-game .gc-main { min-height: 50px; font-size: clamp(1.6rem, 4vw, 2.4rem); }
#screen-daily-game .gc-round { font-size: 0.55rem; margin-bottom: 2px; }
#screen-daily-game .gc-sub { font-size: 0.65rem; margin-top: 4px; }
#screen-daily-game .vinyl-record { width: 60px; height: 60px; }
#screen-daily-game .vinyl-record::after { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
#screen-daily-game .phase-actions { padding: 4px 0; flex-shrink: 0; }
#screen-daily-game .timeline-section {
  flex: 1;
  min-height: 80px;
  overflow-y: auto;
  margin-bottom: 0;
}

/* Daily game turn banner */
.daily-turn-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px 50px;
  flex-shrink: 0;
}
.daily-quit-btn {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  min-height: 32px;
  font-size: 0.65rem;
}
.daily-turn-round {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.daily-score-live {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--neon-cyan);
  background: rgba(72,248,255,0.08);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(72,248,255,0.15);
}

/* Progress dots */
.daily-progress-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 4px;
  flex-shrink: 0;
}
.daily-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.2);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.daily-dot.active {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(72,248,255,0.5);
}
.daily-dot.correct {
  background: var(--success);
  border-color: var(--success);
}
.daily-dot.wrong {
  background: var(--danger);
  border-color: var(--danger);
}

/* Challenge intro */
.challenge-intro-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 20px;
  max-width: 320px;
}
.challenge-intro-emoji {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.challenge-score-line {
  margin-top: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--neon-cyan);
}

/* Daily loading spinner */
.daily-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(246,247,250,0.6);
  font-size: 0.78rem;
}
.daily-loading.hidden { display: none; }
.daily-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Daily Timer ── */
.daily-timer-wrap {
  flex-shrink: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}
.daily-timer-wrap.hidden { display: none !important; }
.daily-timer-clock {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--neon-cyan);
  text-shadow: 0 0 14px rgba(72,248,255,0.5), 0 0 40px rgba(72,248,255,0.15);
  line-height: 1;
  min-width: 56px;
  text-align: center;
}
.daily-timer-clock.warning {
  color: var(--gold);
  text-shadow: 0 0 14px rgba(251,191,36,0.5), 0 0 40px rgba(251,191,36,0.15);
}
.daily-timer-clock.critical {
  color: var(--danger);
  text-shadow: 0 0 14px rgba(239,68,68,0.6), 0 0 40px rgba(239,68,68,0.2);
  animation: timer-pulse 0.5s ease-in-out infinite;
}

/* ── Daily Dramatic Result Overlay ── */
.daily-result-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: daily-overlay-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  overflow: hidden;
}
.daily-result-correct {
  background: radial-gradient(ellipse at center, rgba(52,211,153,0.25) 0%, rgba(0,0,0,0.85) 70%);
}
.daily-result-wrong {
  background: radial-gradient(ellipse at center, rgba(255,79,122,0.25) 0%, rgba(0,0,0,0.85) 70%);
}
.daily-result-emoji {
  font-size: 4rem;
  animation: daily-emoji-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  margin-bottom: 8px;
}
.daily-result-verdict {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: daily-verdict-slide 0.4s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.daily-result-correct .daily-result-verdict {
  color: var(--success);
  text-shadow: 0 0 20px rgba(52,211,153,0.6), 0 0 60px rgba(52,211,153,0.2);
}
.daily-result-wrong .daily-result-verdict {
  color: var(--danger);
  text-shadow: 0 0 20px rgba(255,79,122,0.6), 0 0 60px rgba(255,79,122,0.2);
}
.daily-result-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  animation: daily-verdict-slide 0.4s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.daily-result-year {
  font-size: 2rem;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 16px rgba(72,248,255,0.5);
}
.daily-result-song {
  font-size: 0.8rem;
  color: rgba(246,247,250,0.7);
  text-align: center;
  max-width: 280px;
}

/* Confetti particles */
.daily-confetti {
  position: absolute;
  top: -8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: daily-confetti-fall 1.2s ease-in forwards;
}
@keyframes daily-confetti-fall {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) translateX(var(--drift)) rotate(720deg); opacity: 0; }
}

@keyframes daily-overlay-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes daily-emoji-pop {
  0% { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes daily-verdict-slide {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.daily-result-fade-out {
  animation: daily-overlay-out 0.4s ease-in forwards !important;
}
@keyframes daily-overlay-out {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Screen shake for wrong answers */
.daily-result-wrong ~ #screen-daily-game,
body:has(.daily-result-wrong) #screen-daily-game {
  animation: shake 0.5s ease-in-out;
}

/* ── Flip / Permission Modals ── */
.flip-modal {
  position: fixed; inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  padding-top: max(12px, env(safe-area-inset-top, 12px));
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 20% 25%, rgba(191, 91, 255, 0.28), transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(72, 248, 255, 0.2), transparent 42%),
    rgba(4, 6, 10, 0.92);
  backdrop-filter: blur(4px);
}
.flip-modal.hidden { display: none; }

.flip-dialog {
  width: min(96vw, 560px);
  margin: auto;
  border-radius: 18px;
  padding: 20px 16px;
  text-align: center;
  border: 1px solid rgba(72, 248, 255, 0.45);
  background: linear-gradient(165deg, rgba(14, 17, 25, 0.98), rgba(8, 10, 15, 0.98));
  box-shadow:
    0 0 0 1px rgba(191, 91, 255, 0.22) inset,
    0 22px 60px rgba(0, 0, 0, 0.7);
}

.flip-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--neon-cyan);
}

.flip-title {
  margin: 10px 0 6px;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(72, 248, 255, 0.3),
    0 0 34px rgba(191, 91, 255, 0.24);
}

.flip-subtitle {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: rgba(246,247,250,0.8);
}

.flip-status {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: #ffccf0;
}

.flip-icon {
  font-size: 2.6rem;
  color: var(--neon-cyan);
  animation: flipSpin 1.2s linear infinite;
}

@keyframes flipSpin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.08); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ── Return Banner ── */
.return-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 11000;
  padding: 14px 16px;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
  background: linear-gradient(170deg, rgba(14, 17, 25, 0.97), rgba(8, 10, 15, 0.97));
  border-top: 2px solid var(--neon-cyan);
  text-align: center;
  animation: bannerSlideUp 0.35s ease-out;
}
.return-banner.hidden { display: none; }
.return-banner-inner { max-width: 560px; margin: 0 auto; }
.return-banner-text {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--neon-cyan);
}

@keyframes bannerSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ═══════════════════════════════
   ANIMATIONS
   ═══════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.3s ease-out; }

/* ═══════════════════════════════
   ONLINE MODE
   ═══════════════════════════════ */

.online-choice {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 4px;
}
.online-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.5;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}
.online-divider::before,
.online-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}
.online-code-input {
  font-family: "JetBrains Mono", "SF Mono", monospace;
}

.room-code-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--bg-deep);
  padding: 4px 14px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 5px;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}
.btn-copy-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  margin-left: 8px;
  vertical-align: middle;
  cursor: pointer;
  padding: 0;
  color: var(--chrome);
  transition: background 0.2s, transform 0.15s, color 0.2s;
}
.btn-copy-code:active { transform: scale(0.9); }
.btn-copy-code:hover { background: rgba(255,255,255,0.12); color: var(--neon-cyan); }

.room-players-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.avatar-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar-name-row .playlist-input { flex: 1; }
.avatar-pick {
  position: relative;
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 2px dashed rgba(255,255,255,0.25);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-pick:has(.avatar-img:not(.hidden)) { border-style: solid; border-color: var(--gold); }
.avatar-placeholder {
  font-size: 1.4rem;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-img.hidden { display: none; }
.avatar-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.avatar-sm {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-sm-empty {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
}
.sb-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.room-player-row {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
}
.room-host-tag {
  display: inline-block;
  background: linear-gradient(145deg, #fcd34d, var(--gold));
  color: #0c0f14;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  text-shadow: none;
}
.room-you-tag {
  background: var(--neon-purple);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.room-ready-tag {
  background: var(--success);
  color: #fff;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-left: auto;
}
.room-notready-tag {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-left: auto;
}
.btn-hero-ready {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.25);
  margin-top: 12px;
  font-size: 1.1rem;
  transition: all 0.2s;
}
.btn-hero-ready:hover:not(:disabled) {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.35);
}
.btn-hero-ready.ready-active,
.btn-hero-ready.ready-active:disabled {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #06070b;
  box-shadow: 0 4px 18px rgba(52, 211, 153, 0.25);
  opacity: 1;
  cursor: default;
}

.room-track-info {
  opacity: 0.7;
  font-size: 0.9rem;
  margin: 4px 0 10px;
}

.room-host-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.room-guest-info {
  text-align: center;
  padding: 20px 0;
}
.room-waiting-msg {
  opacity: 0.7;
  font-size: 1rem;
  font-weight: 600;
}

.online-room-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.room-chat {
  margin-top: 4px;
}
.room-chat-messages {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 12px;
  height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 8px;
  scroll-behavior: smooth;
}
.chat-msg {
  font-size: 0.85rem;
  line-height: 1.4;
  word-break: break-word;
}
.chat-msg-name {
  font-weight: 700;
  margin-right: 5px;
}
.chat-msg-you .chat-msg-name { color: var(--neon-cyan); }
.chat-msg-other .chat-msg-name { color: var(--gold); }
.chat-msg-text { opacity: 0.9; }
.room-chat-input-row {
  display: flex;
  gap: 8px;
}
.room-chat-input {
  flex: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  min-height: 44px;
  outline: none;
}
.room-chat-input:focus {
  border-color: var(--neon-cyan);
}
.btn-chat-send {
  background: linear-gradient(135deg, var(--neon-cyan), #0891b2);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.btn-chat-send:active { transform: scale(0.95); filter: brightness(0.85); }

.ol-your-turn-banner {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: #fff;
  text-align: center;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.1em;
  border-radius: 8px;
  margin-bottom: 8px;
  animation: pulse 1.5s ease-in-out infinite;
}
.ol-your-turn-banner.hidden { display: none; }

.ol-waiting-text {
  text-align: center;
  opacity: 0.6;
  font-size: 0.95rem;
  padding: 12px 0;
  font-weight: 600;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.reactions-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  flex-wrap: wrap;
}
.reactions-bar button {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 0.72rem;
  cursor: pointer;
  color: var(--white);
  font-family: inherit;
  letter-spacing: 0.03em;
  transition: transform 0.1s, background 0.15s;
}
.reactions-bar button:active {
  transform: scale(0.9);
  background: rgba(255,255,255,0.12);
}

.reaction-toasts {
  position: fixed;
  bottom: 80px;
  left: 0; right: 0;
  pointer-events: none;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

@keyframes toast-float {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  15% { opacity: 1; transform: translateY(0) scale(1); }
  85% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.8); }
}

.reaction-toast {
  background: rgba(0,0,0,0.75);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 0.75rem;
  color: var(--white);
  font-family: 'Orbitron', sans-serif;
  animation: toast-float 2.5s ease forwards;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

@keyframes spin-record {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes record-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(72,248,255,0.2), 0 0 50px rgba(191,91,255,0.08); }
  50%      { box-shadow: 0 0 36px rgba(72,248,255,0.4), 0 0 80px rgba(191,91,255,0.18); }
}
@keyframes tonearm-drop {
  0%   { transform: rotate(-30deg); }
  80%  { transform: rotate(20deg); }
  100% { transform: rotate(17deg); }
}
@keyframes eq-bar {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.vinyl-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.vinyl-record {
  display: block;
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 28%, rgba(40,40,40,0.6) 28.5%, transparent 29%),
    radial-gradient(circle, transparent 32%, rgba(60,60,60,0.4) 32.5%, transparent 33%),
    radial-gradient(circle, transparent 38%, rgba(50,50,50,0.5) 38.5%, transparent 39%),
    radial-gradient(circle, transparent 44%, rgba(60,60,60,0.3) 44.5%, transparent 45%),
    radial-gradient(circle, transparent 50%, rgba(40,40,40,0.5) 50.5%, transparent 51%),
    radial-gradient(circle, transparent 56%, rgba(55,55,55,0.4) 56.5%, transparent 57%),
    radial-gradient(circle, transparent 62%, rgba(45,45,45,0.5) 62.5%, transparent 63%),
    radial-gradient(circle, transparent 68%, rgba(60,60,60,0.3) 68.5%, transparent 69%),
    radial-gradient(circle, transparent 74%, rgba(50,50,50,0.4) 74.5%, transparent 75%),
    radial-gradient(circle, transparent 80%, rgba(40,40,40,0.5) 80.5%, transparent 81%),
    radial-gradient(circle, transparent 86%, rgba(55,55,55,0.3) 86.5%, transparent 87%),
    radial-gradient(circle, transparent 92%, rgba(45,45,45,0.4) 92.5%, transparent 93%),
    radial-gradient(circle, #0a0a0a 100%);
  border: 2px solid rgba(255,255,255,0.06);
  animation: spin-record 1.8s linear infinite;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.6));
}
.vinyl-record::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(255,255,255,0.03) 0deg,
    transparent 30deg,
    rgba(255,255,255,0.02) 90deg,
    transparent 120deg,
    rgba(255,255,255,0.04) 180deg,
    transparent 210deg,
    rgba(255,255,255,0.02) 270deg,
    transparent 300deg,
    rgba(255,255,255,0.03) 360deg
  );
  pointer-events: none;
}
.vinyl-record::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(9,9,13,0.8) 20%, transparent 21%),
    radial-gradient(circle, rgba(72,248,255,0.15) 45%, transparent 46%),
    linear-gradient(135deg, rgba(72,248,255,0.3), rgba(191,91,255,0.3));
  border: 1.5px solid rgba(72,248,255,0.3);
  box-shadow: 0 0 12px rgba(72,248,255,0.3), 0 0 24px rgba(191,91,255,0.15);
}

.vinyl-tonearm {
  position: absolute;
  top: 2px;
  right: 6px;
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, #555, #777 60%, #999);
  border-radius: 2px;
  transform-origin: calc(100% - 6px) 50%;
  transform: rotate(17deg);
  animation: tonearm-drop 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  z-index: 2;
}
.vinyl-tonearm::before {
  content: "";
  position: absolute;
  right: -2px; top: -6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #888, #555);
  border: 1px solid #777;
}
.vinyl-tonearm::after {
  content: "";
  position: absolute;
  left: -4px; top: -2px;
  width: 5px; height: 8px;
  background: linear-gradient(180deg, #ddd, #999);
  border-radius: 1px 1px 2px 2px;
  clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.vinyl-eq {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 20px;
}
.vinyl-eq-bar {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-violet));
  transform-origin: bottom;
  animation: eq-bar 0.6s ease-in-out infinite;
}
.vinyl-eq-bar:nth-child(1) { height: 14px; animation-delay: 0s; }
.vinyl-eq-bar:nth-child(2) { height: 20px; animation-delay: 0.15s; }
.vinyl-eq-bar:nth-child(3) { height: 10px; animation-delay: 0.3s; }
.vinyl-eq-bar:nth-child(4) { height: 18px; animation-delay: 0.1s; }
.vinyl-eq-bar:nth-child(5) { height: 12px; animation-delay: 0.25s; }
.vinyl-eq-bar:nth-child(6) { height: 16px; animation-delay: 0.05s; }
.vinyl-eq-bar:nth-child(7) { height: 8px; animation-delay: 0.2s; }

.vinyl-playing-text {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: rgba(72, 248, 255, 0.7);
  text-transform: uppercase;
  font-weight: 700;
}

/* ── Streaming Links & Deezer Attribution ── */
.streaming-links {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.streaming-heading {
  margin: 0 0 6px;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246,247,250,0.5);
}
.streaming-btns {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.streaming-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 18px;
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #fff;
  transition: transform 0.12s, filter 0.15s;
  white-space: nowrap;
}
.streaming-btn:active { transform: scale(0.95); }
.streaming-btn:hover { filter: brightness(1.15); }
.streaming-btn svg { flex-shrink: 0; width: 14px; height: 14px; }
.streaming-deezer { background: linear-gradient(135deg, #a238ff, #7c1ddb); }
.streaming-apple { background: linear-gradient(135deg, #fc3c44, #d42b33); }
.streaming-spotify { background: linear-gradient(135deg, #1db954, #148a3c); }
.deezer-attribution {
  margin: 8px 0 0;
  font-size: 0.52rem;
  color: rgba(246,247,250,0.4);
  letter-spacing: 0.03em;
}
.deezer-attribution a {
  color: #a238ff;
  text-decoration: none;
  font-weight: 700;
}
.deezer-attribution a:hover { text-decoration: underline; }

@media (max-width: 360px) {
  .streaming-btns { gap: 4px; }
  .streaming-btn {
    padding: 6px 10px;
    font-size: 0.55rem;
    min-height: 32px;
  }
  .streaming-btn svg { width: 12px; height: 12px; }
  .streaming-btn span { display: none; }
}

/* ── Curated Playlists ── */
.curated-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.curated-heading {
  margin: 0 0 10px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--neon-violet);
  text-align: center;
}
.curated-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(191,91,255,0.3) transparent;
}
.curated-grid::-webkit-scrollbar { width: 4px; }
.curated-grid::-webkit-scrollbar-track { background: transparent; }
.curated-grid::-webkit-scrollbar-thumb {
  background: rgba(191,91,255,0.3);
  border-radius: 4px;
}
.curated-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(191, 91, 255, 0.2);
  background: linear-gradient(160deg, rgba(191, 91, 255, 0.06), rgba(72, 248, 255, 0.03));
  cursor: pointer;
  font-family: inherit;
  color: var(--white);
  text-align: center;
  transition: transform 0.12s, border-color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.curated-card:hover {
  border-color: var(--neon-violet);
  box-shadow: 0 4px 16px rgba(191, 91, 255, 0.15);
  transform: translateY(-1px);
}
.curated-card:active { transform: scale(0.97); }
.curated-icon { font-size: 1.6rem; line-height: 1; }
.curated-name {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.3;
}
.curated-desc {
  font-size: 0.55rem;
  color: rgba(246,247,250,0.5);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.curated-count {
  font-size: 0.55rem;
  color: var(--neon-cyan);
  font-weight: 700;
}

.curated-card.curated-loaded {
  position: relative;
  opacity: 0.5;
  border-color: rgba(52, 211, 153, 0.3);
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6));
  pointer-events: none;
}
.curated-card.curated-loaded .curated-icon { opacity: 0.4; }
.curated-card.curated-loaded .curated-name { opacity: 0.6; }
.curated-card.curated-loaded .curated-desc { display: none; }
.curated-card.curated-loaded .curated-count {
  color: var(--success);
}
.curated-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(52, 211, 153, 0.4);
  z-index: 1;
}

@media (max-width: 360px) {
  .app-shell { padding: 12px 10px 28px; }
  .curated-grid { gap: 6px; max-height: 220px; }
  .curated-card { padding: 10px 6px; }
  .curated-icon { font-size: 1.3rem; }
  .curated-name { font-size: 0.58rem; }
  .curated-desc { display: none; }
  .tl-card { width: 88px; }
  .tl-slot { width: 38px; }
  .tl-slot-btn { width: 34px; height: 34px; font-size: 1rem; }
  .game-card { min-height: 180px; }
  .setup-block { padding: 12px 10px; }
  .btn-hero { padding: 14px 10px; font-size: 0.72rem; }
  .sb-name { font-size: 0.62rem; }
  .turn-timer-clock { font-size: 1.8rem; }
}

/* ═══════════════════════════════
   DESKTOP / TABLET WEB LAYOUT
   ═══════════════════════════════ */
@media (min-width: 420px) {
  .app-shell { padding: 20px 18px 36px; }
  .tl-card { width: 110px; }
  .tl-slot { width: 48px; }
  .tl-slot-btn { width: 40px; height: 40px; }
  .timeline-track { min-height: 120px; }
  .game-card { min-height: 220px; }
  #screen-daily-game .game-card { min-height: 140px; max-height: 26vh; }
  .setup-block { padding: 16px; }
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 720px;
    padding: 28px 32px 48px;
  }
  .menu-header { padding: 48px 0 32px; }
  .mode-toggle { max-width: 380px; }
  .mode-toggle-btn { padding: 16px 14px; font-size: 0.9rem; }
  .game-card { min-height: 280px; border-radius: 22px; }
  #screen-daily-game .game-card { min-height: 160px; max-height: 30vh; }
  .gc-main { min-height: 110px; font-size: clamp(2.8rem, 6vw, 4.2rem); }
  .vinyl-record { width: 160px; height: 160px; }
  .vinyl-record::after { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  #screen-daily-game .vinyl-record { width: 90px; height: 90px; }
  #screen-daily-game .vinyl-record::after { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
  .timeline-section { padding: 20px 18px; border-radius: 20px; }
  .timeline-scroll { padding: 10px 0; }
  .tl-card { width: 130px; }
  .tl-card-year { font-size: 1.5rem; }
  .tl-card-artist { font-size: 0.68rem; }
  .tl-card-song { font-size: 0.58rem; }
  .tl-slot { width: 56px; min-height: 130px; }
  .tl-slot-btn { width: 42px; height: 42px; font-size: 1.2rem; }
  .timeline-track { min-height: 140px; }
  .sb-player { padding: 12px 16px; }
  .scoreboard { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .flip-dialog { max-width: 520px; padding: 28px 24px; }
  .btn { padding: 14px 28px; font-size: 0.88rem; }
  .btn-hero { min-height: 54px; font-size: 0.82rem; }
  .btn-sm { padding: 10px 18px; }
  .result-dialog { padding: 20px 22px 18px; max-height: 88vh; }
  .result-card { width: 55%; max-width: 220px; }
  .result-emoji-wrap { font-size: clamp(2.4rem, 6vw, 3.6rem); }
  .result-big-title { font-size: clamp(2rem, 5vw, 3rem); }
  .streaming-btn { padding: 9px 18px; font-size: 0.7rem; min-height: 40px; }
  .streaming-btn svg { width: 16px; height: 16px; }
  .curated-grid { grid-template-columns: 1fr 1fr 1fr; max-height: 320px; gap: 12px; }
  .curated-card { padding: 14px 10px; }
  .curated-icon { font-size: 1.8rem; }
  .curated-name { font-size: 0.72rem; }
  .curated-desc { font-size: 0.58rem; }
  .scan-dialog { max-height: 85vh; }
  .scan-dialog-body { padding: 20px 20px 8px; }
  .scan-dialog > .scan-actions { padding: 8px 20px 20px; }
  .setup-block { padding: 18px; margin-bottom: 20px; }
  .player-avatar-pick { width: 48px; height: 48px; min-width: 48px; }
  .room-chat-messages { height: 180px; }
}

@media (min-width: 1024px) {
  .app-shell {
    max-width: 860px;
    padding: 36px 48px 56px;
  }
  .menu-header { padding: 60px 0 40px; }
  .mode-toggle { max-width: 420px; }
  .mode-toggle-btn { padding: 18px 16px; font-size: 0.95rem; }
  .game-card { min-height: 320px; }
  #screen-daily-game .game-card { min-height: 180px; max-height: 32vh; }
  .gc-main { min-height: 120px; }
  .vinyl-record { width: 180px; height: 180px; }
  .vinyl-record::after { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
  #screen-daily-game .vinyl-record { width: 100px; height: 100px; }
  #screen-daily-game .vinyl-record::after { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
  .timeline-section { padding: 24px 22px; }
  .tl-card { width: 150px; }
  .tl-card-year { font-size: 1.7rem; }
  .tl-card-artist { font-size: 0.72rem; }
  .tl-card-song { font-size: 0.62rem; }
  .tl-slot { width: 60px; min-height: 150px; }
  .tl-slot-btn { width: 46px; height: 46px; font-size: 1.3rem; }
  .timeline-track { min-height: 160px; }
  .curated-grid { grid-template-columns: repeat(4, 1fr); max-height: 360px; }
  .streaming-btns { gap: 10px; }
  .streaming-btn { padding: 10px 22px; font-size: 0.75rem; }
  .flip-dialog { padding: 32px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .vinyl-record { animation: spin-record 2s linear infinite !important; }
  .vinyl-eq-bar { animation: none !important; transform: scaleY(0.5) !important; }
}

/* Toast notifications */
.ol-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: rgba(20, 20, 30, 0.92);
  color: #fff;
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(72, 248, 255, 0.2);
}
.ol-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Ghost cards */
.ghost-cards-section {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}
.ghost-cards-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.ghost-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin: 3px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  opacity: 0.4;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.03);
}
.ghost-year {
  font-weight: 700;
  color: var(--gold);
}
.ghost-info {
  color: rgba(255, 255, 255, 0.5);
}

/* Teams mode */
.teams-toggle-row {
  margin: 12px 0;
}
.teams-switch-wrap {
  margin-bottom: 8px;
}
.teams-switch {
  position: relative;
  display: flex;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 3px;
  gap: 0;
}
.teams-switch-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: linear-gradient(135deg, var(--neon-cyan), #36d1c4);
  border-radius: 11px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(72,248,255,0.25);
  z-index: 0;
}
.teams-switch-indicator.right {
  transform: translateX(100%);
}
.teams-switch-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: rgba(255,255,255,0.40);
  cursor: pointer;
  transition: color 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.teams-switch-btn.active {
  color: #06070b;
}
.teams-switch-btn svg {
  flex-shrink: 0;
}
.team-assignments {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.team-col {
  flex: 1;
  padding: 8px;
  border-radius: 10px;
  text-align: center;
}
.team-col h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 6px;
}
.team-a {
  background: rgba(72, 248, 255, 0.08);
  border: 1px solid rgba(72, 248, 255, 0.2);
}
.team-a h4 { color: var(--neon-cyan); }
.team-b {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
}
.team-b h4 { color: var(--gold); }
.team-tag {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 8px;
  margin: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}
.sb-team {
  border-left: 3px solid transparent;
}
.sb-team .sb-name { font-weight: 700; }
.sb-team-members {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}
