/* ============================================================
   LUSTWATCH — CINEMATIC DESIGN SYSTEM v2
   Presentation only. No logic changes.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
    --lw-bg: #08090D;
    --lw-bg-2: #101218;
    --lw-surface: #171A22;
    --lw-surface-2: #20242E;
    --lw-surface-3: #282D38;
    --lw-text: #F7F8FA;
    --lw-text-2: #A5ADBB;
    --lw-text-muted: #747D8C;
    --lw-red: #E50914;
    --lw-red-hover: #FF1F2B;
    --lw-red-glow: rgba(229,9,20,0.35);
    --lw-green: #3DD68C;
    --lw-blue: #4F8FF7;
    --lw-amber: #F5A524;
    --lw-purple: #A855F7;
    --lw-border: rgba(255,255,255,0.09);
    --lw-border-strong: rgba(255,255,255,0.16);
    --lw-r-sm: 6px;
    --lw-r: 12px;
    --lw-r-lg: 16px;
    --lw-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --lw-fast: 180ms;
    --lw-med: 280ms;

    /* Legacy aliases for existing inline styles */
    --bg-color: var(--lw-bg);
    --surface-color: var(--lw-surface);
    --primary-red: var(--lw-red);
    --text-main: var(--lw-text);
    --text-muted: var(--lw-text-2);
    --border-color: var(--lw-border);
}

/* ---------- Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
html { scroll-behavior: smooth; }
body {
    background: var(--lw-bg);
    color: var(--lw-text);
    overflow-x: hidden;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(229,9,20,0.10), transparent 60%),
        radial-gradient(900px 500px at 85% 10%, rgba(79,143,247,0.05), transparent 60%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
::selection { background: var(--lw-red); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--lw-bg-2); }
::-webkit-scrollbar-thumb { background: var(--lw-surface-3); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a4050; }

/* ---------- Navbar ---------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 48px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(8,9,13,0.92) 0%, rgba(8,9,13,0) 100%);
    transition: background var(--lw-med) var(--lw-ease),
                padding var(--lw-med) var(--lw-ease),
                backdrop-filter var(--lw-med) var(--lw-ease);
}
.navbar.scrolled {
    background: rgba(8,9,13,0.88);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--lw-border);
    padding: 12px 48px;
}
.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--lw-text);
    flex-shrink: 0;
}
.logo span { color: var(--lw-red); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a,
.nav-auth a {
    color: var(--lw-text-2);
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--lw-r-sm);
    transition: color var(--lw-fast) var(--lw-ease),
                background var(--lw-fast) var(--lw-ease);
    white-space: nowrap;
}
.nav-links a:hover,
.nav-auth a:hover {
    color: var(--lw-text);
    background: rgba(255,255,255,0.05);
}
.nav-auth { display: flex; align-items: center; gap: 6px; }

/* ---------- Hero ---------- */
.hero {
    height: 88vh;
    min-height: 560px;
    background-size: cover;
    background-position: center top;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 0 48px 100px;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(8,9,13,0.95) 0%, rgba(8,9,13,0.55) 42%, transparent 78%),
        linear-gradient(to top, var(--lw-bg) 0%, rgba(8,9,13,0.35) 38%, transparent 65%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    animation: lwFadeUp 700ms var(--lw-ease) both;
}
.hero-badge {
    display: inline-block;
    background: var(--lw-red);
    color: #fff;
    padding: 5px 12px;
    border-radius: var(--lw-r-sm);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    margin-bottom: 16px;
    text-transform: uppercase;
    box-shadow: 0 6px 22px var(--lw-red-glow);
}
.hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    font-weight: 800;
    margin-bottom: 16px;
    text-transform: uppercase;
    line-height: 1.02;
    letter-spacing: -1px;
}
.meta {
    color: var(--lw-text-2);
    font-size: 14px;
    margin-bottom: 22px;
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
.meta .age-rating {
    border: 1px solid var(--lw-border-strong);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--lw-text-2);
}
.hero p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #d5d9e0;
    max-width: 580px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--lw-fast) var(--lw-ease),
                background var(--lw-fast) var(--lw-ease),
                box-shadow var(--lw-fast) var(--lw-ease);
    font-family: inherit;
    line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: var(--lw-red);
    color: #fff;
    box-shadow: 0 8px 24px var(--lw-red-glow);
}
.btn-primary:hover { background: var(--lw-red-hover); }
.btn-secondary {
    background: rgba(255,255,255,0.10);
    color: #fff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.14);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.22);
}

/* ---------- Carousels & Rows ---------- */
.carousel-section,
.row-section { padding: 26px 48px; }
.carousel-section h2,
.row-section h2 {
    font-size: 20px;
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--lw-text);
}
.carousel-section h2 svg,
.row-section h2 svg { width: 20px; height: 20px; opacity: 0.85; }
.carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 4px 22px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}
.carousel::-webkit-scrollbar { display: none; }

/* ---------- Movie Cards ---------- */
.movie-card {
    position: relative;
    min-width: 200px;
    border-radius: var(--lw-r);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    background: var(--lw-surface);
    border: 1px solid transparent;
    transition: transform var(--lw-med) var(--lw-ease),
                box-shadow var(--lw-med) var(--lw-ease),
                border-color var(--lw-med) var(--lw-ease);
    scroll-snap-align: start;
}
.movie-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.55);
    border-color: var(--lw-border-strong);
    z-index: 10;
}
.movie-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 400ms var(--lw-ease);
}
.movie-card:hover img { transform: scale(1.04); }
.movie-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 44px 14px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.96) 10%, rgba(0,0,0,0.6) 60%, transparent 100%);
    pointer-events: none;
}
.movie-info h3 {
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.movie-info p {
    font-size: 11px;
    color: var(--lw-text-2);
    font-weight: 500;
}
.movie-card.wide { min-width: 320px; }
.movie-card.wide img { height: 180px; }
.progress-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.15);
}
.progress-fill {
    height: 100%;
    background: var(--lw-red);
    border-radius: 2px;
}

/* ---------- Genre Grid (legacy) ---------- */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.genre-card {
    background: linear-gradient(135deg, var(--lw-surface) 0%, var(--lw-surface-2) 100%);
    border: 1px solid var(--lw-border);
    padding: 26px 18px;
    border-radius: var(--lw-r);
    text-align: center;
    color: var(--lw-text);
    font-weight: 600;
    font-size: 14px;
    transition: all var(--lw-med) var(--lw-ease);
    position: relative;
    overflow: hidden;
}
.genre-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(229,9,20,0.9), rgba(229,9,20,0.6));
    opacity: 0;
    transition: opacity var(--lw-med) var(--lw-ease);
}
.genre-card:hover {
    transform: translateY(-3px);
    border-color: rgba(229,9,20,0.4);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.genre-card:hover::after { opacity: 1; }
.genre-card > * { position: relative; z-index: 1; }

/* ---------- Forms ---------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--lw-bg-2);
    border: 1px solid var(--lw-border);
    color: var(--lw-text);
    border-radius: var(--lw-r-sm);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--lw-fast) var(--lw-ease),
                box-shadow var(--lw-fast) var(--lw-ease);
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(229,9,20,0.5);
    box-shadow: 0 0 0 3px rgba(229,9,20,0.12);
}
input::placeholder,
textarea::placeholder { color: var(--lw-text-muted); }
label {
    color: var(--lw-text-2);
    font-size: 12px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

/* ---------- Floating Buttons ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 85px;
    right: 24px;
    width: 50px;
    height: 50px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37,211,102,0.35);
    z-index: 999;
    transition: transform var(--lw-fast) var(--lw-ease),
                box-shadow var(--lw-fast) var(--lw-ease);
}
.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 32px rgba(37,211,102,0.5);
}
.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--lw-surface-2);
    border: 1px solid var(--lw-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all var(--lw-fast) var(--lw-ease);
}
.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-top-btn:hover {
    background: var(--lw-red);
    border-color: var(--lw-red);
}

/* ---------- Bottom Navigation ---------- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(8,9,13,0.94);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-top: 1px solid var(--lw-border);
    z-index: 1000;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
}
.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--lw-text-muted);
    font-size: 10px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    transition: color var(--lw-fast) var(--lw-ease);
}
.bottom-nav a.active,
.bottom-nav a:hover { color: var(--lw-text); }
.bottom-nav a.active svg { color: var(--lw-red); }
.bottom-nav svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* ---------- Animations ---------- */
@keyframes lwFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Tablet (≤ 992px): hide top nav, show bottom nav ---- */
@media (max-width: 992px) {
    .navbar { padding: 14px 24px; }
    .navbar.scrolled { padding: 10px 24px; }
    .nav-links { display: none; }

    .hero { padding: 0 24px 60px; height: 76vh; }
    .hero h1 { font-size: 2.4rem; }

    .carousel-section,
    .row-section { padding: 20px 24px; }
    .movie-card { min-width: 160px; }
    .movie-card img { height: 240px; }
    .movie-card.wide { min-width: 260px; }
    .movie-card.wide img { height: 146px; }

    .bottom-nav { display: flex; }
    body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* ---- Phone (≤ 768px) ---- */
@media (max-width: 768px) {
    .hero {
        padding-bottom: 40px;
        height: 72vh;
        min-height: 480px;
    }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 14px; }

    .carousel-section,
    .row-section { padding: 18px 16px; }
    .carousel-section h2,
    .row-section h2 { font-size: 17px; margin-bottom: 14px; }
    .movie-card { min-width: 140px; }
    .movie-card img { height: 210px; }
    .movie-card.wide { min-width: 240px; }
    .movie-card.wide img { height: 135px; }

    .genre-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .genre-card { padding: 22px 14px; font-size: 13px; }

    .whatsapp-float { bottom: 88px; right: 14px; width: 46px; height: 46px; }
    .scroll-top-btn { bottom: 88px; right: 72px; width: 40px; height: 40px; }
}

/* ---- Small phone (≤ 480px) ---- */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.65rem; }
    .hero-actions { gap: 8px; }
    .btn { padding: 10px 18px; font-size: 14px; }
    .nav-auth a { padding: 6px 10px; font-size: 13px; }
    .logo { font-size: 18px; }
    .movie-card { min-width: 130px; }
    .movie-card img { height: 195px; }
}

/* ---- Desktop (≥ 993px): show top nav, hide bottom nav ---- */
@media (min-width: 993px) {
    .nav-links { display: flex !important; }
    .bottom-nav { display: none !important; }
}

/* ============================================================
   BILLBOARD ROW (optional Netflix-style usage on any page)
   ============================================================ */
.billboard-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 8px 4px 24px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}
.billboard-row::-webkit-scrollbar { display: none; }
.billboard-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.billboard-card:hover { transform: translateY(-6px) scale(1.02); }
.billboard-card:hover > div { box-shadow: 0 20px 50px rgba(0,0,0,0.6); }

/* ============================================================
   GENRE TILES (Disney+ style)
   ============================================================ */
.genre-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 22px;
    min-height: 130px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.2px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.genre-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.15), transparent 60%);
    opacity: 0.6;
    pointer-events: none;
}
.genre-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}
.genre-tile svg {
    opacity: 0.7;
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.genre-tile:hover svg {
    transform: translateX(6px);
    opacity: 1;
}

/* ============================================================
   ROW HEADERS with optional subtitle
   ============================================================ */
.row-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 8px;
}
.row-header h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #F7F8FA;
    margin: 0;
}
.row-sub {
    font-size: 12px;
    color: #747D8C;
    font-weight: 500;
    letter-spacing: 0.2px;
}
.content-wrap { padding-bottom: 40px; }

/* ---- Responsive for billboard/genre/row-header add-ons ---- */
@media (max-width: 992px) {
    .billboard-card { flex: 0 0 260px; }
}
@media (max-width: 768px) {
    .billboard-card { flex: 0 0 240px; }
    .genre-tile { min-height: 110px; padding: 18px 16px; font-size: 14px; }
    .genre-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .row-header h2 { font-size: 17px; }
    .row-sub { display: none; }
}
@media (max-width: 480px) {
    .billboard-card { flex: 0 0 220px; }
    .genre-tile { min-height: 100px; padding: 16px 14px; font-size: 13px; }
}