* {
    box-sizing: border-box;
}

:root {
    --pink: #ff69b4;
    --pink-dark: #d94f96;
    --bg: #07070a;
    --panel: #111116;
    --panel-2: #18181f;
    --text: #ffffff;
    --muted: #a5a5ad;
    --border: rgba(255, 255, 255, 0.09);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    animation: pageFadeIn 0.6s ease both;
}

.fade-in {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeInUp 0.7s ease both;
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}


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

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    z-index: 100;

    height: 70px;

    display: flex;
    align-items: center;
    gap: 35px;

    padding: 0 35px;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.95),
            rgba(0, 0, 0, 0)
        );
}

.brand {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    white-space: nowrap;
}

.brand span {
    color: var(--pink);
}

.nav nav {
    display: flex;
    align-items: center;
    gap: 24px;

    color: #ddd;
    font-size: 14px;
}

.nav nav a:hover {
    color: var(--pink);
}

.icon-btn {
    margin-left: auto;

    width: 42px;
    height: 42px;

    border: 0;
    border-radius: 50%;

    background: rgba(255,255,255,.08);
    color: white;

    font-size: 25px;
}

.icon-btn:hover {
    background: var(--pink);
    color: #111;
}


/* =========================
   HERO
   ========================= */

.hero {
    position: relative;

    min-height: 700px;

    display: flex;
    align-items: center;

    padding: 120px 7% 80px;

    background:
        linear-gradient(
            90deg,
            #07070a 0%,
            rgba(7,7,10,.82) 35%,
            rgba(7,7,10,.25) 75%
        ),
        linear-gradient(
            0deg,
            #07070a 0%,
            transparent 35%
        );

    background-size: cover;
    background-position: center;

    transition: opacity .35s ease, transform .35s ease;
}

.hero.hero-fade {
    opacity: 0.32;
    transform: scale(0.995);
}

.hero-shade {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(7,7,10,.85),
            transparent
        ),
        linear-gradient(
            0deg,
            #07070a,
            transparent 35%
        );
}

.hero-content {
    position: relative;
    z-index: 2;

    max-width: 650px;
    opacity: 0;
    transform: translateY(18px);
    animation: fadeInUp 0.75s ease forwards;
    animation-delay: 0.15s;
}

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

.eyebrow {
    margin-bottom: 12px;

    color: var(--pink);

    font-size: 13px;
    font-weight: 900;
    letter-spacing: 3px;
}

.hero h1 {
    margin: 0 0 18px;

    font-size: clamp(
        42px,
        7vw,
        78px
    );

    line-height: .98;
}

.hero p {
    max-width: 580px;

    color: #ccc;

    font-size: 18px;
    line-height: 1.6;
}


/* =========================
   BUTTONS
   ========================= */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 25px;
}

.primary,
.secondary {
    border: 0;
    border-radius: 8px;

    padding: 12px 20px;

    font-weight: 800;
}

.primary {
    background: var(--pink);
    color: #160711;
}

.primary:hover {
    background: #ff8ac5;
}

.secondary {
    background: rgba(255,255,255,.1);
    color: white;

    border: 1px solid var(--border);
}

.secondary:hover {
    background: rgba(255,255,255,.17);
}


/* =========================
   SECTIONS
   ========================= */

.section {
    padding: 35px 5%;
}

.section-head {
    display: flex;
    align-items: center;

    margin-bottom: 18px;
    opacity: 0;
    transform: translateY(18px);
    animation: fadeInUp 0.7s ease forwards;
}

.section-head h2 {
    margin: 0;

    font-size: 25px;
}

.section-head a {
    margin-left: auto;

    color: var(--pink);

    font-size: 14px;
    font-weight: 700;
}


/* =========================
   CONTENT ROWS
   ========================= */

.row {
    display: flex;
    gap: 16px;

    overflow-x: auto;

    padding: 5px 0 15px;

    scrollbar-width: thin;
    scrollbar-color: var(--pink) transparent;
}

.row::-webkit-scrollbar {
    height: 6px;
}

.row::-webkit-scrollbar-thumb {
    background: var(--pink);
    border-radius: 20px;
}


/* =========================
   MOVIE CARDS
   ========================= */

.card {
    flex: 0 0 180px;

    overflow: hidden;

    border-radius: 9px;

    background: var(--panel);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        opacity .35s ease,
        transform .35s ease;

    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease forwards;
}

.row .card:nth-child(1) { animation-delay: 0.12s; }
.row .card:nth-child(2) { animation-delay: 0.17s; }
.row .card:nth-child(3) { animation-delay: 0.22s; }
.row .card:nth-child(4) { animation-delay: 0.27s; }
.row .card:nth-child(5) { animation-delay: 0.32s; }
.row .card:nth-child(6) { animation-delay: 0.37s; }
.row .card:nth-child(7) { animation-delay: 0.42s; }
.row .card:nth-child(8) { animation-delay: 0.47s; }

.card:hover {
    transform: scale(1.045);

    box-shadow:
        0 15px 35px
        rgba(0,0,0,.5);
}

.poster {
    display: block;

    width: 100%;
    height: 270px;

    object-fit: cover;

    background: var(--panel-2);
}

.card-title {
    padding: 10px 10px 3px;

    font-weight: 700;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    padding: 0 10px 12px;

    color: var(--muted);

    font-size: 12px;
}


/* =========================
   MODALS
   ========================= */

.modal {
    position: fixed;
    inset: 0;

    z-index: 500;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;

    background:
        rgba(0,0,0,.82);

    backdrop-filter: blur(10px);
}

.modal.hidden {
    display: none;
}

.modal-card,
.details-card {
    position: relative;

    width: min(
        100%,
        1100px
    );

    max-height: 90vh;

    overflow: auto;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--panel);

    box-shadow:
        0 30px 100px
        rgba(0,0,0,.7);
}

.modal-card {
    padding: 30px;
}

.close {
    position: absolute;

    top: 15px;
    right: 15px;

    z-index: 10;

    width: 38px;
    height: 38px;

    border: 0;
    border-radius: 50%;

    background: rgba(0,0,0,.6);

    color: white;

    font-size: 25px;
}

.close:hover {
    background: var(--pink);
    color: #111;
}


/* =========================
   SEARCH
   ========================= */

#searchInput {
    width: 100%;

    margin: 16px 0 24px;

    padding: 16px 18px;

    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;

    outline: none;

    background: rgba(255,255,255,0.05);
    color: white;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

#searchInput:focus {
    border-color: var(--pink);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.12),
        0 0 0 6px rgba(255,105,180,0.12);
    transform: translateY(-1px);
}

.search-panel {
    display: grid;
    gap: 20px;
    padding: 26px;
    border-radius: 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 90px rgba(0,0,0,0.28);
}

.search-panel input {
    background: transparent;
}

.search-panel .row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 18px;
    overflow: visible;
    padding: 0;
}

.grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(150px, 1fr)
        );

    gap: 16px;
}


/* =========================
   DETAILS
   ========================= */

.details-card {
    overflow: auto;
}

.detail-backdrop {
    display: block;

    width: 100%;
    height: 360px;

    object-fit: cover;

    background: var(--panel-2);
}

.detail-body {
    padding: 30px;
}

.detail-body h2 {
    margin-top: 0;

    font-size: 34px;
}

.muted {
    color: var(--muted);
}

#detailText {
    max-width: 850px;

    color: #ccc;

    line-height: 1.7;
}

.facts {
    display: grid;

    grid-template-columns:
        130px 1fr;

    gap: 10px 20px;

    margin: 25px 0;

    color: #ccc;
}

.facts b {
    color: white;
}

.season-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.season-btn {
    padding: 10px 14px;
}


/* =========================
   RELATED CONTENT
   ========================= */

.mini-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(110px, 1fr)
        );

    gap: 14px;

    margin-top: 15px;
}

.mini-item {
    overflow: hidden;

    border-radius: 8px;

    background: var(--panel-2);
}

.mini-item img {
    display: block;

    width: 100%;
    aspect-ratio: 2 / 3;

    object-fit: cover;
}

.mini-item span {
    display: block;

    padding: 8px;

    font-size: 13px;
}


/* =========================
   EMPTY LIST
   ========================= */

.empty-row {
    min-height: 80px;

    align-items: center;

    color: var(--muted);
}


/* =========================
   WATCH PAGE
   ========================= */

.watch-page {
    background: #050507;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 90px 20px 20px;
}

.watch-main {
    width: min(100%, 1180px);
    max-width: 1180px;

    margin: 0 auto;
    padding: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.player-wrap {
    position: relative;

    width: 100%;
    max-width: 1180px;
    height: min(80vh, 820px);

    background: #050507;

    border: 2px solid var(--pink);

    box-shadow:
        0 0 40px
        rgba(255,105,180,.2);

    margin: 0 auto;
}

.player-wrap iframe {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 100%;

    border: 0;

    background: #050507;
}

.player-fullscreen {
    position: absolute;

    right: 18px;
    bottom: 18px;

    z-index: 10;

    padding: 10px 15px;

    border: 1px solid var(--pink);
    border-radius: 8px;

    background: rgba(10,5,10,.92);

    color: white;

    cursor: pointer;

    font-weight: 700;
}

.player-fullscreen:hover {
    background: var(--pink);
    color: #12070d;
}

.watch-info {
    padding: 25px;
}

.player-message {
    width: 100%;
    height: 100%;

    display: grid;
    place-content: center;

    padding: 30px;

    text-align: center;

    color: #aaa;
}

.player-message h2 {
    color: white;
}


/* =========================
   FULLSCREEN
   ========================= */

.player-mode {
    overflow: hidden;
}

.player-mode .nav {
    display: none;
}

.player-mode .player-wrap {
    width: 100vw;
    height: 100vh;

    border: 0;
}

.player-mode .watch-info {
    display: none;
}


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

@media (max-width: 800px) {

    .nav {
        padding: 0 18px;
        gap: 15px;
    }

    .nav nav {
        display: none;
    }

    .hero {
        min-height: 600px;

        padding:
            110px 25px 60px;
    }

    .section {
        padding:
            25px 18px;
    }

    .card {
        flex-basis: 145px;
    }

    .poster {
        height: 218px;
    }

    .detail-backdrop {
        height: 230px;
    }

    .detail-body {
        padding: 20px;
    }

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

    .player-wrap {
        height: 60vh;
    }
}