:root {
    /* Modern Slate Palette */
    --c-bg-body: #f8fafc;
    /* Slate-50 */
    --c-bg-surface: #ffffff;
    /* White */

    /* Brand Colors */
    --c-brand-primary: #e50914;
    /* Netflix Red */
    --c-brand-hover: #b20710;
    --c-brand-dark: #0f172a;
    /* Slate-900 */

    /* Typography */
    --c-text-main: #1e293b;
    /* Slate-800 */
    --c-text-sub: #64748b;
    /* Slate-500 */

    /* Borders & Dividers */
    --c-border: #e2e8f0;
    /* Slate-200 */

    /* Modern UI Tokens */
    --w-container: 1240px;
    --h-header: 80px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Fonts */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Base Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--c-bg-body);
    font-family: var(--font-body);
    color: var(--c-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    max-width: var(--w-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 44px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    gap: 8px;
}

.btn-primary {
    background: var(--c-brand-primary);
    color: white;
    box-shadow: 0 4px 6px rgba(229, 9, 20, 0.2);
}

.btn-primary:hover {
    background: var(--c-brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(229, 9, 20, 0.3);
}

/* HEADER - CLEAN WHITE */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: var(--h-header);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--c-border);
}

.header-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--c-text-main);
    /* Dark Text */
    padding: 28px 0;
    position: relative;
    letter-spacing: 0.5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--c-brand-primary);
    transition: width 0.3s ease;
    border-radius: 3px 3px 0 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--c-brand-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--c-text-main);
    font-size: 22px;
    cursor: pointer;
}

/* NEWS TICKER */
.news-ticker-wrap {
    background: var(--c-brand-dark);
    color: white;
    height: 44px;
    overflow: hidden;
}

.ticker-label {
    background: var(--c-brand-primary);
    color: white;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0% 100%);
    padding-right: 30px;
    z-index: 2;
}

.ticker-content {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

/* HERO SECTION */
.hero-section {
    padding: 30px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* Slider */
.headline-slider-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    aspect-ratio: 16/9;
}

.slider-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    padding: 40px;
}

.slider-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

/* Live Widget Card */
.live-player-wrapper {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--c-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Important for equal height */
    min-height: 0;
    /* Important for flex/grid overflow */
}

.player-header {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-text-main);
}

.program-title {
    font-weight: 700;
    font-size: 15px;
}

.video-container {
    background: black;
    aspect-ratio: 16/9;
}

.next-programs {
    background: #f8fafc;
    flex: 1;
}

.program-item {
    background: white;
    margin-bottom: 1px;
    padding: 16px 20px;
    border-left: 3px solid transparent;
}

.program-item:hover {
    border-left-color: var(--c-brand-primary);
    background: #f1f5f9;
}

.program-item .time {
    color: var(--c-brand-primary);
    font-size: 18px;
}

/* CARDS - Modern & Clean */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    /* Soft shadow, no border */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid white;
    /* Invisible border for sizing */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.card-img {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.08);
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--c-brand-primary);
    margin-bottom: 8px;
    display: inline-block;
    background: #fff1f2;
    padding: 4px 8px;
    border-radius: 4px;
    align-self: flex-start;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text-main);
    line-height: 1.4;
    margin-bottom: 12px;
}

.card-meta {
    font-size: 12px;
    color: var(--c-text-sub);
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Section Headings */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--c-text-main);
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--c-brand-primary);
    margin-top: 8px;
    border-radius: 2px;
}

/* FOOTER */
.main-footer {
    background: var(--c-brand-dark);
    color: #94a3b8;
    padding: 80px 0 30px;
    margin-top: 80px;
    font-size: 15px;
}

.footer-col h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-col a {
    color: #cbd5e1;
    transition: 0.2s;
}

.footer-col a:hover {
    color: var(--c-brand-primary);
    padding-left: 5px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-list {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-grid,
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    .hero-grid,
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .main-header {
        height: 60px;
    }

    .headline-slider-wrapper {
        min-height: 300px;
    }
}

/* Utilities */
.glass-panel {
    /* Kept for potential overlay usage or specialized cards */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

/* LIVE PAGE LAYOUT */
.live-page-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 0;
    max-width: 1400px;
    margin: 30px auto;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 70vh;
    /* Fixed height for chat scroll */
    min-height: 500px;
}

/* PROGRAM DETAIL STYLES */
.program-hero {
    position: relative;
    height: 60vh;
    /* Reduced from 85vh */
    min-height: 500px;
    width: 100%;
    display: flex;
    align-items: center;
    color: white;
    /* Text over image needs to be white */
    margin-bottom: 2rem;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.program-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.program-meta-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    align-items: center;
}

.featured-badge {
    background: var(--c-brand-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.program-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-play {
    background: white;
    color: black;
    border: none;
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
}

.btn-play:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.9);
}

.btn-list {
    background: rgba(109, 109, 110, 0.7);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
}

.btn-list:hover {
    background: rgba(109, 109, 110, 0.4);
}

.btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.program-cast-preview {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 20px;
}

.program-cast-preview strong {
    color: #fff;
    margin-right: 5px;
}

.program-cast-preview span {
    display: block;
}
}

.ep-info {
    padding: 1.5rem;
}

.ep-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--c-text-main);
}

.ep-meta {
    font-size: 0.9rem;
    color: var(--c-text-sub);
}

.video-info {
    padding: 20px;
    background: #0f172a;
    color: white;
    flex: 1;
}

.live-status {
    color: #e50914;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #e50914;
    border-radius: 50%;
    animation: pulseRed 2s infinite;
}

/* CHAT SECTION */
.chat-section {
    border-left: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.chat-header {
    padding: 15px;
    background: white;
    border-bottom: 1px solid var(--c-border);
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f1f5f9;
}

.chat-msg {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.msg-user {
    font-weight: 800;
    color: var(--c-text-main);
    margin-right: 5px;
}

.msg-text {
    color: #334155;
}

.system-msg {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    font-size: 13px;
    margin-top: 20px;
}

.chat-form {
    padding: 15px;
    background: white;
    border-top: 1px solid var(--c-border);
}

.chat-form .form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.chat-form .form-row:last-child {
    margin-bottom: 0;
}

.chat-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 14px;
}

.btn-send {
    background: var(--c-brand-primary);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-send:hover {
    background: var(--c-brand-hover);
}

@media (max-width: 900px) {
    .live-page-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .chat-section {
        height: 500px;
        border-left: none;
        border-top: 1px solid var(--c-border);
    }
}