/* ============================================================
   LUSTWATCH CINEMA — Homepage design system
   Scoped to .cw-* selectors. Cannot break other pages.
   ============================================================ */

/* ---- HERO ---- */
.cw-hero {
    position: relative;
    min-height: 88vh;
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: flex-end;
    padding: 0 48px 120px;
    margin-bottom: -60px;
    overflow: hidden;
}
.cw-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(8,9,13,0.96) 0%, rgba(8,9,13,0.65) 38%, rgba(8,9,13,0.15) 78%),
        linear-gradient(to top, #08090D 0%, rgba(8,9,13,0.5) 35%, transparent 65%);
    pointer-events: none;
}
.cw-hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    animation: cwFadeUp 700ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes cwFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cw-hero-badge {
    display: inline-block;
    background: #E50914;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    margin-bottom: 20px;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(229,9,20,0.4);
}
.cw-hero h1 {
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.7);
}
.cw-hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    color: #A5ADBB;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 22px;
}
.cw-dot {
    width: 3px;
    height: 3px;
    background: #747D8C;
    border-radius: 50%;
}
.cw-rating {
    border: 1px solid rgba(255,255,255,0.25);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #F7F8FA;
}
.cw-views-hero {
    color: #3DD68C;
    font-weight: 600;
}
.cw-hero-synopsis {
    font-size: 16px;
    line-height: 1.6;
    color: #d5d9e0;
    max-width: 580px;
    margin-bottom: 32px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.cw-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.cw-hero-empty {
    background: #0b0c10;
    min-height: 60vh;
    margin-bottom: 0;
}

/* ---- BUTTONS ---- */
.cw-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    line-height: 1;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cw-btn:hover { transform: translateY(-1px); }
.cw-btn-primary {
    background: #E50914;
    color: #fff;
    box-shadow: 0 8px 24px rgba(229,9,20,0.35);
}
.cw-btn-primary:hover { background: #FF1F2B; }
.cw-btn-ghost {
    background: rgba(255,255,255,0.12);
    color: #fff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.18);
}
.cw-btn-ghost:hover { background: rgba(255,255,255,0.18); }

/* ---- MAIN ---- */
.cw-main {
    position: relative;
    z-index: 5;
    padding-bottom: 80px;
    background: #08090D;
}

/* ---- ROWS ---- */
.cw-row {
    padding: 32px 48px 8px;
}
.cw-row-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 10px;
    flex-wrap: wrap;
}
.cw-row-header h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: #F7F8FA;
    margin: 0;
}
.cw-row-sub {
    font-size: 12px;
    color: #747D8C;
    font-weight: 500;
}

/* ---- CAROUSEL ---- */
.cw-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}
.cw-carousel::-webkit-scrollbar { display: none; }
.cw-carousel-billboard {
    gap: 20px;
    padding: 12px 4px 24px;
}

/* ---- STANDARD CARD ---- */
.cw-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cw-card:hover { transform: translateY(-6px); }
.cw-card-poster {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 2/3;
    background: #171A22;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    transition: box-shadow 240ms;
}
.cw-card:hover .cw-card-poster {
    box-shadow: 0 18px 44px rgba(0,0,0,0.6);
}
.cw-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cw-card-meta {
    padding: 12px 2px 0;
}
.cw-card-meta h3 {
    font-size: 14px;
    font-weight: 600;
    color: #F7F8FA;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cw-card-meta p {
    font-size: 12px;
    color: #A5ADBB;
    font-weight: 500;
}
.cw-card-wide { flex: 0 0 320px; }
.cw-card-wide .cw-card-poster { aspect-ratio: 16/9; }

/* ---- BADGES ---- */
.cw-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: rgba(0,0,0,0.75);
    z-index: 3;
}
.cw-badge-free         { color: #3DD68C; border: 1px solid #3DD68C; }
.cw-badge-subscription { color: #4F8FF7; border: 1px solid #4F8FF7; }
.cw-badge-rental       { color: #F5A524; border: 1px solid #F5A524; }
.cw-badge-purchase     { color: #A855F7; border: 1px solid #A855F7; }
.cw-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(229,9,20,0.9);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    z-index: 3;
}
.cw-views {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    z-index: 3;
}
.cw-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.2);
}
.cw-progress-fill {
    height: 100%;
    background: #E50914;
    border-radius: 2px;
}

/* ---- BILLBOARD CARD ---- */
.cw-billboard {
    flex: 0 0 340px;
    position: relative;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cw-billboard:hover { transform: translateY(-6px); }
.cw-billboard-rank {
    position: absolute;
    bottom: -8px;
    left: -10px;
    font-size: 96px;
    font-weight: 900;
    line-height: 0.8;
    color: #08090D;
    -webkit-text-stroke: 4px #F7F8FA;
    z-index: 3;
    letter-spacing: -6px;
    pointer-events: none;
}
.cw-billboard-poster {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #171A22;
    box-shadow: 0 8px 26px rgba(0,0,0,0.5);
    transition: box-shadow 260ms;
}
.cw-billboard:hover .cw-billboard-poster {
    box-shadow: 0 22px 50px rgba(0,0,0,0.7);
}
.cw-billboard-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cw-billboard-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.2) 45%, transparent 70%);
    pointer-events: none;
}
.cw-billboard-meta {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 50px 18px 14px;
    z-index: 2;
}
.cw-billboard-meta h3 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cw-billboard-meta p {
    font-size: 12px;
    color: #A5ADBB;
    font-weight: 500;
}
.cw-rating-inline { color: #F7F8FA; }

/* ---- GENRE GRID ---- */
.cw-genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.cw-genre-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 26px 22px;
    min-height: 140px;
    border-radius: 12px;
    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 260ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cw-genre-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.15), transparent 60%);
    pointer-events: none;
}
.cw-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);
}
.cw-genre-tile svg {
    opacity: 0.6;
    transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1), opacity 260ms;
}
.cw-genre-tile:hover svg {
    transform: translateX(6px);
    opacity: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Tablet (≤ 992px): bigger rows, bottom nav visible ---- */
@media (max-width: 992px) {
    .cw-hero {
        padding: 0 24px 100px;
        min-height: 78vh;
    }
    .cw-hero h1 { font-size: 2.6rem; }
    .cw-row { padding: 26px 24px 6px; }
    .cw-card { flex: 0 0 160px; }
    .cw-card-wide { flex: 0 0 260px; }
    .cw-billboard { flex: 0 0 280px; }
    .cw-billboard-rank {
        font-size: 72px;
        -webkit-text-stroke: 3px #F7F8FA;
        left: -6px;
    }
    body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* ---- Phone (≤ 768px) ---- */
@media (max-width: 768px) {
    .cw-hero {
        padding: 100px 20px 60px;
        min-height: 70vh;
        margin-bottom: -30px;
    }
    .cw-hero h1 {
        font-size: 2rem;
        letter-spacing: -0.8px;
    }
    .cw-hero-synopsis {
        font-size: 14px;
        margin-bottom: 24px;
    }
    .cw-hero-actions { gap: 8px; }
    .cw-btn { padding: 11px 18px; font-size: 14px; }

    .cw-row { padding: 22px 16px 4px; }
    .cw-row-header h2 { font-size: 18px; }
    .cw-row-sub { display: none; }

    .cw-carousel { gap: 12px; }
    .cw-card { flex: 0 0 140px; }
    .cw-card-wide { flex: 0 0 240px; }
    .cw-billboard { flex: 0 0 240px; }
    .cw-billboard-rank {
        font-size: 60px;
        -webkit-text-stroke: 3px #F7F8FA;
        left: -4px;
        bottom: -4px;
    }
    .cw-billboard-meta { padding: 40px 12px 10px; }
    .cw-billboard-meta h3 { font-size: 13px; }
    .cw-billboard-meta p { font-size: 11px; }

    .cw-genre-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .cw-genre-tile {
        min-height: 110px;
        padding: 18px 16px;
        font-size: 14px;
    }
}

/* ---- Small phone (≤ 480px) ---- */
@media (max-width: 480px) {
    .cw-hero h1 { font-size: 1.7rem; }
    .cw-card { flex: 0 0 130px; }
    .cw-billboard { flex: 0 0 220px; }
    .cw-billboard-rank { font-size: 52px; }
}

.cw-btn-download {
    background: rgba(255,255,255,0.10);
    color: #F7F8FA;
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cw-btn-download:hover {
    background: rgba(61,214,140,0.15);
    border-color: rgba(61,214,140,0.4);
    color: #3DD68C;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(61,214,140,0.20);
}
.cw-btn-download:active {
    transform: translateY(0);
}
.cw-btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}