/* Display Screen CSS for Smart TV / Projector */

body.display-mode {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  user-select: none;
  background-color: #030712;
  cursor: default;
}

body.display-mode.idle-cursor {
  cursor: none;
}

/* Ambient Animated Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.35;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #0284c7 0%, transparent 70%);
  top: -100px;
  left: 10%;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #d97706 0%, transparent 70%);
  bottom: -150px;
  right: 15%;
  animation-delay: -5s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #db2777 0%, transparent 70%);
  top: 30%;
  right: -80px;
  animation-delay: -9s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.1); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* Top Subtle Controls */
.display-controls {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.display-controls:hover {
  opacity: 1;
}

.conn-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #94a3b8;
}

.control-btn {
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  padding: 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: var(--accent-cyan);
}

/* Audio Unlock Banner */
.audio-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #050814;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
  cursor: pointer;
  animation: bounceBanner 2s infinite ease-in-out;
}

@keyframes bounceBanner {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

.audio-banner.hidden {
  display: none !important;
}

/* Main Display Layout */
.display-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 40px;
  box-sizing: border-box;
}

/* Header */
.display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.pulse-indicator {
  width: 10px;
  height: 10px;
  background-color: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 12px #38bdf8;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.event-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}

.round-badge {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  padding: 8px 22px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
  text-transform: uppercase;
}

/* Center Stage */
.center-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 0;
  position: relative;
  min-height: 0;
}

/* Standby Screen */
.standby-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: fadeIn 0.8s ease;
}

.crest-container {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.crest-halo {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.35) 0%, transparent 70%);
  animation: rotateHalo 12s linear infinite;
}

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

.trophy-icon {
  font-size: 5.5rem;
  filter: drop-shadow(0 10px 25px rgba(251, 191, 36, 0.5));
  animation: bobTrophy 3s ease-in-out infinite alternate;
}

@keyframes bobTrophy {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

.standby-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 15px rgba(251, 191, 36, 0.3));
  margin-bottom: 8px;
}

.standby-desc {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin-bottom: 25px;
}

.standby-loading {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.7);
  padding: 10px 28px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 1.1rem;
}

.radar-scan {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #38bdf8;
  border-top-color: transparent;
  animation: spinRadar 1s linear infinite;
}

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

/* Active Question Screen */
.question-screen {
  width: 100%;
  max-width: 1500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  animation: zoomFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Timer Component */
.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: -35px;
  z-index: 10;
  position: relative;
}

.timer-svg-box {
  width: 140px;
  height: 140px;
  position: relative;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-track {
  fill: rgba(11, 19, 43, 0.95);
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 10;
}

.timer-progress {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.8s linear, stroke 0.4s ease;
}

.timer-text-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.timer-unit {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 2px;
}

/* Timer State Variations */
.timer-container.warning .timer-progress {
  stroke: #f59e0b;
}

.timer-container.urgent .timer-progress {
  stroke: #ef4444;
}

.timer-container.urgent .timer-digits {
  color: #ef4444;
  animation: urgentBeat 0.5s infinite alternate;
}

@keyframes urgentBeat {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px #ef4444); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 25px #ef4444); }
}

.timeout-alert {
  margin-top: 8px;
  background: #ef4444;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  padding: 4px 18px;
  border-radius: var(--radius-full);
  letter-spacing: 0.1em;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.8);
  animation: shakeAlert 0.4s infinite;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Question Card */
.question-card {
  width: 100%;
  background: rgba(11, 19, 43, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 2px solid rgba(56, 189, 248, 0.35);
  border-radius: 28px;
  padding: 45px 50px 35px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  position: relative;
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.q-tag {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}

.q-cat-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #93c5fd;
  font-size: 1rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
}

.q-points-tag {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-left: auto;
}

.question-text-wrapper {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.question-text {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.2vw, 4.2rem);
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
  letter-spacing: -0.01em;
}

/* Revealed Answer Box */
.display-answer-box {
  margin-top: 25px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
  border: 2px solid #fbbf24;
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  text-align: center;
  animation: slideUpAnswer 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.answer-badge {
  display: inline-block;
  background: #fbbf24;
  color: #050814;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 3px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.answer-text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.8rem);
  font-weight: 800;
  color: #fef08a;
  line-height: 1.3;
}

/* Bottom Scoreboard Stage */
.scoreboard-stage {
  padding-top: 15px;
}

.teams-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  max-width: 1600px;
  margin: 0 auto;
}

/* Team Card */
.team-card {
  position: relative;
  background: rgba(11, 19, 43, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  overflow: visible;
}

/* Card Glows based on team */
.team-card.color-cyan {
  border-top: 6px solid var(--team-a);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 35px rgba(14, 165, 233, 0.2);
}
.team-card.color-cyan .team-name-badge {
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.team-card.color-gold {
  border-top: 6px solid var(--team-b);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 35px rgba(245, 158, 11, 0.2);
}
.team-card.color-gold .team-name-badge {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.team-card.color-magenta {
  border-top: 6px solid var(--team-c);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 35px rgba(236, 72, 153, 0.2);
}
.team-card.color-magenta .team-name-badge {
  background: rgba(236, 72, 153, 0.18);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.4);
}

.team-name-badge {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 2.2rem);
  font-weight: 800;
  padding: 6px 28px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-score-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.team-score-digits {
  font-family: var(--font-mono);
  font-size: clamp(3.8rem, 6.5vw, 6.8rem);
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
}

/* Floating Delta Score Badge Animation */
.floating-score-badge {
  position: absolute;
  top: -20px;
  right: 10%;
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 900;
  padding: 4px 18px;
  border-radius: var(--radius-full);
  pointer-events: none;
  z-index: 50;
  animation: floatPop 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-score-badge.positive {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.9);
}

.floating-score-badge.negative {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.9);
}

@keyframes floatPop {
  0% { opacity: 0; transform: translateY(20px) scale(0.6); }
  25% { opacity: 1; transform: translateY(-15px) scale(1.2); }
  70% { opacity: 1; transform: translateY(-35px) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.9); }
}

/* Flash Animations on Card */
.team-card.flash-positive {
  animation: flashGreen 0.7s ease-out;
}

@keyframes flashGreen {
  0% { transform: scale(1.06); box-shadow: 0 0 50px #10b981, inset 0 0 30px #10b981; border-color: #10b981; }
  100% { transform: scale(1); }
}

.team-card.flash-negative {
  animation: flashRed 0.7s ease-out;
}

@keyframes flashRed {
  0% { transform: scale(0.95); box-shadow: 0 0 50px #ef4444, inset 0 0 30px #ef4444; border-color: #ef4444; }
  100% { transform: scale(1); }
}

/* Utility Hidden */
.hidden {
  display: none !important;
}

/* Responsive adjustment for ultra-wide & smaller TVs */
@media (max-height: 750px) {
  .display-container { padding: 15px 30px; }
  .timer-svg-box { width: 110px; height: 110px; }
  .timer-digits { font-size: 2.5rem; }
  .question-card { padding: 30px 40px 25px; }
  .question-text-wrapper { min-height: 110px; }
  .team-card { padding: 14px 18px 18px; }
}
