/* ============================================================
   CineOlly — Premium Design System v2
   Ultra-responsive for all devices: Mobile, Tablet, PC, Mac
   ============================================================ */

/* ── Design Tokens ── */
:root {
    /* Backgrounds */
    --bg-void: #06060c;
    --bg-base: #0a0a14;
    --bg-surface: #10101e;
    --bg-elevated: #16162a;
    --bg-card: #1a1a30;
    --bg-card-hover: #222244;
    --bg-glass: rgba(16, 16, 30, 0.75);
    --bg-glass-heavy: rgba(10, 10, 20, 0.92);

    /* Text */
    --text-primary: #f2f2fa;
    --text-secondary: #9898b8;
    --text-muted: #5e5e7e;
    --text-dim: #3a3a55;

    /* Accent Colors */
    --red: #e63946;
    --red-light: #ff4d5a;
    --red-glow: rgba(230, 57, 70, 0.35);
    --gold: #ffd166;
    --gold-dim: rgba(255, 209, 102, 0.15);
    --emerald: #06d6a0;
    --purple: #7b2ff7;
    --purple-dim: rgba(123, 47, 247, 0.12);
    --cyan: #4cc9f0;
    --cyan-dim: rgba(76, 201, 240, 0.12);
    --orange: #ef8354;

    /* Gradients */
    --grad-red: linear-gradient(135deg, #e63946, #ff6b6b);
    --grad-premium: linear-gradient(135deg, #e63946 0%, #9b2cff 50%, #4cc9f0 100%);
    --grad-gold: linear-gradient(135deg, #ffd166, #ef8354);
    --grad-dark: linear-gradient(180deg, transparent 0%, var(--bg-base) 100%);
    --grad-card: linear-gradient(180deg, transparent 20%, rgba(6, 6, 12, 0.92) 100%);
    --grad-hero-bottom: linear-gradient(180deg, transparent 0%, rgba(6, 6, 12, 0.4) 40%, var(--bg-base) 100%);
    --grad-hero-left: linear-gradient(90deg, rgba(6, 6, 12, 0.85) 0%, rgba(6, 6, 12, 0.3) 50%, transparent 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
    --shadow-red: 0 0 40px var(--red-glow);
    --shadow-card: 0 8px 32px rgba(0,0,0,0.35);

    /* Borders */
    --border-subtle: 1px solid rgba(255,255,255,0.05);
    --border-light: 1px solid rgba(255,255,255,0.08);
    --border-accent: 1px solid rgba(230, 57, 70, 0.25);

    /* Radius */
    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-full: 9999px;

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Outfit', 'Space Grotesk', 'Inter', -apple-system, sans-serif;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 0.18s var(--ease-out);
    --t-med: 0.35s var(--ease-out);
    --t-slow: 0.5s var(--ease-out);

    /* Layout — fluid */
    --header-h: 64px;
    --content-max: 1480px;
    --side-pad: clamp(1rem, 4vw, 3.5rem);
    --mob-nav-h: 60px;
    --card-w: 185px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}
button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}
a { color: var(--cyan); text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
input { -webkit-appearance: none; appearance: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Selection */
::selection { background: rgba(230, 57, 70, 0.3); color: white; }

/* ── Ambient Glow ── */
.ambient-glow {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 60% 40% at 20% 20%, rgba(230,57,70,0.05) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 80%, rgba(123,47,247,0.04) 0%, transparent 60%);
    will-change: auto;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    height: var(--header-h);
    background: rgba(6, 6, 12, 0.6);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: var(--border-subtle);
    transition: background var(--t-med), box-shadow var(--t-med);
}
.header.scrolled {
    background: rgba(6, 6, 12, 0.95);
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.header-inner {
    max-width: var(--content-max); margin: 0 auto;
    height: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 0 var(--side-pad);
}
.header-left { display: flex; align-items: center; gap: 2rem; }
.header-right { display: flex; align-items: center; gap: 0.8rem; }

/* Logo */
.logo {
    display: flex; align-items: center; gap: 0.6rem;
    cursor: pointer; flex-shrink: 0;
    -webkit-user-select: none; user-select: none;
}
.logo-mark {
    width: 36px; height: 36px; border-radius: var(--r-sm);
    background: var(--grad-red);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    box-shadow: 0 4px 18px var(--red-glow);
    transition: transform var(--t-fast);
    flex-shrink: 0;
}
.logo:hover .logo-mark { transform: scale(1.08) rotate(-3deg); }
.logo-c { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; color: white; }
.logo-dot {
    position: absolute; bottom: 3px; right: 4px;
    width: 5px; height: 5px; background: var(--gold); border-radius: 50%;
}
.logo-text {
    font-family: var(--font-display); font-size: 1.3rem; font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; letter-spacing: -0.3px;
}

/* Nav */
.main-nav { display: flex; gap: 0.2rem; }
.nav-link {
    padding: 0.4rem 0.9rem; font-size: 0.85rem; font-weight: 500;
    color: var(--text-secondary); border-radius: var(--r-full);
    transition: color var(--t-fast), background var(--t-fast);
    position: relative; white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.nav-link.active { color: white; background: rgba(230, 57, 70, 0.15); }
.nav-link.active::after {
    content: ''; position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%);
    width: 16px; height: 2px; background: var(--red); border-radius: 1px;
}

/* Search */
.search-wrapper { display: flex; align-items: center; position: relative; }
.search-toggle {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); border-radius: 50%;
    transition: color var(--t-fast), background var(--t-fast);
}
.search-toggle:hover { color: white; background: rgba(255,255,255,0.08); }
.search-expanded {
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    width: 0; opacity: 0; overflow: hidden;
    display: flex; align-items: center;
    background: var(--bg-elevated); border: var(--border-light);
    border-radius: var(--r-full);
    transition: width var(--t-med), opacity var(--t-med);
}
.search-wrapper.open .search-expanded {
    width: min(280px, 50vw); opacity: 1; padding: 0 0.8rem;
}
.search-wrapper.open .search-toggle { display: none; }
.search-expanded input {
    flex: 1; background: none; border: none; color: var(--text-primary);
    font-size: 0.88rem; padding: 0.55rem 0.4rem; outline: none;
    font-family: var(--font-body); min-width: 0;
}
.search-expanded input::placeholder { color: var(--text-muted); }
.search-clear {
    color: var(--text-muted); font-size: 0.85rem; padding: 4px 6px;
    transition: color var(--t-fast); flex-shrink: 0;
}
.search-clear:hover { color: white; }

/* ── Mobile Bottom Nav ── */
.mobile-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    height: var(--mob-nav-h);
    background: rgba(6, 6, 12, 0.95);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-top: var(--border-subtle);
    justify-content: space-around; align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mob-nav-btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--text-muted); font-size: 0.6rem; font-weight: 500;
    transition: color var(--t-fast);
    padding: 6px 14px; min-width: 56px;
    -webkit-user-select: none; user-select: none;
}
.mob-nav-btn svg { transition: transform var(--t-fast); width: 20px; height: 20px; }
.mob-nav-btn.active { color: var(--red); }
.mob-nav-btn.active svg { transform: scale(1.1); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative; width: 100%;
    height: clamp(420px, 80vh, 780px);
    overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
    position: absolute; inset: 0; opacity: 0;
    transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide-img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 20%;
}
.hero-overlay-gradient {
    position: absolute; inset: 0; z-index: 2;
    background:
        var(--grad-hero-left),
        var(--grad-hero-bottom);
}
.hero-body {
    position: relative; z-index: 3;
    max-width: var(--content-max); margin: 0 auto;
    padding: 0 var(--side-pad);
    height: 100%; display: flex; flex-direction: column;
    justify-content: flex-end;
    padding-bottom: clamp(2.5rem, 6vh, 5rem);
}

/* Hero content animations */
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.9rem; border-radius: var(--r-full);
    background: rgba(230, 57, 70, 0.15); border: 1px solid rgba(230, 57, 70, 0.3);
    color: var(--red-light); font-size: 0.75rem; font-weight: 600;
    width: fit-content; margin-bottom: 0.7rem;
    animation: fadeUp 0.6s var(--ease-out) 0.2s both;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 5vw, 3.5rem);
    font-weight: 900; line-height: 1.08;
    margin-bottom: 0.6rem;
    max-width: min(600px, 70vw);
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
    letter-spacing: -0.5px;
    animation: fadeUp 0.6s var(--ease-out) 0.3s both;
    overflow-wrap: break-word;
    word-break: break-word;
}
.hero-desc {
    font-size: clamp(0.85rem, 1.5vw, 1.05rem);
    color: var(--text-secondary);
    max-width: min(480px, 65vw);
    margin-bottom: 0.8rem; line-height: 1.6;
    animation: fadeUp 0.6s var(--ease-out) 0.4s both;
}
.hero-stats {
    display: flex; gap: 0.5rem; margin-bottom: 1.2rem;
    flex-wrap: wrap;
    animation: fadeUp 0.6s var(--ease-out) 0.45s both;
}
.hero-stat {
    padding: 0.25rem 0.7rem; border-radius: var(--r-xs);
    background: rgba(255,255,255,0.08); font-size: 0.78rem; font-weight: 600;
    color: var(--text-secondary); backdrop-filter: blur(6px);
}
.hero-actions {
    display: flex; gap: 0.6rem; flex-wrap: wrap;
    animation: fadeUp 0.6s var(--ease-out) 0.5s both;
}
.hero-dots {
    display: flex; gap: 5px; margin-top: 1.5rem;
    animation: fadeUp 0.6s var(--ease-out) 0.55s both;
}
.hero-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.25); border: none; cursor: pointer;
    transition: var(--t-fast); padding: 0;
}
.hero-dot.active { background: var(--red); width: 22px; border-radius: 4px; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn-primary {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.75rem 1.8rem; background: var(--grad-red); color: white;
    font-weight: 700; font-size: 0.9rem; border-radius: var(--r-full);
    box-shadow: 0 6px 24px var(--red-glow);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
    white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 36px var(--red-glow); }
.btn-primary:active { transform: scale(0.97); }

.btn-glass {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    color: white; font-weight: 600; font-size: 0.88rem; border-radius: var(--r-full);
    transition: background var(--t-fast), transform var(--t-fast);
    white-space: nowrap;
}
.btn-glass:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }

/* ============================================================
   GENRE BAR
   ============================================================ */
.genre-bar {
    position: sticky; top: var(--header-h); z-index: 50;
    background: rgba(6, 6, 12, 0.88);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: var(--border-subtle);
    padding: 0 var(--side-pad);
}
.genre-scroll {
    max-width: var(--content-max); margin: 0 auto;
    display: flex; gap: 0.35rem; padding: 0.6rem 0;
    overflow-x: auto; scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.genre-scroll::-webkit-scrollbar { display: none; }
.genre-chip {
    flex-shrink: 0; padding: 0.35rem 0.9rem;
    border-radius: var(--r-full); font-size: 0.78rem; font-weight: 500;
    background: rgba(255,255,255,0.05); color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.06);
    transition: var(--t-fast); white-space: nowrap;
    -webkit-user-select: none; user-select: none;
}
.genre-chip:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.genre-chip.active {
    background: rgba(230, 57, 70, 0.15); color: var(--red-light);
    border-color: rgba(230, 57, 70, 0.3);
}

/* ============================================================
   CONTENT CAROUSELS
   ============================================================ */
.content {
    max-width: var(--content-max); margin: 0 auto;
    padding: 1.2rem var(--side-pad) 4rem;
}

.carousel-section {
    margin-bottom: 2rem;
    animation: fadeUp 0.5s var(--ease-out) both;
}
.carousel-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.8rem; gap: 0.5rem;
}
.section-heading {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 700;
    color: var(--text-primary); display: flex; align-items: center; gap: 0.4rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.see-all-btn {
    font-size: 0.78rem; font-weight: 600; color: var(--red-light);
    padding: 0.35rem 0.9rem; border-radius: var(--r-full);
    background: rgba(230, 57, 70, 0.08);
    transition: var(--t-fast); white-space: nowrap; flex-shrink: 0;
}
.see-all-btn:hover { background: rgba(230, 57, 70, 0.18); }

.carousel-track {
    display: flex; gap: 0.8rem; overflow-x: auto;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}
.carousel-track::-webkit-scrollbar { display: none; }

/* ── Movie Card ── */
.movie-card {
    flex-shrink: 0;
    width: var(--card-w);
    border-radius: var(--r-md); overflow: hidden;
    position: relative; cursor: pointer;
    scroll-snap-align: start;
    transition: transform var(--t-med), box-shadow var(--t-med);
    background: var(--bg-card);
    -webkit-user-select: none; user-select: none;
}
.movie-card:hover {
    transform: translateY(-10px) scale(1.04);
    box-shadow: var(--shadow-lg), var(--shadow-red);
    z-index: 10;
}
.card-poster-wrap {
    position: relative; aspect-ratio: 2/3; overflow: hidden;
    background: var(--bg-elevated);
}
.card-poster {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}
.movie-card:hover .card-poster { transform: scale(1.1); }

.card-gradient {
    position: absolute; inset: 0;
    background: var(--grad-card);
    opacity: 0; transition: opacity var(--t-med);
}
.movie-card:hover .card-gradient { opacity: 1; }

/* Play button */
.card-play {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--grad-red);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity var(--t-med), transform var(--t-med);
    box-shadow: 0 6px 24px var(--red-glow);
    z-index: 4;
}
.card-play svg { margin-left: 2px; }
.movie-card:hover .card-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card-play:hover { transform: translate(-50%, -50%) scale(1.15) !important; }

/* Badges */
.card-rating-badge {
    position: absolute; top: 7px; left: 7px; z-index: 4;
    padding: 2px 7px; border-radius: var(--r-xs);
    background: rgba(0,0,0,0.65); backdrop-filter: blur(8px);
    font-size: 0.68rem; font-weight: 700; color: var(--gold);
    display: flex; align-items: center; gap: 3px;
    border: 1px solid rgba(255, 209, 102, 0.15);
}
.card-quality {
    position: absolute; top: 7px; right: 7px; z-index: 4;
    padding: 2px 6px; border-radius: var(--r-xs);
    background: rgba(230,57,70,0.85);
    font-size: 0.58rem; font-weight: 800; color: white;
    letter-spacing: 0.5px;
}

/* Card info */
.card-info {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 4;
    padding: 0.8rem 0.7rem 0.7rem;
    opacity: 0; transform: translateY(8px);
    transition: opacity var(--t-med), transform var(--t-med);
}
.movie-card:hover .card-info { opacity: 1; transform: translateY(0); }
.card-title {
    font-family: var(--font-display); font-size: 0.82rem; font-weight: 700;
    color: white; line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    margin-bottom: 0.2rem;
}
.card-year {
    font-size: 0.68rem; color: var(--text-secondary); font-weight: 500;
}

/* ============================================================
   GENRE BROWSE GRID
   ============================================================ */
.genre-browse {
    max-width: var(--content-max); margin: 0 auto;
    padding: 1rem var(--side-pad) 4rem;
}
.genre-browse-header { margin-bottom: 1.2rem; }
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr));
    gap: 1rem;
}
.genre-grid .movie-card {
    width: 100%;
}
.scroll-loader {
    display: flex; align-items: center; justify-content: center;
    gap: 0.8rem; padding: 2rem 0; color: var(--text-muted);
    font-size: 0.85rem;
}
.scroll-loader-spinner {
    width: 24px; height: 24px; border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--red); border-radius: 50%;
    animation: loaderSpin 0.8s linear infinite;
}

/* ============================================================
   ULTRA PREMIUM CINEMA PLAYER
   ============================================================ */
.cinema-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: clamp(0.5rem, 2vw, 1.5rem);
    overscroll-behavior: contain;
}
.cinema-overlay.active { opacity: 1; visibility: visible; }

.cinema-modal {
    width: 100%; max-width: 1000px;
    background: var(--bg-surface);
    border-radius: var(--r-lg);
    border: var(--border-light);
    box-shadow: 0 40px 100px rgba(0,0,0,0.8), 0 0 80px rgba(230,57,70,0.08);
    overflow: hidden;
    transform: translateY(40px) scale(0.92);
    transition: transform 0.45s var(--ease-out);
    max-height: 95vh;
    max-height: 95dvh;
    overflow-y: auto;
    position: relative;
    overscroll-behavior: contain;
}
.cinema-overlay.active .cinema-modal {
    transform: translateY(0) scale(1);
}

.cinema-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.8rem 1.5rem;
    background: var(--bg-surface);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cinema-header-title {
    font-family: var(--font-display);
    font-size: 0.95rem; font-weight: 600; color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 70%;
}
.cinema-close {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    color: white; transition: var(--t-fast);
}
.cinema-close:hover { background: var(--red); transform: rotate(90deg) scale(1.1); }

/* Player */
.cinema-player-wrap { position: relative; width: 100%; overflow: hidden; }
.cinema-player {
    width: 100%; aspect-ratio: 16/9;
    background: #000; position: relative;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.cinema-player iframe,
.cinema-player #yt-player-instance {
    position: absolute;
    width: 110% !important;
    height: 120% !important;
    top: -10% !important;
    left: -5% !important;
    border: none;
    pointer-events: none;
}

/* Fullscreen Icon Toggling */
#cinema-fullscreen-btn svg {
    display: none !important;
}
#cinema-fullscreen-btn #fs-enter-icon {
    display: block !important;
}
.cinema-modal.fullscreen-active #cinema-fullscreen-btn #fs-enter-icon {
    display: none !important;
}
.cinema-modal.fullscreen-active #cinema-fullscreen-btn #fs-exit-icon {
    display: block !important;
}
.cinema-player-click-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: pointer;
}
.cinema-player-glow {
    position: absolute; bottom: -25px; left: 10%; right: 10%; height: 50px;
    background: radial-gradient(ellipse, var(--red-glow) 0%, transparent 70%);
    filter: blur(18px); pointer-events: none; opacity: 0.5;
}
.no-trailer {
    color: var(--text-muted); font-size: 1rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
    text-align: center; padding: 1rem;
    position: relative; z-index: 12;
}
.no-trailer-icon { font-size: 2.5rem; opacity: 0.4; }

/* Cinema Controls Bar (YouTube/Netflix-style absolutely overlayed at bottom) */
.cinema-controls-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 2.5rem 1.2rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    border-bottom: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.cinema-player-wrap.controls-visible .cinema-controls-bar {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.cinema-controls-row {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.cinema-controls-left, .cinema-controls-right {
    display: flex; align-items: center; gap: 0.8rem;
}
.cinema-icon-btn {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: var(--t-fast);
    cursor: pointer; padding: 0;
}
.cinema-icon-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    transform: scale(1.08);
}
.cinema-icon-btn:active { transform: scale(0.94); }
.cinema-icon-btn.active {
    color: var(--cyan);
    background: rgba(76,201,240,0.12);
    border-color: rgba(76,201,240,0.25);
}
.cinema-time-display {
    font-size: 0.78rem; font-weight: 600; color: var(--text-secondary);
    user-select: none; font-variant-numeric: tabular-nums;
    margin-left: 0.4rem;
}

/* Timeline / Progress Bar styling */
.cinema-progress-container {
    width: 100%; height: 16px; display: flex; align-items: center;
    cursor: pointer; padding: 4px 0;
}
.cinema-progress-bar {
    width: 100%; height: 4px; background: rgba(255,255,255,0.2);
    border-radius: 2px; position: relative; transition: height 0.15s ease;
}
.cinema-progress-container:hover .cinema-progress-bar {
    height: 6px;
}
.cinema-progress-filled {
    height: 100%; width: 0%; background: var(--red);
    border-radius: 2px; position: absolute; left: 0; top: 0;
}
.cinema-progress-handle {
    width: 12px; height: 12px; border-radius: 50%;
    background: white; position: absolute; top: 50%; left: 0%;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.cinema-progress-container:hover .cinema-progress-handle {
    transform: translate(-50%, -50%) scale(1.35);
}

/* Fullscreen layouts override */
.cinema-modal:fullscreen,
.cinema-modal.fullscreen-active {
    max-width: none !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: black !important;
}
.cinema-modal:fullscreen .cinema-player-wrap,
.cinema-modal.fullscreen-active .cinema-player-wrap {
    flex: 1 !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: black !important;
}
.cinema-modal:fullscreen .cinema-player,
.cinema-modal.fullscreen-active .cinema-player {
    height: 100% !important;
    aspect-ratio: auto !important;
}
.cinema-modal:fullscreen .cinema-header,
.cinema-modal:fullscreen .cinema-details,
.cinema-modal:fullscreen .cinema-cast-section,
.cinema-modal.fullscreen-active .cinema-header,
.cinema-modal.fullscreen-active .cinema-details,
.cinema-modal.fullscreen-active .cinema-cast-section {
    display: none !important;
}

/* Mini Player Mode (PiP) */
.cinema-overlay.mini {
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    pointer-events: none;
}
.cinema-overlay.mini .cinema-modal {
    position: fixed; bottom: 24px; right: 24px;
    top: auto; left: auto; transform: none;
    width: 340px; max-width: 90vw; height: auto;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0,0,0,0.8);
    pointer-events: auto; max-height: none;
}
.cinema-overlay.mini .cinema-header,
.cinema-overlay.mini .cinema-details,
.cinema-overlay.mini .cinema-controls-bar {
    display: none !important;
}
.cinema-mini-overlay {
    position: absolute; inset: 0; z-index: 10;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    gap: 0.8rem; cursor: pointer;
}
.cinema-overlay.mini .cinema-player-wrap:hover .cinema-mini-overlay {
    display: flex;
}
.mini-overlay-btn {
    padding: 0.5rem 1rem; border-radius: var(--r-full);
    font-size: 0.72rem; font-weight: 700; color: white;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.15);
    transition: var(--t-fast); cursor: pointer;
}
.mini-overlay-btn:hover {
    background: white; color: black; transform: scale(1.05);
}
#mini-close-btn:hover {
    background: var(--red); color: white; border-color: var(--red);
}

/* Settings popup container */
.cinema-settings-popup {
    position: absolute;
    bottom: calc(100% + 12px); right: 0;
    z-index: 100; width: 280px;
    background: rgba(10, 10, 20, 0.95);
    border: var(--border-light); border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    display: none; flex-direction: column;
    padding: 1rem; gap: 0.8rem;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.cinema-dropdown-wrapper {
    position: relative; display: inline-block;
}
.cinema-dropdown-wrapper.open .cinema-settings-popup {
    display: flex;
}
.settings-group {
    display: flex; flex-direction: column; gap: 0.4rem;
}
.settings-group-title {
    font-size: 0.68rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.settings-group-options {
    display: flex; flex-wrap: wrap; gap: 0.35rem;
}
.settings-opt {
    padding: 0.25rem 0.6rem; border-radius: var(--r-xs);
    font-size: 0.7rem; font-weight: 600; color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--t-fast); cursor: pointer;
}
.settings-opt:hover {
    color: var(--text-primary); background: rgba(255, 255, 255, 0.1);
}
.settings-opt.active {
    color: var(--emerald); background: rgba(6, 214, 160, 0.12);
    border-color: rgba(6, 214, 160, 0.25);
}

/* Movie Details in Modal */
.cinema-details {
    display: flex; gap: 1.5rem; padding: 1.5rem 2rem;
    align-items: flex-start;
}
.cinema-poster-col { flex-shrink: 0; }
.cinema-poster {
    width: 130px; border-radius: var(--r-sm);
    box-shadow: var(--shadow-md);
    aspect-ratio: 2/3; object-fit: cover;
}
.cinema-info-col { flex: 1; min-width: 0; }
.cinema-title {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    font-weight: 800;
    line-height: 1.15; margin-bottom: 0.6rem; letter-spacing: -0.3px;
    overflow-wrap: break-word; word-break: break-word;
}
.cinema-meta-row {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    margin-bottom: 0.7rem;
}
.cinema-rating-pill {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.8rem; border-radius: var(--r-full);
    background: var(--gold-dim); color: var(--gold);
    font-weight: 700; font-size: 0.84rem;
    border: 1px solid rgba(255, 209, 102, 0.2);
}
.cinema-meta-chip {
    padding: 0.2rem 0.6rem; border-radius: var(--r-xs);
    background: rgba(255,255,255,0.06); color: var(--text-secondary);
    font-size: 0.78rem; font-weight: 500;
}
.cinema-genres-row { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.cinema-genre-tag {
    padding: 0.2rem 0.7rem; border-radius: var(--r-full);
    background: var(--purple-dim); color: var(--cyan);
    border: 1px solid rgba(76, 201, 240, 0.15);
    font-size: 0.72rem; font-weight: 500;
}
.cinema-overview {
    color: var(--text-secondary); font-size: 0.88rem;
    line-height: 1.7;
    max-height: 100px; overflow-y: auto;
}

/* ============================================================
   LOADER
   ============================================================ */
.loader-full {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-void);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1.5rem; color: var(--text-muted); font-size: 0.88rem;
    transition: opacity 0.4s ease;
}
.loader-full.hidden { opacity: 0; pointer-events: none; }
.loader-ring { position: relative; width: 48px; height: 48px; }
.loader-ring div {
    position: absolute; width: 40px; height: 40px;
    border: 3px solid transparent; border-radius: 50%;
    animation: loaderSpin 1.2s ease-in-out infinite;
}
.loader-ring div:nth-child(1) { border-top-color: var(--red); animation-delay: 0s; }
.loader-ring div:nth-child(2) { border-right-color: var(--purple); animation-delay: 0.15s; }
.loader-ring div:nth-child(3) { border-bottom-color: var(--cyan); animation-delay: 0.3s; }
@keyframes loaderSpin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    border-top: var(--border-subtle);
    padding: 2rem var(--side-pad) 1.5rem;
    background: var(--bg-void);
}
.footer-inner {
    max-width: var(--content-max); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
}
.footer-brand p { color: var(--text-muted); font-size: 0.78rem; margin-top: 0.15rem; }
.footer-logo {
    font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
    background: var(--grad-red); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-mid { text-align: center; }
.footer-tagline { color: var(--text-dim); font-size: 0.78rem; }
.footer-links { color: var(--text-muted); font-size: 0.78rem; }
.footer-copy {
    max-width: var(--content-max); margin: 1rem auto 0;
    padding-top: 1rem; border-top: var(--border-subtle);
    text-align: center;
}
.footer-copy p { color: var(--text-dim); font-size: 0.72rem; }

/* Utility */
.fade-in { animation: fadeUp 0.5s var(--ease-out) both; }

/* Search results grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}
.search-results-grid .movie-card {
    width: 100%;
}
.search-results-heading {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.search-results-heading .search-count {
    font-size: 0.8rem; color: var(--text-muted); font-weight: 500;
}

/* Live search indicator */
.search-expanded.searching::after {
    content: ''; position: absolute; bottom: 0; left: 10%; right: 10%;
    height: 2px; background: var(--grad-premium);
    animation: searchPulse 1s ease infinite;
}
@keyframes searchPulse {
    0%, 100% { opacity: 0.3; transform: scaleX(0.5); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── Large Desktop (1440px+) ── */
@media (min-width: 1440px) {
    :root { --card-w: 200px; }
}

/* ── Standard Desktop (1024-1439px) ── */
@media (max-width: 1439px) {
    :root { --card-w: 175px; }
}

/* ── Small Laptop / Tablet Landscape (768-1023px) ── */
@media (max-width: 1023px) {
    :root { --card-w: 155px; }
    .main-nav { gap: 0.1rem; }
    .nav-link { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
}

/* ── Tablet Portrait (768px) ── */
@media (max-width: 768px) {
    :root {
        --header-h: 56px;
        --card-w: 140px;
        --mob-nav-h: 56px;
    }

    /* Switch to mobile nav */
    .main-nav { display: none; }
    .mobile-nav { display: flex; }
    body { padding-bottom: calc(var(--mob-nav-h) + env(safe-area-inset-bottom, 0px)); }

    .hero { height: clamp(350px, 65vh, 550px); }

    .btn-primary svg { width: 16px; height: 16px; }
    .btn-glass svg { width: 14px; height: 14px; }

    .carousel-track { gap: 0.6rem; }

    /* Cinema modal */
    .cinema-details { flex-direction: column; padding: 1rem 1.2rem; gap: 0.8rem; }
    .cinema-poster-col { display: flex; gap: 1rem; align-items: flex-start; width: 100%; }
    .cinema-poster { width: 90px; }
    .cinema-title { font-size: 1.2rem; }
    .cinema-overview { max-height: 80px; font-size: 0.82rem; }
    .cinema-controls-bar { padding: 0.5rem 0.8rem; }
    .cinema-ctrl-chip { font-size: 0.62rem; padding: 0.2rem 0.55rem; }

    /* Footer */
    .footer-inner { flex-direction: column; text-align: center; gap: 0.6rem; }
    .footer-mid { order: -1; }
}

/* ── Large Phone (481-767px) ── */
@media (max-width: 600px) {
    :root { --card-w: 130px; }

    .logo-text { font-size: 1.15rem; }
    .logo-mark { width: 32px; height: 32px; }
    .logo-c { font-size: 1.05rem; }

    .hero-stats { gap: 0.4rem; }
    .hero-stat { padding: 0.2rem 0.55rem; font-size: 0.7rem; }
    .hero-badge { font-size: 0.68rem; padding: 0.25rem 0.7rem; }

    .btn-primary { padding: 0.65rem 1.3rem; font-size: 0.82rem; }
    .btn-glass { padding: 0.65rem 1rem; font-size: 0.8rem; }

    .genre-chip { padding: 0.3rem 0.7rem; font-size: 0.72rem; }

    .card-play { width: 40px; height: 40px; }
    .card-play svg { width: 18px; height: 18px; }
    .card-rating-badge { font-size: 0.62rem; padding: 2px 5px; }
    .card-quality { font-size: 0.55rem; padding: 1px 5px; }

    /* Cinema Overlay and Modal Fit to Screen */
    .cinema-overlay { padding: 0; }
    .cinema-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        display: flex;
        flex-direction: column;
    }
    .cinema-player-wrap { flex-shrink: 0; }
    .cinema-details {
        flex: 1;
        overflow-y: auto;
        padding: 1.2rem 1rem;
    }
    .cinema-close { width: 32px; height: 32px; }
    .cinema-icon-btn { width: 32px; height: 32px; }
    .cinema-controls-left, .cinema-controls-right { gap: 0.4rem; }
    .cinema-time-display { font-size: 0.72rem; margin-left: 0.1rem; }
    #cinema-pip-btn { display: none !important; }
}

/* ── Small Phone (≤480px) ── */
@media (max-width: 480px) {
    :root { --card-w: 120px; }

    .search-wrapper.open .search-expanded { width: min(200px, 45vw); }

    .hero { height: clamp(300px, 60vh, 450px); }

    .hero-actions { gap: 0.4rem; }

    .genre-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.6rem;
    }

    .cinema-poster { width: 75px; }
    .cinema-genres-row { gap: 0.25rem; }
    .cinema-genre-tag { font-size: 0.65rem; padding: 0.15rem 0.5rem; }
}

/* ── Very Small Phone (≤360px) ── */
@media (max-width: 360px) {
    :root { --card-w: 105px; }

    .logo-text { font-size: 1rem; }
    .hero-title { letter-spacing: -0.3px; }

    .btn-primary { padding: 0.55rem 1rem; font-size: 0.78rem; gap: 0.3rem; }
    .btn-glass { padding: 0.55rem 0.8rem; font-size: 0.75rem; gap: 0.3rem; }

    .mob-nav-btn { padding: 5px 8px; min-width: 48px; font-size: 0.55rem; }
    .mob-nav-btn svg { width: 18px; height: 18px; }

    .genre-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Landscape phones ── */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { height: 100vh; height: 100dvh; min-height: 280px; }
    .hero-body { padding-bottom: 1.5rem; }
    .hero-desc { display: none; }
    .hero-stats { margin-bottom: 0.6rem; }
    :root { --mob-nav-h: 48px; }
    .mob-nav-btn span { display: none; }
}

/* ── Hover media query — disable hover effects on touch ── */
@media (hover: none) {
    .movie-card:hover {
        transform: none;
        box-shadow: none;
    }
    .movie-card:hover .card-poster { transform: none; }
    .movie-card:hover .card-gradient { opacity: 0; }
    .movie-card:hover .card-play { opacity: 0; }
    .movie-card:hover .card-info { opacity: 0; }

    /* Show info always on touch */
    .card-gradient { opacity: 1 !important; }
    .card-info { opacity: 1 !important; transform: none !important; }
    .card-rating-badge { display: flex; }

    /* Active state for touch */
    .movie-card:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }
}

/* ── Print ── */
@media print {
    .header, .mobile-nav, .genre-bar, .cinema-overlay, .loader-full, .ambient-glow { display: none !important; }
    body { background: white; color: black; padding: 0; }
    .hero { height: auto; min-height: 0; }
}

/* ── Reduced motion preference ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero-slide { transition: opacity 0.01ms !important; }
}

/* ── Dark/Light system preference (forced dark) ── */
@media (prefers-color-scheme: light) {
    /* CineOlly is always dark theme by design */
    :root { color-scheme: dark; }
}
:root { color-scheme: dark; }

/* YouTube-style Settings Menu Panel */
.cinema-settings-popup {
    width: 290px;
    padding: 6px 0;
    max-height: 320px;
    overflow-y: auto;
    background: rgba(15, 15, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 48px rgba(0,0,0,0.8);
    display: none;
    flex-direction: column;
}
.cinema-dropdown-wrapper.open .cinema-settings-popup {
    display: flex;
}
.settings-menu-view {
    display: none;
    flex-direction: column;
    width: 100%;
}
.settings-menu-view.active {
    display: flex;
}

/* Settings Item Rows */
.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: background var(--t-fast);
    user-select: none;
    width: 100%;
}
.settings-item.clickable {
    cursor: pointer;
}
.settings-item.clickable:hover {
    background: rgba(255, 255, 255, 0.08);
}
.settings-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.settings-item-icon {
    color: var(--text-secondary);
}
.settings-item-value-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-item-value {
    font-size: 0.76rem;
    color: var(--text-secondary);
}
.settings-arrow {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Switches */
.settings-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
    cursor: pointer;
}
.settings-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.settings-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.18);
    transition: var(--t-fast);
    border-radius: 18px;
}
.settings-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: #aaa;
    transition: var(--t-fast);
    border-radius: 50%;
}
.settings-switch input:checked + .settings-slider {
    background-color: var(--red);
}
.settings-switch input:checked + .settings-slider:before {
    transform: translateX(16px);
    background-color: white;
}

/* Submenu option items list */
.settings-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--text-primary);
    width: 100%;
    text-align: left;
}
.settings-back-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}
.settings-back-btn .back-arrow {
    font-size: 1.1rem;
    color: var(--text-secondary);
}
.settings-group-options {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.settings-opt-item {
    display: flex;
    align-items: center;
    padding: 10px 42px 10px 16px; /* indent for checkmark check */
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    width: 100%;
    text-align: left;
    transition: background var(--t-fast);
    position: relative;
}
.settings-opt-item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}
.settings-opt-item.active {
    color: var(--cyan);
    font-weight: 700;
}
.settings-opt-item.active::after {
    content: "✓";
    position: absolute;
    right: 20px;
    font-size: 0.85rem;
    color: var(--cyan);
}

/* Cast Profiles Section */
.cinema-cast-section {
    padding: 0 2rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    width: 100%;
}
.cast-section-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.2rem 0 0.8rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.cast-track {
    display: flex;
    gap: 1.2rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.5rem;
    width: 100%;
}
.cast-track::-webkit-scrollbar {
    display: none;
}
.cast-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    text-align: center;
}
.cast-avatar-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 2px solid rgba(255,255,255,0.08);
    background: var(--bg-elevated);
    transition: transform var(--t-fast), border-color var(--t-fast);
}
.cast-card:hover .cast-avatar-wrap {
    transform: scale(1.08);
    border-color: var(--cyan);
}
.cast-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cast-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
}
.cast-character {
    font-size: 0.62rem;
    color: var(--text-muted);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    margin-top: 2px;
    width: 100%;
}

@media (max-width: 600px) {
    .cinema-cast-section {
        padding: 0 1rem 1.5rem;
    }
}
