/* =========================================================
   CHAMANISTREAM GLOBAL
   PREMIUM CINEMATIC STREAMING UI
   MATCHED TO CURRENT APP.JS
========================================================= */

:root {
    --bg: #05070d;
    --bg-soft: #080c15;
    --surface: #0b101b;
    --surface-2: #101725;
    --surface-3: #151e2e;

    --text: #f8fafc;
    --text-soft: #d8e1ee;
    --muted: #8996aa;

    --blue: #3b82f6;
    --blue-light: #60a5fa;
    --violet: #8b5cf6;
    --cyan: #22d3ee;

    --danger: #ef4444;

    --border: rgba(148, 163, 184, 0.14);

    --gradient:
        linear-gradient(
            135deg,
            #3b82f6,
            #8b5cf6
        );

    --shadow:
        0 25px 70px rgba(0, 0, 0, 0.55);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(59, 130, 246, 0.13),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 0%,
            rgba(139, 92, 246, 0.12),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #05070d,
            #070b13,
            #05070d
        );

    color: var(--text);

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    line-height: 1.5;

    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

img {
    max-width: 100%;
}

#app {
    min-height: 100vh;
}

#main-content {
    min-height: 70vh;
}


/* =========================================================
   HEADER
========================================================= */

#header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    background:
        rgba(5, 7, 13, 0.94);

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

    backdrop-filter:
        blur(20px);

    -webkit-backdrop-filter:
        blur(20px);
}

.header-inner {
    width: 100%;
    min-height: 72px;

    display: flex;
    align-items: center;

    gap: 25px;

    padding:
        12px 4vw;
}


/* =========================================================
   BRAND
========================================================= */

.brand {
    display: flex;
    align-items: center;

    gap: 10px;

    flex-shrink: 0;

    color: white;

    font-size: 20px;
    font-weight: 900;

    letter-spacing: -0.7px;
}

.brand-icon {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background:
        var(--gradient);

    color: white;

    font-size: 15px;

    box-shadow:
        0 8px 28px rgba(59, 130, 246, 0.3);
}

.brand span:last-child {
    background:
        var(--gradient);

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}


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

.search-box {
    margin-left: auto;

    display: flex;
    align-items: center;

    gap: 9px;

    width: min(520px, 50%);
}

.search-box input {
    width: 100%;
    height: 44px;

    padding:
        0 15px;

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

    border-radius: 11px;

    outline: none;

    background:
        rgba(16, 23, 37, 0.9);

    color: white;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.search-box input::placeholder {
    color: #66758b;
}

.search-box input:focus {
    border-color:
        rgba(96, 165, 250, 0.7);

    box-shadow:
        0 0 0 4px
        rgba(59, 130, 246, 0.1);
}

.search-box button {
    height: 44px;

    padding:
        0 19px;

    flex-shrink: 0;

    border-radius: 11px;

    background:
        var(--gradient);

    color: white;

    cursor: pointer;

    font-weight: 800;

    box-shadow:
        0 9px 25px
        rgba(59, 130, 246, 0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.search-box button:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 13px 32px
        rgba(139, 92, 246, 0.3);
}


/* =========================================================
   NAVIGATION
   IMPORTANT:
   APP.JS USES BUTTONS, NOT <a>
========================================================= */

#navigation {
    position: sticky;

    top: 72px;

    z-index: 900;

    width: 100%;

    background:
        rgba(7, 11, 19, 0.96);

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

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);
}

.nav-inner {
    display: flex;
    align-items: center;

    gap: 7px;

    padding:
        9px 4vw;

    overflow-x: auto;

    scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
    display: none;
}

.nav-link {
    position: relative;

    flex-shrink: 0;

    padding:
        9px 17px;

    border-radius: 9px;

    background:
        transparent;

    color:
        var(--muted);

    cursor: pointer;

    font-size: 13px;
    font-weight: 800;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.nav-link:hover {
    color: white;

    background:
        rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: white;

    background:
        rgba(59, 130, 246, 0.16);
}

.nav-link.active::after {
    content: "";

    position: absolute;

    left: 17px;
    right: 17px;
    bottom: 3px;

    height: 2px;

    border-radius: 10px;

    background:
        var(--gradient);
}


/* =========================================================
   FEATURED
========================================================= */

.featured-section {
    padding:
        35px 4vw 25px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 18px;
}

.section-heading h1,
.section-heading h2 {
    color: white;

    font-weight: 900;

    letter-spacing:
        -0.7px;
}

.section-heading h1 {
    font-size: 27px;
}

.section-heading h2 {
    font-size: 22px;
}

.section-heading p {
    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   FEATURED GRID
========================================================= */

.featured-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                240px,
                1fr
            )
        );

    gap: 20px;
}


/* =========================================================
   FEATURED CARD
========================================================= */

.featured-card {
    position: relative;

    overflow: hidden;

    min-height: 350px;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--surface);

    cursor: pointer;

    box-shadow:
        0 15px 45px
        rgba(0, 0, 0, 0.3);

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.featured-card:hover {
    transform:
        translateY(-7px);

    border-color:
        rgba(96, 165, 250, 0.4);

    box-shadow:
        0 25px 60px
        rgba(0, 0, 0, 0.55);
}

.featured-card .card-image {
    width: 100%;
    height: 240px;

    overflow: hidden;

    background:
        var(--surface-3);
}

.featured-card .card-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.45s ease;
}

.featured-card:hover .card-image img {
    transform:
        scale(1.08);
}

.image-placeholder {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            135deg,
            #101827,
            #17152a
        );

    color:
        var(--blue-light);

    font-size: 35px;
}

.featured-card .card-content {
    padding: 17px;
}

.featured-card h2 {
    margin-bottom: 7px;

    font-size: 18px;
}

.featured-card p {
    margin-bottom: 14px;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;
}

.featured-card button {
    padding:
        9px 14px;

    border-radius: 9px;

    background:
        var(--gradient);

    color: white;

    cursor: pointer;

    font-size: 12px;

    font-weight: 800;
}


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

.content-section {
    padding:
        30px 4vw;
}

.content-grid {
    display: grid;

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

    gap: 17px;
}


/* =========================================================
   CONTENT CARD
   MATCHES app.js .content-card
========================================================= */

.content-card {
    position: relative;

    overflow: hidden;

    min-width: 0;

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

    border-radius:
        var(--radius-md);

    background:
        linear-gradient(
            180deg,
            var(--surface-2),
            var(--surface)
        );

    cursor: pointer;

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.content-card:hover {
    transform:
        translateY(-7px);

    border-color:
        rgba(96, 165, 250, 0.45);

    box-shadow:
        0 20px 45px
        rgba(0, 0, 0, 0.45);
}


/* =========================================================
   CARD POSTER
========================================================= */

.card-poster {
    position: relative;

    width: 100%;

    aspect-ratio:
        2 / 3;

    overflow: hidden;

    background:
        var(--surface-3);
}

.card-poster img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.4s ease;
}

.content-card:hover .card-poster img {
    transform:
        scale(1.07);
}

.card-info {
    padding:
        12px;
}

.card-info h3 {
    overflow: hidden;

    color: white;

    font-size: 14px;

    font-weight: 750;

    line-height: 1.4;

    display:
        -webkit-box;

    -webkit-box-orient:
        vertical;

    -webkit-line-clamp:
        2;
}


/* =========================================================
   DETAIL PAGE
========================================================= */

.detail-page {
    min-height: 70vh;

    padding:
        35px 4vw 70px;
}

.detail-hero {
    position: relative;

    width: 100%;
    max-width: 1200px;

    min-height: 420px;

    margin:
        0 auto 35px;

    overflow: hidden;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--surface);
}

.detail-hero > img {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 0.65;
}

.detail-hero::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(5,7,13,.98),
            rgba(5,7,13,.72),
            rgba(5,7,13,.25)
        );
}

.detail-overlay {
    position: relative;

    z-index: 2;

    min-height: 420px;

    max-width: 720px;

    display: flex;

    flex-direction: column;

    justify-content: flex-end;

    padding:
        45px;
}

.detail-overlay h1 {
    margin-bottom: 15px;

    font-size:
        clamp(
            32px,
            6vw,
            58px
        );

    line-height: 1;

    letter-spacing:
        -1.8px;
}

.detail-overlay p {
    color:
        var(--text-soft);

    font-size: 15px;

    line-height: 1.8;
}


/* =========================================================
   EPISODE SECTION
   MATCHES app.js
========================================================= */

.episode-section {
    width: 100%;
    max-width: 1200px;

    margin:
        0 auto;
}

.episode-section .section-heading {
    margin-bottom: 16px;
}

.episode-section .section-heading span {
    min-width: 38px;

    padding:
        5px 10px;

    border-radius: 20px;

    background:
        rgba(59, 130, 246, 0.15);

    color:
        var(--blue-light);

    text-align: center;

    font-size: 12px;

    font-weight: 800;
}


/* =========================================================
   EPISODE GRID
========================================================= */

.episode-grid {
    display: grid;

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

    gap: 10px;
}


/* =========================================================
   EPISODE BUTTON
   MATCHES app.js .episode-button
========================================================= */

.episode-button {
    min-height: 48px;

    padding:
        8px 10px;

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

    border-radius:
        10px;

    background:
        linear-gradient(
            180deg,
            #111827,
            #0b101b
        );

    color:
        var(--text-soft);

    cursor: pointer;

    font-size: 13px;

    font-weight: 750;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.episode-button:hover {
    transform:
        translateY(-2px);

    border-color:
        rgba(96, 165, 250, 0.65);

    background:
        var(--gradient);

    color:
        white;

    box-shadow:
        0 10px 25px
        rgba(59, 130, 246, 0.2);
}

.episode-button:active {
    transform:
        translateY(0);
}


/* =========================================================
   PLAYER
========================================================= */

#player-root {
    position: relative;
    z-index: 5000;
}

.player-overlay {
    position: fixed;

    inset: 0;

    z-index: 5000;

    display: flex;

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

    padding: 15px;

    background:
        rgba(1, 3, 8, 0.97);

    backdrop-filter:
        blur(15px);
}

.player,
.player-container {
    position: relative;

    width:
        min(
            1150px,
            100%
        );

    overflow: hidden;

    border:
        1px solid
        rgba(96, 165, 250, 0.22);

    border-radius:
        18px;

    background:
        #02040a;

    box-shadow:
        0 40px 120px
        rgba(0, 0, 0, 0.9);
}

.player-header {
    min-height: 56px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding:
        9px 14px;

    background:
        #0b101b;

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

.player-title {
    overflow: hidden;

    color: white;

    font-size: 15px;

    font-weight: 800;

    white-space: nowrap;

    text-overflow: ellipsis;
}

.player-close {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 50%;

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

    color: white;

    cursor: pointer;

    font-size: 18px;
}

.player-close:hover {
    background:
        var(--danger);
}

.video-wrapper {
    position: relative;

    width: 100%;

    background: black;
}

.player video,
.chamani-video {
    width: 100%;

    max-height: 76vh;

    display: block;

    background: black;
}

.player-bottom {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding:
        11px 14px;

    background:
        var(--surface);

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

    color:
        var(--muted);

    font-size: 12px;
}

.player-bottom button {
    padding:
        8px 13px;

    border-radius:
        8px;

    background:
        var(--surface-3);

    color: white;

    cursor: pointer;
}

.player-bottom button:hover {
    background:
        var(--blue);
}


/* =========================================================
   PLAYER ERROR
========================================================= */

.player-error {
    width:
        min(
            520px,
            100%
        );

    padding:
        45px 25px;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--surface);

    text-align:
        center;

    box-shadow:
        var(--shadow);
}

.player-error .error-icon {
    margin-bottom: 12px;

    font-size: 40px;
}

.player-error h2 {
    margin-bottom: 10px;
}

.player-error p {
    margin-bottom: 20px;

    color: var(--muted);
}


/* =========================================================
   LOADING
========================================================= */

.app-loader {
    min-height:
        65vh;

    display: flex;

    flex-direction: column;

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

    gap: 16px;

    color:
        var(--muted);
}

.loader {
    width: 46px;
    height: 46px;

    border:
        3px solid
        rgba(255,255,255,.08);

    border-top-color:
        var(--cyan);

    border-right-color:
        var(--blue);

    border-radius: 50%;

    animation:
        chamani-spin
        0.8s
        linear
        infinite;
}

@keyframes chamani-spin {
    to {
        transform:
            rotate(360deg);
    }
}


/* =========================================================
   ERROR STATE
========================================================= */

.error-state {
    min-height:
        65vh;

    display: flex;

    flex-direction: column;

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

    padding: 30px;

    text-align: center;
}

.error-state h2 {
    margin-bottom: 10px;

    font-size: 25px;
}

.error-state p {
    max-width: 550px;

    margin-bottom: 20px;

    color: var(--muted);
}

.error-state button {
    padding:
        11px 18px;

    border-radius:
        9px;

    background:
        var(--gradient);

    color: white;

    cursor: pointer;

    font-weight: 800;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-state {
    min-height:
        45vh;

    display: flex;

    flex-direction: column;

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

    padding: 40px 20px;

    text-align: center;

    color: var(--muted);
}

.empty-state h2 {
    margin-bottom: 8px;

    color: white;
}


/* =========================================================
   TOAST
========================================================= */

#toast-root {
    position: relative;

    z-index: 9000;
}

.toast {
    position: fixed;

    left: 50%;
    bottom: 25px;

    z-index: 9000;

    transform:
        translateX(-50%);

    max-width:
        min(
            90vw,
            520px
        );

    padding:
        13px 19px;

    border:
        1px solid
        rgba(96,165,250,.25);

    border-radius:
        10px;

    background:
        rgba(11,16,27,.96);

    color: white;

    box-shadow:
        0 20px 50px
        rgba(0,0,0,.5);

    backdrop-filter:
        blur(15px);

    font-size: 14px;
}


/* =========================================================
   FOOTER
========================================================= */

#footer {
    margin-top:
        70px;

    padding:
        40px 20px;

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

    background:
        #050810;

    color:
        var(--muted);

    text-align:
        center;

    font-size: 13px;
}

.footer-inner {
    max-width: 1100px;

    margin: auto;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 800px) {

    .header-inner {
        padding:
            11px 20px;
    }

    .nav-inner {
        padding:
            8px 20px;
    }

    .content-section,
    .featured-section {
        padding-left: 20px;
        padding-right: 20px;
    }

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

    .content-grid {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            );
    }

}


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

@media (max-width: 600px) {

    .header-inner {
        min-height: 112px;

        flex-wrap: wrap;

        padding:
            10px 15px;

        gap: 9px;
    }

    .brand {
        font-size: 18px;
    }

    .brand-icon {
        width: 34px;
        height: 34px;
    }

    .search-box {
        width: 100%;

        margin-left: 0;
    }

    #navigation {
        top: 112px;
    }

    .nav-inner {
        padding:
            7px 15px;
    }

    .nav-link {
        padding:
            8px 13px;
    }

    .featured-section,
    .content-section {
        padding:
            25px 15px;
    }

    .section-heading h1 {
        font-size: 23px;
    }

    .section-heading h2 {
        font-size: 19px;
    }

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

    .featured-card {
        min-height: 0;
    }

    .featured-card .card-image {
        height: 220px;
    }

    .content-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 12px;
    }

    .detail-page {
        padding:
            20px 12px 50px;
    }

    .detail-hero {
        min-height:
            400px;

        border-radius:
            15px;
    }

    .detail-overlay {
        min-height:
            400px;

        padding:
            25px 20px;
    }

    .detail-overlay h1 {
        font-size:
            34px;
    }

    .episode-grid {
        grid-template-columns:
            repeat(
                3,
                1fr
            );

        gap: 8px;
    }

    .episode-button {
        min-height:
            46px;

        padding:
            7px 4px;

        font-size:
            12px;
    }

    .player-overlay {
        padding:
            7px;
    }

    .player,
    .player-container {
        border-radius:
            12px;
    }

}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 380px) {

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

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

    .brand {
        font-size:
            16px;
    }

    .search-box button {
        padding:
            0 13px;
    }

}
/* =========================================================
   CHAMANISTREAM
   CURRENT APP.JS COMPATIBILITY LAYER
   DO NOT REMOVE
========================================================= */


/* =========================================================
   HEADER
========================================================= */

#header {
    min-height: 72px;
}

#header .brand {
    min-height: 72px;
    padding: 12px 4vw;
}

.brand-mark {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 11px;

    background: var(--gradient);

    box-shadow:
        0 8px 28px
        rgba(59, 130, 246, 0.3);
}

.brand-mark::before {
    content: "▶";

    color: white;

    font-size: 14px;
}


/* Header actions */

.header-actions {
    position: absolute;

    top: 12px;
    right: 4vw;

    display: flex;
    align-items: center;

    gap: 10px;
}

.search-wrapper {
    width: min(420px, 42vw);
}

.search-wrapper input {
    width: 100%;
    height: 44px;

    padding: 0 15px;

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

    border-radius: 11px;

    outline: none;

    background:
        rgba(16, 23, 37, 0.9);

    color: white;
}

.search-wrapper input::placeholder {
    color: #66758b;
}

.search-wrapper input:focus {
    border-color:
        rgba(96, 165, 250, 0.7);

    box-shadow:
        0 0 0 4px
        rgba(59, 130, 246, 0.1);
}

.menu-toggle {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background:
        var(--surface-2);

    color: white;

    cursor: pointer;

    font-size: 20px;

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


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

#navigation {
    display: block;
}

#navigation.active {
    display: block;
}


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

.hero {
    position: relative;

    min-height: 520px;

    overflow: hidden;

    display: flex;
    align-items: center;

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

.hero-background {
    position: absolute;

    inset: 0;

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

    transform: scale(1.02);
}

.hero::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(5,7,13,.15),
            rgba(5,7,13,.35) 45%,
            rgba(5,7,13,1) 100%
        );
}

.hero-content {
    position: relative;

    z-index: 2;

    width: min(700px, 90%);

    padding:
        80px 4vw 70px;
}

.hero-label {
    display: inline-block;

    margin-bottom: 15px;

    padding:
        6px 11px;

    border:
        1px solid
        rgba(96,165,250,.25);

    border-radius: 20px;

    background:
        rgba(59,130,246,.12);

    color:
        var(--blue-light);

    font-size: 12px;

    font-weight: 800;
}

.hero h1 {
    margin-bottom: 16px;

    font-size:
        clamp(
            38px,
            7vw,
            72px
        );

    line-height: 1;

    letter-spacing: -2px;
}

.hero p {
    max-width: 650px;

    margin-bottom: 24px;

    color: var(--text-soft);

    font-size: 15px;

    line-height: 1.8;
}

.hero-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}

.primary-button,
.secondary-button {
    min-height: 44px;

    padding:
        0 18px;

    border-radius: 10px;

    cursor: pointer;

    font-weight: 800;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.primary-button {
    background:
        var(--gradient);

    color: white;

    box-shadow:
        0 10px 30px
        rgba(59,130,246,.25);
}

.secondary-button {
    background:
        rgba(255,255,255,.08);

    color: white;

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

.primary-button:hover,
.secondary-button:hover {
    transform:
        translateY(-2px);
}


/* =========================================================
   CURRENT APP.JS CONTENT ROW
========================================================= */

.content-row {
    display: grid;

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

    gap: 17px;

    overflow: visible;
}


/* =========================================================
   CURRENT APP.JS MEDIA CARD
========================================================= */

.media-card {
    position: relative;

    overflow: hidden;

    min-width: 0;

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

    border-radius:
        var(--radius-md);

    background:
        linear-gradient(
            180deg,
            var(--surface-2),
            var(--surface)
        );

    cursor: pointer;

    transition:
        transform .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;
}

.media-card:hover {
    transform:
        translateY(-7px);

    border-color:
        rgba(96,165,250,.45);

    box-shadow:
        0 20px 45px
        rgba(0,0,0,.45);
}

.media-card .card-image {
    position: relative;

    width: 100%;

    aspect-ratio:
        2 / 3;

    overflow: hidden;

    background:
        var(--surface-3);
}

.media-card .card-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform .4s ease;
}

.media-card:hover .card-image img {
    transform:
        scale(1.07);
}

.media-card .card-info {
    padding: 12px;
}

.media-card .card-info h3 {
    overflow: hidden;

    color: white;

    font-size: 14px;

    font-weight: 750;

    line-height: 1.4;

    display:
        -webkit-box;

    -webkit-box-orient:
        vertical;

    -webkit-line-clamp: 2;
}

.media-card .card-info span {
    display: block;

    margin-top: 6px;

    color: var(--muted);

    font-size: 11px;
}


/* =========================================================
   SECTION HEADER
========================================================= */

.section-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 17px;
}

.section-header h2 {
    color: white;

    font-size: 22px;

    font-weight: 900;

    letter-spacing: -.7px;
}


/* =========================================================
   DETAIL PAGE
========================================================= */

.detail-page {
    min-height: 70vh;

    padding:
        25px 4vw 70px;
}

.back-button {
    margin-bottom: 18px;

    padding:
        9px 15px;

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

    border-radius: 9px;

    background:
        var(--surface-2);

    color: white;

    cursor: pointer;

    font-weight: 700;
}

.back-button:hover {
    background:
        var(--blue);
}


/* Detail hero */

.detail-hero {
    position: relative;

    display: flex;

    width: 100%;
    max-width: 1200px;

    min-height: 420px;

    margin:
        0 auto 35px;

    overflow: hidden;

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

    border-radius:
        var(--radius-lg);

    background:
        var(--surface);
}

.detail-poster {
    position: relative;

    width: 38%;

    min-height: 420px;

    flex-shrink: 0;

    background:
        var(--surface-3);
}

.detail-poster::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(5,7,13,.55)
        );
}

.detail-poster img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.detail-content {
    position: relative;

    z-index: 2;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding: 45px;

    flex: 1;
}

.detail-content h1 {
    margin-bottom: 15px;

    color: white;

    font-size:
        clamp(
            30px,
            5vw,
            56px
        );

    line-height: 1;

    letter-spacing:
        -1.7px;
}

.detail-content p {
    max-width: 650px;

    color:
        var(--text-soft);

    font-size: 15px;

    line-height: 1.8;
}


/* =========================================================
   EPISODES
========================================================= */

.episodes-section {
    width: 100%;
    max-width: 1200px;

    margin:
        0 auto;
}

.episodes-section h2 {
    margin-bottom: 16px;

    color: white;

    font-size: 22px;

    font-weight: 900;
}

.episode-list {
    display: grid;

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

    gap: 10px;
}


/* Actual button created by app.js */

.episode-card {
    position: relative;

    min-height: 55px;

    display: flex;

    align-items: center;

    gap: 8px;

    padding:
        8px 10px;

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

    border-radius:
        10px;

    background:
        linear-gradient(
            180deg,
            #111827,
            #0b101b
        );

    color:
        var(--text-soft);

    cursor: pointer;

    text-align: left;

    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.episode-card:hover {
    transform:
        translateY(-2px);

    border-color:
        rgba(96,165,250,.65);

    background:
        var(--gradient);

    color: white;

    box-shadow:
        0 10px 25px
        rgba(59,130,246,.2);
}

.episode-number {
    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 8px;

    background:
        rgba(255,255,255,.07);

    font-size: 11px;

    font-weight: 900;
}

.episode-title {
    overflow: hidden;

    flex: 1;

    font-size: 12px;

    font-weight: 750;

    white-space: nowrap;

    text-overflow: ellipsis;
}

.episode-play {
    flex-shrink: 0;

    font-size: 12px;
}


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

@media (max-width: 800px) {

    #header .brand {
        padding-left: 20px;
    }

    .header-actions {
        right: 20px;
    }

    .content-row {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            );
    }

    .detail-poster {
        width: 42%;
    }

}


@media (max-width: 600px) {

    #header {
        min-height: 112px;
    }

    #header .brand {
        min-height: 55px;

        padding:
            10px 15px;
    }

    .header-actions {
        position: absolute;

        top: 58px;
        left: 15px;
        right: 15px;

        width: auto;
    }

    .search-wrapper {
        width: 100%;
    }

    .menu-toggle {
        display: none;
    }

    #navigation {
        top: 112px;
    }

    .hero {
        min-height: 500px;
    }

    .hero-content {
        padding:
            50px 15px 45px;
    }

    .content-row {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 12px;
    }

    .detail-hero {
        display: block;

        min-height: 0;
    }

    .detail-poster {
        width: 100%;

        height: 300px;

        min-height: 0;
    }

    .detail-content {
        padding:
            25px 20px 30px;
    }

    .detail-content h1 {
        font-size: 34px;
    }

    .episode-list {
        grid-template-columns:
            repeat(
                3,
                1fr
            );

        gap: 8px;
    }

    .episode-card {
        min-height: 46px;

        padding:
            7px 5px;
    }

    .episode-number {
        width: 24px;
        height: 24px;
    }

}


@media (max-width: 380px) {

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

}