@import url("pwa-base.css");

body { background: #050e1f; overflow-x: hidden; }

.pwa-eyebrow {
    margin: 0 0 4px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.tv-shell {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 16px), 1400px);
    margin: 0 auto;
    padding: 12px 0 24px;
}

.tv-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.tv-header h1 { margin: 0; font-size: 1.6rem; }

.tv-header-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.tv-header-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.tv-header-links a:hover,
.tv-header-links a.active {
    background: var(--accent);
    color: #091632;
    border-color: var(--accent);
}

.pwa-install-btn {
    padding: 12px 22px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #d4a84f, #f0c468);
    color: #091632;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    max-width: 280px;
}

.pwa-install-btn.hidden { display: none; }

.tv-player-section {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.tv-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.tv-player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(5, 14, 31, 0.75);
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
    z-index: 5;
}

.tv-player-overlay.visible { opacity: 1; }

.tv-player-overlay .big-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.7; }

.tv-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tv-now-playing { display: flex; align-items: center; gap: 10px; }

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 1.8s infinite ease-in-out;
}

.live-dot.inactive { background: var(--text-muted); animation: none; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.now-label { color: var(--text-muted); font-size: 0.85rem; margin: 0; }
.now-title { font-weight: 700; font-size: 1rem; margin: 0; }

.tv-timer { color: var(--text-muted); font-variant-numeric: tabular-nums; }

.tv-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tv-controls .control-btn {
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    font-size: 0.85rem;
    cursor: pointer;
}

.tv-controls .control-btn.primary {
    background: var(--accent);
    color: #091632;
    border-color: var(--accent);
}

.tv-controls .volume-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.tv-controls .volume-group input { width: 100px; accent-color: var(--accent); }

.tv-bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 18px;
}

@media (min-width: 860px) {
    .tv-bottom-grid { grid-template-columns: 1fr 1fr; }
}

.tv-schedule-panel {
    border-radius: var(--radius-lg);
    border: 1px solid var(--panel-border);
    background: linear-gradient(180deg, rgba(14, 31, 66, 0.6), rgba(7, 21, 47, 0.5));
    padding: 20px;
}

.tv-schedule-panel h2 { margin: 0 0 6px; font-size: 1.2rem; }
.schedule-sub { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 16px; }

.schedule-list { display: grid; gap: 10px; }

.schedule-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.schedule-item.active-now {
    background: rgba(212, 168, 79, 0.12);
    border-color: var(--accent);
}

.schedule-item.next-up { border-color: rgba(212, 168, 79, 0.3); }

.sched-time {
    min-width: 60px;
    color: var(--accent-strong);
    font-weight: 600;
    font-size: 0.9rem;
}

.sched-info { flex: 1; min-width: 0; }
.sched-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-meta { color: var(--text-muted); font-size: 0.8rem; }

.sched-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    flex-shrink: 0;
}

.sched-badge.live-now { background: rgba(112, 212, 164, 0.18); color: var(--success); }
.sched-badge.upcoming { background: rgba(212, 168, 79, 0.15); color: var(--accent-strong); }
.sched-badge.ended { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); }

.no-schedule-msg { color: var(--text-muted); text-align: center; padding: 24px 0; }

.pwa-footer-tv {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pwa-footer-tv a { color: var(--accent-strong); }

.glass-panel {
    border-radius: var(--radius-lg);
    border: 1px solid var(--panel-border);
    background: var(--panel);
    backdrop-filter: blur(20px);
}
