/* -------------------------------------------------------------
 * MDCU Medical Tournament 2026 - Styling Guide & Themes
 * ------------------------------------------------------------- */

/* Design Variables */
:root {
  --bg-primary: #02090d;
  --bg-teal-dark: #021b1e;
  --bg-purple-dark: #110620;
  
  /* Accent Neon Colors */
  --neon-cyan: #00ffd2;
  --neon-cyan-glow: #00e5ff;
  --neon-purple: #c026d3;
  --neon-pink: #ff007f;
  --neon-green: #00ff66;
  
  /* Text colors */
  --text-main: #ffffff;
  --text-secondary: #a3b3bc;
  --text-muted: #64748b;
  
  /* Fonts */
  --font-main: 'Prompt', sans-serif;
  --font-title: 'Orbitron', sans-serif;
}

/* Reset & Base Rules */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
}

/* Fullscreen Background Decorations */
.bg-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-teal-dark) 0%, #031016 40%, var(--bg-purple-dark) 100%);
  z-index: 1;
}

.grid-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 255, 210, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 210, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center center;
  z-index: 2;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.15;
  z-index: 2;
  pointer-events: none;
}

.orb-cyan {
  width: 50vw;
  height: 50vw;
  background: var(--neon-cyan-glow);
  top: -10%;
  left: -10%;
  animation: orbFloat 25s infinite alternate ease-in-out;
}

.orb-purple {
  width: 60vw;
  height: 60vw;
  background: var(--neon-purple);
  bottom: -20%;
  right: -10%;
  animation: orbFloat 35s infinite alternate-reverse ease-in-out;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 8%) scale(1.1); }
}

/* Heartbeat ECG Line Overlay */
.heartbeat-container {
  position: absolute;
  bottom: 18%;
  left: 0;
  width: 100%;
  height: 140px;
  z-index: 1;
  opacity: 0.25;
  pointer-events: none;
}

.heartbeat-svg {
  width: 100%;
  height: 100%;
}

.heartbeat-path {
  fill: none;
  stroke: var(--neon-cyan);
  stroke-width: 2.5;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: ecgStroke 8s linear infinite;
}

@keyframes ecgStroke {
  0% {
    stroke-dashoffset: 1200;
  }
  100% {
    stroke-dashoffset: -1200;
  }
}

/* Main Views Controller */
#app-container {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

/* Base View styling */
.view {
  position: absolute;
  width: 90%;
  max-width: 1280px;
  height: calc(100% - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.view.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* -------------------------------------------------------------
 * VIEW 1: HOMEPAGE
 * ------------------------------------------------------------- */
.home-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo-wrapper.secret-trigger {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo-wrapper.secret-trigger:hover {
  transform: scale(1.03);
}

/* -------------------------------------------------------------
 * JEOPARDY BOARD STYLING (FINAL ROUND)
 * ------------------------------------------------------------- */
.jeopardy-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

.jeopardy-header {
  text-align: center;
  margin-bottom: 25px;
}

.jeopardy-badge {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--neon-pink);
  background: rgba(255, 0, 127, 0.12);
  border: 1.5px solid rgba(255, 0, 127, 0.4);
  padding: 10px 28px;
  border-radius: 30px;
  margin-bottom: 14px;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.2);
}

.jeopardy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.jeopardy-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Topic Category Header Card */
.topic-card {
  background: linear-gradient(135deg, rgba(6, 25, 38, 0.85) 0%, rgba(17, 6, 32, 0.85) 100%);
  border: 1px solid rgba(0, 255, 210, 0.3);
  border-radius: 16px;
  padding: 20px 15px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
}

.topic-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px auto;
  border-radius: 50%;
  background: rgba(0, 255, 210, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
}

.topic-card:nth-child(2) .topic-icon {
  background: rgba(192, 38, 211, 0.1);
  color: var(--neon-purple);
}

.topic-card:nth-child(3) .topic-icon {
  background: rgba(255, 0, 127, 0.1);
  color: var(--neon-pink);
}

.topic-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 255, 210, 0.3);
}

/* Question Tile Cards - Default (Unclicked / Active State) */
.jeopardy-card {
  background: linear-gradient(135deg, rgba(6, 28, 42, 0.85) 0%, rgba(18, 8, 36, 0.85) 100%);
  border: 1px solid rgba(0, 255, 210, 0.35);
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 12px rgba(0, 255, 210, 0.12);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  min-height: 105px;
}

.jeopardy-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
  pointer-events: none;
}

/* Hover state for active (unclicked) cards */
.jeopardy-card:not(.clicked):hover {
  transform: translateY(-5px) scale(1.03);
  background: linear-gradient(135deg, rgba(8, 38, 56, 0.95) 0%, rgba(28, 12, 52, 0.95) 100%);
  border-color: var(--neon-cyan);
  box-shadow: 0 15px 35px rgba(0, 255, 210, 0.35), 0 0 20px rgba(0, 255, 210, 0.2);
}

.jeopardy-card:not(.clicked):active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 15px rgba(0, 255, 210, 0.4);
}

/* Spent / Clicked Question Tile styling (Dimmed / Spent State) */
.jeopardy-card.clicked {
  opacity: 0.35;
  background: rgba(2, 8, 14, 0.35) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: none !important;
  transform: none !important;
}

.jeopardy-card.clicked .card-score-value {
  color: var(--text-muted) !important;
  text-shadow: none !important;
}

.jeopardy-card.clicked .card-item-tag {
  color: var(--text-muted) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.jeopardy-card.clicked .card-topic-label {
  color: var(--text-muted) !important;
}

.card-item-tag {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  background: rgba(0, 255, 210, 0.08);
  border: 1px solid rgba(0, 255, 210, 0.25);
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.card-score-value {
  font-family: var(--font-title);
  font-size: 2.3rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 0 15px rgba(0, 255, 210, 0.6);
  margin: 2px 0;
  transition: all 0.3s ease;
}

.card-topic-label {
  display: none;
}

/* Score-tier specific neon styling for unclicked cards */
.jeopardy-card[data-score="100"]:not(.clicked) .card-score-value {
  color: var(--neon-cyan);
  text-shadow: 0 0 15px rgba(0, 255, 210, 0.5);
}

.jeopardy-card[data-score="200"]:not(.clicked) .card-score-value {
  color: #38bdf8;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.jeopardy-card[data-score="200"]:not(.clicked) .card-item-tag {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
}

.jeopardy-card[data-score="250"]:not(.clicked) .card-score-value {
  color: #e879f9;
  text-shadow: 0 0 18px rgba(232, 121, 249, 0.6);
}

.jeopardy-card[data-score="250"]:not(.clicked) .card-item-tag {
  color: #e879f9;
  border-color: rgba(232, 121, 249, 0.35);
  background: rgba(232, 121, 249, 0.1);
}

.congress-logo {
  height: 150px;
  width: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 
    0 0 15px rgba(255, 255, 255, 0.5), 
    0 0 30px var(--neon-cyan-glow);
  animation: logoPulse 4s infinite alternate ease-in-out;
}

@keyframes logoPulse {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 255, 255, 0.4), 0 0 25px rgba(0, 229, 255, 0.4); }
  100% { transform: scale(1.04); box-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 0 45px rgba(0, 229, 255, 0.7); }
}

.tournament-title {
  font-family: var(--font-title);
  color: var(--text-main);
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.tournament-title .prefix {
  display: block;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 8px;
}

.tournament-title .highlight {
  display: inline-block;
  font-size: 4.8rem;
  font-weight: 900;
  color: var(--text-main);
  background: linear-gradient(90deg, #ffffff, var(--neon-cyan), var(--neon-cyan-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.5));
  margin: 5px 0;
  letter-spacing: 4px;
}

.tournament-title .suffix {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 5px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.pulse-line {
  width: 180px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-cyan-glow), transparent);
  border-radius: 2px;
  margin: 15px 0 25px 0;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
  animation: widthPulse 3s infinite ease-in-out;
}

@keyframes widthPulse {
  0%, 100% { width: 150px; opacity: 0.6; }
  50% { width: 250px; opacity: 1; }
}

.tournament-details {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--neon-pink);
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 0, 127, 0.4);
  margin-top: 50px;
  margin-bottom: 10px;
  position: relative;
  z-index: 5;
}

/* -------------------------------------------------------------
 * VIEW 2: COUNTDOWN TIMER
 * ------------------------------------------------------------- */
.countdown-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.view-header {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 6px;
  background: linear-gradient(90deg, var(--neon-cyan), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 255, 210, 0.3));
}

.view-subheader {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 5px;
  margin-top: 5px;
  margin-bottom: 40px;
  text-transform: uppercase;
}

.timer-display-container {
  position: relative;
  width: 400px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(2, 8, 14, 0.45) 0%, rgba(2, 8, 14, 0.25) 65%, transparent 72%);
  backdrop-filter: blur(10px);
  overflow: visible;
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg); /* Start progress at the top */
  overflow: visible;
}

.progress-ring-bar {
  transition: stroke-dashoffset 0.1s linear;
  filter: drop-shadow(0 0 12px var(--neon-cyan-glow));
}

.timer-digits {
  font-family: var(--font-title);
  font-size: 8.5rem;
  font-weight: 900;
  color: #ffffff;
  z-index: 5;
  text-shadow: 
    0 0 20px rgba(255, 255, 255, 0.2),
    0 0 40px var(--neon-cyan-glow);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* States for countdown timer visual cues */
.timer-running .timer-digits {
  text-shadow: 
    0 0 25px rgba(255, 255, 255, 0.2),
    0 0 50px var(--neon-cyan-glow);
}

.timer-warning .timer-digits {
  color: var(--neon-pink);
  text-shadow: 
    0 0 25px rgba(255, 0, 127, 0.3),
    0 0 50px var(--neon-pink);
  animation: digitPanic 0.5s infinite alternate ease-in-out;
}

.timer-warning .progress-ring-bar {
  stroke: var(--neon-pink) !important;
  filter: drop-shadow(0 0 12px var(--neon-pink));
}

.timer-finished .timer-digits {
  color: #ff0033;
  text-shadow: 
    0 0 30px rgba(255, 0, 0, 0.4),
    0 0 60px #ff0033;
  animation: digitFlash 0.4s infinite alternate ease-in-out;
}

.timer-finished .progress-ring-bar {
  stroke: #ff0033 !important;
  filter: drop-shadow(0 0 15px #ff0033);
}

@keyframes digitPanic {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

@keyframes digitFlash {
  0% { opacity: 0.3; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1.05); }
}

.timer-status {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--neon-cyan);
  background: rgba(0, 255, 210, 0.05);
  border: 1px solid rgba(0, 255, 210, 0.2);
  padding: 8px 30px;
  border-radius: 20px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.timer-running .timer-status {
  color: var(--neon-green);
  background: rgba(0, 255, 102, 0.05);
  border-color: rgba(0, 255, 102, 0.2);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.1);
}

.timer-paused .timer-status {
  color: #eab308;
  background: rgba(234, 179, 8, 0.05);
  border-color: rgba(234, 179, 8, 0.2);
}

.timer-finished .timer-status {
  color: #ff0033;
  background: rgba(255, 0, 51, 0.08);
  border-color: rgba(255, 0, 51, 0.3);
  box-shadow: 0 0 15px rgba(255, 0, 51, 0.2);
}

/* Red Tie-Break Countdown Theme (Key 2) */
.tiebreak-theme .view-header {
  background: linear-gradient(90deg, #ff0055, #ff3366, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 0, 85, 0.4));
}

.tiebreak-theme .view-subheader {
  color: #ff3366;
  text-shadow: 0 0 10px rgba(255, 0, 85, 0.4);
}

.tiebreak-digits {
  color: #ffffff;
  text-shadow: 
    0 0 20px rgba(255, 255, 255, 0.2),
    0 0 40px #ff0055;
}

.timer-running .tiebreak-digits {
  text-shadow: 
    0 0 25px rgba(255, 255, 255, 0.2),
    0 0 50px #ff0055;
}

#ring-bar-20 {
  filter: drop-shadow(0 0 14px #ff0055);
}

.tiebreak-status {
  color: #ff0055;
  background: rgba(255, 0, 85, 0.08);
  border: 1.5px solid rgba(255, 0, 85, 0.3);
  box-shadow: 0 0 12px rgba(255, 0, 85, 0.15);
}

.timer-running .tiebreak-status {
  color: #ff0055;
  background: rgba(255, 0, 85, 0.15);
  border-color: rgba(255, 0, 85, 0.5);
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.35);
}

.full-page-controls {
  margin-top: 25px;
  max-width: 380px;
  width: 100%;
}

/* -------------------------------------------------------------
 * VIEW 3: SCOREBOARD
 * ------------------------------------------------------------- */
.scoreboard-content {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scoreboard-table-container {
  width: 100%;
  background: rgba(5, 18, 25, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-bottom: 25px;
}

.scoreboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.scoreboard-table th {
  padding: 20px 30px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.scoreboard-table td {
  padding: 18px 30px;
  font-size: 1.15rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

.scoreboard-table tbody tr {
  animation: slideInRow 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.scoreboard-table tbody tr.rank-row-animating {
  animation: none !important;
  will-change: transform, opacity;
}

@keyframes scoreFlashGlow {
  0% {
    background-color: rgba(0, 255, 210, 0.22);
    box-shadow: inset 0 0 20px rgba(0, 255, 210, 0.3);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

tr.score-updated {
  animation: scoreFlashGlow 1.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes slideInRow {
  0% { transform: translateY(15px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Stagger animations for rows using JS-added custom property */
.scoreboard-table tbody tr:hover {
  background: rgba(0, 255, 210, 0.03);
}

/* Specific column styles */
.col-rank {
  width: 15%;
  text-align: center;
  font-family: var(--font-title);
  font-weight: 700;
}

.col-team {
  width: 60%;
}

.col-score {
  width: 25%;
  text-align: right;
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--neon-cyan);
}

/* Rank Glow styles */
tr.rank-1 {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.06) 0%, transparent 100%);
}
tr.rank-1 td {
  font-weight: 800;
}
tr.rank-1 .col-rank span {
  display: inline-block;
  padding: 4px 10px;
  background: #eab308;
  color: #000;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
}
tr.rank-1 .col-score {
  color: #eab308;
  text-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

tr.rank-2 {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.06) 0%, transparent 100%);
}
tr.rank-2 .col-rank span {
  display: inline-block;
  padding: 4px 10px;
  background: #94a3b8;
  color: #000;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.3);
}
tr.rank-2 .col-score {
  color: #cbd5e1;
}

tr.rank-3 {
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.06) 0%, transparent 100%);
}
tr.rank-3 .col-rank span {
  display: inline-block;
  padding: 4px 10px;
  background: #b45309;
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(180, 83, 9, 0.3);
}
tr.rank-3 .col-score {
  color: #d97706;
}

tr.rank-4 {
  background: linear-gradient(90deg, rgba(14, 116, 144, 0.04) 0%, transparent 100%);
}
tr.rank-4 .col-rank span {
  display: inline-block;
  padding: 4px 10px;
  background: #0e7490;
  color: #e0f2fe;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
tr.rank-4 .col-score {
  color: #7dd3fc;
}

.scoreboard-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-green);
  animation: pulseDot 1.5s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.refresh-time {
  color: var(--text-muted);
}



/* -------------------------------------------------------------
 * INTERACTIVE AUDIO INDICATOR
 * ------------------------------------------------------------- */
#audio-indicator {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 100;
  cursor: pointer;
  transition: all 0.3s ease;
}

.audio-indicator-muted {
  color: var(--text-muted);
}

.audio-indicator-active {
  color: var(--neon-green);
  border-color: rgba(0, 255, 102, 0.2);
  background: rgba(0, 255, 102, 0.03);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.05);
}

#audio-indicator:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* -------------------------------------------------------------
 * NAVIGATION & ROUND PORTALS
 * ------------------------------------------------------------- */

/* Back to Home Navigation Button */
.nav-back-home {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 8px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 100;
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-back-home:hover {
  opacity: 1;
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 210, 0.2);
  transform: translateX(-3px);
}

.nav-back-home svg {
  transition: transform 0.3s ease;
}

.nav-back-home:hover svg {
  transform: translateX(-3px);
}

/* Portal Navigation Layout on index.html */
.portal-nav-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 30px;
  margin-top: 40px;
  width: 100%;
  max-width: 900px;
}

.portal-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(4, 19, 28, 0.6);
  border: 1px solid rgba(0, 255, 210, 0.15);
  border-radius: 20px;
  padding: 36px 28px;
  text-decoration: none;
  color: var(--text-main);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.7s ease;
}

.portal-card:hover::before {
  left: 100%;
}

.portal-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--neon-cyan);
  box-shadow: 0 20px 40px rgba(0, 255, 210, 0.15), 0 0 20px rgba(0, 255, 210, 0.1);
}

.portal-card.final-card:hover {
  border-color: var(--neon-purple);
  box-shadow: 0 20px 40px rgba(192, 38, 211, 0.2), 0 0 20px rgba(192, 38, 211, 0.15);
}

.portal-badge {
  align-self: flex-start;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border-radius: 12px;
  text-transform: uppercase;
  background: rgba(0, 255, 210, 0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 255, 210, 0.3);
  margin-bottom: 24px;
}

.portal-card.final-card .portal-badge {
  background: rgba(192, 38, 211, 0.15);
  color: #e879f9;
  border-color: rgba(192, 38, 211, 0.4);
}

.portal-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 20px;
  color: #ffffff;
}

.portal-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 30px;
}

.portal-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--neon-cyan);
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-card.final-card .portal-action {
  color: #e879f9;
}

.portal-action svg {
  transition: transform 0.3s ease;
}

.portal-card:hover .portal-action svg {
  transform: translateX(6px);
}

/* Final Round Placeholder Styling */
.final-placeholder-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
  padding: 40px 30px;
  background: rgba(17, 6, 32, 0.4);
  border: 1px solid rgba(192, 38, 211, 0.2);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.final-icon-glow {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(192, 38, 211, 0.15);
  border: 1px solid rgba(192, 38, 211, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #e879f9;
  box-shadow: 0 0 25px rgba(192, 38, 211, 0.25);
}

.final-notice-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: #ffffff;
  margin-bottom: 12px;
}

.final-notice-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* -------------------------------------------------------------
 * JEOPARDY BOARD STYLING (FINAL ROUND)
 * ------------------------------------------------------------- */
.jeopardy-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

.jeopardy-header {
  text-align: center;
  margin-bottom: 25px;
}

.jeopardy-badge {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--neon-pink);
  background: rgba(255, 0, 127, 0.12);
  border: 1.5px solid rgba(255, 0, 127, 0.4);
  padding: 10px 28px;
  border-radius: 30px;
  margin-bottom: 14px;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.2);
}

.jeopardy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.jeopardy-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Topic Category Header Card */
.topic-card {
  background: linear-gradient(135deg, rgba(6, 25, 38, 0.85) 0%, rgba(17, 6, 32, 0.85) 100%);
  border: 1px solid rgba(0, 255, 210, 0.3);
  border-radius: 16px;
  padding: 20px 15px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
}

.topic-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px auto;
  border-radius: 50%;
  background: rgba(0, 255, 210, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
}

.topic-card:nth-child(2) .topic-icon {
  background: rgba(192, 38, 211, 0.1);
  color: var(--neon-purple);
}

.topic-card:nth-child(3) .topic-icon {
  background: rgba(255, 0, 127, 0.1);
  color: var(--neon-pink);
}

.topic-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 255, 210, 0.3);
}

/* Question Tile Cards */
.jeopardy-card {
  background: rgba(4, 18, 28, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  min-height: 105px;
}

.jeopardy-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

.jeopardy-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: rgba(8, 32, 48, 0.85);
  border-color: var(--neon-cyan);
  box-shadow: 0 12px 30px rgba(0, 255, 210, 0.25), 0 0 15px rgba(0, 255, 210, 0.15);
}

.jeopardy-card:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 15px rgba(0, 255, 210, 0.4);
}

/* Visited / Clicked card styling */
.jeopardy-card.clicked {
  border-color: rgba(0, 255, 210, 0.6);
  background: rgba(0, 255, 210, 0.08);
  animation: cardPulse 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes cardPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 210, 0.7); }
  50% { transform: scale(1.04); box-shadow: 0 0 25px 5px rgba(0, 255, 210, 0.4); }
  100% { transform: scale(1); }
}

.card-item-tag {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  background: rgba(0, 255, 210, 0.08);
  border: 1px solid rgba(0, 255, 210, 0.25);
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.card-score-value {
  font-family: var(--font-title);
  font-size: 2.3rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 0 15px rgba(0, 255, 210, 0.6);
  margin: 2px 0;
  transition: all 0.3s ease;
}

.card-topic-label {
  display: none;
}

/* Score-tier specific neon styling */
.jeopardy-card[data-score="100"] .card-score-value {
  color: var(--neon-cyan);
  text-shadow: 0 0 15px rgba(0, 255, 210, 0.5);
}

.jeopardy-card[data-score="200"] .card-score-value {
  color: #38bdf8;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.jeopardy-card[data-score="200"] .card-item-tag {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
}

.jeopardy-card[data-score="250"] .card-score-value {
  color: #e879f9;
  text-shadow: 0 0 18px rgba(232, 121, 249, 0.6);
}

.jeopardy-card[data-score="250"] .card-item-tag {
  color: #e879f9;
  border-color: rgba(232, 121, 249, 0.35);
  background: rgba(232, 121, 249, 0.1);
}

@media (max-width: 900px) {
  .jeopardy-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

/* -------------------------------------------------------------
 * QUESTION DETAIL MODAL & 10s TIMER
 * ------------------------------------------------------------- */
.modal-question-container {
  width: 100%;
  max-width: 1240px;
  background: rgba(4, 18, 28, 0.75);
  border: 1px solid rgba(0, 255, 210, 0.25);
  border-radius: 24px;
  padding: 40px 45px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  gap: 45px;
  margin: 0 auto;
}

.question-detail-left {
  flex: 1.4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.modal-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 14px;
  margin-bottom: 24px;
}

.modal-topic-badge {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  background: rgba(0, 255, 210, 0.12);
  border: 1.5px solid rgba(0, 255, 210, 0.4);
  padding: 8px 22px;
  border-radius: 14px;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(0, 255, 210, 0.15);
}

.modal-item-badge {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  padding: 8px 22px;
  border-radius: 14px;
  text-transform: uppercase;
}

.modal-score-box {
  margin-bottom: 30px;
}

.modal-score-label {
  display: block;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.modal-score-num {
  font-family: var(--font-title);
  font-size: 5rem;
  font-weight: 900;
  color: var(--neon-cyan);
  line-height: 1;
  text-shadow: 0 0 25px rgba(0, 255, 210, 0.5);
}

.author-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(17, 6, 32, 0.75) 0%, rgba(26, 10, 48, 0.75) 100%);
  border: 1.5px solid rgba(192, 38, 211, 0.4);
  border-radius: 20px;
  padding: 22px 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(192, 38, 211, 0.15);
}

.author-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(192, 38, 211, 0.2);
  border: 1px solid rgba(192, 38, 211, 0.4);
  color: #e879f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(192, 38, 211, 0.3);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--neon-pink);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 0, 127, 0.3);
}

.author-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Modal Vertical Divider */
.modal-divider {
  width: 1px;
  height: 320px;
  background: linear-gradient(180deg, transparent, rgba(0, 255, 210, 0.3), rgba(192, 38, 211, 0.3), transparent);
}

/* Right Side: 30-Second Timer */
.question-timer-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal-timer-header {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.modal-timer-ring-container {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  overflow: visible;
}

.modal-timer-ring {
  transform: rotate(-90deg);
  overflow: visible;
}

.modal-ring-bar {
  transition: stroke-dashoffset 0.1s linear;
  filter: drop-shadow(0 0 14px var(--neon-cyan-glow));
}

.modal-timer-digits {
  position: absolute;
  font-family: var(--font-title);
  font-size: 5.5rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 25px var(--neon-cyan-glow);
}

.modal-timer-status {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--neon-cyan);
  background: rgba(0, 255, 210, 0.08);
  border: 1px solid rgba(0, 255, 210, 0.25);
  padding: 6px 24px;
  border-radius: 20px;
  margin-bottom: 25px;
  text-transform: uppercase;
}

.modal-timer-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.modal-timer-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
}

.timer-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-start {
  background: linear-gradient(135deg, rgba(0, 255, 210, 0.2) 0%, rgba(0, 229, 255, 0.2) 100%);
  border-color: var(--neon-cyan);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(0, 255, 210, 0.2);
}

.btn-start:hover {
  background: linear-gradient(135deg, rgba(0, 255, 210, 0.35) 0%, rgba(0, 229, 255, 0.35) 100%);
  box-shadow: 0 0 25px rgba(0, 255, 210, 0.4);
  transform: translateY(-2px);
}

.btn-reset {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
}

.btn-reset:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-steal {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(234, 88, 12, 0.2) 100%);
  border-color: #f97316;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.25);
  width: 100%;
  max-width: 170px;
  padding: 10px 20px;
  justify-content: center;
}

.btn-steal:hover {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.35) 0%, rgba(234, 88, 12, 0.35) 100%);
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.5);
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .modal-question-container {
    flex-direction: column;
    padding: 30px 20px;
    gap: 30px;
  }
  .modal-divider {
    width: 100%;
    height: 1px;
  }
  .tournament-details {
    font-size: 1.3rem;
    letter-spacing: 2px;
  }
}

/* -------------------------------------------------------------
 * EVALUATION VIEW STYLING
 * ------------------------------------------------------------- */
.evaluation-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.qr-card-container {
  position: relative;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-card {
  background: rgba(4, 19, 28, 0.75);
  border: 2px solid rgba(0, 255, 210, 0.3);
  border-radius: 24px;
  padding: 30px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 255, 210, 0.1);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-card-glow {
  position: absolute;
  width: 105%;
  height: 105%;
  background: radial-gradient(circle, rgba(0, 255, 210, 0.25) 0%, transparent 70%);
  filter: blur(15px);
  z-index: -1;
  pointer-events: none;
}

.qr-image {
  width: 320px;
  height: 320px;
  border-radius: 12px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
  display: block;
}

.qr-card:hover {
  transform: translateY(-5px);
  border-color: var(--neon-cyan);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 255, 210, 0.25);
}

@media (max-width: 600px) {
  .qr-image {
    width: 240px;
    height: 240px;
  }
}




