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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Cairo", sans-serif;
    background: #07131d;
    color: white;
    overflow-x: hidden;
}

button,
select {
    font-family: inherit;
}

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


/* =========================
   LOADER
========================= */

#loader {
    position: fixed;
    inset: 0;
    background: #07131d;

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

    gap: 15px;

    z-index: 9999;
}

.loader-circle {
    width: 75px;
    height: 75px;

    border-radius: 50%;

    border: 7px solid #17384d;
    border-top-color: #28c7ff;

    animation: spin 1s linear infinite;
}

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


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

#main {
    width: 100%;
    max-width: 1500px;

    margin: auto;

    padding: 25px;
}


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

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

    gap: 20px;

    padding-bottom: 18px;
    margin-bottom: 28px;

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

.logo {
    color: #28c7ff;

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


/* =========================
   HOME BUTTON
========================= */

.home-btn {
    display: inline-flex;

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

    gap: 9px;

    min-width: 175px;

    height: 54px;

    padding: 0 18px;

    background: #10283a;

    border: 1px solid rgba(40,199,255,.45);

    border-radius: 14px;

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

    transition: .25s;
}

.home-btn:hover {
    background: #17384d;

    transform: translateY(-2px);

    box-shadow:
        0 0 20px rgba(40,199,255,.25);
}

.home-icon {
    font-size: 25px;
}


/* =========================
   BANNER
========================= */

.banner {
    min-height: 220px;

    margin-bottom: 25px;

    border-radius: 22px;

    overflow: hidden;

    background:
        linear-gradient(
            rgba(0,0,0,.35),
            rgba(0,0,0,.75)
        ),
        linear-gradient(
            135deg,
            #17384d,
            #07131d
        );

    display: flex;
    align-items: flex-end;
}

.banner-overlay {
    width: 100%;

    padding: 35px;
}

.banner-overlay h2 {
    font-size: 34px;

    margin-bottom: 10px;

    text-shadow:
        0 4px 15px rgba(0,0,0,.9);
}

.banner-overlay p {
    font-size: 18px;

    color: #d8edf7;
}


/* =========================
   LAYOUT
========================= */

.main-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        360px;

    gap: 25px;

    align-items: start;
}


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

.player-card {
    background: #10202c;

    padding: 18px;

    border-radius: 22px;

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

.video-js {
    width: 100% !important;

    aspect-ratio: 16 / 9;

    height: auto !important;

    background: black;

    border-radius: 16px;

    overflow: hidden;
}

.video-js .vjs-tech {
    object-fit: contain;
}

.video-js .vjs-control-bar {
    background: rgba(0,0,0,.9);
}

.video-js .vjs-play-progress,
.video-js .vjs-volume-level {
    background: #28c7ff;
}

.video-js .vjs-big-play-button {
    width: 64px;
    height: 64px;

    line-height: 60px;

    border-radius: 50%;

    border: none;

    background: #28c7ff;

    color: #00131d;

    font-size: 1.7em;

    margin-left: -32px;
    margin-top: -32px;
}

.video-js:hover .vjs-big-play-button {
    background: #0ea5e9;
}


/* =========================
   ACTIONS
========================= */

.player-actions {
    display: grid;

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

    gap: 15px;

    margin-top: 18px;
}

.player-actions button,
.download-btn {
    min-height: 52px;

    border: none;

    border-radius: 14px;

    display: flex;

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

    gap: 8px;

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

    cursor: pointer;

    transition: .25s;
}

.player-actions button {
    background: #1b3649;

    color: white;
}

.player-actions button:hover:not(:disabled) {
    background: #28c7ff;

    color: #00131d;
}

.player-actions button:disabled {
    opacity: .4;

    cursor: not-allowed;
}

.download-btn {
    background: #22c55e;

    color: white;
}

.download-btn:hover {
    background: #16a34a;

    transform: translateY(-2px);
}


/* =========================
   NOW PLAYING
========================= */

.now-playing {
    margin-top: 22px;

    background: #132c3f;

    padding: 18px;

    border-radius: 16px;
}

.now-playing h3 {
    color: #28c7ff;

    margin-bottom: 8px;
}

.now-playing h2 {
    font-size: 23px;

    margin-bottom: 8px;
}

.now-playing p {
    color: #c9dce7;

    line-height: 1.8;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    display: flex;

    flex-direction: column;

    gap: 20px;
}

.box {
    background: #10202c;

    padding: 18px;

    border-radius: 18px;
}

.box h3 {
    color: #28c7ff;

    margin-bottom: 15px;
}


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

#seasonSelect {
    width: 100%;

    height: 50px;

    padding: 0 15px;

    background: #17384d;

    border: 1px solid rgba(40,199,255,.2);

    border-radius: 12px;

    color: white;

    font-size: 16px;

    outline: none;
}


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

#episodeList {
    display: flex;

    flex-direction: column;

    gap: 12px;

    max-height: 600px;

    overflow-y: auto;

    padding-right: 5px;
}

.episode {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 10px;

    padding: 14px;

    background: #17384d;

    border-radius: 12px;

    cursor: pointer;

    font-weight: 700;

    transition: .2s;
}

.episode:hover {
    background: #28c7ff;

    color: #00131d;
}

.episode.active {
    background: #28c7ff;

    color: #00131d;
}

.episode-left {
    display: flex;

    align-items: center;

    gap: 10px;
}

.episode-title {
    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================
   SCROLLBAR
========================= */

#episodeList::-webkit-scrollbar {
    width: 7px;
}

#episodeList::-webkit-scrollbar-thumb {
    background: #28c7ff;

    border-radius: 50px;
}


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

@media (max-width: 1000px) {

    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
}


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

@media (max-width: 700px) {

    #main {
        padding: 15px;
    }

    .topbar {
        flex-direction: column-reverse;

        align-items: stretch;
    }

    .logo {
        text-align: center;

        font-size: 26px;
    }

    .home-btn {
        width: 100%;
    }

    .banner {
        min-height: 180px;
    }

    .banner-overlay {
        padding: 22px;
    }

    .banner-overlay h2 {
        font-size: 24px;
    }

    .banner-overlay p {
        font-size: 15px;
    }

    .player-card {
        padding: 10px;

        border-radius: 18px;
    }

    .video-js {
        border-radius: 12px;
    }

    .player-actions {
        grid-template-columns: 1fr;
    }

    .player-actions button,
    .download-btn {
        width: 100%;
    }

    #episodeList {
        max-height: 450px;
    }
}
