/**
 * Components - Minimal UI Components
 */

/**/
/* Modern Hero Section */
.hero-modern {
    position: relative;
    background-color: #0f172a;
    color: white;
    /* Strict containment for filters */
    overflow: hidden;
    transform: translateZ(0);
    /* Force GPU layer to fix Safari blur bleed */
    border-radius: 0;

    height: auto;
    min-height: 400px;
    /* Reduced from 500px to avoid "full page" feel on laptops */
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    /* Extend behind transparent nav */
    margin-top: -62px;
    padding-top: 62px;
}

.hero-modern-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    /* Reduced blur to minimize performance hit and bleeding radius */
    filter: blur(50px) brightness(0.3);
    /* Scale up to hide potential blur edges */
    transform: scale(1.1);
    opacity: 0.8;
    z-index: 0;
    /* GPU optimization to prevent blocking other animations */
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    contain: strict;
}

.hero-modern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.2), #0f172a);
}

.hero-modern-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping */
    gap: 3rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
    align-items: center;
    /* Center vertically if side-by-side, or in column */
    justify-content: center;
    /* Center horizontally */
}

/* Hero Media Group - Poster + Gallery Strip */
.hero-media-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: 0.75rem;
}

.hero-gallery-strip {
    display: flex;
    gap: 0.4rem;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
}

.hero-gallery-thumb {
    width: 50px;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, opacity 0.2s;
}

.hero-gallery-strip:hover .hero-gallery-thumb {
    opacity: 0.85;
}

.hero-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-gallery-more-btn {
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.hero-gallery-more-btn span {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-text-content {
    flex: 1;
    min-width: 300px;
    /* Prevent it from getting too squashed */
    padding-top: 20px;
}

@media (max-width: 768px) {
    .hero-modern-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-text-content {
        width: 100%;
        padding-top: 0;
    }

    .hero-modern-content .flex {
        justify-content: center;
        /* Center the flex rows inside (rating, buttons) */
    }

    .hero-gallery-thumb {
        width: 40px;
        height: 56px;
    }

    .hero-poster {
        width: 200px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-meta {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-genres {
        justify-content: center;
    }

    .hero-summary {
        font-size: 0.9rem;
    }
}

.hero-poster {
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    color: white;
}

/* Show Detail Hero Meta */
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
}

.hero-meta-sep {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.6rem;
}

.hero-rating {
    color: #fbbf24;
    font-weight: 600;
}

.hero-status {
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 0.85rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-summary {
    color: white;
    font-size: 1rem;
    line-height: 1.7;
    max-width: 800px;
}

.hero-summary p {
    margin: 0;
    color: white;
}

.hero-genres {
    margin-top: 2rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Reusable pill style for meta info (genres, person details, etc.) */
.meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

a.meta-pill:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Show Page Quick Navigation (mobile only) */
.show-quick-nav {
    display: none;
}

@media (max-width: 768px) {
    .show-quick-nav {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding: 0.75rem 0;
        margin-bottom: 1rem;
        border-bottom: 1px solid #eee;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .show-quick-nav::-webkit-scrollbar {
        display: none;
    }

    .quick-nav-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        font-weight: 500;
        color: #555;
        background: #f5f5f5;
        border: 1px solid #e0e0e0;
        border-radius: 50px;
        text-decoration: none;
        transition: all 0.2s;
    }

    .quick-nav-btn:hover,
    .quick-nav-btn:active {
        background: #333;
        color: white;
        border-color: #333;
    }
}

/* Modern Accordion */
details.season-accordion {
    border: none;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
    background: white;
    transition: background-color 0.2s;
}

details.season-accordion:last-child {
    border-bottom: none;
}

details.season-accordion summary {
    list-style: none;
    /* Remove default triangle */
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.125rem;
    color: #1f2937;
}

details.season-accordion summary::-webkit-details-marker {
    display: none;
}

details.season-accordion summary::after {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7' /%3E%3C/svg%3E");
    transition: transform 0.2s;
}

details.season-accordion[open] summary::after {
    transform: rotate(180deg);
}

details.season-accordion[open] summary {
    border-bottom: 1px solid #f3f4f6;
}

/* Placeholder Box */
.placeholder-box {
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 2rem;
}

.placeholder-icon {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

/* Episode Card with Image Background Overlay */
.episode-card-overlay {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.episode-card-overlay:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.episode-card-content {
    padding: 1rem 1.25rem;
    color: white;
}

.episode-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.episode-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.episode-airdate-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.episode-date-status {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    line-height: 1;
}

/* Today - highlighted green */
.episode-date-today {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

/* Tomorrow - cyan accent */
.episode-date-tomorrow {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 2px 6px rgba(6, 182, 212, 0.3);
}

/* Upcoming (within next week or future) - blue subtle */
.episode-date-upcoming {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
}

/* Aired - muted gray */
.episode-date-aired {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* TBA - warning amber */
.episode-date-tba {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.episode-airdate {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.episode-card-overlay .episode-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: white !important;
    line-height: 1.3;
}

.episode-card-overlay .episode-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7) !important;
}

.episode-card-overlay .episode-summary {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8) !important;
    margin: 0.5rem 0;
}

/* Next Episode Card with Image Background Overlay */
.next-episode-card-overlay {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.next-episode-card-overlay:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.next-episode-content {
    padding: 2rem;
    color: white;
}

.next-episode-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.next-episode-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: white;
    line-height: 1.2;
}

.next-episode-info {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.next-episode-summary {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    color: white;
}

.btn-outline {
    background: white;
    border-color: var(--border-color);
    color: var(--color-text-secondary);
}

.btn-outline:hover {
    border-color: var(--color-text-primary);
    color: var(--color-text-primary);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
}

.btn-icon {
    padding: var(--space-2);
    color: var(--color-text-secondary);
    background: transparent;
}

.btn-icon:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-secondary);
}

/* === NAVIGATION (Unsplash-inspired) === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 62px;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Scrolled state - solid white */
.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

/* Dark text on transparent nav for visibility */
.nav:not(.scrolled) .nav-brand,
.nav:not(.scrolled) .nav-link,
.nav:not(.scrolled) .nav-btn-ghost {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.nav:not(.scrolled) .nav-brand span {
    color: rgba(255, 255, 255, 0.7) !important;
}

.nav:not(.scrolled) .nav-search-input {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
}

.nav:not(.scrolled) .nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.nav:not(.scrolled) .nav-search-icon {
    color: rgba(255, 255, 255, 0.7);
}

.nav:not(.scrolled) .nav-divider {
    background: rgba(255, 255, 255, 0.3);
}

/* Sign Up button: white in transparent state, dark when scrolled */
.nav:not(.scrolled) .nav-btn-primary {
    background: white;
    color: #111;
}

.nav:not(.scrolled) .nav-btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 62px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Clean text logo */
.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

.nav-brand:hover {
    color: #111;
}

/* Large search bar in header */
.nav-search {
    flex: 1;
    position: relative;
}

.nav-search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.75rem;
    font-size: 0.95rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 24px;
    color: #111;
    transition: all 0.2s ease;
}

.nav-search-input:hover {
    background: #eee;
}

.nav-search-input:focus {
    outline: none;
    background: #fff;
    border-color: #ddd;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.nav-search-input::placeholder {
    color: #888;
}

.nav-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

/* Navigation menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    margin: 0;
    margin-left: auto;
    padding: 0;
    align-items: center;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

/* Simple clean links */
.nav-link {
    color: #767676;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: #111;
}

/* Divider */
.nav-divider {
    width: 1px;
    height: 32px;
    background: #e5e5e5;
    margin: 0 0.5rem;
}

/* User Menu */
#userMenu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Auth Buttons - Clean style */
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    border: none;
    white-space: nowrap;
}

.nav-btn-ghost {
    background: transparent;
    color: #767676;
}

.nav-btn-ghost:hover {
    color: #111;
}

.nav-btn-primary {
    background: #111;
    color: #fff;
}

.nav-btn-primary:hover {
    background: #333;
}

/* Logged in user */
.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
}

.nav-user:hover {
    background: #f5f5f5;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #111;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-logout {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #767676;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.nav-logout:hover {
    color: #111;
    background: #f5f5f5;
}

/* Logout button: white text in transparent state */
.nav:not(.scrolled) .nav-logout {
    color: rgba(255, 255, 255, 0.85);
}

.nav:not(.scrolled) .nav-logout:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

/* === MOBILE NAVIGATION === */

/* Hamburger button - hidden on desktop */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    position: relative;
    width: 40px;
    height: 40px;
    z-index: 101;
}

/* Hamburger lines */
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #111;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.nav-hamburger span:nth-child(1) {
    top: 12px;
}

.nav-hamburger span:nth-child(2) {
    top: 19px;
}

.nav-hamburger span:nth-child(3) {
    top: 26px;
}

/* Hamburger to X animation when open */
.nav-hamburger.open span:nth-child(1) {
    top: 19px;
    transform: translateX(-50%) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    top: 19px;
    transform: translateX(-50%) rotate(-45deg);
}

/* Transparent nav hamburger color */
.nav:not(.scrolled) .nav-hamburger span {
    background: #fff;
}

/* Force white nav when menu is open */
.nav.menu-open {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav.menu-open .nav-hamburger span {
    background: #111;
}

.nav.menu-open .nav-brand,
.nav.menu-open .nav-brand span {
    color: #111 !important;
    text-shadow: none !important;
}

/* Mobile overlay menu - fullscreen slide from right */
.nav-mobile-menu {
    position: fixed;
    top: 62px;
    right: 0;
    bottom: 0;
    width: 100%;
    background: #fff;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transform: translateX(100%);
    overflow-y: auto;
    /* Hidden by default - prevents flash on page load */
    visibility: hidden;
    /* No transition initially - prevents slide animation on load */
}

/* Hide mobile menu completely on desktop to prevent flash during reload */
@media (min-width: 769px) {
    .nav-mobile-menu {
        display: none !important;
    }
}

.nav-mobile-menu.open {
    transform: translateX(0);
    visibility: visible;
    /* Only add transition when opening/closing, not on initial load */
    transition: transform 0.3s ease, visibility 0s;
}

/* Add transition for closing animation */
.nav-mobile-menu:not(.open) {
    transition: transform 0.3s ease, visibility 0s 0.3s;
}

/* Mobile search inside menu */
.nav-mobile-search {
    position: relative;
    margin-bottom: 1.5rem;
}

.nav-mobile-search input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 12px;
    color: #111;
}

.nav-mobile-search input:focus {
    outline: none;
    background: #fff;
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-mobile-search svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    width: 20px;
    height: 20px;
}

/* Mobile nav links - large touch targets */
.nav-mobile-links {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.nav-mobile-links a {
    display: block;
    padding: 1.25rem 0;
    color: #111;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.nav-mobile-links a:last-child {
    border-bottom: none;
}

/* Mobile user section - at bottom */
.nav-mobile-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 0;
    margin-top: auto;
    border-top: 1px solid #eee;
}

.nav-mobile-user .nav-avatar {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}

.nav-mobile-user>span:not(.nav-avatar) {
    flex: 1;
    color: #111;
    font-weight: 500;
    font-size: 1rem;
}

.nav-mobile-logout {
    color: #666;
    font-size: 0.95rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

/* Mobile auth buttons - at bottom */
.nav-mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.25rem;
    margin-top: auto;
    border-top: 1px solid #eee;
}

.nav-mobile-auth button {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.nav-mobile-auth .btn-ghost {
    background: #f5f5f5;
    border: none;
    color: #111;
}

.nav-mobile-auth .btn-primary {
    background: #111;
    border: none;
    color: #fff;
}

/* Prevent body scroll when menu open */
body.mobile-menu-open {
    overflow: hidden;
}

/* When mobile menu is open, hide desktop nav elements even on desktop resize */
body.mobile-menu-open .nav-menu {
    display: none !important;
}

body.mobile-menu-open .nav-search {
    display: none !important;
}

body.mobile-menu-open .nav-hamburger {
    display: flex !important;
}

@media (max-width: 768px) {

    /* Show hamburger, hide desktop menu and search */
    .nav-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-search {
        display: none;
    }

    .nav-menu {
        display: none;
    }

    .nav-container {
        padding: 0 1rem;
        gap: 0.5rem;
    }
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 500;
    line-height: 1;
}

.badge-outline-white {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(4px);
}

.badge-dark {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.gap-2 {
    gap: var(--space-2);
}

.flex-wrap {
    flex-wrap: wrap;
}

/* === SHOW CARD === */
.show-card {
    position: relative;
    cursor: pointer;
    transition: none;
    margin-bottom: var(--space-4);
}

.show-card-image-wrapper {
    position: relative;
    width: 100%;
    background: var(--color-bg-secondary);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.show-card-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: filter var(--transition-base);
}

.show-card:hover .show-card-image {
    filter: brightness(0.9);
}

.show-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity var(--transition-fast);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--space-4);
}

.show-card:hover .show-card-overlay {
    opacity: 1;
}

.show-card-actions {
    display: flex;
    justify-content: flex-end;
}

.show-card-info {
    color: white;
}

.show-card-title {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-1);
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.show-card-meta {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.8);
}

/* === SHOWS GRID === */
/* === GRID LAYOUT (Replaces Masonry) === */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-6);
    padding: var(--space-8) 0;
    align-items: start;
    /* Fix: Align items to top of row */
    /* Prevent weird stretching/offset behavior */
    align-content: start;
}

.shows-grid .show-card {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Ensure uniform height */
}

.show-card-image-wrapper {
    aspect-ratio: 2/3;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.show-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.show-card:hover .show-card-image {
    transform: scale(1.05);
    /* Zoom effect instead of brightness */
    filter: none;
}

/* === FORMS === */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-1);
    color: var(--color-text-primary);
}

.form-control {
    width: 100%;
    padding: var(--space-3);
    font-size: var(--text-base);
    color: var(--color-text-primary);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-text-primary);
}

/* === SEARCH BAR (Hero) === */
.search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: var(--space-4) var(--space-4) var(--space-4) var(--space-12);
    font-size: var(--text-lg);
    border: 1px solid transparent;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.search-input:hover {
    background: white;
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    background: white;
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.search-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

/* === MODAL === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--space-4);
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    /* Smaller, focused auth modal */
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.modal-header {
    padding: var(--space-8) var(--space-8) 0;
    text-align: center;
    border: none;
}

.modal-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: transparent;
    border: none;
    font-size: var(--text-2xl);
    color: var(--color-text-secondary);
    cursor: pointer;
}

.modal-body {
    padding: var(--space-8);
}

/* === HERO SECTION === */
.hero {
    min-height: 660px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    margin-bottom: 0rem;
    position: relative;
    /* Extend behind transparent nav */
    margin-top: -62px;
    padding-top: 62px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.85) 0%, rgba(30, 30, 50, 0.75) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.hero-title {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: #fff;
    color: #111;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* === ENHANCED HERO SECTION === */
.hero-enhanced {
    position: relative;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    margin-top: -62px;
    padding: calc(62px + 3rem) 0 3rem;
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center 20%;
    filter: blur(30px) brightness(0.35);
    transform: scale(1.15);
    z-index: 0;
}

.hero-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.7) 50%, rgba(15, 23, 42, 0.95) 85%, rgba(15, 23, 42, 1) 100%);
    z-index: 1;
}

.hero-enhanced-content {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

.hero-two-col {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 4rem;
    align-items: center;
    margin-bottom: 2rem;
}

.hero-main {
    text-align: left;
    padding-right: 2rem;
}

.hero-main .hero-title {
    text-align: left;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-main .hero-subtitle {
    text-align: left;
    font-size: 1.35rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-main .hero-btn {
    padding: 1.1rem 2.5rem;
    font-size: 1.05rem;
}

.hero-main .hero-stats {
    justify-content: flex-start;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 3rem;
}

/* On the Spot / Airing Today List */
.hero-airing-today {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
}

.hero-airing-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-airing-dot {
    width: 10px;
    height: 10px;
    background: #f59e0b;
    border-radius: 50%;
    animation: pulse-badge 2s ease-in-out infinite;
}

.hero-airing-header h3 {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.hero-airing-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-airing-item {
    margin: 0;
}

.hero-airing-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.hero-airing-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-airing-thumb {
    width: 40px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.hero-airing-info {
    flex: 1;
    min-width: 0;
}

.hero-airing-show {
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-airing-ep {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-airing-time {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
}

.hero-airing-network {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.hero-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    backdrop-filter: blur(10px);
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-badge:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
    transform: translateY(-1px);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Trending Shows Strip in Hero */
.hero-featured {
    margin-top: 2.5rem;
}

.hero-featured-label {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero-featured-strip {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-show-mini {
    display: block;
    width: 100px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.hero-show-mini:hover {
    transform: translateY(-4px) scale(1.05);
}

.hero-show-mini-poster {
    width: 100px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s ease;
}

.hero-show-mini:hover .hero-show-mini-poster {
    border-color: rgba(255, 255, 255, 0.4);
}

.hero-show-mini-title {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Airing Tonight Section */
.airing-tonight-section {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f172a 100%);
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.airing-tonight-section h2 {
    color: white !important;
}

.airing-tonight-section .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Live Badge for Cards */
.card-badge-live {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 400px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Enhanced Hero Mobile */
    .hero-enhanced {
        min-height: auto;
        padding: calc(62px + 2rem) 0 2rem;
    }

    .hero-two-col {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero-main {
        text-align: center;
        padding-right: 0;
    }

    .hero-main .hero-title {
        text-align: center;
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-main .hero-subtitle {
        text-align: center;
        font-size: 1rem;
        margin-bottom: 1.5rem;
        max-width: none;
    }

    .hero-main .hero-btn {
        padding: 0.9rem 1.75rem;
        font-size: 1rem;
    }

    .hero-main .hero-stats {
        justify-content: center;
        text-align: center;
        margin-top: 1.5rem;
        padding-top: 1rem;
        gap: 2rem;
    }

    .hero-actions-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-featured-strip {
        gap: 0.75rem;
    }

    .hero-show-mini {
        width: 70px;
    }

    .hero-show-mini-poster {
        width: 70px;
        height: 105px;
    }

    .hero-show-mini-title {
        font-size: 0.65rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat-number {
        font-size: 1.25rem;
    }

    .hero-airing-today {
        max-width: 100%;
        overflow: hidden;
    }

    .hero-airing-show,
    .hero-airing-ep {
        max-width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .hero-enhanced {
        padding: calc(62px + 1.5rem) 0 1.5rem;
    }

    .hero-main .hero-title {
        font-size: 1.75rem;
    }

    .hero-main .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-airing-today {
        padding: 1rem;
    }

    .hero-airing-thumb {
        width: 35px;
        height: 50px;
    }

    .hero-airing-show {
        font-size: 0.85rem;
    }

    .hero-airing-ep {
        font-size: 0.7rem;
    }

    .hero-stat-number {
        font-size: 1.1rem;
    }

    .hero-stat-label {
        font-size: 0.65rem;
    }
}

/* === PAGE HEADER (Reusable for Calendar, Profile, Discover, etc.) === */
/* Uses negative margin to extend gradient behind transparent nav */
.page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    text-align: center;
    margin-top: -62px;
    padding: 95px 1rem 2rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: white;
}

.page-header p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 1rem;
}

/* === PROFILE PAGE === */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* === CALENDAR PAGE === */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.95rem;
}

.calendar-stat strong {
    color: #111;
    font-weight: 600;
}

.calendar-stat-divider {
    color: #ddd;
    margin: 0 0.25rem;
}

.calendar-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* View Toggle (Week/Month) */
.calendar-view-toggle {
    display: flex;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
}

.toggle-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.toggle-btn:hover {
    color: #111;
}

.toggle-btn.active {
    background: #111;
    color: #fff;
}

/* Date Navigation */
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.15s ease;
}

.nav-arrow:hover {
    background: #eee;
    color: #111;
}

.calendar-period {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    min-width: 140px;
    text-align: center;
}

/* Today Button */
.today-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.today-btn:hover {
    background: #eee;
    color: #111;
}

/* Calendar Day Section */
.calendar-day-section {
    margin-bottom: 2.5rem;
}

.calendar-date-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: #666;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calendar-date-header.today {
    color: #111;
    border-bottom-color: #111;
}

.today-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #111;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Episode Card */
.episode-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.episode-card:hover {
    border-color: #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.episode-poster {
    width: 70px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.episode-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
    font-weight: 600;
}

.episode-details {
    flex: 1;
    min-width: 0;
}

.episode-show-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    margin-bottom: 0.25rem;
}

.episode-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.episode-meta {
    font-size: 0.85rem;
    color: #888;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .calendar-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .calendar-stats {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
    }

    .calendar-controls {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }

    .calendar-view-toggle {
        width: 100%;
        justify-content: center;
    }

    .toggle-btn {
        flex: 1;
    }

    .calendar-nav {
        width: 100%;
        justify-content: center;
    }

    .today-btn {
        width: 100%;
    }
}

/* === DISCOVER PAGE === */

/* Discover Hero */
.discover-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 95px 1rem 3rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    /* Extend behind transparent nav */
    margin-top: -62px;
}

.discover-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.discover-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.discover-hero h1 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.discover-hero p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Discover Search */
.discover-search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.discover-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    z-index: 1;
    transition: transform 0.3s, color 0.3s;
}

/* Move icon with input on focus */
.discover-search-wrapper:focus-within .discover-search-icon {
    transform: translateY(calc(-50% - 2px));
    color: #333;
}

.discover-search {
    width: 100%;
    padding: 1.1rem 1.25rem 1.1rem 3.25rem;
    font-size: 1rem;
    background: white;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s, transform 0.3s;
}

.discover-search:focus {
    outline: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.discover-search::placeholder {
    color: #999;
}

/* Filter Section */
.discover-filters {
    background: #fafafa;
    border-bottom: 1px solid #eee;
    padding: 1.25rem 0;
    position: sticky;
    top: 62px;
    z-index: 90;
}

.filters-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0.5rem;
}

/* Genre Pills */
.genre-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* Desktop-only centering */
@media (min-width: 769px) {
    .genre-pills {
        justify-content: center;
    }
}

.genre-pill {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #555;
}

.genre-pill:hover {
    border-color: #333;
    color: #111;
    transform: translateY(-1px);
}

.genre-pill.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Filter Dropdowns */
.filter-dropdowns {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: all 0.2s;
    color: #333;
    max-width: 220px;
    /* Increased to fit long names */
    min-width: 140px;
}

.filter-select:hover {
    border-color: #999;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Filter Toggle Button - hidden on desktop */
.filter-toggle-btn {
    display: none;
}

/* === DISCOVER PAGE MOBILE RESPONSIVE === */
@media (max-width: 768px) {

    /* Filters container - stack vertically */
    .discover-filters {
        padding: 1rem 0 !important;
    }

    .filters-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    /* Genre pills - horizontal scroll */
    .genre-pills {
        display: flex !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        width: calc(100% + 2rem) !important;
        scrollbar-width: none;
    }

    .genre-pills::-webkit-scrollbar {
        display: none;
    }

    .genre-pill {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    /* Filter toggle button - visible on mobile */
    .filter-toggle-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        font-weight: 600;
        font-family: inherit;
        color: #555;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .filter-toggle-btn:hover {
        border-color: #999;
    }

    .filter-toggle-btn.active {
        border-color: #667eea;
        color: #667eea;
    }

    .filter-toggle-arrow {
        margin-left: auto;
        transition: transform 0.2s ease;
    }

    .filter-toggle-btn.active .filter-toggle-arrow {
        transform: rotate(180deg);
    }

    .filter-count-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 0.7rem;
        font-weight: 700;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 50px;
    }

    /* Filter dropdowns - hidden by default on mobile */
    .filter-dropdowns {
        display: none !important;
        grid-template-columns: repeat(2, 1fr);
        width: 100% !important;
        gap: 0.75rem !important;
    }

    .filter-dropdowns.open {
        display: grid !important;
    }

    .filter-select {
        flex: 1 !important;
        max-width: none !important;
        min-width: 0 !important;
        font-size: 16px !important;
        /* Prevents iOS zoom on focus */
    }

    /* Shows grid - exactly 2 columns on mobile */
    .shows-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        padding: 1rem 0 !important;
        overflow: visible !important;
        -webkit-overflow-scrolling: auto !important;
    }

    .shows-grid.discover-grid {
        gap: 0.75rem !important;
    }

    /* Fix home-section scroll issue on mobile */
    .home-section .shows-grid {
        max-height: none !important;
        overflow: visible !important;
    }



    /* Discover hero/header spacing */
    .discover-search-wrapper {
        margin-top: 1rem !important;
    }

    .discover-search {
        padding: 0.9rem 1rem 0.9rem 2.75rem !important;
        font-size: 16px !important;
        /* Prevents iOS zoom */
    }

    /* Fix container overflow causing horizontal scroll */
    .container {
        overflow-x: clip;
    }

    /* Pagination mobile */
    .pagination-controls {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    /* Disable hover effects on touch devices to prevent double-tap issue */
    .show-card.enhanced:hover {
        transform: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    }

    .show-card.enhanced .show-card-overlay {
        opacity: 1 !important;
    }

    /* === SHOW DETAIL PAGE MOBILE === */
    /* Main content + sidebar - stack vertically */
    .container>div[style*="grid-template-columns"] {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    .main-content {
        width: 100% !important;
        margin-bottom: 2rem !important;
    }

    .sidebar {
        width: 100% !important;
    }

    /* Episode cards mobile */
    /* Episode overlay cards mobile */
    .episode-card-overlay {
        margin-bottom: 6px !important;
    }

    .episode-card-content {
        padding: 0.75rem 1rem !important;
    }

    .episode-title {
        font-size: 0.9rem !important;
    }

    /* Next episode overlay card mobile */
    .next-episode-content {
        padding: 1.5rem !important;
    }

    .next-episode-title {
        font-size: 1.25rem !important;
    }

    .next-episode-summary {
        display: none !important;
    }

    /* Cast grid mobile - 4 columns instead of 3 */
    .sidebar div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
    }
}

/* Results Info */
.results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.5rem;
}

.results-count {
    font-size: 0.95rem;
    color: #666;
}

.results-count strong {
    color: #111;
    font-weight: 600;
}

.active-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    background: #f0f0f0;
    border-radius: 50px;
    color: #555;
}

.active-filter-tag .remove-filter {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    font-size: 1rem;
    line-height: 1;
}

.active-filter-tag .remove-filter:hover {
    opacity: 1;
}

.clear-all-filters {
    font-size: 0.85rem;
    color: #667eea;
    cursor: pointer;
    margin-left: 0.5rem;
    font-weight: 500;
}

.clear-all-filters:hover {
    text-decoration: underline;
}

/* Featured Section */
.discover-section {
    padding: 2.5rem 0;
}

.discover-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.discover-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.discover-section-title .icon {
    font-size: 1.25rem;
}

.view-all-link {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.view-all-link:hover {
    color: #764ba2;
}

/* Enhanced Show Cards */
.shows-grid.discover-grid {
    gap: 1.5rem;
}

.show-card.enhanced {
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.show-card.enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.show-card.enhanced .show-card-image-wrapper {
    border-radius: 0;
    margin-bottom: 0;
}

.show-card.enhanced .show-card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.show-card.enhanced:hover .show-card-overlay {
    opacity: 1;
}

.show-card.enhanced .show-card-info {
    padding: 1rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.show-card.enhanced .show-card-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.show-card.enhanced .show-card-meta {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.show-card.enhanced .card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
}

.show-card.enhanced .card-rating {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    color: #ffc107;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Empty State */
.discover-empty {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.discover-empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.discover-empty h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.discover-empty p {
    color: #666;
    font-size: 1rem;
}

/* Loading Skeleton */
.skeleton-card {
    background: #f5f5f5;
    border-radius: 12px;
    aspect-ratio: 2/3;
    animation: shimmer 1.5s infinite;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .discover-hero {
        padding: calc(62px + 2rem) 1rem 2rem;
    }

    .discover-hero h1 {
        font-size: 1.75rem;
    }

    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .genre-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .genre-pill {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .filter-dropdowns {
        justify-content: space-between;
    }

    .filter-select {
        flex: 1;
    }
}

/* === PERSON PAGE === */
.person-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 3rem 0;
    border-bottom: none;
    margin-top: -62px;
    padding-top: calc(62px + 2rem);
    color: white;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2rem;
}

.back-btn:hover {
    border-color: #111;
    color: #111;
}

.person-header {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.person-photo {
    flex-shrink: 0;
    width: 200px;
}

.person-photo img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.person-info {
    flex: 1;
    min-width: 0;
}

.person-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 1rem 0;
    letter-spacing: -0.02em;
}

.person-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* person-meta-item uses same styles as meta-pill */
.person-meta-item {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.person-details {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.person-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 500;
    color: white;
}

.person-bio {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.section-count {
    font-size: 0.9rem;
    color: #888;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #888;
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .person-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .person-photo {
        width: 160px;
    }

    .person-name {
        font-size: 1.75rem;
    }

    .person-meta {
        justify-content: center;
    }

    .person-details {
        justify-content: center;
    }

    .person-bio {
        text-align: left;
    }
}

/* === PAGINATION === */
.discover-pagination {
    margin-top: 2rem;
    padding: 1rem 0 2rem;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-controls .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pagination-controls .page-btn:hover {
    background: #eee;
    border-color: #ddd;
}

.pagination-controls .page-btn.active {
    background: #111;
    color: white;
    border-color: #111;
}

.pagination-controls .page-dots {
    color: #999;
    padding: 0 4px;
}

.pagination-controls .page-info {
    margin-left: 16px;
    color: #888;
    font-size: 14px;
}

@media (max-width: 640px) {
    .pagination-controls {
        gap: 4px;
    }

    .pagination-controls .page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }

    .pagination-controls .page-info {
        width: 100%;
        text-align: center;
        margin: 8px 0 0 0;
    }
}

/* === LANDING PAGE SECTIONS === */

/* Recent Articles Section */
.recent-articles-section {
    background: #f9fafb;
    padding: 4rem 1rem;
}

.recent-articles-section .section-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-top: -1.25rem;
    margin-bottom: 2rem;
}

.home-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.home-article-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.home-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.home-article-image {
    height: 180px;
    background: linear-gradient(135deg, #667eea, #8b5cf6);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.home-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.home-article-card:hover .home-article-image img {
    transform: scale(1.05);
}

.home-article-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.home-article-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home-article-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-article-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-article-meta {
    font-size: 0.8rem;
    color: #999;
    margin-top: auto;
}

@media (max-width: 768px) {
    .home-articles-grid {
        grid-template-columns: 1fr;
    }

    .recent-articles-section {
        padding: 3rem 0;
    }
}

/* Genre Pills Section */
.genres-section {
    padding: 3rem 0;
}

/* Unified Landing Page Headings */
.home-section h2,
.genres-section h2,
.airing-section h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.genres-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    max-width: 900px;
    margin: 0 auto;
}

.genre-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.genre-link:hover {
    background: #1a1a2e;
    color: white;
    border-color: #1a1a2e;
}

.genre-link .emoji {
    font-size: 1.1rem;
}

/* Airing Section */
.airing-section {
    background: #f9fafb;
    padding: 4rem 0;
}

.airing-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.airing-section .section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.airing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.airing-card {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: box-shadow 0.2s;
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
}

.airing-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.airing-card-image {
    width: 60px;
    height: 85px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.airing-card-info {
    flex: 1;
    min-width: 0;
}

.airing-card-show {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.airing-card-episode {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.airing-card-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #888;
    background: #f3f4f6;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

/* === TV GUIDE / SCHEDULE SECTION === */
.schedule-section {
    background: #f9fafb;
    padding: 4rem 0 3rem;
}

.schedule-section h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.schedule-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Day Tabs */
.schedule-tabs-wrapper {
    max-width: 900px;
    margin: 0 auto 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.schedule-tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.schedule-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    min-width: max-content;
    padding: 0 0.5rem;
}

.schedule-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
    font-family: inherit;
}

.schedule-tab:hover {
    border-color: #111;
    background: #fafafa;
}

.schedule-tab.active {
    background: #111;
    border-color: #111;
    color: white;
}

.schedule-tab.schedule-tab-empty {
    opacity: 0.5;
}

.schedule-tab.schedule-tab-empty:hover {
    opacity: 0.75;
}

.schedule-tab-day {
    font-size: 0.9rem;
    font-weight: 600;
    color: inherit;
}

.schedule-tab.active .schedule-tab-day {
    color: white;
}

.schedule-tab-date {
    font-size: 0.75rem;
    color: #888;
}

.schedule-tab.active .schedule-tab-date {
    color: rgba(255, 255, 255, 0.7);
}

.schedule-tab-count {
    font-size: 0.65rem;
    color: #999;
    margin-top: 2px;
}

.schedule-tab.active .schedule-tab-count {
    color: rgba(255, 255, 255, 0.6);
}

/* Day Panels */

.schedule-day-panel {
    display: none;
}

.schedule-day-panel.active {
    display: block;
}

/* Episode Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 0.75rem;
}

/* Episode Card */
.schedule-card {
    display: flex;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.schedule-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.schedule-card-poster {
    width: 56px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.schedule-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.schedule-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.schedule-card-show {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-card-rating {
    font-size: 0.75rem;
    font-weight: 600;
    color: #f59e0b;
    flex-shrink: 0;
    background: #fffbeb;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.schedule-card-episode {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.schedule-card-time {
    font-size: 0.75rem;
    font-weight: 500;
    color: #1a1a2e;
    background: #e8eaf0;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.schedule-card-network {
    font-size: 0.75rem;
    color: #666;
}

.schedule-card-genre {
    font-size: 0.7rem;
    color: #999;
}

/* Empty State */
.schedule-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.schedule-empty svg {
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.schedule-empty p {
    font-size: 0.95rem;
    margin: 0;
    color: #999;
}

/* Mobile */
@media (max-width: 768px) {
    .schedule-section {
        padding: 3rem 0 2rem;
    }

    .schedule-tabs {
        justify-content: flex-start;
        padding: 0 0.5rem;
    }

    .schedule-tab {
        min-width: 75px;
        padding: 0.6rem 0.9rem;
    }

    .schedule-tab-day {
        font-size: 0.8rem;
    }

    .schedule-grid {
        grid-template-columns: 1fr;
    }
}

/* === SCHEDULE PAGE === */
.schedule-page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 3rem 1rem 2rem;
    text-align: center;
    color: white;
    margin-top: -62px;
    padding-top: calc(62px + 2rem);
}

.schedule-page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.schedule-page-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.schedule-page-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.schedule-page-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.schedule-page-day-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111;
    margin: 0;
    text-align: left;
}

.schedule-page-day-count {
    font-size: 0.85rem;
    color: #888;
    flex-shrink: 0;
}

/* Schedule Filter Bar */
.schedule-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    margin-bottom: 0.5rem;
}

.schedule-filter-bar label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.schedule-filter-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    min-width: 180px;
}

.schedule-filter-select:hover {
    border-color: #d1d5db;
}

.schedule-filter-select:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 2px rgba(26, 26, 46, 0.1);
}

/* Hide filtered-out cards */
.schedule-card.schedule-hidden {
    display: none;
}

/* Empty state when all cards filtered out */
.schedule-filter-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #999;
    font-size: 0.95rem;
}

/* Network Quick Filters */
.schedule-network-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.schedule-quick-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
}

.schedule-quick-filters::-webkit-scrollbar {
    display: none;
}

.schedule-network-pill {
    padding: 0.5rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    color: #555;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.schedule-network-pill:hover {
    border-color: #111;
    color: #111;
}

.schedule-network-pill.active {
    background: #111;
    border-color: #111;
    color: white;
}

@media (max-width: 768px) {
    .schedule-page-header h1 {
        font-size: 1.75rem;
    }

    .schedule-network-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .schedule-quick-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        min-width: 0;
        width: 100%;
        padding-bottom: 2px;
    }

    .schedule-filter-select {
        width: auto;
        min-width: 160px;
    }

    .schedule-network-pill {
        padding: 0.45rem 1rem;
        font-size: 0.8rem;
    }
}

/* Stats Bar */
.stats-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 3rem 1rem;
    text-align: center;
    color: white;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Final CTA Section */
.cta-section {
    padding: 5rem 1rem;
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 26, 46, 0.3);
}

/* === DISCOVER SHOWS TABS === */
.shows-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.shows-tabs {
    display: flex;
    gap: 0.5rem;
}

.shows-tab {
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shows-tab:hover {
    border-color: #111;
    color: #111;
}

.shows-tab.active {
    background: #111;
    border-color: #111;
    color: white;
}

.shows-panel {
    display: none;
}

.shows-panel.active {
    display: block;
}

@media (max-width: 768px) {
    .shows-tabs {
        gap: 0.35rem;
    }

    .shows-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Home Sections Spacing */
.home-section {
    padding: 4rem 0;
    overflow: visible;
    /* Prevent unwanted scroll containers */
}

.home-section .container {
    overflow: visible;
}

.home-section .shows-grid {
    overflow: visible;
}

.home-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .airing-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Footer Styles
   ============================================ */
.site-footer {
    background: #fff;
    color: #374151;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid #e5e7eb;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section {
    min-width: 0;
}

.footer-title {
    color: #111827;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.footer-about {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #6b7280;
    max-width: 300px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #111827;
}

.footer-bottom {
    padding-top: 1.5rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright,
.footer-attribution {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0;
}

.footer-attribution a {
    color: #6366f1;
    text-decoration: none;
}

.footer-attribution a:hover {
    text-decoration: underline;
}

.footer-description {
    margin: 1.5rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.footer-description p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #9ca3af;
    margin: 0;
}

/* Footer responsive */
@media (max-width: 768px) {
    .site-footer {
        padding: 2rem 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-about {
        max-width: none;
        margin: 0 auto;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Show Page - Seasons & Episodes Redesign
   ============================================ */

/* On Deck Section */
.on-deck-section {
    margin-bottom: 2rem;
}

.on-deck-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
}

.on-deck-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 50%, #6366f1 100%);
}

.on-deck-thumb {
    flex-shrink: 0;
    width: 200px;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.on-deck-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.on-deck-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #9ca3af;
}

.on-deck-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.on-deck-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #10b981;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.on-deck-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

.on-deck-episode-num {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.on-deck-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #111;
    line-height: 1.2;
}

.on-deck-airdate {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.on-deck-airdate-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.on-deck-summary {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6b7280;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Season Selector Dropdown */
.season-tabs-container {
    margin-bottom: var(--space-8);
    max-width: 100%;
    padding: var(--space-5);
    background: var(--color-bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.season-select-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.season-tabs-title {
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
    margin: 0;
    flex-shrink: 0;
}

.season-select-control {
    position: relative;
    flex-shrink: 0;
}

.season-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: var(--space-3) 2.25rem var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    font-family: var(--font-sans);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 220px;
    box-shadow: var(--shadow-sm);
}

.season-select:hover {
    border-color: var(--color-text-secondary);
    box-shadow: var(--shadow-md);
}

.season-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.season-select option {
    font-family: var(--font-sans);
    padding: var(--space-2);
}

.season-select-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.season-select-control:hover .season-select-icon {
    color: var(--color-text-secondary);
}

/* Episodes List (IMDB-style) */
.episodes-list-modern {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.episode-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.episode-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.episode-thumb {
    flex-shrink: 0;
    width: 160px;
    aspect-ratio: 16/9;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}

.episode-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.5rem;
}

.episode-num-badge {
    position: absolute;
    bottom: 0.4rem;
    left: 0.4rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border-radius: 4px;
}

.episode-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.episode-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.episode-item .episode-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.episode-item .episode-airdate {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.episode-item .episode-summary {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.episode-item .episode-meta {
    font-size: 0.8rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.episode-item .episode-meta .rating {
    color: #fbbf24;
}

/* Episode date badges */
.episode-item .date-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 4px;
    line-height: 1;
}

.episode-item .date-badge.today {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.episode-item .date-badge.tomorrow {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.episode-item .date-badge.upcoming {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.episode-item .date-badge.tba {
    background: rgba(251, 191, 36, 0.15);
    color: #d97706;
}

.episode-item .date-badge.aired {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

/* Empty episodes state */
.episodes-empty {
    padding: 3rem;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px dashed #e5e7eb;
}

/* Mobile Responsive - Show Page */
@media (max-width: 768px) {

    /* On Deck */
    .on-deck-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .on-deck-thumb {
        width: 100%;
    }

    .on-deck-title {
        font-size: 1.25rem;
    }

    .on-deck-summary {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    /* Season dropdown mobile */
    .season-select-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .season-select {
        width: 100%;
        min-width: unset;
    }

    /* Episode items */
    .episode-item {
        flex-direction: column;
        padding: 0;
        overflow: hidden;
    }

    .episode-thumb {
        width: 100%;
        border-radius: 0;
    }

    .episode-num-badge {
        bottom: 0.6rem;
        left: 0.6rem;
    }

    .episode-info {
        padding: 1rem;
    }

    .episode-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .episode-item .episode-airdate {
        order: -1;
    }

    .episode-item .episode-summary {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

/* ============================================
   Modals - Redesigned for Visual Consistency
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    margin-top: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.25s ease-out;
    overflow: hidden;
    position: relative;
}

.modal-large {
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #111;
}

.modal-body {
    padding: 1.5rem;
}

/* Cast Grid */
.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.cast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.cast-card:hover {
    background: white;
    border-color: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cast-card-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cast-card-info {
    width: 100%;
}

.cast-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cast-card-character {
    font-size: 0.8rem;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Gallery Modal */
.modal-gallery {
    background: transparent;
    max-width: 1000px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.gallery-item {
    aspect-ratio: 2/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark Modal Theme (for Gallery) */
.modal-dark {
    background: rgba(0, 0, 0, 0.92);
}

.modal-gallery {
    background: #1a1a1a;
    max-width: 1000px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header-dark {
    background: #1a1a1a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header-dark .modal-title {
    color: white;
}

.modal-close-dark {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-close-dark:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Mobile Modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        margin-top: 0;
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 1rem 1.25rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }

    .modal-header-dark {
        background: #111;
    }

    .modal-body {
        padding: 1rem 1.25rem 2rem;
    }

    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    .cast-card {
        padding: 0.75rem;
    }

    .cast-card-img {
        width: 60px;
        height: 60px;
    }

    .cast-card-name {
        font-size: 0.8rem;
    }

    .cast-card-character {
        font-size: 0.7rem;
    }
}