/* =========================================
   MOVIEBOX SERIES PAGE
========================================= */

.series-page-body {

    margin: 0;

    background: #070709;

    color: #ffffff;

    font-family: inherit;

}


/* =========================================
   MAIN
========================================= */

.series-detail-page {

    width: 100%;

    min-height: 100vh;

    padding-bottom: 70px;

    background: #070709;

}


.series-topbar,
.series-player-section,
.series-navigation,
.series-section,
.series-information,
.series-details-section {

    width: min(
        1320px,
        calc(100% - 32px)
    );

    margin-left: auto;

    margin-right: auto;

}


/* =========================================
   BACK BUTTON
========================================= */

.series-topbar {

    padding: 24px 0 12px;

}


.series-back-button {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    height: 40px;

    padding: 0 14px;

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

    border-radius: 10px;

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

    color: #fff;

    cursor: pointer;

}


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

.series-player {

    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    min-height: 320px;

    overflow: hidden;

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

    border-radius: 15px;

    background: #000;

}


.series-player iframe {

    width: 100%;

    height: 100%;

    border: 0;

    display: none;

}


.series-player-placeholder {

    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 12px;

    color:
        rgba(255,255,255,.45);

}


/* =========================================
   PREV / CURRENT / NEXT
========================================= */

.series-navigation {

    margin-top: 18px;

    min-height: 72px;

    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 15px;

    padding: 10px 14px;

    border: 1px solid
        rgba(255,255,255,.07);

    border-radius: 15px;

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

}


.series-nav-button {

    min-height: 44px;

    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 0 15px;

    border: 0;

    border-radius: 10px;

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

    color: #fff;

    cursor: pointer;

}


.series-nav-button:last-child {

    justify-self: end;

}


.series-nav-button:disabled {

    opacity: .35;

    cursor: not-allowed;

}


.series-now-playing {

    text-align: center;

}


.series-now-playing span {

    display: block;

    margin-bottom: 4px;

    color:
        rgba(255,255,255,.38);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.5px;

}


.series-now-playing strong {

    font-size: 14px;

}


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

.series-section {

    margin-top: 34px;

}


.series-section-heading span {

    display: block;

    margin-bottom: 7px;

    color: #ff5a13;

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 1.5px;

}


.series-section-heading h2 {

    margin:
        0 0 17px;

    font-size: 22px;

}


/* =========================================
   VIDEO SOURCES
========================================= */

.series-source-grid {

    display: grid;

    grid-template-columns:
        repeat(5, minmax(0,1fr));

    gap: 10px;

}


.series-source-button {

    min-height: 52px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 8px;

    padding: 0 13px;

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

    border-radius: 10px;

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

    color: #fff;

    cursor: pointer;

}


.series-source-button.active {

    border-color:
        rgba(255,77,0,.75);

    background:
        rgba(255,77,0,.10);

}


/* =========================================
   SEASON
========================================= */

.series-season-row {

    display: flex;

    align-items: center;

    gap: 13px;

    margin-bottom: 13px;

}


.series-season-label {

    color:
        rgba(255,255,255,.48);

    font-size: 12px;

    font-weight: 800;

}


.series-season-buttons {

    display: flex;

    gap: 7px;

    flex-wrap: wrap;

}


.series-season-button {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    min-height: 34px;

    padding: 0 10px;

    border: 1px solid
        rgba(255,255,255,.07);

    border-radius: 8px;

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

    color:
        rgba(255,255,255,.75);

    cursor: pointer;

    font-size: 11px;

}


.series-season-button small {

    color:
        rgba(255,255,255,.38);

    font-size: 9px;

}


.series-season-button.active {

    border-color:
        rgba(255,77,0,.6);

    background:
        rgba(255,77,0,.10);

    color: #fff;

}


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

.series-episode-buttons {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    padding: 15px;

    border: 1px solid
        rgba(255,255,255,.06);

    border-radius: 13px;

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

}


.series-episode-button {

    min-width: 47px;

    height: 37px;

    padding: 0 10px;

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

    border-radius: 8px;

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

    color:
        rgba(255,255,255,.75);

    cursor: pointer;

    font-size: 11px;

    font-weight: 800;

}


.series-episode-button.active {

    border-color: #ff4d00;

    background: #ff4d00;

    color: #fff;

}


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

.series-download-heading {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 15px;

}


.series-season-select-wrap select {

    min-width: 140px;

    height: 42px;

    padding: 0 13px;

    border: 1px solid
        rgba(255,255,255,.09);

    border-radius: 10px;

    outline: none;

    background: #111116;

    color: #fff;

}


.series-download-list {

    display: grid;

    gap: 12px;

}


.series-download-card {

    display: grid;

    grid-template-columns:
        255px minmax(0,1fr);

    gap: 20px;

    padding: 16px;

    border: 1px solid
        rgba(255,255,255,.07);

    border-radius: 15px;

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

}


.series-episode-image-wrap {

    position: relative;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 11px;

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

}


.series-episode-image {

    width: 100%;

    height: 100%;

    object-fit: cover;

}


.series-download-info h3 {

    margin: 0;

    font-size: 18px;

}


.series-episode-meta {

    margin-top: 6px;

    color:
        rgba(255,255,255,.48);

    font-size: 12px;

}


.series-download-info p {

    margin: 12px 0 18px;

    color:
        rgba(255,255,255,.48);

    font-size: 13px;

    line-height: 1.65;

}


.series-download-button {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    min-height: 40px;

    padding: 0 13px;

    border: 0;

    border-radius: 9px;

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

    color: #fff;

    cursor: pointer;

}


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

.series-information {

    margin-top: 45px;

}


.series-information-card {

    min-height: 300px;

    display: flex;

    align-items: center;

    gap: 30px;

    padding: 32px;

    border: 1px solid
        rgba(255,255,255,.07);

    border-radius: 17px;

    background-position: center;

    background-size: cover;

}


.series-poster {

    width: 180px;

    height: 270px;

    object-fit: cover;

    border-radius: 11px;

}


.series-info-content {

    max-width: 760px;

}


.series-type {

    color: #ff5a13;

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 1px;

}


.series-info-content h1 {

    margin: 10px 0;

    font-size: 48px;

}


.series-meta {

    display: flex;

    gap: 16px;

    margin-bottom: 18px;

    color:
        rgba(255,255,255,.65);

}


.series-info-content p {

    color:
        rgba(255,255,255,.52);

    line-height: 1.7;

}


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

.series-details-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 10px;

}


.series-details-grid > div {

    min-height: 85px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    gap: 7px;

    padding: 15px;

    border: 1px solid
        rgba(255,255,255,.06);

    border-radius: 11px;

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

}


.series-details-grid span {

    color:
        rgba(255,255,255,.36);

    font-size: 9px;

    text-transform: uppercase;

}


.series-details-grid strong {

    font-size: 13px;

}


/* =========================================
   EMPTY / ERROR
========================================= */

.series-empty {

    min-height: 80px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid
        rgba(255,255,255,.06);

    border-radius: 12px;

    color:
        rgba(255,255,255,.42);

}


.series-error {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 12px;

}


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

@media (max-width: 800px) {

    .series-source-grid {

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

    }


    .series-download-card {

        grid-template-columns: 1fr;

    }


    .series-information-card {

        flex-direction: column;

        align-items: flex-start;

    }


    .series-details-grid {

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

    }

}


@media (max-width: 520px) {

    .series-navigation {

        grid-template-columns:
            auto 1fr auto;

    }


    .series-source-grid {

        grid-template-columns:
            1fr 1fr;

    }


    .series-season-row {

        align-items: flex-start;

        flex-direction: column;

    }


    .series-download-heading {

        flex-direction: column;

        align-items: stretch;

    }


    .series-season-select-wrap select {

        width: 100%;

    }


    .series-details-grid {

        grid-template-columns: 1fr;

    }

}
/* ==========================================
   DOWNLOAD & WATCH EPISODE
========================================== */

.download-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}


.download-head select {
    min-width: 170px;
    height: 46px;
    padding: 0 42px 0 16px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    background: #1b1b1e;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
}


.download-head select:hover {
    border-color: rgba(255,77,0,0.45);
}


.download-head select:focus {
    border-color: rgba(255,77,0,0.7);
}


/* Episode list */

.downloads {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* Episode card */

.download-card {
    display: flex;
    align-items: stretch;
    gap: 18px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: rgba(255,255,255,0.025);
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.download-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-1px);
}


.download-card.active {
    border-color: rgba(255,77,0,0.55);
    background: rgba(255,77,0,0.055);
}


/* Episode image */

.download-card .still {
    position: relative;
    width: 220px;
    min-width: 220px;
    height: 124px;
    overflow: hidden;
    border-radius: 10px;
    background: #101014;
}


.download-card .still img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


.episode-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.25);
}


.episode-image-placeholder svg {
    width: 30px;
    height: 30px;
}


/* E1 overlay */

.episode-number-overlay {
    position: absolute;
    left: 8px;
    bottom: 8px;
    min-width: 38px;
    height: 25px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(0,0,0,0.78);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}


/* Info */

.download-info {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.download-info .title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}


.download-info h3 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
}


.download-info small {
    display: block;
    margin-top: 6px;
    color: rgba(255,255,255,0.42);
    font-size: 11px;
}

.download-info p {
    margin: 8px 0 12px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    line-height: 1.55;
    overflow: hidden;
    max-height: 38px;
}

/* Download button */

.episode-download-button {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}


.episode-download-button:hover {
    background: #ff4d00;
    border-color: #ff4d00;
}


.episode-download-button svg {
    width: 14px;
    height: 14px;
}


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

@media (max-width: 700px) {

    .download-head {
        align-items: stretch;
        flex-direction: column;
    }


    .download-head select {
        width: 100%;
    }


    .download-card {
        gap: 12px;
    }


    .download-card .still {
        width: 130px;
        min-width: 130px;
        height: 88px;
    }


    .download-info h3 {
        font-size: 13px;
    }


    .download-info p {
        display: none;
    }


    .episode-download-button {
        min-height: 32px;
        padding: 0 11px;
    }

}


@media (max-width: 480px) {

    .download-card {
        flex-direction: column;
    }


    .download-card .still {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }


    .episode-download-button {
        width: 100%;
    }

}
/* =========================================================
   MOVIEBOX SERIES - PLAYER FIX
========================================================= */

.series-page-body {
    margin: 0;
    padding: 0;
    background: #070709;
    color: #fff;
}


/* =========================================================
   MAIN CONTAINER
========================================================= */

.series-page {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 80px;
}


/* =========================================================
   BACK BUTTON
========================================================= */

.series-top {
    margin-bottom: 14px;
}

.series-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    height: 40px;
    padding: 0 15px;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;

    background: #171719;
    color: #fff;

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

    cursor: pointer;
}

.series-back:hover {
    background: #222225;
}


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

.series-player {
    width: 100%;
    margin-bottom: 16px;
}

.series-frame {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

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

    background: #000;

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


/* iframe */

.series-frame iframe,
#series-iframe {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;

    background: #000;

    display: none;
}


/* placeholder */

.series-player-placeholder {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;
    flex-direction: column;

    gap: 10px;

    color: rgba(255,255,255,.48);

    background: #000;

    font-size: 14px;
}

.series-player-placeholder svg {
    width: 34px;
    height: 34px;
    opacity: .65;
}


/* =========================================================
   PREV / NEXT
========================================================= */

.series-nav {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;

    gap: 16px;

    padding: 14px;

    margin-bottom: 34px;

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

    background: rgba(255,255,255,.025);
}

.series-nav > button {
    height: 46px;

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

    padding: 0 18px;

    border: 0;
    border-radius: 10px;

    background: #1a1a1d;
    color: #fff;

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

    cursor: pointer;
}

.series-nav > button:hover:not(:disabled) {
    background: #242428;
}

.series-nav > button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.series-now-playing {
    min-width: 130px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;

    text-align: center;
}

.series-now-playing small {
    color: #ff5a00;

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

    letter-spacing: 1.5px;
}

.series-now-playing strong {
    font-size: 14px;
}


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

.section {
    margin-top: 34px;
    margin-bottom: 34px;
}

.eyebrow {
    margin-bottom: 7px;

    color: #ff5a00;

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

    letter-spacing: 1.4px;
}

.section h2 {
    margin: 0 0 18px;

    color: #fff;

    font-size: 25px;
    line-height: 1.2;
}


/* =========================================================
   VIDEO SOURCES
========================================================= */

.source-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 10px;
}

.source-btn {
    min-height: 52px;

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

    gap: 10px;

    padding: 0 14px;

    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;

    background: #111113;
    color: #ddd;

    cursor: pointer;

    transition:
        .2s ease;
}

.source-btn:hover {
    background: #1b1b1e;
}

.source-btn.active {
    border-color: rgba(255,77,0,.75);

    background:
        linear-gradient(
            135deg,
            rgba(255,77,0,.18),
            rgba(255,77,0,.06)
        );

    color: #fff;
}

.source-btn span {
    overflow: hidden;

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

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

.source-btn svg {
    width: 15px;
    height: 15px;

    flex: 0 0 auto;
}


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

.download-head {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}

.download-head h2 {
    margin-bottom: 0;
}


/* Season dropdown */

#season-select {
    width: 185px;
    height: 46px;

    padding: 0 14px;

    border: 1px solid rgba(255,255,255,.09);
    border-radius: 10px;

    background: #171719;
    color: #fff;

    outline: none;

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

    cursor: pointer;
}

#season-select:focus {
    border-color: rgba(255,77,0,.65);
}


/* =========================================================
   EPISODE CARDS
========================================================= */

.downloads {
    display: flex;

    flex-direction: column;

    gap: 12px;
}

.download-card {
    display: grid;

    grid-template-columns:
        250px
        minmax(0, 1fr);

    gap: 18px;

    padding: 14px;

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

    background: #101012;

    cursor: pointer;

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

.download-card:hover {
    border-color: rgba(255,255,255,.14);

    background: #151518;

    transform: translateY(-1px);
}

.download-card.active {
    border-color: rgba(255,77,0,.72);

    background:
        linear-gradient(
            90deg,
            rgba(255,77,0,.10),
            #101012
        );
}


/* Episode image */

.still {
    position: relative;

    width: 100%;
    height: 140px;

    overflow: hidden;

    border-radius: 10px;

    background: #18181b;
}

.still img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

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

    display: flex;

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

    color: rgba(255,255,255,.3);
}


/* E1 overlay */

.episode-number-overlay {
    position: absolute;

    left: 8px;
    bottom: 8px;

    min-width: 38px;
    height: 26px;

    display: flex;

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

    padding: 0 8px;

    border-radius: 7px;

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

    color: #fff;

    font-size: 11px;
    font-weight: 800;
}


/* Episode information */

.download-info {
    min-width: 0;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: flex-start;
}

.download-info h3 {
    margin: 0 0 6px;

    color: #fff;

    font-size: 16px;
}

.download-info small {
    color: rgba(255,255,255,.45);

    font-size: 11px;
}

.download-info p {
    margin: 8px 0 14px;

    color: rgba(255,255,255,.5);

    font-size: 12px;
    line-height: 1.55;

    max-width: 750px;
}


/* Download button */

.episode-download-button {
    display: inline-flex;

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

    gap: 7px;

    min-width: 105px;
    height: 38px;

    padding: 0 13px;

    border: 1px solid rgba(255,255,255,.09);
    border-radius: 9px;

    background: #1b1b1e;
    color: #fff;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.episode-download-button:hover {
    background: #28282c;
}

.episode-download-button svg {
    width: 15px;
    height: 15px;
}


/* =========================================================
   SERIES INFO
========================================================= */

.series-info {
    position: relative;

    display: grid;

    grid-template-columns:
        240px
        minmax(0, 1fr);

    gap: 30px;

    padding: 28px;

    min-height: 300px;

    overflow: hidden;

    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;

    background-color: #0c0c0e;
    background-size: cover;
    background-position: center;
}

.series-info > div {
    position: relative;
    z-index: 2;
}

.series-info .poster {
    width: 240px;
    height: 350px;

    display: block;

    object-fit: cover;

    border-radius: 12px;

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

.series-info .type {
    color: #ff5a00;

    font-size: 11px;
    letter-spacing: 1.4px;
}

.series-info h1 {
    margin: 12px 0 12px;

    font-size: 36px;
    line-height: 1.1;
}

.series-info .meta {
    display: flex;

    flex-wrap: wrap;

    gap: 14px;

    margin-bottom: 18px;

    color: rgba(255,255,255,.7);

    font-size: 13px;
}

.series-info p {
    max-width: 720px;

    margin: 0;

    color: rgba(255,255,255,.68);

    font-size: 14px;
    line-height: 1.7;
}


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

.details {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;
}

.details > div {
    display: flex;

    flex-direction: column;

    gap: 6px;

    padding: 16px;

    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;

    background: #101012;
}

.details small {
    color: rgba(255,255,255,.4);

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: .7px;
}

.details b {
    color: #fff;

    font-size: 13px;

    word-break: break-word;
}


/* =========================================================
   EMPTY / ERROR
========================================================= */

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

    display: flex;

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

    padding: 20px;

    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;

    background: #101012;

    color: rgba(255,255,255,.45);

    font-size: 13px;
}


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

@media (max-width: 900px) {

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

    .download-card {
        grid-template-columns:
            190px
            minmax(0, 1fr);
    }

    .series-info {
        grid-template-columns:
            180px
            minmax(0, 1fr);
    }

    .series-info .poster {
        width: 180px;
        height: 270px;
    }

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

}


@media (max-width: 650px) {

    .series-page {
        width: min(
            100% - 20px,
            1380px
        );

        padding-top: 12px;
    }

    .series-nav {
        grid-template-columns: 1fr;
    }

    .series-now-playing {
        order: -1;
    }

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

    .download-head {
        align-items: stretch;

        flex-direction: column;
    }

    #season-select {
        width: 100%;
    }

    .download-card {
        grid-template-columns: 1fr;

        gap: 13px;
    }

    .still {
        height: 190px;
    }

    .series-info {
        grid-template-columns: 1fr;

        padding: 20px;
    }

    .series-info .poster {
        width: 150px;
        height: 225px;
    }

    .series-info h1 {
        font-size: 28px;
    }

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

}
/* =========================================================
   MOBILE SERIES VIEW — MOVIEBOX STYLE
========================================================= */

@media (max-width: 640px) {

    /* Main page */
    .series-page-body {
        overflow-x: hidden;
    }

    #series-detail-content {
        width: 100%;
        padding: 0 12px 30px;
        box-sizing: border-box;
    }


    /* Header */
    header {
        height: auto !important;
    }

    header > div {
        height: 60px !important;
        padding: 0 10px !important;
        gap: 8px !important;
    }

    header button {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px;
    }

    header button svg {
        width: 18px !important;
        height: 18px !important;
    }


    /* Search */
    #series-search-input {
        height: 38px !important;
        padding-left: 38px !important;
        padding-right: 10px !important;
        font-size: 12px !important;
        border-radius: 10px !important;
    }


    /* Hide Ad-Free button on small mobile */
    header button[class*="bg-\\[\\#ff4d00\\]"] {
        display: none !important;
    }


    /* Series loading */
    .series-loading {
        min-height: 50vh;
        padding: 30px 10px;
    }

    .series-loading p {
        font-size: 13px;
    }


    /* Player */
    .series-player-section,
    .series-player,
    .series-video-player {
        width: 100% !important;
        max-width: 100% !important;
    }

    #series-player,
    #series-iframe {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        min-height: 0 !important;
        border-radius: 10px !important;
    }


    /* Episode navigation */
    .series-episode-navigation,
    .episode-navigation,
    .series-player-controls {
        gap: 6px !important;
        margin-top: 10px !important;
    }

    .series-episode-navigation button,
    .episode-navigation button,
    .series-player-controls button {
        min-height: 36px !important;
        padding: 7px 10px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
    }


    /* Section spacing */
    .series-section {
        margin-top: 18px !important;
        padding: 0 !important;
    }


    /* Section headings */
    .series-section h2,
    .series-section h3 {
        font-size: 15px !important;
        margin-bottom: 10px !important;
    }


    /* Video Sources */
    .video-sources,
    .series-video-sources,
    .source-list {
        gap: 7px !important;
    }

    .video-source-item,
    .series-source-item {
        min-height: 38px !important;
        padding: 8px 10px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
    }


    /* Season selector */
    #season-select {
        width: 100% !important;
        height: 38px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
    }


    /* Episode buttons */
    .episode-list,
    .episodes-grid,
    .series-episodes {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .episode-item,
    .episode-button,
    .episode-card {
        min-height: 38px !important;
        padding: 7px 4px !important;
        font-size: 11px !important;
        border-radius: 7px !important;
    }


    /* Download episode buttons */
    .download-episode-item,
    .download-episode,
    .episode-download-item {
        padding: 9px 10px !important;
        min-height: 42px !important;
        border-radius: 8px !important;
    }

    .download-episode-item button,
    .download-episode button,
    .episode-download-item button {
        padding: 6px 9px !important;
        font-size: 10px !important;
    }


    /* Series information */
    .series-info,
    .series-details,
    .series-detail-card {
        padding: 12px !important;
        margin-top: 14px !important;
        border-radius: 10px !important;
    }

    .series-info h2,
    .series-info h3,
    .series-details h2,
    .series-details h3 {
        font-size: 15px !important;
    }

    .series-info p,
    .series-details p {
        font-size: 11px !important;
        line-height: 1.6 !important;
    }


    /* Poster / backdrop */
    .series-poster {
        max-width: 110px !important;
    }


    /* Sidebar */
    #sidebar {
        width: 270px !important;
        max-width: 82vw !important;
    }

    #sidebar .text-xl {
        font-size: 17px !important;
    }

    #sidebar .nav-item {
        padding: 9px 12px !important;
        font-size: 13px !important;
    }

    #sidebar .nav-item svg {
        width: 18px !important;
        height: 18px !important;
    }

}
/* =========================================================
   EPISODE DOWNLOAD — PREMIUM MOVIEBOX STYLE
========================================================= */

.download-episode-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    width: 100%;
    padding: 12px 14px;

    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;

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

.download-episode-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 77, 0, 0.35);
    transform: translateY(-1px);
}


/* Episode title / info */

.download-episode-item .episode-info {
    min-width: 0;
    flex: 1;
}

.download-episode-item .episode-title {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;

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

.download-episode-item .episode-meta {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
}


/* Download Button */

.download-episode-item .download-btn,
.download-episode-item button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    flex-shrink: 0;

    min-width: 92px;
    height: 36px;

    padding: 0 13px;

    border: 1px solid rgba(255, 77, 0, 0.35);
    border-radius: 9px;

    background: rgba(255, 77, 0, 0.12);
    color: #ff6a2a;

    font-size: 11px;
    font-weight: 700;

    cursor: pointer;

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

.download-episode-item .download-btn:hover,
.download-episode-item button:hover {
    background: #ff4d00;
    border-color: #ff4d00;
    color: #fff;

    transform: translateY(-1px);
}

.download-episode-item .download-btn:active,
.download-episode-item button:active {
    transform: scale(0.97);
}


/* Download icon */

.download-episode-item .download-btn svg,
.download-episode-item button svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}


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

@media (max-width: 640px) {

    .download-episode-item {
        padding: 10px;
        gap: 8px;
        border-radius: 10px;
    }

    .download-episode-item .episode-title {
        font-size: 11px;
    }

    .download-episode-item .episode-meta {
        font-size: 9px;
        margin-top: 2px;
    }

    .download-episode-item .download-btn,
    .download-episode-item button {
        min-width: 76px;
        height: 32px;
        padding: 0 9px;

        border-radius: 8px;

        font-size: 10px;
    }

    .download-episode-item .download-btn svg,
    .download-episode-item button svg {
        width: 13px;
        height: 13px;
    }

}
/* =========================================================
   MOVIEBOX SERIES - REAL MOBILE OVERRIDE
========================================================= */

@media (max-width: 650px) {

    /* ---------- PAGE ---------- */

    .series-page {
        width: calc(100% - 20px) !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 12px 0 40px !important;
    }


    /* ---------- PLAYER ---------- */

    .series-player {
        width: 100% !important;
        margin: 0 0 10px !important;
    }

    .series-frame {
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        min-height: 0 !important;
        height: auto !important;
        border-radius: 10px !important;
    }


    /* ---------- PREV / CURRENT / NEXT ---------- */

    .series-nav {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;

        gap: 6px !important;
        padding: 7px !important;
        margin-bottom: 20px !important;

        min-height: 0 !important;
        border-radius: 10px !important;
    }

    .series-nav > button {
        height: 34px !important;
        min-height: 34px !important;

        padding: 0 8px !important;

        border-radius: 7px !important;

        font-size: 10px !important;
        font-weight: 700 !important;
    }

    .series-now-playing {
        min-width: 65px !important;
        gap: 2px !important;
    }

    .series-now-playing small {
        font-size: 7px !important;
        letter-spacing: 1px !important;
    }

    .series-now-playing strong {
        font-size: 10px !important;
    }


    /* ---------- ALL SECTIONS ---------- */

    .section {
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }

    .eyebrow {
        margin-bottom: 4px !important;
        font-size: 8px !important;
        letter-spacing: 1.1px !important;
    }

    .section h2 {
        margin: 0 0 10px !important;
        font-size: 17px !important;
        line-height: 1.2 !important;
    }


    /* ---------- VIDEO SOURCES ---------- */

    .source-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .source-btn {
        min-height: 38px !important;
        height: 38px !important;

        padding: 0 9px !important;

        border-radius: 7px !important;

        font-size: 10px !important;
    }

    .source-btn span {
        font-size: 10px !important;
    }

    .source-btn svg {
        width: 13px !important;
        height: 13px !important;
    }


    /* ---------- DOWNLOAD HEADER ---------- */

    .download-head {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;

        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .download-head h2 {
        font-size: 17px !important;
    }

    #season-select {
        width: 115px !important;
        min-width: 115px !important;
        height: 34px !important;

        padding: 0 8px !important;

        border-radius: 7px !important;

        font-size: 10px !important;
    }


    /* ---------- EPISODE DOWNLOAD LIST ---------- */

    .downloads {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }


    /* ---------- EPISODE CARD ---------- */

    .download-card {
        display: grid !important;

        grid-template-columns: 105px minmax(0, 1fr) !important;

        gap: 10px !important;

        padding: 8px !important;

        border-radius: 9px !important;
    }


    /* Episode thumbnail */

    .download-card .still,
    .still {
        width: 105px !important;
        min-width: 105px !important;

        height: 70px !important;

        aspect-ratio: auto !important;

        border-radius: 7px !important;
    }

    .episode-number-overlay {
        left: 5px !important;
        bottom: 5px !important;

        min-width: 30px !important;
        height: 20px !important;

        padding: 0 5px !important;

        border-radius: 5px !important;

        font-size: 9px !important;
    }


    /* Episode information */

    .download-info {
        min-width: 0 !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }
.download-info h3 {
    margin: 0 0 3px !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
}
    .download-info small {
        font-size: 8px !important;
    }

    .download-info p {
        display: none !important;
    }


    /* Download button */

    .episode-download-button {
        min-width: 72px !important;
        width: auto !important;

        height: 28px !important;
        min-height: 28px !important;

        padding: 0 8px !important;

        margin-top: 5px !important;

        border-radius: 6px !important;

        font-size: 9px !important;
        gap: 4px !important;
    }

    .episode-download-button svg {
        width: 12px !important;
        height: 12px !important;
    }


    /* ---------- SERIES INFO ---------- */

    .series-info {
        display: grid !important;
        grid-template-columns: 85px minmax(0, 1fr) !important;

        gap: 12px !important;

        padding: 12px !important;

        min-height: 0 !important;

        border-radius: 10px !important;
    }

    .series-info .poster {
        width: 85px !important;
        height: 128px !important;

        border-radius: 7px !important;
    }

    .series-info h1 {
        margin: 4px 0 6px !important;

        font-size: 18px !important;
        line-height: 1.15 !important;
    }

    .series-info .type {
        font-size: 8px !important;
        letter-spacing: 1px !important;
    }

    .series-info .meta {
        gap: 6px !important;
        margin-bottom: 7px !important;

        font-size: 9px !important;
    }

    .series-info p {
    font-size: 9px !important;
    line-height: 1.45 !important;
}

    /* ---------- DETAILS ---------- */

    .details {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

        gap: 6px !important;
    }

    .details > div {
        min-height: 55px !important;

        padding: 9px !important;

        border-radius: 7px !important;
    }

    .details small {
        font-size: 7px !important;
    }

    .details b {
        font-size: 10px !important;
    }


    /* ---------- EMPTY ---------- */

    .series-empty {
        min-height: 55px !important;
        padding: 10px !important;

        border-radius: 8px !important;

        font-size: 10px !important;
    }

}


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

@media (max-width: 380px) {

    .series-page {
        width: calc(100% - 14px) !important;
    }

    .series-nav {
        gap: 4px !important;
        padding: 5px !important;
    }

    .series-nav > button {
        padding: 0 6px !important;
        font-size: 9px !important;
    }

    .series-now-playing strong {
        font-size: 9px !important;
    }

    .source-btn span {
        font-size: 9px !important;
    }

    .download-card {
        grid-template-columns: 92px minmax(0, 1fr) !important;
        gap: 8px !important;
    }

    .download-card .still,
    .still {
        width: 92px !important;
        min-width: 92px !important;
        height: 62px !important;
    }

    .episode-download-button {
        min-width: 65px !important;
        height: 26px !important;
        font-size: 8px !important;
    }

    .series-info {
        grid-template-columns: 75px minmax(0, 1fr) !important;
        gap: 9px !important;
        padding: 9px !important;
    }

    .series-info .poster {
        width: 75px !important;
        height: 112px !important;
    }

    .series-info h1 {
        font-size: 16px !important;
    }

}
/* =========================================
   MOBILE EPISODE TITLE + DOWNLOAD BUTTON
   ========================================= */

@media (max-width: 650px) {

    /* Episode card */
    .download-card {
        grid-template-columns: 105px minmax(0, 1fr) !important;
        gap: 10px !important;
        padding: 8px !important;
        min-height: 86px !important;
        align-items: center !important;
    }

    /* Episode thumbnail */
    .download-card .still {
        width: 105px !important;
        min-width: 105px !important;
        height: 70px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }

    /* Episode information */
    .download-info {
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 5px !important;
    }

    /* EPISODE TITLE — hide mat karna */
    .download-info h3 {
        display: block !important;
        margin: 0 !important;

        font-size: 12px !important;
        line-height: 1.35 !important;
        font-weight: 700 !important;

        color: #ffffff !important;

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

    /* Episode description */
    .download-info p {
        display: block !important;

        margin: 0 !important;
        font-size: 9px !important;
        line-height: 1.35 !important;

        color: rgba(255,255,255,0.55) !important;

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

    /* DOWNLOAD BUTTON */
    .episode-download-button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: fit-content !important;
        min-width: 78px !important;
        height: 30px !important;

        padding: 0 12px !important;

        border: 1px solid rgba(255,255,255,0.14) !important;
        border-radius: 7px !important;

        background: rgba(255,255,255,0.08) !important;
        color: #ffffff !important;

        font-size: 10px !important;
        font-weight: 700 !important;
        line-height: 1 !important;

        cursor: pointer !important;

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

    .episode-download-button:hover {
        background: rgba(255,255,255,0.14) !important;
        border-color: rgba(255,255,255,0.25) !important;
    }

    .episode-download-button:active {
        transform: scale(0.96) !important;
    }

    /* Agar button ke andar icon hai */
    .episode-download-button svg {
        width: 13px !important;
        height: 13px !important;
        margin-right: 5px !important;
    }
}
/* =========================================
   HIGHLIGHTED DOWNLOAD BUTTON
   ========================================= */

.episode-download-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 90px !important;
    height: 32px !important;
    padding: 0 14px !important;

    border: 0 !important;
    border-radius: 7px !important;

    background: #ff2f6d !important;
    color: #ffffff !important;

    font-size: 11px !important;
    font-weight: 700 !important;

    box-shadow: 0 4px 14px rgba(255, 47, 109, 0.28) !important;

    cursor: pointer !important;

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

/* Hover */
.episode-download-button:hover {
    background: #ff477d !important;
    box-shadow: 0 6px 18px rgba(255, 47, 109, 0.38) !important;
}

/* Click */
.episode-download-button:active {
    transform: scale(0.95) !important;
}

/* Icon */
.episode-download-button svg {
    width: 14px !important;
    height: 14px !important;
    margin-right: 5px !important;
}


/* MOBILE */
@media (max-width: 650px) {

    .episode-download-button {
        min-width: 76px !important;
        height: 28px !important;
        padding: 0 10px !important;

        border-radius: 6px !important;

        font-size: 9px !important;

        box-shadow: 0 3px 10px rgba(255, 47, 109, 0.25) !important;
    }

    .episode-download-button svg {
        width: 12px !important;
        height: 12px !important;
        margin-right: 4px !important;
    }
}
#series-detail-content > .series-detail-loading {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    height: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.series-detail-loading span {
    display: block;
    width: 35%;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        rgba(255, 77, 0, 0.25),
        #ff4d00,
        #ffb078
    );
    box-shadow: 0 0 12px rgba(255, 77, 0, 0.5);
    animation: seriesDetailLoadingMove 1.2s ease-in-out infinite;
}

@keyframes seriesDetailLoadingMove {
    0% {
        transform: translateX(-110%);
    }

    100% {
        transform: translateX(300%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .series-detail-loading span {
        animation: none;
        width: 100%;
    }
}

#series-detail-content .loading-spinner {
    display: none !important;
}

#series-detail-content .loading-state p {
    display: none !important;
}