/* Live TV Broadcast Display (16:9 / 4K Ultra-Wide Presentation) — DESIGN.md */

:root {
  --display-accent: #00E5FF;
}

body.display-mode {
  overflow: hidden;
  background: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  transition: background-color 0.25s, color 0.25s;
}

/* Background Atmosphere */
[data-theme="dark"] .tv-background-layer, :root:not([data-theme="light"]) .tv-background-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 50% 10%, rgba(0, 229, 255, 0.05) 0%, transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(50, 215, 75, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(0, 229, 255, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #121212 0%, #161616 100%);
}

[data-theme="light"] .tv-background-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 50% 10%, rgba(0, 151, 167, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(22, 163, 74, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(0, 151, 167, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #F8FAFC 0%, #EEF2F6 100%);
}

.tv-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  padding: 24px 40px;
  box-sizing: border-box;
}

/* TV Header */
.tv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 16px;
}

.tv-championship-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tv-sparko-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.4));
}

.tv-logo-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 2.2rem;
  color: #000;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.4);
}

.tv-title-main {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.02em;
  color: var(--text-main);
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.tv-title-sub {
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.tv-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Active Stage Card - DESIGN.md */
.tv-stage-banner {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 28px 36px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tv-lot-large {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  background: var(--bg-surface-elevated);
  border: 3px solid var(--accent-primary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 3rem;
  box-shadow: 0 0 30px var(--accent-primary-glow);
}

.tv-team-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tv-badges-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tv-team-name-lg {
  font-family: var(--font-sans);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.tv-contingent-lg {
  font-size: 1.4rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* JURY STATUS CARDS (3 CARDS) */
.tv-judges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.tv-judge-card {
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.tv-judge-card.status-pending {
  border-color: rgba(0, 229, 255, 0.4);
}

.tv-judge-card.status-locked {
  border-color: var(--accent-secondary);
  background: rgba(50, 215, 75, 0.12);
  box-shadow: 0 0 30px rgba(50, 215, 75, 0.25);
}

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

.tv-judge-role-title {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.tv-judge-badge-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
}

.tv-judge-badge-state.evaluating {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
}

.tv-judge-badge-state.locked {
  background: rgba(50, 215, 75, 0.2);
  border: 1px solid var(--accent-secondary);
  color: var(--accent-secondary);
}

.tv-judge-rubric-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.tv-judge-score-preview {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.tv-judge-ceiling {
  font-size: 1.1rem;
  color: var(--text-dim);
}

/* DRAMATIC REVEAL OVERLAY / CONTAINER */
.tv-reveal-panel {
  display: none;
  background: var(--bg-card);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  margin-top: 10px;
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.35);
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.reveal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.reveal-breakdown {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reveal-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #181818;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.reveal-final-hero {
  text-align: center;
  padding: 30px;
  background: #181818;
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent-primary);
}

.reveal-final-title {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.reveal-final-number {
  font-family: var(--font-mono);
  font-size: 6rem;
  font-weight: 900;
  color: var(--accent-primary);
  line-height: 1;
  text-shadow: 0 0 40px rgba(0, 229, 255, 0.6);
  margin-bottom: 12px;
}

.reveal-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  border-radius: 9999px;
  background: var(--accent-secondary);
  color: #000;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
}

/* LEADERBOARD VIEW */
.tv-leaderboard-container {
  display: none;
  flex-direction: column;
  flex-grow: 1;
}

.lb-header-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.lb-category-title {
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 16px;
}

.lb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.lb-table th {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 16px;
  letter-spacing: 0.02em;
}

.lb-table td {
  padding: 14px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.lb-table tr td:first-child {
  border-left: 1px solid var(--border-subtle);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.lb-table tr td:last-child {
  border-right: 1px solid var(--border-subtle);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.lb-table tr:hover td {
  background: #252525;
}

.lb-rank-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.25rem;
}

.rank-gold {
  background: var(--accent-primary);
  color: #000;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.5);
}

.rank-silver {
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
  color: #000;
  box-shadow: 0 0 16px rgba(226, 232, 240, 0.4);
}

.rank-bronze {
  background: linear-gradient(135deg, #f97316 0%, #b45309 100%);
  color: #fff;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.4);
}

.rank-normal {
  background: #252525;
  color: var(--text-muted);
}
