/* ==========================================================================
   HITSTER MUSIC TRIVIA MOBILE CSS
   ========================================================================== */

:root {
  --bg-dark: #0b0d17;
  --bg-card: rgba(22, 27, 46, 0.75);
  --border-glass: rgba(255, 255, 255, 0.12);
  --primary-accent: #7928ca;
  --primary-glow: #ff0080;
  --secondary-accent: #00dfd8;
  --success: #00e676;
  --danger: #ff1744;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-glow: 0 10px 30px rgba(255, 0, 128, 0.3);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button,
input[type="button"],
input[type="submit"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(121, 40, 202, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(255, 0, 128, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(0, 223, 216, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  padding: 10px 10px 16px 10px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  min-height: 44px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-icon {
  font-size: 1.25rem;
  animation: pulse 2s infinite alternate;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #00dfd8, #ff0080);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Badges & Pills */
.badge {
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-glow));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge.audio-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary-accent);
}

.preset-btn {
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-heading);
}

.preset-btn:hover {
  background: rgba(255, 0, 85, 0.2);
  border-color: #ff0055;
}

.audio-provider-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.provider-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.provider-btn.active[data-provider="youtube"] {
  background: linear-gradient(135deg, #ff0000, #ff0055);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.4);
}

.provider-btn.active[data-provider="spotify"] {
  background: linear-gradient(135deg, #1db954, #1ed760);
  color: #000;
  box-shadow: 0 2px 8px rgba(29, 185, 84, 0.4);
}

/* Screens System */
.screen {
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Glassmorphism Card */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.hero-title {
  text-align: center;
  margin-bottom: 20px;
}

.hero-title h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 6px;
  line-height: 1.4;
}

/* Buttons */
.btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-glow));
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-success {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #000;
}

.btn-large {
  padding: 13px 20px;
  font-size: 1.05rem;
  border-radius: var(--radius-xl);
}

.w-full {
  width: 100%;
}

.glow {
  box-shadow: var(--shadow-glow);
}

.glow:hover {
  box-shadow: 0 12px 36px rgba(255, 0, 128, 0.5);
}

/* Section Box */
.section-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 10px;
}

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

.section-header h3, .section-box h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

/* Team Inputs */
.teams-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.team-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 6px 12px;
}

.team-color-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
}

.team-input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  outline: none;
}

.btn-remove-team {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

.btn-remove-team:hover {
  color: var(--danger);
}

/* Language Selector Row */
.lang-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.lang-label {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Rule Setting Groups (consistent vertical stacking) */
.rule-select-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
  width: 100%;
}

.rule-select-group--last {
  margin-bottom: 4px;
}

.rule-select-group label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Button Toggle Groups inside .rule-select-group get no extra margin */
.rule-select-group .win-mode-toggle {
  margin: 0;
}

/* Win Condition & Timeline Mode Button Toggles */
.win-mode-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}

#timeline-mode-toggle {
  grid-template-columns: repeat(2, 1fr);
}

.mode-btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.25;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: normal;
  word-break: normal;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.mode-btn.active {
  background: var(--primary-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(121, 40, 202, 0.4);
}

/* Dropdown Selects */
.custom-select {
  background: rgba(22, 27, 46, 0.95);
  border: 1px solid var(--border-glass);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.custom-select--inline {
  width: auto;
  min-width: 150px;
  padding: 8px 36px 8px 12px;
  font-size: 0.9rem;
}

.custom-select option {
  background-color: #121629;
  color: #fff;
  padding: 8px;
}

.custom-select:focus {
  border-color: var(--secondary-accent);
  box-shadow: 0 0 12px rgba(0, 223, 216, 0.3);
}

/* Genre Cards */
.genre-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0;
}

.genre-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.genre-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.genre-card.selected {
  border-color: var(--secondary-accent);
  background: rgba(0, 223, 216, 0.12);
  box-shadow: 0 0 20px rgba(0, 223, 216, 0.25);
}

.genre-icon {
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.08);
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.genre-info h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.genre-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Dice Mini-Game Screen */
.dice-arena {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.dice-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.dice-card.winner {
  border-color: var(--success);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
  background: rgba(0, 230, 118, 0.1);
  transform: scale(1.03);
}

.dice-team-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.die-wrapper {
  width: 60px;
  height: 60px;
  position: relative;
  perspective: 400px;
}

.die-face {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 2px solid var(--secondary-accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s ease;
}

.die-face.rolling {
  animation: rollDie 0.8s ease-in-out infinite;
}

@keyframes rollDie {
  0% { transform: rotate(0deg) scale(0.9); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(0.9); }
}

.tie-banner {
  background: rgba(255, 153, 0, 0.15);
  border: 1px solid #ff9900;
  color: #ffb74d;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.winner-announcement {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.2), rgba(0, 223, 216, 0.2));
  border: 1px solid var(--success);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 16px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

/* Gameplay Turn Header */
.active-team-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 2px solid var(--primary-accent);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  box-shadow: 0 8px 24px rgba(121, 40, 202, 0.3);
}

.team-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-identity .label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--secondary-accent);
}

.team-identity h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
}

.team-score-badge {
  text-align: right;
}

.score-num {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.score-unit {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
}

/* Audio Control & Play Button */
.audio-control-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

.player-controls-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  padding: 4px 0;
}

.player-mini-btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-shrink: 0;
  outline: none;
}

.player-mini-btn .mini-btn-icon {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-main);
  transition: color 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.player-mini-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--secondary-accent);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 20px rgba(0, 223, 216, 0.3);
}

.player-mini-btn:hover .mini-btn-icon {
  color: #fff;
}

.player-mini-btn:active {
  transform: scale(0.92);
}

.player-mini-btn.highlight-error {
  background: linear-gradient(135deg, rgba(255, 23, 68, 0.35), rgba(255, 0, 128, 0.35));
  border: 2px solid var(--danger);
  box-shadow: 0 0 20px rgba(255, 23, 68, 0.6);
  animation: pulse-warning 1.5s infinite;
}

.player-mini-btn.highlight-error .mini-btn-icon {
  color: #fff;
}

.play-symbol-btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-glow), var(--primary-accent));
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(255, 0, 128, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.play-symbol-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(255, 0, 128, 0.7);
}

.play-symbol-btn:active {
  transform: scale(0.92);
}

.play-icon {
  font-size: 1.8rem;
  color: #fff;
  margin-left: 4px;
}

.audio-status-label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Audio Equalizer animation */
.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 24px;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.equalizer.active {
  opacity: 1;
}

.equalizer .bar {
  width: 4px;
  height: 100%;
  background: var(--secondary-accent);
  border-radius: 2px;
}

.equalizer.active .bar:nth-child(1) { animation: eq 0.6s ease-in-out infinite alternate; }
.equalizer.active .bar:nth-child(2) { animation: eq 0.8s ease-in-out infinite alternate 0.2s; }
.equalizer.active .bar:nth-child(3) { animation: eq 0.5s ease-in-out infinite alternate 0.4s; }
.equalizer.active .bar:nth-child(4) { animation: eq 0.9s ease-in-out infinite alternate 0.1s; }
.equalizer.active .bar:nth-child(5) { animation: eq 0.7s ease-in-out infinite alternate 0.3s; }

@keyframes eq {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* Secret Reveal Card */
.secret-reveal-container {
  margin: 8px 0;
  perspective: 1000px;
  cursor: pointer;
}

.secret-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.secret-card.holding {
  border-color: var(--secondary-accent);
  box-shadow: 0 0 20px rgba(0, 223, 216, 0.5);
  transform: scale(0.98);
}

.hold-progress-bar {
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #00dfd8, #ff0080);
  border-radius: 4px;
  margin-top: 6px;
  transition: width 0.1s linear;
}

.secret-card.holding .hold-progress-bar {
  width: 100%;
  transition: width 1.2s linear;
}

.secret-card.revealed {
  border-style: solid;
  border-color: var(--secondary-accent);
  background: linear-gradient(135deg, rgba(121, 40, 202, 0.3), rgba(0, 223, 216, 0.2));
  box-shadow: 0 0 25px rgba(0, 223, 216, 0.3);
}

.secret-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.secret-card.revealed .secret-front {
  display: none;
}

.secret-back {
  display: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.secret-card.revealed .secret-back {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

.lock-icon {
  font-size: 2rem;
}

.secret-front h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.secret-front p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.song-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--secondary-accent);
}

.song-details h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  margin: 4px 0;
}

.song-details h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.year-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.year-badge strong {
  color: var(--secondary-accent);
  font-size: 1.05rem;
}

/* Scoring Controls */
.scoring-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.3s ease;
}

.scoring-controls.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.score-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-question {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}

.btn-toggle-group {
  display: flex;
  gap: 6px;
}

.score-btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex: 1;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.score-btn.right.active {
  background: var(--success);
  color: #000;
  box-shadow: 0 4px 12px rgba(0, 230, 118, 0.4);
}

.score-btn.wrong.active {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 23, 68, 0.4);
}

/* Timeline Box */
.timeline-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}

.timeline-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Timeline Interactive Placement Track (Mobile Wrap / River Flow) */
.timeline-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 6px;
  padding: 10px 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin: 6px 0;
  transition: opacity 0.3s ease;
}

.timeline-track.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.timeline-card-node {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1.5px solid var(--secondary-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-card-node.newly-added {
  border-color: var(--success);
  background: rgba(0, 230, 118, 0.25);
  color: var(--success);
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.4);
}

.timeline-slot-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.timeline-slot-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--secondary-accent);
  color: #fff;
}

.timeline-slot-btn.selected {
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-glow));
  border-style: solid;
  border-color: #fff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(121, 40, 202, 0.5);
  transform: scale(1.04);
}

.timeline-feedback {
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  padding: 8px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
}

.timeline-feedback.exact,
.handover-feedback.exact {
  color: var(--success);
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid var(--success);
}

.timeline-feedback.close {
  color: var(--secondary-accent);
  background: rgba(0, 223, 216, 0.15);
  border: 1px solid var(--secondary-accent);
}

.timeline-feedback.off,
.handover-feedback.off {
  color: #ff5252;
  background: rgba(255, 23, 68, 0.15);
  border: 1px solid #ff5252;
}

@keyframes pulseWarning {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.7);
    border-color: #ff9900 !important;
  }
  50% {
    box-shadow: 0 0 20px 6px rgba(255, 82, 82, 0.85);
    border-color: #ff5252 !important;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 153, 0, 0);
  }
}

.pulse-warning {
  animation: pulseWarning 1.2s ease-in-out 2 !important;
}

.timeline-warning-banner {
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 153, 0, 0.18);
  border: 1.5px solid #ff9900;
  color: #ffd166;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.25);
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.handover-feedback {
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  text-align: center;
  line-height: 1.4;
}

.handover-song-card {
  background: rgba(255, 23, 68, 0.1);
  border: 1px dashed rgba(255, 82, 82, 0.4);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 10px 0;
  text-align: center;
  width: 100%;
}

.handover-song-card .song-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #ff5252;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.handover-song-card .song-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.handover-song-card .song-meta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary-accent);
  margin-top: 2px;
}

.handover-song-card .song-year {
  color: #ffd166;
  font-weight: 700;
}


.turn-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
}

.turn-summary-bar strong {
  font-size: 1.3rem;
  color: var(--secondary-accent);
}

/* Scoreboard Accordion */
.scoreboard-bar {
  padding: 12px 16px;
}

.scoreboard-bar h4 {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mini-scoreboard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  overflow: visible;
}

.mini-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 1 auto;
}

.mini-score-pill span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
}

.mini-score-pill strong {
  font-size: 0.78rem;
}

.mini-score-pill.active-turn {
  border-color: var(--primary-glow);
  background: rgba(255, 0, 128, 0.15);
  box-shadow: 0 0 8px rgba(255, 0, 128, 0.3);
}

/* Winner Screen */
.trophy-header {
  margin-bottom: 16px;
}

.trophy-icon {
  font-size: 3.5rem;
  display: inline-block;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.winner-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.winner-banner-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 0, 128, 0.2));
  border: 2px solid #ffd700;
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.winner-banner-card h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffd700;
}

.final-rankings-box h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 12px;
  text-align: left;
}

.final-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.final-rank-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.rank-pos {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.2rem;
  width: 30px;
}

.rank-pos.gold { color: #ffd700; }
.rank-pos.silver { color: #c0c0c0; }
.rank-pos.bronze { color: #cd7f32; }

/* In-App Handover Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 13, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease forwards;
}

.modal-card {
  width: 100%;
  max-width: 400px;
  border: 2px solid var(--primary-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 2.5rem;
}

.handover-score {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--secondary-accent);
}

.handover-details {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.next-team-preview {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  width: 100%;
  margin: 10px 0;
}

.next-team-preview .label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--secondary-accent);
}

.next-team-preview h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 4px;
}

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
