/* Midnight Static TV Guide - 90s Retro Styling */

/* ========================================
   CUSTOMIZABLE VARIABLES - TWEAK THESE!
   ======================================== */
:root {
    /* Classic 90s cable TV guide vibe (flatter, chunkier) */
    --tv-background: #120818;
    --grid-surface: #1a0e2e;
    --header-gradient: linear-gradient(90deg, #2a1055 0%, #6b21a8 50%, #2a1055 100%);
    --time-marker-color: #e8d4ff;
    --time-divider-color: rgba(200, 160, 255, 0.55);
    --channel-badge-gradient: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%);
    --channel-badge-border: rgba(255, 255, 255, 0.65);
    --channel-text-glow: rgba(0, 0, 0, 0);
    --program-blue: #5c3d99;
    --program-green: #1c7b58;
    --program-purple: #8b5cf6;
    --program-gold: #b08a2a;
    --program-offline: #494f63;
    --program-border: rgba(255, 255, 255, 0.55);
    --program-border-strong: rgba(255, 255, 255, 0.75);
    --text-primary: #f5f0ff;
    --text-secondary: #ddd0ff;
    --text-muted: rgba(221, 208, 255, 0.8);
    --text-color: var(--text-primary);
    --secondary-color: var(--channel-text-glow);

    /* Layout metrics */
    --channel-row-height: 84px;
    --channel-name-width: 210px;
    --channel-info-width: calc(var(--channel-name-width) + 72px);
    --program-block-min-width: 120px;
    --time-slot-minutes: 30;
    --time-block-count: 5;

    /* Header logo tuning (prevents oversized logo) */
    --logo-size: 42px;
    --logo-glow-color: rgba(180, 130, 255, 0.75);
    --logo-breath-speed: 3.2s;
    --logo-breath-scale: 1.05;

    /* Typography (more like TV listings, less arcade) */
    --font-family-main: 'Barlow', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-family-display: 'Barlow', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-size-channel-name: 13px;
    --font-size-channel-number: 15px;
    --font-size-program-title: 12px;
    --font-size-program-time: 11px;

    /* Transitions / effects */
    --transition-speed: 0.15s;
    --glow-strong: none;
    --glow-soft: none;

    /* Subtle CRT softness for 90s cable-guide feel */
    --blur-header-text: 0.55px;
    --blur-info-box: 0.65px;
    --blur-time-display: 0.6px;
    --blur-ticker: 0.5px;
    --blur-nav-instructions: 0.5px;
    --blur-logo: 0.45px;
    --blur-channel-row: 0.5px;
    --blur-channel-name: 0.55px;
    --blur-program-title: 0.55px;
    --blur-program-time: 0.5px;
    --blur-channel-number: 0.5px;

    /* Fade panels into page background instead of hard boxes */
    --panel-fade-top: rgba(42, 16, 85, 0.78);
    --panel-fade-mid: rgba(26, 14, 46, 0.52);
    --panel-fade-bottom: rgba(8, 4, 16, 0);
    --panel-fade-solid: rgba(26, 14, 46, 0.58);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Loading/Landing Page Styles */
.loading-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    gap: 40px;
    padding: 40px;
}

.loading-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-logo {
    height: 120px;
    width: auto;
    filter: brightness(0) invert(1);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
}

.loading-logo.breathing {
    animation: logoBreath 2s ease-in-out infinite alternate;
}

@keyframes logoBreath {
    0% { 
        filter: drop-shadow(0 0 20px #57048f);
        transform: scale(1);
    }
    100% { 
        filter: drop-shadow(0 0 30px #57048f);
        transform: scale(1.05);
    }
}

.loading-tagline {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    opacity: 0.8;
}

.loading-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 400px;
}

.loading-bar {
    width: 100%;
    height: 20px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 2px solid #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.loading-fill {
    height: 100%;
    background: linear-gradient(135deg, #4a2a4a 0%, #2a1a2a 50%, #1a0a2e 100%);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.loading-percentage {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 300px;
}

.loading-step {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: #666;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    opacity: 0.5;
}

.loading-step.active {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    opacity: 1;
    transform: translateX(10px);
}

.loading-step.completed {
    color: #4a2a4a;
    text-shadow: 0 0 5px rgba(74, 42, 74, 0.8);
    opacity: 0.8;
}

.loading-animation {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-dots {
    display: flex;
    gap: 5px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

.loading-status {
    text-align: center;
    min-height: 20px;
}

.status-text {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}

/* Responsive Design for Loading Page */
@media (max-width: 768px) {
    .loading-screen {
        gap: 30px;
    padding: 20px;
    }
    
    .loading-logo {
        height: 80px;
    }
    
    .loading-tagline {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .loading-progress {
        min-width: 300px;
    }
    
    .loading-steps {
        min-width: 250px;
    }
}


body {
    font-family: var(--font-family-main);
    background: var(--tv-background);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* CRT Screen Effect */
.crt-screen {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 5;
}

.screen-content {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
    isolation: isolate;
}

/* Unified top bar: header + ticker share one container */
.top-bar {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--panel-fade-top) 0%, var(--panel-fade-mid) 58%, var(--panel-fade-bottom) 100%);
    border: none;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: none;
}

.top-bar .tv-header {
    border: none;
    margin: 0;
    background: transparent;
}

.top-bar .news-ticker {
    border: none;
    margin-bottom: 0;
    background: linear-gradient(180deg, rgba(42, 16, 85, 0.78) 0%, rgba(8, 4, 16, 0) 100%);
}

/* Header Styling */
.tv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    text-shadow: none;
    height: 60px;
    flex-shrink: 0;
    min-height: 60px;
    max-height: 60px;
}

.header-left {
    flex: 0 0 auto;
    max-width: 200px;
}

.header-center {
    flex: 1;
    text-align: center;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-right {
    flex: 0 0 auto;
    max-width: 150px;
}

.header-left .logo {
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
}

/* Breathing Effect */
.breathing {
    animation: breathing 3s ease-in-out infinite;
}

@keyframes breathing {
    0% { opacity: 0.8; text-shadow: 0 0 5px #57048f; }
    50% { opacity: 1; text-shadow: 0 0 15px rgba(255, 255, 255, 1); }
    100% { opacity: 0.8; text-shadow: 0 0 5px #57048f; }
}

.header-center .date-display {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: var(--text-color);
    text-shadow: 0 0 8px var(--channel-text-glow);
    filter: blur(var(--blur-header-text));
}

.header-right .signal-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.signal-bars {
    display: flex;
    gap: 3px;
    align-items: end;
}

.signal-bars .bar {
    width: 4px;
    background: #fff;
    box-shadow: none;
    animation: signalPulse 2s ease-in-out infinite;
}

.signal-bars .bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.signal-bars .bar:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.signal-bars .bar:nth-child(3) { height: 16px; animation-delay: 0.4s; }

@keyframes signalPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.signal-text {
    font-family: var(--font-family-display);
    font-size: 10px;
    color: var(--text-color);
    text-shadow: none;
    filter: blur(var(--blur-header-text));
}

/* Info Section / Now Playing + Preview */
.info-section,
.info-section.nowplay-preview {
    display: flex;
    margin-bottom: 0;
    align-items: stretch;
    min-height: 300px;
    gap: 0;
    background: linear-gradient(180deg, rgba(7, 38, 92, 0.88) 0%, rgba(4, 18, 45, 0.62) 62%, var(--panel-fade-bottom) 100%);
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    backdrop-filter: blur(2px);
}

.info-section.nowplay-preview .info-box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.info-body {
    display: flex;
    flex: 1;
    min-height: 0;
    align-items: stretch;
    gap: 16px;
}

.info-body.has-poster .info-content {
    flex: 1;
    min-width: 0;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

#now-description.program-description {
    font-family: var(--font-family-main);
    font-size: 14px;
    line-height: 1.35;
    color: rgba(236, 241, 255, 0.88);
    margin-top: 4px;
    filter: blur(var(--blur-info-box));
}

.program-poster-frame {
    flex: 0 0 132px;
    width: 132px;
    max-width: 132px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px 10px 4px;
    box-sizing: border-box;
    overflow: hidden;
}

.program-poster-frame[hidden] {
    display: none !important;
}

.program-poster-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 2px solid rgba(180, 130, 255, 0.35);
    box-shadow: 0 0 12px rgba(120, 80, 200, 0.25);
}
.info-section.nowplay-preview .commercial-box {
    flex: 1.15;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.info-box, .commercial-box {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 18px 20px;
    box-shadow: none;
    filter: blur(var(--blur-info-box));
}

.info-box {
    border-right: none;
    background: linear-gradient(90deg, rgba(60, 20, 100, 0.35) 0%, rgba(8, 4, 16, 0) 100%);
}

.commercial-box {
    overflow: hidden;
}

.info-title, .commercial-title {
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    color: var(--text-secondary);
    text-shadow: none;
    margin-bottom: 10px;
    border-bottom: none;
    padding-bottom: 6px;
    letter-spacing: 1px;
    background: linear-gradient(90deg, rgba(180, 130, 255, 0.16) 0%, rgba(2, 8, 24, 0) 100%);
    filter: blur(var(--blur-info-box));
}

.current-time {
    font-family: var(--font-family-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: none;
    margin-bottom: 2px;
    line-height: 1.05;
    filter: blur(var(--blur-time-display));
}

.timezone-info {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: var(--text-secondary);
    text-shadow: 0 0 5px var(--text-color);
    margin-bottom: 8px;
    opacity: 0.85;
    filter: blur(var(--blur-time-display));
}

.current-program {
    font-family: var(--font-family-main);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
    filter: blur(var(--blur-info-box));
}

.current-channel {
    font-family: var(--font-family-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
    margin-top: 4px;
}

.current-window {
    font-family: var(--font-family-main);
    font-size: 14px;
    color: rgba(236, 241, 255, 0.82);
    margin-top: 2px;
    letter-spacing: 0.4px;
}

.commercial-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    position: relative;
}

.info-section.nowplay-preview .commercial-content {
    justify-content: stretch;
    align-items: stretch;
}

.commercial-item {
    font-family: var(--font-family-main);
    font-size: 12px;
    color: var(--text-secondary);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
    filter: blur(var(--blur-info-box));
}

/* News Ticker (standalone fallback; normally inside .top-bar) */
.news-ticker {
    background: transparent;
    border: none;
    border-radius: 0;
    height: 35px;
    overflow: hidden;
    position: relative;
    box-shadow: none;
    margin-bottom: 0;
}

.ticker-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: inline-flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    will-change: transform;
    animation: scroll-ticker 90s linear infinite;
}

.ticker-item {
    font-family: var(--font-family-main);
    font-size: 14px;
    color: var(--text-primary);
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    padding-right: 0;
    filter: blur(var(--blur-ticker));
}

.ticker-sep {
    color: rgba(207, 224, 255, 0.55);
    padding: 0 1.25rem;
    filter: blur(var(--blur-ticker));
}

@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* TV Guide Grid */
.tv-guide-container {
    flex: 1;
    background: linear-gradient(180deg, var(--panel-fade-solid) 0%, rgba(4, 16, 38, 0.55) 55%, var(--panel-fade-bottom) 100%);
    border: none;
    padding: 12px 12px 10px;
    box-shadow: none;
    overflow: hidden;
    --guide-window-minutes: calc(var(--time-block-count) * var(--time-slot-minutes));
}

.time-header {
    position: relative;
    z-index: 12;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(180, 130, 255, 0.35);
    background: linear-gradient(180deg, rgba(180, 130, 255, 0.18) 0%, rgba(2, 8, 24, 0) 100%);
    min-height: 44px;
}

.time-header-inner {
    display: grid;
    grid-template-columns: var(--channel-info-width) 1fr;
    align-items: center;
    width: 100%;
}

.time-track-wrapper {
    position: relative;
    overflow: hidden;
    /* Match the channels scrollbar gutter so markers align with program blocks */
    padding-right: 12px;
}

.time-label {
    font-family: var(--font-family-display);
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-align: center;
    padding: 6px 8px;
    border-right: 2px solid rgba(180, 130, 255, 0.35);
    text-transform: uppercase;
    text-shadow: none;
}

.time-scale {
    display: grid;
    grid-template-columns: repeat(var(--time-block-count), 1fr);
    position: relative;
    gap: 0;
    width: 100%;
    min-width: 0;
}

.time-marker {
    position: relative;
    font-family: var(--font-family-display);
    font-size: 13px;
    font-weight: 700;
    color: #f5f0ff;
    text-align: center;
    letter-spacing: 0.5px;
    padding: 6px 6px 8px;
    z-index: 15;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    background: rgba(60, 20, 100, 0.88);
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    border-right: 1px solid rgba(0, 0, 0, 0.35);
    border-top: 1px solid rgba(180, 130, 255, 0.35);
}

.time-marker::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    transform: none;
    width: 1px;
    height: 12px;
    background: var(--time-divider-color);
}

.time-scale::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: -640px;
    left: 0;
    right: 0;
    background-image: linear-gradient(to right, transparent 0, transparent calc(100% / var(--time-block-count) - 1px), var(--time-divider-color) calc(100% / var(--time-block-count)));
    background-size: calc(100% / var(--time-block-count));
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
}

.channels-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 640px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 12px;
    scrollbar-width: thin;
    position: relative;
}

.channels-container::-webkit-scrollbar {
    width: 8px;
}

.channels-container::-webkit-scrollbar-thumb {
    background: rgba(180, 130, 255, 0.25);
}

.channel-row {
    position: relative;
    display: grid;
    grid-template-columns: var(--channel-info-width) 1fr;
    background: rgba(7, 32, 86, 0.95);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: none;
    transition: background-color var(--transition-speed) ease;
    cursor: pointer;
}

.channel-row:hover {
    transform: none;
    box-shadow: none;
    background: rgba(10, 49, 129, 0.95);
}

.channel-row.selected {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: -2px;
    box-shadow: none;
}

.channel-info {
    display: flex;
    align-items: stretch;
    border-right: 2px solid rgba(180, 130, 255, 0.35);
    position: relative;
    overflow: hidden;
}

.channel-number-badge {
    width: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--channel-badge-gradient);
    border-right: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 0 12px rgba(9, 86, 210, 0.8);
}

.channel-number {
    font-family: var(--font-family-display);
    font-size: var(--font-size-channel-number);
    color: #f9fbff;
    text-shadow: none;
    font-weight: 800;
}

.channel-meta {
    flex: 1;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.channel-name {
    font-family: var(--font-family-main);
    font-size: var(--font-size-channel-name);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-shadow: none;
}

.channel-name.multi-line {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.channel-name.single-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-name-top {
    font-weight: 600;
}

.channel-name-bottom {
    font-weight: 400;
}

.programs-row {
    position: relative;
    height: var(--channel-row-height);
    padding: 4px 0;
    overflow: visible;
    z-index: 1;
}

.channel-row::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: var(--channel-info-width);
    background-image: linear-gradient(
        to right,
        transparent calc(100% / var(--time-block-count) - 1px),
        rgba(200, 160, 255, 0.22) calc(100% / var(--time-block-count))
    );
    background-size: calc(100% / var(--time-block-count));
    pointer-events: none;
    opacity: 0.85;
}

.program-block {
    position: absolute;
    top: 4px;
    bottom: 4px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 6px 10px;
    background: var(--program-blue);
    color: var(--text-primary);
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: none;
    clip-path: none;
    border: 2px solid var(--program-border);
    border-radius: 0;
    transition: border-color var(--transition-speed) ease;
    z-index: 6;
}

.program-block:hover,
.program-block.selected {
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.9);
}

.program-block.weather-program {
    background: var(--program-purple);
}

.program-block.static-program {
    background: var(--program-green);
}

.program-block.shopping-program {
    background: var(--program-gold);
    color: #1b1403;
}

.program-block.offline-program {
    background: var(--program-offline);
    color: rgba(230, 233, 244, 0.75);
    border-style: dashed;
}

.program-title {
    font-family: var(--font-family-main);
    font-size: var(--font-size-program-title);
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    text-shadow: none;
    margin-bottom: 2px;
    width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    word-break: break-word;
}

.program-time {
    font-family: var(--font-family-main);
    font-size: var(--font-size-program-time);
    color: rgba(236, 241, 255, 0.75);
    letter-spacing: 0.4px;
}

.program-duration {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    color: #666;
    margin-top: 1px;
    font-weight: bold;
    text-shadow: 0 0 2px var(--channel-text-glow);
}

/* Navigation Instructions */
.nav-instructions {
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 12px 18px;
    margin-top: 20px;
    background: #061f4b;
    border: 2px solid rgba(255, 255, 255, 0.55);
    box-shadow: none;
    text-transform: uppercase;
}

.nav-item {
    font-family: var(--font-family-display);
    font-size: 11px;
    letter-spacing: 1px;
    color: #f0f6ff;
    text-shadow: none;
}

@media (max-width: 1200px) {
    :root {
        --channel-name-width: 180px;
        --channel-info-width: calc(var(--channel-name-width) + 68px);
    }

    .channels-container {
        max-height: 560px;
    }
}

@media (max-width: 768px) {
    :root {
        --channel-row-height: 72px;
        --channel-name-width: 150px;
        --channel-info-width: calc(var(--channel-name-width) + 68px);
    }

    .tv-guide-container {
        padding: 14px 12px 10px;
        border-width: 2px;
        overflow-x: auto;
    }

    .time-header,
    .channel-row {
        grid-template-columns: 150px 1fr;
    }

    .channels-container {
        padding-right: 0;
        overflow-x: auto;
        max-height: none;
    }

    .channel-row {
        min-width: 720px;
    }

    .program-block {
        padding: 6px 14px 6px 12px;
        clip-path: none;
    }

    .program-title {
        font-size: 12px;
    }

    .program-time {
        font-size: 10px;
    }

    .nav-instructions {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 540px) {
    :root {
        --channel-name-width: 130px;
        --channel-info-width: calc(var(--channel-name-width) + 56px);
    }

    .time-label {
        font-size: 11px;
    }

    .channel-number-badge {
        width: 56px;
    }

    .channel-slug {
        font-size: 10px;
    }

    .channel-name {
        font-size: 11px;
        letter-spacing: 0.4px;
    }

    .program-block {
        padding: 6px 10px 6px 10px;
    }
}

/* Channel View */
.channel-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.channel-view.hidden {
    display: none;
}

.channel-logo-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2001;
    animation: logoFade 4s ease-in-out infinite;
}

.logo-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 20px;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    letter-spacing: 3px;
}

@keyframes logoFade {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.channel-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2001;
}

.control-btn {
    font-family: var(--font-family-display);
    font-size: 13px;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(12, 39, 102, 0.9) 0%, rgba(5, 19, 58, 0.95) 100%);
    border: 2px solid rgba(180, 130, 255, 0.45);
    border-radius: 4px;
    padding: 8px 14px;
    cursor: pointer;
    text-shadow: var(--glow-soft);
    box-shadow: 0 10px 18px rgba(3, 12, 32, 0.7);
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: linear-gradient(135deg, rgba(18, 72, 184, 0.95) 0%, rgba(9, 38, 104, 0.95) 100%);
    box-shadow: 0 12px 22px rgba(5, 22, 60, 0.8);
    transform: scale(1.05);
}

/* Mobile Portrait Layout - No Auto-Rotation */
@media (max-width: 768px) and (orientation: portrait) {
    /* Force portrait orientation - no rotation */
    html, body {
        min-height: 100vh;
        overflow-x: hidden;
        position: relative;
        width: 100%;
        transform: none;
    }
    
    .crt-screen {
        width: 100vw;
        height: 100vh;
        padding: 5px;
    display: flex;
        flex-direction: column;
    }
    
    .screen-content {
        height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 10px;
        gap: 8px;
    }
    
    /* Compact header for mobile portrait */
    .tv-header {
        height: 50px;
        padding: 8px;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .header-left .logo-container {
        gap: 6px;
    }
    
    .logo-image {
        height: 25px;
    }
    
    .logo-text {
        font-size: 12px;
    }
    
    .header-center .date-display {
        font-size: 14px;
    }
    
    .header-right .signal-status {
        scale: 0.8;
    }
    
    
    .news-ticker {
        height: 25px;
        font-size: 10px;
        flex-shrink: 0;
    }
    
    /* Compact info section - stacked: video first, now playing below */
    .info-section.nowplay-preview {
        flex-direction: column;
        min-height: auto;
        height: auto;
    }

    .info-section.nowplay-preview .commercial-box {
        order: -1;
        flex: 0 0 180px;
        min-height: 180px;
    }

    .info-section.nowplay-preview .info-box {
        order: 0;
        border-right: none;
        border-top: 1px solid rgba(180, 130, 255, 0.25);
        padding: 8px;
    }

    .info-body.has-poster {
        gap: 10px;
    }

    .program-poster-frame {
        flex: 0 0 88px;
        width: 88px;
        max-width: 88px;
        padding: 6px 8px 6px 2px;
    }
    
    .info-box, .commercial-box {
        padding: 6px;
        font-size: 9px;
    }
    
    .info-title, .commercial-title {
        font-size: 9px;
    }
    
    .current-time {
        font-size: 22px;
    }
    
    .current-program {
        font-size: 16px;
    }

    .current-channel {
        font-size: 13px;
    }
    
    .commercial-item {
        font-size: 8px;
    }
    
    /* Mobile TV Guide - Portrait Layout */
    .tv-guide-container {
        flex: 1;
        padding: 8px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    
    /* Time header - horizontal scroll on mobile */
    .time-header {
        display: grid;
        grid-template-columns: 100px 1fr;
        overflow-x: auto;
        margin-bottom: 8px;
        padding-bottom: 6px;
        flex-shrink: 0;
    }
    
    .time-label {
        width: 100px;
        font-size: 10px;
        flex-shrink: 0;
    }
    
    .time-marker {
        font-size: 9px;
    }
    
    /* Channels - vertical list for mobile */
    .channels-container {
        display: flex;
        flex-direction: column;
        gap: 6px;
        flex: 1;
        overflow-y: auto;
    }
    
    .channel-row {
        display: flex;
        flex-direction: column;
        padding: 8px;
        gap: 4px;
        min-height: 80px;
    }
    
    .channel-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
        margin-bottom: 4px;
    }
    
    .channel-number {
        font-size: 12px;
        width: 25px;
    }
    
    .channel-logo {
        font-size: 10px;
        width: 40px;
    }
    
    .channel-name {
        font-size: 11px;
        flex: 1;
        text-align: center;
    }
    
    /* Programs - desktop grid layout only */
    .programs-row {
        position: relative;
        width: 100%;
        min-height: 70px;
        padding: 4px 0;
    }
    
    .program-block {
        padding: 6px;
    }
    
    .program-title {
        font-size: 10px;
        line-height: 1.2;
        margin-bottom: 2px;
    }
    
    .program-time {
        font-size: 8px;
    }
    
    /* Mobile navigation */
    .nav-instructions {
        gap: 15px;
        padding: 6px;
        flex-shrink: 0;
        font-size: 9px;
    }
    
    .nav-item {
        font-size: 9px;
    }
    
    .control-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Mobile Landscape - Prevent auto-rotation */
@media (max-width: 768px) and (orientation: landscape) {
    /* Prevent auto-rotation by maintaining portrait-like proportions */
    .crt-screen {
        transform: rotate(0deg);
        height: 100vh;
        width: 100vw;
    }
    
    /* Keep the existing mobile styles but prevent landscape behavior */
    .tv-header {
        height: 60px;
        padding: 10px;
        gap: 10px;
    }
    
    .header-left .logo-container {
        gap: 8px;
    }
    
    .logo-image {
        height: 30px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .header-center .date-display {
    font-size: 16px;
    }
    
    .info-section.nowplay-preview {
        flex-direction: row;
        min-height: 200px;
        height: auto;
        gap: 0;
    }

    .info-section.nowplay-preview .commercial-box {
        order: 0;
        flex: 1;
        min-height: 0;
    }

    .info-section.nowplay-preview .info-box {
        padding: 8px;
    }
    
    .info-box, .commercial-box {
        padding: 8px;
    }
    
    .info-title, .commercial-title {
        font-size: 10px;
    }
    
    .current-time {
        font-size: 24px;
    }
    
    .current-program {
        font-size: 18px;
    }
    
    .commercial-item {
        font-size: 10px;
    }
    
    .tv-guide-container {
        padding: 10px;
    }
    
    .time-label {
        width: 100px;
        font-size: 12px;
    }
    
    .time-marker {
        font-size: 10px;
    }
    
    .channel-info {
        width: 100px;
        gap: 6px;
    }
    
    .channel-number {
        font-size: 10px;
        width: 18px;
    }
    
    .channel-logo {
        font-size: 9px;
        width: 35px;
    }
    
    .channel-name {
        font-size: 10px;
    }
    
    .program-block {
        padding: 6px;
        grid-column: var(--grid-start, 1) / span var(--grid-span, 1);
    }
    
    .program-title {
        font-size: 9px;
    }
    
    .program-time {
        font-size: 8px;
    }
    
    .nav-instructions {
        gap: 20px;
        padding: 8px;
    }
    
    .nav-item {
        font-size: 10px;
    }
    
    .control-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Glow Effects */
.tv-header, .info-box, .commercial-box, .tv-guide-container, .channel-row, .program-block, .control-btn {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.tv-header:hover, .info-box:hover, .commercial-box:hover, .tv-guide-container:hover {
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

/* Game Station Styles */
.game-station {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(180deg, #2a1055 0%, #120818 55%, #1a0e2e 100%);
    color: #f5f0ff;
    font-family: 'Barlow', 'VT323', sans-serif;
}

.game-header {
    background: linear-gradient(90deg, rgba(42, 16, 85, 0.95) 0%, rgba(107, 33, 168, 0.85) 50%, rgba(42, 16, 85, 0.95) 100%);
    border-bottom: 2px solid rgba(181, 124, 255, 0.45);
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.game-header h1 {
    font-size: 32px;
    margin: 0;
    color: #f5f0ff;
    text-shadow: 0 0 12px rgba(181, 124, 255, 0.55);
}

.game-header p {
    font-size: 16px;
    margin: 10px 0 0 0;
    color: #ddd0ff;
    opacity: 0.95;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.game-card {
    background: linear-gradient(160deg, rgba(60, 20, 100, 0.92) 0%, rgba(26, 14, 46, 0.95) 100%);
    border: 2px solid rgba(181, 124, 255, 0.45);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.game-card:hover {
    background: linear-gradient(160deg, rgba(91, 33, 182, 0.95) 0%, rgba(42, 16, 85, 0.98) 100%);
    box-shadow: 0 0 24px rgba(181, 124, 255, 0.35);
    transform: scale(1.02);
    border-color: rgba(221, 208, 255, 0.65);
}

.game-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.game-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: #f5f0ff;
    letter-spacing: 0.5px;
}

.game-description {
    font-size: 14px;
    color: #ddd0ff;
    margin-bottom: 15px;
    line-height: 1.4;
}

.game-status {
    font-size: 12px;
    color: #c084fc;
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.45);
    letter-spacing: 1px;
}

.game-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

/* Channel View Styles */
.channel-view {
    position: relative;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    display: flex;
        flex-direction: column;
    justify-content: center;
    align-items: center;
}

.channel-logo-display {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: logoBlink 3s ease-in-out infinite;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
    z-index: 1000;
}

.channel-logo-img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
}

.channel-name-display {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    margin-top: 10px;
    text-align: center;
}

@keyframes logoBlink {
    0%, 70% { opacity: 1; }
    75%, 95% { opacity: 0.3; }
    100% { opacity: 1; }
}

.channel-nav-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
    z-index: 1000;
}

.nav-button {
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.95) 0%, rgba(42, 16, 85, 0.98) 100%);
    border: 2px solid rgba(181, 124, 255, 0.55);
    border-radius: 0;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(181, 124, 255, 0.25);
}

.nav-button:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.98) 0%, rgba(60, 20, 100, 0.98) 100%);
    box-shadow: 0 0 20px rgba(181, 124, 255, 0.45);
    transform: scale(1.05);
}

.button-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.channel-info-display {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.82) 0%, rgba(26, 26, 26, 0.55) 72%, rgba(2, 8, 24, 0) 100%);
    border: none;
    border-radius: 0;
    padding: 15px 18px 15px 15px;
    box-shadow: none;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
    z-index: 1000;
    backdrop-filter: blur(0.6px);
}

.program-channel-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: rgba(207, 224, 255, 0.85);
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.program-title {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
}

.program-time {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}

.program-type {
    font-family: 'VT323', monospace;
    font-size: 12px;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
    margin-top: 5px;
    opacity: 0.8;
}

/* Video Player Styles */
.channel-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Disable all video controls */
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Hide video controls completely */
.channel-video::-webkit-media-controls {
    display: none !important;
}

.channel-video::-webkit-media-controls-panel {
    display: none !important;
}

.channel-video::-webkit-media-controls-play-button {
    display: none !important;
}

.channel-video::-webkit-media-controls-timeline {
    display: none !important;
}

.channel-video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.channel-video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.channel-video::-webkit-media-controls-mute-button {
    display: none !important;
}

.channel-video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.channel-video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

.channel-video {
    object-fit: cover;
    z-index: 1;
}

/* Force landscape orientation on mobile for channel view */
@media (max-width: 768px) {
    .channel-view {
        /* Force landscape orientation */
        transform: rotate(0deg);
    }
    
    /* Ensure video fills screen in landscape */
    .channel-view .channel-video {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
    }
    
    /* Hide elements that might interfere */
    .channel-view .crt-screen {
        width: 100vw;
        height: 100vh;
    }
}

/* Portrait orientation - show message to rotate */
@media (max-width: 768px) and (orientation: portrait) {
    .channel-view::before {
        content: "Please rotate your device to landscape";
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(90deg);
        background: rgba(0, 0, 0, 0.9);
        color: #fff;
        padding: 20px;
        border-radius: 10px;
        z-index: 9999;
        font-family: 'Orbitron', monospace;
        font-size: 18px;
        text-align: center;
        pointer-events: none;
        animation: fadeInOut 3s ease-in-out infinite;
    }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.no-video-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
        text-align: center;
    color: #fff;
    font-family: 'Orbitron', monospace;
    z-index: 2;
}

.no-video-message h2 {
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.no-video-message p {
    font-size: 16px;
    opacity: 0.8;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}

/* Logo Text Styling */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 260px;
    width: 100%;
}

.logo-image {
    height: var(--logo-size);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1) blur(var(--blur-logo)) drop-shadow(0 0 15px var(--logo-glow-color));
    animation: logoBreath var(--logo-breath-speed) ease-in-out infinite alternate;
}

@keyframes logoBreath {
    0% { 
        filter: brightness(0) invert(1) drop-shadow(0 0 15px var(--logo-glow-color));
        transform: scale(1);
    }
    100% { 
        filter: brightness(0) invert(1) drop-shadow(0 0 25px var(--logo-glow-color));
        transform: scale(var(--logo-breath-scale));
    }
}

.logo-text {
    font-family: 'Orbitron', monospace;
        font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 10px #8b5cf6;
    letter-spacing: 2px;
}

/* CRT Scanlines Effect */
.crt-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 4;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        var(--scanline-color) 2px,
        var(--scanline-color) 4px
    );
    animation: scanlines var(--scanline-speed) linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Channel Row Scanlines */
.channel-row {
    position: relative;
    overflow: hidden;
}

.channel-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        var(--channel-scanline-color) 1px,
        var(--channel-scanline-color) 2px
    );
    animation: channelScanlines var(--channel-scanline-speed) linear infinite;
}

@keyframes channelScanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(2px); }
}

/* Program Info Display */
.program-info {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a0a2e 0%, #16213e 100%);
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 20px;
    min-width: 400px;
    max-width: 600px;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
    filter: blur(var(--blur-info-box));
}

.program-info.hidden {
    display: none;
}

.program-info-content {
    text-align: center;
}

.program-title-display {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    margin-bottom: 15px;
    filter: blur(var(--blur-info-box));
}

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

.program-channel {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #ffffff;
    font-weight: 700;
    filter: blur(var(--blur-info-box));
}

.program-time {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: #00ff00;
    filter: blur(var(--blur-info-box));
}

.program-description {
    font-family: 'VT323', monospace;
    font-size: 12px;
    color: #ffffff;
    opacity: 0.8;
    margin-top: 10px;
    filter: blur(var(--blur-info-box));
}

/* Static Channel Program Styling */
.static-program {
    background: linear-gradient(135deg, #2a1a4a 0%, #1a0a2e 100%);
    border: 2px solid #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.static-program:hover,
.static-program.selected {
    background: linear-gradient(135deg, #3a2a5a 0%, #2a1a3e 100%);
    border-color: #00ff00;
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.5);
    transform: scale(var(--selection-scale));
    filter: blur(0px) !important;
}

.static-program .program-title {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.static-program .program-time {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}

/* Shopping Channel Program */
.shopping-program {
    background: linear-gradient(135deg, #4a2a1a 0%, #2e1a0a 100%);
    border: 2px solid #8bac0f;
    box-shadow: 0 0 15px rgba(139, 172, 15, 0.3);
}

.shopping-program:hover,
.shopping-program.selected {
    background: linear-gradient(135deg, #5a3a2a 0%, #3e2a1a 100%);
    border-color: #8bac0f;
    box-shadow: 0 0 25px rgba(139, 172, 15, 0.5);
    transform: scale(var(--selection-scale));
    filter: blur(0px) !important;
}

.shopping-program .program-title {
    color: #8bac0f;
    text-shadow: 0 0 10px rgba(139, 172, 15, 0.5);
}

.shopping-program .program-time {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}

/* Remote control button styles removed - only game controllers supported */

/* QR Code Modal */
/* QR modal styles removed - only game controllers supported */

.qr-close-button {
    background: #ff6b35;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 20px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.qr-close-button:hover {
    background: #ff8c5a;
    transform: scale(1.05);
}

.commercial-video-frame {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    aspect-ratio: unset;
    background: #000;
    border: none;
    box-shadow: none;
    overflow: hidden;
}

.commercial-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

.weather-preview-frame {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 14px;
    background:
        linear-gradient(180deg, #3d2060 0%, #6b4423 45%, #3d2060 100%);
    color: #fff;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.weather-preview-frame[hidden] {
    display: none !important;
}

.weather-preview-banner {
    font-family: var(--font-family-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: #ffff00;
    text-transform: uppercase;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.weather-preview-location {
    font-family: var(--font-family-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.weather-preview-temp {
    font-family: var(--font-family-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.weather-preview-condition {
    font-family: var(--font-family-main);
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: capitalize;
    color: #ffff00;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.weather-preview-details {
    font-family: var(--font-family-main);
    font-size: 11px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 4px;
}

/* Tablet/desktop: side-by-side now playing + preview */
@media (min-width: 769px) {
    .info-section.nowplay-preview {
        flex-direction: row;
    }
}

/* Portrait mobile: stack with video on top */
@media (max-width: 768px) and (orientation: portrait) {
    .info-section.nowplay-preview .commercial-box {
        order: -1;
    }
}
