/* ==========================================================================
   TV Display - Area Styles
   Used by: TvLayout, TV/Index, TV/Sport, TV/SportPartial
   ========================================================================== */

/* --- Layout --- */
.tv-layout {
    min-height: 100vh;
    background: #000;
}

/* --- TV Page (tournament-specific) --- */
.tv-page {
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

/* --- TV Container (sport-based) --- */
.tv-container {
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 25%, #1a1a1a 50%, #0a0a0a 75%, #000000 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.tv-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(147, 51, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(34, 197, 94, 0.02) 0%, transparent 50%);
    animation: tv-float 20s ease-in-out infinite;
}

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

.tv-brand {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
}

.tv-separator {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 1rem;
}

.tv-tournament-name {
    font-size: 1rem;
    font-weight: 600;
    color: #e5e7eb;
    letter-spacing: 0.03em;
}

.tv-match-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Live Badge --- */
.tv-live-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 0.3rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: live-blink 1.5s ease-in-out infinite;
}

@keyframes live-blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px #22c55e; }
    50% { opacity: 0.4; box-shadow: none; }
}

/* --- Fullscreen Button --- */
.tv-fullscreen-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    padding: 0.4rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* --- Scoreboard --- */
.scoreboard {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    overflow: hidden;
}

.scoreboard-header {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.scoreboard-match-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scoreboard-court {
    font-size: 0.75rem;
    color: #6b7280;
}

.scoreboard-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
}

.scoreboard-row:last-child {
    border-bottom: none;
}

.scoreboard-row.serving {
    background: rgba(59, 130, 246, 0.05);
}

.scoreboard-player {
    font-size: 1rem;
    font-weight: 600;
    color: #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.serve-indicator {
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.scoreboard-scores {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.score-set {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    width: 2rem;
    text-align: center;
    padding: 0.2rem 0;
}

.score-set.current {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 0.375rem;
    width: 2.5rem;
    padding: 0.25rem 0;
}

.score-set.won {
    color: #22c55e;
}

.match-status-live {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.match-status-scheduled {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --- TV Glass Card --- */
.tv-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
}

/* --- Brand Logo --- */
.brand-logo {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

/* --- Status Badges --- */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-live {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.live-pulse {
    animation: tv-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes tv-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* --- Timer --- */
.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* --- Score & Player Display --- */
.score-display {
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.player-display {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tournament-display {
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.court-info {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* --- Match Info Grid --- */
.match-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.next-match-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
}

.schedule-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.schedule-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #3b82f6;
    padding-left: 1.25rem;
}

/* --- Slides --- */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 1s ease-in-out;
    display: none;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    display: block;
}

.slide-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slide-indicator.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    width: 32px;
    border-radius: 6px;
}

.slide-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
}

.slide-indicator.active:hover {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

/* --- Sport Selector --- */
.sport-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 50;
}

.sport-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sport-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.sport-button.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: transparent;
}

/* --- Floating Orbs --- */
.floating-orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    animation: tv-float-orb 30s infinite ease-in-out;
}

.orb:nth-child(1) {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb:nth-child(2) {
    width: 300px;
    height: 300px;
    top: 50%;
    right: -50px;
    animation-delay: 10s;
}

.orb:nth-child(3) {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: 30%;
    animation-delay: 20s;
}

/* --- Animations --- */
@keyframes tv-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

@keyframes tv-float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .score-display {
        font-size: 4rem;
    }
    .player-display {
        font-size: 1.5rem;
    }
    .match-info-grid {
        grid-template-columns: 1fr;
    }
}
