:root {
    --bg-dark: #050a15;
    --hud-bg: rgba(8, 15, 30, 0.85);
    --hud-border: rgba(255, 255, 255, 0.1);
    --accent: #00e0ff;
    --accent-glow: rgba(0, 224, 255, 0.6);
    --accent-red: #ff3366;
    --text-primary: #ffffff;
    --text-secondary: #8ca2bf;
    --overlay-z: 100;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    overflow: hidden;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    user-select: none;
}

.tv-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

#player {
    width: 100vw;
    height: 100vh;
    transform: scale(1.2);
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.15)
    );
    background-size: 100% 4px;
    z-index: 10;
    pointer-events: none;
    opacity: 0.8;
    display: none;
}

.noise-overlay {
    position: absolute; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url('data:image/svg+xml,%3Csvg viewBox=%220 0 200 200%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22noiseFilter%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.65%22 numOctaves=%223%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23noiseFilter)%22 opacity=%220.15%22/%3E%3C/svg%3E');
    z-index: 6; pointer-events: none;
    display: none;
}

.vhs-filter {
    position: absolute; top: 0; left: 0; width: 100vw; height: 100vh;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.5);
    background: linear-gradient(rgba(255,0,0,0.05) 0%, rgba(0,255,0,0.02) 50%, rgba(0,0,255,0.05) 100%);
    mix-blend-mode: screen;
    z-index: 5; pointer-events: none;
    animation: vhs-rgb 3s infinite linear;
    display: none;
}

@keyframes vhs-rgb {
    0% { transform: translateY(0) scale(1.001);  }
    10% { transform: translateY(2px) scale(1.0); }
    100% { transform: translateY(0) scale(1.001); }
}

/* Look: Clean */
body.look-clean #player { transform: scale(1.0) !important; filter: none; }
body.look-clean .scanlines, body.look-clean .vhs-filter, body.look-clean .noise-overlay { display: none; }

/* Look: Retro */
body.look-retro #player { transform: scale(1.4) !important; filter: contrast(1.2) sepia(0.2); }
body.look-retro .scanlines { display: block; opacity: 0.6; }
body.look-retro .noise-overlay { display: block; }
body.look-retro .vhs-filter { display: none; }

/* Look: Y2K */
body.look-y2k #player { transform: scale(1.4) !important; filter: contrast(1.1) saturate(1.2); }
body.look-y2k .vhs-filter { display: block; opacity: 0.8; }
body.look-y2k .scanlines { display: block; opacity: 0.5; }
body.look-y2k .noise-overlay { display: none; }

/* Custom VCR Font Re-Import for Y2K Mode */
@font-face {
    font-family: 'VCR';
    src: url('assets/fonts/vcr.ttf') format('truetype');
}

body.look-y2k, body.look-y2k *:not(i) {
    font-family: 'VCR', sans-serif !important;
    text-transform: uppercase !important;
}

#tv-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

#tv-static.active {
    opacity: 1;
}

.tv-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--overlay-z);
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.logo {
    position: absolute;
    top: 35px;
    right: 45px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    background: var(--hud-bg);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--hud-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 1px;
}

.logo-kratex {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.logo-tv {
    color: var(--accent-red);
    text-shadow: 0 0 15px rgba(255, 51, 102, 0.6);
}

.info-banner {
    position: absolute;
    bottom: 50px;
    left: 50px;
    width: calc(100% - 100px);
    max-width: 900px;
    height: auto;
    min-height: 90px;
    background: var(--hud-bg);
    border-top: 3px solid var(--accent);
    display: flex;
    align-items: center;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.info-banner.hidden {
    opacity: 0;
    transform: translateY(30px);
}

.channel-num {
    background: linear-gradient(135deg, #005f8f, var(--accent));
    color: white;
    padding: 0 25px;
    height: 100%;
    font-size: 28px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    box-shadow: 2px 0 15px rgba(0,0,0,0.3);
}

.program-details {
    padding: 0 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.program-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.2;
    width: 100%;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.program-tags {
    display: flex;
    align-items: center;
    gap: 12px;
}

.program-category {
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.program-status {
    font-size: 13px;
    color: #20e070;
    font-weight: 700;
    letter-spacing: 1px;
}

.remote-controls {
    position: absolute;
    bottom: 120px;
    right: 50px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 110;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.remote-controls.hidden {
    display: none;
}

.floating-actions {
    position: absolute;
    bottom: 50px;
    right: 50px;
    display: flex;
    gap: 15px;
    z-index: 105;
    pointer-events: auto;
}

.floating-btn {
    width: 60px;
    height: 60px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.floating-btn:hover {
    color: white;
    border-color: white;
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

.keyboard-hints {
    position: absolute;
    top: 50px;
    left: 50px;
    color: rgba(255,255,255,0.3);
    font-size: 20px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    pointer-events: none;
    z-index: 100;
}

.remote-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: -10px;
    margin-left: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.volume-controls, .channel-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.minimal-controls-box {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.remote-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid transparent;
    border-radius: 20px;
    width: 60px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Minimal Remote Overrides */
.minimal-btn {
    background: transparent;
    color: #fff;
    border: none;
    border-radius: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 20px;
    width: auto;
    padding: 2px 10px;
    box-shadow: none;
    cursor: pointer;
    transition: color 0.1s;
    outline: none;
}

.minimal-btn:hover {
    color: var(--accent);
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
}

.minimal-btn:active {
    color: #fff;
    transform: none;
}

.retro-dropdown {
    background: #000;
    color: #0f0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    border: 2px solid #888;
    padding: 5px 10px;
    width: 100%;
    margin-bottom: 10px;
    outline: none;
    cursor: pointer;
    text-transform: uppercase;
}

.retro-info-banner {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #555;
    border-radius: 0;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.8);
    align-items: flex-start;
    padding: 10px;
    height: auto;
}

.retro-channel {
    background: #000;
    color: #0f0;
    border: 2px solid #0f0;
    box-shadow: none;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    padding: 10px;
    font-size: 24px;
    margin-right: 15px;
}

.retro-details {
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.program-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 5px;
}

.program-title { margin-bottom: 0; color: #fff; text-shadow: none; font-size: 24px; width: 100%; line-height: 1.2; }
.program-year { color: #f0f; font-size: 20px; margin-left: 15px; white-space: nowrap; }

.program-desc {
    color: #ccc;
    font-size: 16px;
    margin-bottom: 12px;
    width: 100%;
}

.program-category {
    background: #00f;
    color: #fff;
    border-radius: 0;
    padding: 2px 5px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}


.power-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.power-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.power-btn {
    background: transparent;
    border: 2px solid rgba(0, 224, 255, 0.5);
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(0, 224, 255, 0.1), inset 0 0 20px rgba(0, 224, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    transition: all 0.3s ease;
    outline: none;
}

.power-btn svg {
    color: var(--accent);
    margin-bottom: 5px;
}

.power-btn:hover {
    background: rgba(0, 224, 255, 0.1);
    box-shadow: 0 0 40px rgba(0, 224, 255, 0.5), inset 0 0 30px rgba(0, 224, 255, 0.3);
    transform: scale(1.05);
    border-color: var(--accent);
}


/* Ticker Styles */
.ticker-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000000;
    color: white;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 20px;
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    z-index: 150;
    border-top: 2px solid white;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 60s linear infinite;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Landing Content Styles */
.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 201;
}

.landing-logo {
    max-width: 300px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.landing-content p {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.landing-links {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.landing-links a {
    color: white;
    text-decoration: none;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 20px;
    transition: all 0.2s ease;
    background: rgba(0,0,0,0.5);
}

.landing-links a:hover {
    background: var(--accent);
    color: black;
    border-color: var(--accent);
}

/* TV Logo Image Wrapper */
.logo {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 100;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.logo img {
    height: 60px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

/* Open Video Button */
.open-video-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    margin: 0 20px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.open-video-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--accent);
    border-color: var(--accent);
}

.category-btn {
    width: 100px !important;
    font-size: 14px !important;
}
