/**
 * Display Monitor (Layar Besar / Smart TV) Specialized CSS
 * High Contrast, Super Legible, Animated Rankings
 */

body.display-screen {
  background: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0a0c16 65%, #05060b 100%);
  color: #f8fafc;
  overflow-x: hidden;
  padding: 0;
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* TV Header */
.tv-header {
  padding: 20px 40px;
  background: rgba(10, 12, 22, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.tv-title-box {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tv-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.tv-title-text h1 {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tv-title-text p {
  margin: 3px 0 0 0;
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 500;
}

/* Live Status Pulse */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fca5a5;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  background-color: #ef4444;
  border-radius: 50%;
  animation: livePulse 1.4s infinite;
  box-shadow: 0 0 12px #ef4444;
}

@keyframes livePulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Category Tabs */
.tv-tabs-bar {
  display: flex;
  gap: 16px;
  padding: 16px 40px;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
  justify-content: space-between;
}

.tab-buttons {
  display: flex;
  gap: 12px;
}

.tv-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tv-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tv-tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
}

.tv-autorotate-control {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Progress bar for auto-rotate */
.rotate-progress {
  width: 90px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.rotate-progress-bar {
  height: 100%;
  width: 0%;
  background: #38bdf8;
  transition: width 0.1s linear;
}

/* Main Display Content */
.tv-container {
  padding: 24px 40px 40px;
  max-width: 1700px;
  margin: 0 auto;
}

/* Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

/* Leaderboard Item Card */
.leaderboard-card {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px 28px;
  display: grid;
  grid-template-columns: 80px 140px 1fr auto 180px;
  align-items: center;
  gap: 24px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background 0.3s ease;
  will-change: transform;
}

/* Rank Medals & Numbers */
.rank-badge {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Podium Styling */
.leaderboard-card.rank-1 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(17, 24, 39, 0.95) 70%);
  border: 2px solid #f59e0b;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.25);
  transform: scale(1.01);
}

.leaderboard-card.rank-1 .rank-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-color: #fbbf24;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

.leaderboard-card.rank-2 {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(17, 24, 39, 0.9) 70%);
  border: 2px solid #94a3b8;
  box-shadow: 0 0 25px rgba(148, 163, 184, 0.2);
}

.leaderboard-card.rank-2 .rank-badge {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #fff;
  border-color: #cbd5e1;
}

.leaderboard-card.rank-3 {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.12) 0%, rgba(17, 24, 39, 0.9) 70%);
  border: 2px solid #d97706;
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.15);
}

.leaderboard-card.rank-3 .rank-badge {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  border-color: #f59e0b;
}

/* Contestant Details */
.contestant-no {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  text-align: center;
}

.contestant-info h3 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.contestant-info p {
  margin: 4px 0 0 0;
  font-size: 1.05rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Juri Score Breakdown Chips */
.judges-breakdown {
  display: flex;
  gap: 10px;
  align-items: center;
}

.judge-chip {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 10px;
  text-align: center;
  min-width: 90px;
}

.judge-chip .chip-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
}

.judge-chip .chip-score {
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
  margin-top: 2px;
}

.judge-chip.pending {
  border-style: dashed;
  opacity: 0.6;
}

.judge-chip.pending .chip-score {
  color: #64748b;
  font-size: 0.95rem;
}

/* Total Final Score Big Pill */
.total-score-pill {
  text-align: right;
  padding: 8px 18px;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid rgba(16, 185, 129, 0.4);
  border-radius: 16px;
  min-width: 150px;
}

.total-score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6ee7b7;
  font-weight: 800;
}

.total-score-number {
  font-size: 2.3rem;
  font-weight: 900;
  color: #10b981;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* TV Footer Ticker */
.tv-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 12, 22, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #64748b;
}

/* FLIP animation transition class */
.moving-item {
  transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1) !important;
}

.rank-jump-up {
  animation: rankJumpUp 1.2s ease;
}

@keyframes rankJumpUp {
  0% { transform: scale(1); }
  30% { transform: scale(1.04); box-shadow: 0 0 40px rgba(59, 130, 246, 0.7); }
  100% { transform: scale(1); }
}
