/* ============================
   Lumio — Glassmorphism Design System
   Modern · Minimal · Glass · Dark
   ============================ */

:root {
    /* Backgrounds */
    --bg: #06060c;
    --bg-2: #0b0b16;
    --surface: rgba(255,255,255,0.04);
    --surface-2: rgba(255,255,255,0.07);
    --surface-hover: rgba(255,255,255,0.10);

    /* Glass */
    --glass-bg: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.10);
    --glass-blur: blur(20px) saturate(180%);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.37);

    /* Accents */
    --accent: #7c5cfc;
    --accent-light: #a78bfa;
    --accent-2: #e879f9;
    --accent-glow: rgba(124,92,252,0.45);
    --accent-gradient: linear-gradient(135deg, #7c5cfc 0%, #e879f9 100%);
    --accent-gradient-soft: linear-gradient(135deg, rgba(124,92,252,0.15) 0%, rgba(232,121,249,0.15) 100%);

    /* Text */
    --text: #f0f0f5;
    --text-muted: #9898b0;
    --text-dim: #555570;
    --gold: #fbbf24;

    /* Layout */
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --max-w: 1400px;
    --nav-h: 64px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================
   RESET
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    /* Animated gradient mesh background */
    background-image:
        radial-gradient(ellipse 800px 600px at 10% -10%, rgba(124,92,252,0.12), transparent),
        radial-gradient(ellipse 600px 400px at 90% 10%, rgba(232,121,249,0.08), transparent),
        radial-gradient(ellipse 700px 500px at 50% 100%, rgba(124,92,252,0.06), transparent);
    background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }

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

/* ============================
   NAVBAR — Glassmorphism
   ============================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: calc(var(--nav-h) + var(--safe-top));
    padding: var(--safe-top) 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    will-change: transform;
}
.navbar.scrolled {
    background: rgba(6, 6, 12, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom-color: var(--glass-border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.nav-left { display: flex; align-items: center; gap: 8px; }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-link {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px; font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--surface-hover); }
.nav-link.active {
    color: var(--accent-light);
    background: var(--accent-gradient-soft);
    border: 1px solid rgba(124,92,252,0.2);
}
.nav-link svg { flex-shrink: 0; }
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 22px; font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    transition: transform 0.2s;
}
.logo:hover { transform: scale(1.03); }
.logo svg { transition: transform 0.3s; }
.logo:hover svg { transform: rotate(-12deg) scale(1.1); }
.logo .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Search box — glass */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 9px 16px;
    width: 280px;
    transition: all 0.3s ease;
}
.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 4px 20px var(--accent-glow);
    width: 340px;
    background: rgba(255,255,255,0.08);
}
.search-icon { color: var(--text-muted); flex-shrink: 0; transition: color 0.2s; }
.search-box:focus-within .search-icon { color: var(--accent-light); }
#searchInput {
    background: none; border: none; outline: none;
    color: var(--text); font-size: 14px;
    margin-left: 8px; width: 100%;
}
#searchInput::placeholder { color: var(--text-dim); }

/* Search results — glass dropdown */
.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: rgba(11, 11, 22, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--glass-shadow);
    z-index: 100;
}
.search-results.active { display: block; }
.search-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    transition: background 0.2s;
}
.search-item:hover { background: var(--surface-hover); }
.search-item img { width: 36px; height: 54px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.search-item-title { font-size: 13px; font-weight: 500; }
.search-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.search-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ============================
   HERO
   ============================ */
.hero {
    position: relative;
    width: 100%;
    height: 70dvh;
    min-height: 400px;
    max-height: 700px;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center 20%;
    transition: opacity 0.6s ease;
    will-change: transform;
    transform: scale(1.05);
    -webkit-backface-visibility: hidden;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        to right,
        rgba(6,6,12,0.92) 0%,
        rgba(6,6,12,0.5) 50%,
        rgba(6,6,12,0.1) 100%
    ),
    linear-gradient(to top, var(--bg) 0%, transparent 50%);
}
.hero-content {
    position: absolute;
    bottom: 15%;
    left: 5%;
    max-width: 600px;
    z-index: 2;
}
.hero-badge {
    display: inline-block;
    background: var(--accent-gradient);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px var(--accent-glow);
}
.hero-title {
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    letter-spacing: -0.02em;
}
.hero-overview {
    font-size: clamp(13px, 1.5vw, 16px);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 14px; }
.hero-meta .rating { color: var(--gold); font-weight: 600; }
.hero-meta .dot { width: 4px; height: 4px; background: var(--text-dim); border-radius: 50%; }
.hero-actions { display: flex; gap: 12px; }
.hero-fade-bottom {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--bg), transparent);
    z-index: 1;
}

/* ============================
   BUTTONS
   ============================ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px;
    transition: all 0.25s ease;
    will-change: transform;
    touch-action: manipulation;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
    background: var(--accent-gradient);
    color: white;
}
.btn-primary:hover { box-shadow: 0 4px 20px var(--accent-glow), 0 0 40px var(--accent-glow); transform: translateY(-2px); }
.btn-glow {
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-glow:hover {
    box-shadow: 0 6px 30px var(--accent-glow), 0 0 60px var(--accent-glow);
}

/* ============================
   CONTENT SECTIONS
   ============================ */
.content-section {
    padding: 20px 0 60px;
}
.main-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 60px);
}
.row-section { margin-bottom: 40px; overflow: visible; }
.row-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.row-title {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.row-nav { display: flex; gap: 6px; }
.row-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    transition: all 0.2s ease;
    touch-action: manipulation;
}
.row-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: var(--accent);
    box-shadow: 0 2px 12px var(--accent-glow);
}

/* Slider row */
.slider-row {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    will-change: scroll-position;
}
.slider-row::-webkit-scrollbar { display: none; }

/* ============================
   CARDS — Glassmorphism
   ============================ */
.card {
    position: relative;
    flex-shrink: 0;
    width: clamp(130px, 15vw, 180px);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    scroll-snap-align: start;
    transition: all 0.3s ease;
    will-change: transform;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}
.card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(124,92,252,0.3);
    z-index: 2;
}
.card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}
.card-play-btn {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 48px; height: 48px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.card:hover .card-play-btn { transform: translate(-50%, -50%) scale(1); }
.card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 10px 12px;
    background: linear-gradient(to top, rgba(6,6,12,0.95), transparent);
}
.card-title {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.card-rating {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}
.card-rating svg {
    width: 10px; height: 10px;
    fill: var(--gold);
}

/* ============================
   WATCH PAGE — PLAYER
   ============================ */
.watch-main { padding-top: calc(var(--nav-h) + var(--safe-top)); }
.player-section {
    width: 100%;
    background: #000;
    padding: 0 clamp(20px, 4vw, 60px);
}
.player-section-inner {
    max-width: 1000px;
    margin: 0 auto;
}
.player-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 56.25%; /* 16:9 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    border-radius: var(--radius);
    overflow: hidden;
}
#playerFrame {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
    background: #000;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}
.player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-2);
    z-index: 2;
    transition: opacity 0.3s ease;
}
.player-loading.hidden { opacity: 0; pointer-events: none; }
.player-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--text-dim);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================
   INFO SECTION
   ============================ */
.info-section { padding: 40px clamp(16px, 4vw, 60px); }
.info-container { max-width: var(--max-w); margin: 0 auto; }
.info-layout { display: flex; gap: 32px; }
.info-poster { flex-shrink: 0; }
.info-poster img {
    width: 200px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
}
.info-details { flex: 1; min-width: 0; min-height: 0; width: 100%; }
.info-title {
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.info-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 14px; flex-wrap: wrap; }
.info-meta .rating { color: var(--gold); font-weight: 600; }
.info-meta .dot { width: 4px; height: 4px; background: var(--text-dim); border-radius: 50%; }
.info-genres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.genre-tag {
    background: var(--accent-gradient-soft);
    border: 1px solid rgba(124,92,252,0.2);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-light);
    transition: all 0.2s ease;
}
.genre-tag:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 12px var(--accent-glow);
}
.info-overview {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}
.info-extra {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.extra-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    transition: all 0.2s ease;
}
.extra-item:hover { background: var(--surface-hover); border-color: var(--accent); }
.extra-label { display: block; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.extra-value { font-size: 14px; font-weight: 500; }

/* TV Selector — glass */
.tv-selector {
    display: flex; align-items: flex-end; gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: var(--radius);
}
.selector-group { flex: 1; min-width: 160px; }
.selector-group label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.custom-select {
    width: 100%;
    padding: 10px 32px 10px 14px;
    background: rgba(0,0,0,0.3);
    color: var(--text);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    -webkit-appearance: none;
    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='%239898b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s;
}
.custom-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); outline: none; }

/* ============================
   RELATED
   ============================ */
.related-section { padding: 0 clamp(16px, 4vw, 60px) 60px; }
.related-container { max-width: var(--max-w); margin: 0 auto; }
.related-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}
.related-grid .card { width: 100%; }

/* ============================
   SEARCH PAGE
   ============================ */
.search-page { padding: calc(var(--nav-h) + 40px) clamp(16px, 4vw, 60px) 60px; }
.search-page-container { max-width: var(--max-w); margin: 0 auto; }
.search-page-title { font-size: 24px; font-weight: 700; margin-bottom: 32px; letter-spacing: -0.01em; }
.search-page-title .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.search-empty-state {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    padding: 80px 20px;
    color: var(--text-muted);
}

/* ============================
   FOOTER — Glass
   ============================ */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px clamp(16px, 4vw, 60px) max(calc(24px + var(--safe-bottom)), env(safe-area-inset-bottom, 0px));
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.footer-content { max-width: var(--max-w); margin: 0 auto; text-align: center; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.footer-logo .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.footer-text { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.footer-text a { color: var(--accent-light); }
.footer-text a:hover { text-decoration: underline; }
.footer-copy { font-size: 12px; color: var(--text-dim); }

/* ============================
   PLAYER TABS — Glass
   ============================ */
.player-tabs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.player-tabs::-webkit-scrollbar { display: none; }
.player-tab {
    flex-shrink: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.player-tab:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: rgba(124,92,252,0.3);
}
.player-tab.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.tab-warning {
    color: var(--gold);
    font-size: 0.75rem;
}
.player-tab.active .tab-warning { color: rgba(255,255,255,0.8); }

/* ============================
   PLAYER SHIELD (Ad Protection)
   ============================ */
.player-shield {
    position: absolute;
    inset: 0;
    background: rgba(6, 6, 12, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.player-shield.shield-visible { opacity: 1; pointer-events: all; }
.player-shield.shield-active { opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
.shield-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.shield-content span { font-size: 1rem; font-weight: 600; color: #fff; }
.shield-content small { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

.server-note {
    font-size: 11px;
    color: var(--gold);
    margin-left: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.server-loading {
    font-size: 12px;
    color: var(--text-dim);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ============================
   HAMBURGER TOGGLE
   ============================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger:hover { background: var(--surface-hover); }

/* ============================
   SIDEBAR (Mobile)
   ============================ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 280px;
    max-width: 80vw;
    height: 100%;
    background: rgba(11, 11, 22, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    z-index: 1600;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-top: var(--safe-top);
}
.sidebar.open { transform: translateX(0); }
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}
.sidebar-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.sidebar-close:hover { background: var(--surface-hover); color: var(--text); }
.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    gap: 4px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.sidebar-link:hover { background: var(--surface-hover); color: var(--text); }
.sidebar-link.active {
    color: var(--accent-light);
    background: var(--accent-gradient-soft);
}
.sidebar-search {
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}
.sidebar-search form { position: relative; }
.sidebar-search input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}
.sidebar-search input:focus { border-color: var(--accent); }

/* ============================
   RESPONSIVE — Tablet (768px+)
   ============================ */
@media (min-width: 768px) {
    .info-poster img { width: 250px; }
    .related-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ============================
   RESPONSIVE — Mobile (<768px)
   ============================ */
@media (max-width: 767px) {
    .hamburger { display: flex; }
    .nav-menu { display: none; }
    .search-box { width: auto; flex: 1; max-width: 200px; }
    .search-box:focus-within { width: auto; max-width: 200px; }
    .search-box span { display: none; }
}

/* ============================
   RESPONSIVE — Mobile (<480px)
   ============================ */
@media (max-width: 480px) {
    .search-box { width: 180px; }
    .search-box:focus-within { width: 220px; }
    .hero { height: 60dvh; min-height: 350px; }
    .hero-content { left: 16px; right: 16px; }
    .card { width: clamp(110px, 35vw, 140px); }
    .info-layout { flex-direction: column; align-items: center; text-align: center; }
    .info-poster img { width: 160px; }
    .info-genres { justify-content: center; }
    .info-meta { justify-content: center; }
    .tv-selector { flex-direction: column; }
    .selector-group { min-width: 100%; }
    .related-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .listing-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

/* ============================
   LISTING PAGE
   ============================ */
.listing-page { padding: calc(var(--nav-h) + var(--safe-top) + 40px) clamp(16px, 4vw, 60px) 60px; }
.listing-container { max-width: var(--max-w); margin: 0 auto; }
.listing-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}
.listing-grid .card { width: 100%; }
.listing-pagination {
    display: flex; align-items: center; justify-content: center; gap: 20px;
    margin-top: 48px;
}
.pagination-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    font-size: 14px; font-weight: 500;
    color: var(--text);
    transition: all 0.2s ease;
}
.pagination-btn:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.pagination-info { font-size: 14px; color: var(--text-muted); }

/* ============================
   SAFARI iOS FIXES
   ============================ */
.navbar { padding-top: max(var(--safe-top), env(safe-area-inset-top, 0px)); }
.hero { height: 70dvh; min-height: min(70vh, 700px); }
body { overscroll-behavior: none; }
@media (max-width: 768px) {
    #searchInput { font-size: 16px; }
    .custom-select { font-size: 16px; }
}
.navbar.scrolled {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ============ FOOTER ============ */
.footer {
    margin-top: auto;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 48px clamp(20px, 4vw, 60px) 24px;
}
.footer-grid {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-brand {
    gap: 16px;
    max-width: 320px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.footer-tagline {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
}
.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
.footer-social {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-social:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}
.footer-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.9);
    margin-bottom: 6px;
}
.footer-link {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
}
.footer-link:hover {
    color: var(--accent);
    padding-left: 4px;
}
.footer-bottom {
    max-width: var(--max-w);
    margin: 24px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-copy {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}
.footer-dev {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
}
.footer-dev .accent {
    font-weight: 600;
    transition: color 0.2s;
}
.footer-dev:hover .accent {
    color: var(--accent);
}
.footer-disclaimer {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
}
.footer-disclaimer a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-disclaimer a:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
    .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
