/* ==========================================================
   GLOBAL
   ========================================================== */

html,
body {
    margin: 0;
    padding: 0;
    /*background: #141414;*/
    background: transparent!important;
    color: #ffffff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ==========================================================
   NETFLIX PAGE
   ========================================================== */

.netflix-container {
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    /*background: #141414;*/
    background: transparent;
    color: #ffffff;
    padding: 0 0 60px;
    overflow-x: hidden;
}

.netflix-container h1 {
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 800;
    margin: 0 0 30px;
    padding-inline: 4vw;
    letter-spacing: -0.04em;
}

.channel-section {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.playlist-row {
    position: relative;
    width: 100%;
    background: transparent;
}

.playlist-title {
    padding-inline: 4vw;
    margin: 0 0 12px;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: #e5e5e5;
}

/* ==========================================================
   CHANNEL STRIP
   ========================================================== */

.channel-strip-container {
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: visible;
    margin-bottom: 32px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.channel-strip-container::-webkit-scrollbar {
    display: none;
}

.channel-strip {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 16px;
    width: max-content;
    min-width: 100%;
    padding: 0 4vw 24px;
}

.channel-item {
    flex: 0 0 120px;
    width: 120px;
    min-width: 120px;
    max-width: 120px;

    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 6px;

    cursor: pointer;

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

.channel-item:hover {
    transform: scale(1.08);
}

.channel-logo {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    background: #222;
    border: 2px solid transparent;

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

.channel-item:hover .channel-logo {
    border-color: #e50914;
}

.channel-name {
    width: 100%;
    margin-top: 8px;
    text-align: center;
    color: #e5e5e5;
    font-size: .85rem;
    line-height: 1.2;
}

/* ==========================================================
   VIDEO ROWS
   ========================================================== */

.row-container {
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow: visible;
    background: transparent;
}

.video-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;

    width: 100%;
    max-width: 100vw;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;
    scroll-snap-type: x proximity;

    scrollbar-width: none;
    -ms-overflow-style: none;

    padding: 0 60px 12px 60px;
    background: transparent;
}

.video-row::-webkit-scrollbar {
    display: none;
}

.video-preview {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    z-index: 20;

    pointer-events: none;


    opacity: 0;
    transition: opacity .3s ease;

}

/* ==========================================================
   VIDEO CARDS
   ========================================================== */

.video-card {
    position: relative;
    flex: 0 0 320px;
    width: 320px;

    aspect-ratio: 16 / 9;

    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    /*background: #222;*/
    background: transparent;
    scroll-snap-align: start;

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


.video-card * {
    pointer-events: none;
}


.video-card:hover {
    transform: scale(1.08);
    z-index: 100;
    box-shadow: 0 20px 40px rgba(0,0,0,.7);
    filter: brightness(1.08);
}

.video-card:hover .video-preview {
    opacity: 1;
}


.video-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
    opacity: 0;
    transition: opacity .2s ease;
}

.video-card:hover::after {
    opacity: 1;
}

.video-poster {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    
    z-index: 1;
    position: relative;

}

.video-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 14px 12px;

    background: linear-gradient(
            to top,
            rgba(0,0,0,.85),
            rgba(0,0,0,.35),
            transparent
    );

    pointer-events: none;
}

.video-name {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;

    font-size: .9rem;
    font-weight: 700;
    line-height: 1.3;

    text-shadow: 0 2px 6px rgba(0,0,0,.9);

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.loading-container {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255,255,255,.2);
    border-top-color: #e50914;
    border-radius: 50%;
    animation: netflix-spin .8s linear infinite;
}

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

/* ==========================================================
   SCROLL BUTTONS (FIXED)
   ========================================================== */

.scroll-button {
    position: absolute;
    top: 0;
    bottom: 0;

    width: 60px;

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

    color: white;
    font-size: 2rem;

    border: none;
    cursor: pointer;

    z-index: 200;

    /* Netflix-style fade */
    background: linear-gradient(
            to right,
            rgba(20,20,20,0.9),
            rgba(20,20,20,0)
    );

    transition: opacity 0.2s ease;
}

/* LEFT */
.scroll-button.scroll-left {
    left: 0;
}

/* RIGHT */
.scroll-button.scroll-right {
    right: 0;

    background: linear-gradient(
            to left,
            rgba(20,20,20,0.9),
            rgba(20,20,20,0)
    );
}

.scroll-button:hover {
    opacity: 1;
}

/* ==========================================================
   SHORT CARDS (VERTICAL / SHORTS)
   ========================================================== */

.short-card {
    border: 3px solid red;
    flex: 0 0 220px;
    width: 220px;

    aspect-ratio: 9 / 16;

    border-radius: 12px;
    overflow: hidden;

    /*background: #222;*/
    background: transparent;

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

.short-card:hover {
    transform: scale(1.06);
    z-index: 20;
    box-shadow: 0 20px 40px rgba(0,0,0,.7);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (min-width: 1800px) {
    .video-card {
        flex-basis: calc(16.666% - 10px);
    }
}

@media (max-width: 1400px) {
    .video-card {
        flex-basis: calc(25% - 10px);
    }
}

@media (max-width: 1024px) {
    .video-card {
        flex-basis: calc(33.333% - 10px);
    }
}

@media (max-width: 768px) {
    .playlist-title,
    .netflix-container h1 {
        padding-inline: 16px;
    }

    .video-row {
        padding: 0 48px 12px 48px;
    }

    .video-card {
        flex-basis: calc(50% - 10px);
    }

    .scroll-button {
        width: 40px;
        font-size: 1.4rem;
    }

    .channel-strip {
        gap: 12px;
        padding: 0 16px 20px;
    }

    .channel-item {
        flex-basis: 90px;
        width: 90px;
        min-width: 90px;
        max-width: 90px;
    }

    .channel-logo {
        width: 70px;
        height: 70px;
    }

    .channel-name {
        font-size: .75rem;
    }

    .short-card {
        flex: 0 0 160px;
    }
}

@media (max-width: 480px) {
    .playlist-title {
        font-size: 1rem;
    }

    .video-row {
        padding: 0 40px 12px 40px;
    }

    .netflix-container {
        padding-top: 16px;
    }

    .scroll-button {
        width: 34px;
        font-size: 1.1rem;
    }

    .channel-strip {
        gap: 10px;
        padding: 0 12px 16px;
    }

    .channel-item {
        flex-basis: 80px;
        width: 80px;
        min-width: 80px;
        max-width: 80px;
    }

    .channel-logo {
        width: 60px;
        height: 60px;
    }

    .channel-name {
        font-size: .7rem;
    }

    .short-card {
        flex: 0 0 140px;
    }
}

@media (max-width: 360px) {
    .video-card {
        flex: 0 0 92%;
    }

    .short-card {
        flex: 0 0 120px;
    }
}

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

.channel-hero {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.channel-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: end;
    padding: 40px;

    background: linear-gradient(
            to top,
            rgba(20,20,20,.95),
            rgba(20,20,20,.2)
    );
}

.channel-hero-overlay h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 800;
}

.channel-header {
    display: flex;
    align-items: center;
    padding: 40px 4vw;

    background: linear-gradient(
            to bottom,
            #1c1c1c,
            #141414
    );
}

.channel-header-logo {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    margin-right: 24px;
}
