.season-color-1 {
    text-align: left;
    font-weight: bold;
     color: #ff6b6b;
    font-size: 1vw;  }
.season-color-2 {
    text-align: left;
    font-weight: bold;
     color: #f9c74f;
    font-size: 1vw;  }
.season-color-3 { 
    text-align: left;
    font-weight: bold;
    color: #4364aa;
    font-size: 1vw;  }
.season-color-4 {
    text-align: left;
    font-weight: bold;
     color: #905790;
    font-size: 1vw;  }
.season-color-5 {
    text-align: left;
    font-weight: bold;
     color: #00b4d8;
    font-size: 1vw;  }
.season-color-6 {
    text-align: left;
    font-weight: bold;
     color: #dc88eb;
    font-size: 1vw;  }
.season-color-7 {
    text-align: left;
    font-weight: bold;
     color: #f9af69;
    font-size: 1vw;  }
.season-color-8 {
    text-align: left;
    font-weight: bold;
     color: #3ccaae;
    font-size: 1vw; }
.season-color-9 {
    text-align: left;
    font-weight: bold;
     color: #f72585;
    font-size: 1vw; }
/* Subtitle Chip Multi-Select Styles */
.subtitle-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.74vw;
    margin-bottom: 1.1vw;
}
.subtitle-chip {
    display: inline-block;
    padding: 0.2vw 0.2vw;
    border-radius: 0.5vw;
    background: #d987ff11;
    color: #fff;
    cursor: pointer;
    font-size: 0.93vw;
    border: 0.19vw solid #d987ff88;;
    transition: background 0.2s, color 0.2s, border 0.2s;
    user-select: none;
}
.subtitle-chip.selected {
    background: #d987ff;
    color: #222;
    border-color: #d987ff;
    font-weight: bold;
}
.subtitle-chip:hover {
    background: #444;
    color: #fff;
}
/* Language Chip Multi-Select Styles */
.language-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.74vw;
    margin-bottom: 1.1vw;
}
.language-chip {
    display: inline-block;
    padding: 0.2vw 0.2vw;
    border-radius: 0.5vw;
    background: #91ceff11;
    color: #fff;
    cursor: pointer;
    font-size: 0.93vw;
    border: 0.19vw solid #91ceff88;
    transition: background 0.2s, color 0.2s, border 0.2s;
    user-select: none;
}
.language-chip.selected {
    background: #91ceff;
    color: #222;
    border-color: #91ceff;
    font-weight: bold;
}
.language-chip:hover {
    background: #444;
    color: #fff;
}
/* Genre Chip Multi-Select Styles */
.genre-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.74vw;
    margin-bottom: 1.1vw;
}
.genre-chip {
    display: inline-block;
    padding: 0.2vw 0.2vw;
    border-radius: 0.5vw;
    background: #51d57911;
    color: #fff;
    cursor: pointer;
    font-size: 0.93vw;
    border: 0.19vw solid #51d57988;
    transition: background 0.2s, color 0.2s, border 0.2s;
    user-select: none;
}
.genre-chip.selected {
    background: #51d579;
    color: #222;
    border-color: #51d579;
    font-weight: bold;
}
.genre-chip:hover {
    background: #444;
    color: #fff;
}
#videoOverlay .autoplay-toggle-btn.selected-on {
    background: #51d579 !important;
    color: #fff !important;
    border: 0.13vw solid #51d579 !important;
}
#videoOverlay .autoplay-toggle-btn.selected-off {
    background: #ff4d4d !important;
    color: #fff !important;
    border: 0.13vw solid #ff4d4d !important;
}
/* Overlay Auto-Play Toggle Button Styles */
.autoplay-toggle-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1vw;
    padding: 0.18vw 1.1vw;
    border-radius: 0.5vw;
    cursor: pointer;
    border: 0.13vw solid transparent;
    transition: background 0.2s, color 0.2s, border 0.2s;
    user-select: none;
    background: #181828;
    color: #fff;
    margin-bottom: 0.7vw;
}
.autoplay-toggle-btn.selected-on {
    color: #fff;
    border: 0.13vw solid #51d579;
    background: #51d579;
}
.autoplay-toggle-btn.selected-off {
    color: #fff;
    border: 0.13vw solid #ff4d4d;
    background: #ff4d4d;
}
/* --- Moved from inline styles in index.php --- */
.image-text-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1.04vw; /* 20px on 1920px screen */
}

#playerpreviewImage {
    max-width: 20%;
    border-radius: 0.52vw; /* 10px */
    margin-top: 0.78vw;    /* 15px */
    display: block;
}

.playerpreview-textcol {
    flex: 1;
    text-align: left;
}

#playerpreviewname {
    margin-top: 0.78vw; /* 15px */
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8vw;
}

#playerpreviewDescription {
    text-align: left;
    font-size: 1vw; /* 0.9rem on 1920px */
    margin-top: 1.3vw; /* 25px */
}

#genreTags {
    text-align: left;
    margin-top: 1.3vw; /* 25px */
}

#genreLabel {
    color: #515ad5;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2vw;
}

#playerpreviewtags {
    color: #aaa;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2vw;
}

#clearCookiesBtn {
    font-family: 'Orbitron', sans-serif;
}

#clearCookiesStatus {
    margin-top: 0.52vw; /* 10px */
    font-size: 0.94vw; /* 0.9rem */
}

.preview-box-hidden {
    display: none;
    flex-direction: column;
    align-items: center;
}

#previewImage {
    max-width: 90%;
    border-radius: 0.52vw; /* 10px */
}

#languageSubtitleRow {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.subtitle-lang-label {
        color: #fff;
        font-family: 'Orbitron', sans-serif;
        font-size: 1.1vw;
        margin-right: 0.7vw;
        padding-left: 2vw;
    }
    .subtitle-lang-options {
        display: flex;
        flex-wrap: wrap;
        gap: 0.7vw;
        margin-bottom: 1vw;
    }
    .subtitle-lang-option {
        color: #fff;
        font-family: 'Orbitron', sans-serif;
        font-size: 1.1vw;
        padding: 0.18vw 1.1vw;
        border-radius: 0.5vw;
        cursor: pointer;
        border: 0.13vw solid transparent;
        transition: background 0.2s, color 0.2s, border 0.2s;
        user-select: none;
        background: #181828;
    }
    .subtitle-lang-option.selected {
        color: #51d579;
        border: 0.13vw solid #51d579;
        background: rgba(81, 213, 121, 0.08);
    }
/* Preferred Audio Language Dropdown Styles */
.lang-settings-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.2vw;
    margin: 0.7vw 0 1.2vw 0;
    max-width: 80vw;
}
.audio-lang-row, .subtitle-lang-row {
    display: flex;
    align-items: center;
    gap: 1.2vw;
}
.audio-lang-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7vw;
}
.audio-lang-option {
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1vw;
    padding: 0.18vw 1.1vw;
    border-radius: 0.5vw;
    cursor: pointer;
    border: 0.13vw solid transparent;
    transition: background 0.2s, color 0.2s, border 0.2s;
    user-select: none;
    background: #181828;
}
.audio-lang-option.selected {
    color: #51d579;
    border: 0.13vw solid #51d579;
    background: rgba(81, 213, 121, 0.08);
}

.audio-lang-label {
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1vw;
    margin-right: 0.7vw;
    padding-left: 2vw;
}
.audio-lang-select {
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1vw;
    padding: 0.18vw 1.1vw;
    border-radius: 0.5vw;
    background: #181828;
    border: 0.13vw solid #b388eb;
    transition: background 0.2s, color 0.2s, border 0.2s;
    outline: none;
    max-width: 30vw;
}
.audio-lang-select:focus {
    border: 0.13vw solid #51d579;
    background: #23234a;
}
/* Settings Section Structure */
.filter-title {
    font-size: 1.1vw;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.1vw;
    font-family: 'Orbitron', sans-serif;
    text-align: left;
    padding-left: 1vw;
}
.settings-section {
    padding: 0.5vw 0;
}
.settings-title {
    font-size: 1.2vw;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5vw;
    font-family: 'Orbitron', sans-serif;
    text-align: left;
    padding-left: 1vw;
}
.settings-divider {
    width: 100%;
    height: 0.12vw;
    background: rgba(179,239,255,0.75);
    margin: 0.3vw 0;
    border-radius: 0.03vw;
}

.filter-divider {
    width: 100%;
    height: 0.12vw;
    background: rgba(179,239,255,0.75);
    margin: 0.3vw 0;
    border-radius: 0.03vw;
    display: block;
}

/* Settings Menu Layout */
.settings-menu {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Pin clear saved data button to bottom */
#clearSavedDataBtn {
    margin-top: auto;
    width: 100%;
    display: block;
}
body {
    font-family: Arial, sans-serif;
    background:
        radial-gradient(ellipse 60vw 60vw at 0% 0%, #b3efff33 0%, transparent 80%), /* top-left purple */
        radial-gradient(ellipse 60vw 60vw at 100% 0%, #8d8ddf33 0%, transparent 80%), /* top-right blue */
        radial-gradient(ellipse 60vw 60vw at 100% 100%, #91ceff33 0%, transparent 80%), /* bottom-right green */
        radial-gradient(ellipse 60vw 60vw at 0% 100%, #d987ff33 0%, transparent 80%), /* bottom-left red */
        radial-gradient(ellipse 80vw 80vw at 50% 50%, #181828 0%, #121212 60%, transparent 100%), /* center dark */
        #121212;
    color: white;
    text-align: center;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Allow the content to start from the top */
    min-height: 100vh; /* Ensure full height of the viewport */
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Internet Explorer/Edge */
    overflow-x: hidden;
    overflow-y: hidden;
}
.maincontainer{
    display: flex;
    width: 100vw;
    height: 100vh;
}
/* --- */
.leftcontainer{
    width: 15vw;
    box-shadow: 0 4px 5px rgba(217, 135, 255, 0.7);
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
    justify-content: flex-start; /* Align items at the top */
    overflow-y: auto;
    height: calc(100vh - 3.125vw);
    overflow-x: hidden;
    /* Hide scrollbars for leftcontainer */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.filter-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    display: flex;
    justify-content: space-between;
}
.type-toggle-row {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 0.8vw;
        border-radius: 0.2vw;
        padding: 0.2vw 0.2vw;
    }
.type-toggle-option {
        flex: 1 1 0;
        text-align: center;
        font-family: 'Orbitron', sans-serif;
        font-size: 1.1vw;
        padding: 0.2vw 0.2vw;
        margin: 0 0.2vw;
        border-radius: 0.2vw;
        border: 0.13vw solid #444;
        background: #222;
        color: #fff;
        cursor: pointer;
        transition: background 0.2s, color 0.2s, border 0.2s;
        user-select: none;
        font-weight: 600;
    }


/* Movie selected */
.type-toggle-option.selected.movie {
    background: #c39d00;
    color: #fff;
    border-color: #c39d00;
}
/* Series selected */
.type-toggle-option.selected.seriess {
    background: #5a2e98;
    color: #fff;
    border-color: #5a2e98;
}
/* Both selected: gradient */
.type-toggle-option.selected.both {
    background: linear-gradient(90deg, #c39d00 0%, #5a2e98 100%);
    color: #fff;
    border: linear-gradient(90deg, #c39d00 0%, #5a2e98 100%);
    }
/* Ensure hover effect is visible even when selected */
.type-toggle-option.selected:hover,
.type-toggle-option:hover {
    background: #444;
    color: #fff;
    border-color: #91ceff;
}


.leftcontainer::-webkit-scrollbar {
    display: none;
}

#searchBox {
    margin-top: 0.52vw;
    margin-bottom: 0.26vw;
    height: 4.8vw;
    width: 13vw;
    max-width: 13vw;
    min-width: 5vw;
    color: white;
    background: none;
    font-family: 'Orbitron', sans-serif;
    border: transparent;
    font-size: 0.9vw;
    justify-content: center;
    resize: none !important;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    -ms-overflow-style: none; /* IE/Edge */
}
#searchBox::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}
#searchBox::-webkit-scrollbar-thumb {
    background: transparent;
}

#searchBox::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    line-height: 1.3;
    white-space: pre-wrap;
    word-break: break-word;

}
#searchBox:focus {
    background: none;
    outline: none; /* Removes the default blue outline */
    box-shadow: 0 0px 5px #91ceff;
}

label {
    display: block;
    margin-bottom: 5px;
}

select {
    width: 100%;
    padding: 5px;
    background: none;
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    outline: none; /* Removes the default blue outline */
}
select::-webkit-scrollbar {
    display: none; /* Hide scrollbar in WebKit browsers (Chrome, Safari) */
}
select option {
    overflow-x: hidden;
    background-color: #121212;
    color: white; /* Text color */
    outline: none; /* Removes the default blue outline */
}
select:focus, select:not(:has(option:checked:first-child)) {
    box-shadow: 0 2px 2px rgb(145, 206, 255);
}
#genreFilter{
    font-family: 'Orbitron', sans-serif;
    width: 100%;
    border: 1px solid #444;
    color: white;
    background: none;
    border: transparent;
}
#genreFilter:focus{
    background: none;
    outline: none; /* Removes the default blue outline */
    box-shadow: 0 0px 5px rgb(217, 135, 255);
}
#typeFilter{
    font-family: 'Orbitron', sans-serif;
    width: 100%;
    border: 1px solid #444;
    color: white;
    background: none;
    border: transparent;
}
#typeFilter:focus{
    background: none;
    outline: none; /* Removes the default blue outline */
    box-shadow: 0 0px 5px rgb(217, 135, 255);
}
#languageFilter{
    font-family: 'Orbitron', sans-serif;
    width: 100%;
    border: 1px solid #444;
    color: white;
    background: none;
    border: transparent;
}
#languageFilter:focus{
    background: none;
    outline: none; /* Removes the default blue outline */
    box-shadow: 0 0px 5px rgb(217, 135, 255);
}
#subtitleFilter{
    font-family: 'Orbitron', sans-serif;
    width: 100%;
    border: 1px solid #444;
    color: white;
    background: none;
    border: transparent;
}
#subtitleFilter:focus{
    background: none;
    outline: none; /* Removes the default blue outline */
    box-shadow: 0 0px 5px rgb(217, 135, 255);
}
#clearFiltersBtn{
    font-family: 'Orbitron', sans-serif;
}


/*  --- */
.middlecontainer{
    width: 70vw;
    height: calc(100vh - 3.125vw);
    padding: 10px;
    overflow-y: auto;
    border: transparent;
    -ms-overflow-style: none;  /* For Internet Explorer 10+ */
    scrollbar-width: none;  /* For Firefox */
}
.middlecontainer::-webkit-scrollbar {
    display: none; /* Hide the scrollbar */
}
.gallery {
    display: flex;
    flex-wrap: wrap; /* Ensure wrapping */
    justify-content: center; /* Align items to the left */
    gap: 10px; /* Optional: add space between the items */
    padding: 10px 0;
    overflow-y: visible; /* ✅ don't block scrolling */
}

/* --- */
.rightcontainer {
    width: 15vw;
    box-shadow: 0 0.21vw 0.26vw rgba(217, 135, 255, 0.7);
    display: flex;
    flex-direction: column;
    overflow-y: hidden; /* default state — no scroll */
    height: 100%;    
}
.rightcontainer.scroll-enabled {
  overflow-y: auto;
}

#playerEpisodes::-webkit-scrollbar {
    display: none; /* Hide the scrollbar */
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}
#playerEpisodes {
        display: none;
    flex: 1;  
  overflow-y: auto;
  font-family: 'Orbitron', sans-serif;
  padding-bottom: 3.64vw; 
}
#playerEpisodes.scroll-enabled {
    display: block;
}
#previewLanguage {
    display: flex; /* Arrange subtitle boxes in a row */
    flex-wrap: wrap; /* Allow wrapping to next line if needed */
    justify-content: center; /* Center them horizontally */
    gap: 5px; /* Small gap between boxes */
    margin-top: 10px;
    font-family: 'Orbitron', sans-serif;
}
#previewSubtitle {
    display: flex; /* Arrange subtitle boxes in a row */
    flex-wrap: wrap; /* Allow wrapping to next line if needed */
    justify-content: center; /* Center them horizontally */
    gap: 5px; /* Small gap between boxes */
    margin-top: 10px;
    font-family: 'Orbitron', sans-serif;
}
.language-box {
        background-color: rgba(217, 135, 255, 0.7);
        border-radius: 0.78vw;
        padding: 0.26vw 0.52vw;
        font-weight: bold;
        color: white;
        font-family: 'Orbitron', sans-serif;
        font-size: 0.73vw;
}
.subtitle-box {
    background-color: rgb(114, 167, 210);
    border-radius: 0.78vw;
    padding: 0.26vw 0.52vw;
    font-weight: bold;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.73vw;
}
.headercontainer {
    height: 3.125vw;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 4px 5px rgba(217, 135, 255, 0.7);
    z-index: 9999;
    overflow: visible;
    position: relative;
    background: #181828;
}
.logo {
    height: 3vw; /* Make height based on viewport width */
    width: auto;
    object-fit: contain;
    margin-right: 1vw;
    margin-left: 1vw;
    max-height: 80%; /* Prevents it from overflowing header */
}
.logotext {
    font-size: 2vw; /* Responsive font size */
    font-weight: bold;
    text-align: left;
    color: white;
    white-space: nowrap; /* Prevent text wrapping */
    font-family: 'Orbitron', sans-serif;
    text-decoration: none;
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Header Buttons - Custom Design */
.header-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 2vw;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    min-width: 220px;
    max-width: 90vw;
}

.header_btn {
    flex: 1 1 6.25vw;
    min-width: 4.7vw;
    max-width: 13.5vw;
    height: 3.1vw;
    min-height: 1.9vw;
    max-height: 3.1vw;
/* Responsive filter section */
.leftcontainer label,
.leftcontainer select,
.leftcontainer input[type="text"],
.leftcontainer button {
    width: 100%;
    max-width: 98%;
    box-sizing: border-box;
    margin-bottom: 0.5em;
}
.leftcontainer select {
    min-width: 80px;
    font-size: 1em;
}
.leftcontainer input[type="text"] {
    font-size: 1em;
}
.leftcontainer button {
    font-size: 1em;
    padding: 0.5em 0;
}
@media (max-width: 900px) {
    .headercontainer {
        flex-direction: column;
        min-height: 48px;
        height: auto;
    }
    .header-buttons {
        width: 98vw;
        gap: 2vw;
        position: static;
        left: unset;
        top: unset;
        transform: none;
        margin: 0 auto;
        justify-content: center;
    }
    .header_btn {
        flex: 1 1 80px;
        min-width: 60px;
        max-width: 140px;
        height: 5vh;
        font-size: 3vw;
    }
    .leftcontainer label,
    .leftcontainer select,
    .leftcontainer input[type="text"],
    .leftcontainer button {
        font-size: 0.95em;
        min-width: 60px;
        max-width: 100%;
    }
}
@media (max-width: 600px) {
    .headercontainer {
        flex-direction: column;
        min-height: 36px;
        height: auto;
    }
    .header-buttons {
        width: 100vw;
        gap: 1vw;
        position: static;
        left: unset;
        top: unset;
        transform: none;
        margin: 0 auto;
        justify-content: center;
    }
    .header_btn {
        flex: 1 1 50px;
        min-width: 40px;
        max-width: 90px;
        height: 4vh;
        font-size: 2.8vw;
    }
    .leftcontainer label,
    .leftcontainer select,
    .leftcontainer input[type="text"],
    .leftcontainer button {
        font-size: 0.9em;
        min-width: 40px;
        max-width: 100%;
    }
}
    border-radius: 0.26vw;
    border: none;
    transition: all 0.5s ease-in-out;
    font-size: 1.67vw;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    background: transparent;
    color: #f5f5f5;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.header_btn:hover {
  box-shadow: 0 0 20px 0px #2e2e2e3a;
}

.header_btn .icon {
    position: absolute;
    height: 3.1vw;
    width: 5.2vw;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s;
}

.header_btn .icon img {
    height: 3.1vw;
    width: 3.1vw;
    object-fit: contain;
}

.header_btn .text {
    transform: translateX(5.2vw);
    transition: all 0.5s;
}

.header_btn:hover .icon {
    width: 16.7vw;
}

.header_btn:hover .text {
  opacity: 0;
}

.header_btn:focus {
  outline: none;
}

.header_btn:nth-child(2) {
  visibility: hidden;
  pointer-events: none;
}

.header_btn:nth-child(2).visible {
  visibility: visible;
  pointer-events: auto;
}

.header_btn.active .icon {
  width: 320px;
}

.header_btn.active .text {
  opacity: 0;
}

.header_btn:active .icon {
    transform: scale(0.85);
}

#seriesGallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.04vw;
    padding: 0.52vw;
}

/* Individual Series Thumbnail Styling */
.series {
    margin: 0.52vw;
    cursor: pointer;
    text-align: center;
    width: 8vw; /* Fixed width for thumbnails */
    transition: transform 0.2s;
}
.card-title{
    margin: 0.26vw 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8vw;
}
.series-image {
    width: 100%;
    height: auto;
    border-radius: 0.52vw;
}

.series:hover {
    transform: scale(1.10);
}

/* Series Title, Type, and Tags Styling */
.series p {
    margin: 0.4vw 0;
}

/* Type Styling */
.type {
    font-style: italic;
    font-weight: bold;
    margin-top: 0.7vw;
    font-size: 1vw;
    right: 5vw;
}

/* Tags Styling */
.tags {
    font-size: 0.63vw;
    color: #777;
    margin-top: 0.26vw;
}

/* Preview Description Styling */
/* Auto-scroll wrapper for preview description */
.preview-description-scroll-wrapper {
    max-height: 210vw;
    min-height: 2.2vw;
    height: 21vw;
    overflow: visible; /* Allow border to show */
    position: relative;
    margin-top: 0.26vw;
    margin-bottom: 0.26vw;
}
/* Make #previewDescription fill the wrapper and scroll */
#previewDescription {
    font-size: 0.9vw;
    color: #b0b0b0;
    text-align: left;
    line-height: 1.3;
    white-space: pre-line;
    overflow-y: auto;
    height: 100%;
    max-height: 100%;
    padding-right: 0.3vw;
    padding-bottom: 0.5em; /* Ensure last line is visible */
    background: #18182833;
    border: 0.13vw solid #a6cef4; /* Subtle purple hue border */
    border-radius: 0.5vw;
    box-shadow: 0 0 0.5vw 0.1vw rgba(166, 206, 244, 0.05); /* Soft glow */
    z-index: 1;
    transition: color 0.2s;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Responsive episode title font size */

.overlay-text p {
    position: absolute;
    left: 4.8vw;
    bottom: -0.5vw;
}

.playercontainer{
    display: flex;
    flex-wrap: wrap; /* Ensure wrapping */
    justify-content: flex-start; /* Align items to the left */
    gap: 10px; /* Optional: add space between the items */
    padding: 10px 0;
    overflow-y: visible; /* ✅ don't block scrolling */
}
img {
  -webkit-user-drag: none;
}
.episode-card {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0.52vw;
    height: 4.68vw;
    padding: 0.41vw 0.62vw;
    border: 1px solid #444;
    border-radius: 0.3vw;
    background: #111;
    color: #ccc;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    margin: 0.26vw 0;
    overflow: hidden;
}

.episode-number {
    min-width: 2.6vw; /* Align all Ep numbers */
    text-align: left;
    font-weight: bold;
    color: #51d579;
    font-size: 1vw;
}

/* Responsive episode title font size for card */
.episode-title {
    flex: 1;
    margin: 0.1vw 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;      /* ✅ Allow text to wrap */
    color: white;
    font-size: 0.8vw;
}
.episode-card.active {
    background-color: rgba(81, 213, 121, 0.35)!important;  /* Green with 30% opacity */
    border-color: #51d579;
}
.episode-card.seen {
  background-color: rgba(81, 213, 121, 0.15); /* Even more transparent green */
}
/* 1) Make the Plyr container always 16:9 and full-width */
.plyr {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%; /* or whatever max you like */
  background: #000; /* black bars when letterboxing */
}

/* 2) Ensure the <video> always fills the container but keeps its own ratio */
.plyr__video-wrapper,
.plyr__video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* shows the whole frame with black bars if needed */
}

/* ────────────────────────────────────────────────────────── */
/* End-of-episode overlay */
#videoOverlay {
    display: none;              /* hidden until video ends */
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    /*background: rgba(0,0,0,0.6);*/
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 100;
    pointer-events: none;
}
#videoOverlay button,
#videoOverlay input,
#videoOverlay label {
  pointer-events: auto;
}
#videoContainer {
position: relative;
}
#videoContainer:fullscreen #videoOverlay {
    display: flex;              /* keep it visible in fullscreen */
}
#videoContainer:fullscreen #skipintrooutro {
    position: fixed !important;
    bottom: 4.16vw;
    right: 1.04vw;
    z-index: 10000;
}
#videoOverlay .overlay-top {
  margin-top: 20%;     /* or use px: e.g. 150px */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.52vw;
}
#videoOverlay button {
    font-family: 'Orbitron', sans-serif;
    padding: 0.52vw 0.78vw;
    font-size: 1vw;
    border: none;
    cursor: pointer;
    background-color: #b388eb;
    color: #fff;
    border-radius: 0.26vw;
}
#videoOverlay button:hover {
    background-color: rgb(145, 206, 255);
    outline: 2px solid #fff;
}
#videoOverlay button:focus {
  outline: 2px solid #fff;     /* white ring around button */
  background-color: rgb(145, 206, 255);
}

#videoOverlay label {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 0.78vw;
}
#videoOverlay input[type="checkbox"] {
    margin-right: 0.26vw;
}

#countdownElement {
    font-size: 0.90vw;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
}
#autoPlayToggle {
    font-family: 'Orbitron', sans-serif;
    margin-left: 0.26vw;
}
#nextEpisodeBtn {
    font-family: 'Orbitron', sans-serif;
    position: absolute;
    bottom: 4.16vw;
    right: 1.04vw;
    padding: 0.52vw 0.78vw;
    background: #b388eb;  /* Matching the color of the other buttons */
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1vw;  /* Adjusted to match other buttons */
    display: block;
    z-index: 10000;
    border-radius: 0.26vw;
    transition: background-color 0.3s ease; /* Add hover effect */
}

/* Hover effect for skip button */
#nextEpisodeBtn:hover {
    background-color: rgb(145, 206, 255);  /* Darker shade on hover to match other buttons */
}

/* Fullscreen Styling for Skip Button */
.plyr--fullscreen #nextEpisodeBtn {
    position: fixed !important;
    bottom: 4.16vw;
    right: 1.04vw;
    z-index: 10000;
}

#videoOverlay button {
    z-index: 10000;
}
/* skip buttons share the same look & position as “Next Episode” */
#skipButton {
    font-family: 'Orbitron', sans-serif;
    display: none;
    padding: 0.52vw 0.78vw;
    background: #b388eb;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1vw;
    border-radius: 0.26vw;
    transition: background-color 0.3s ease;
}

#skipButton:hover {
    background-color: rgb(145, 206, 255);
}

/* skip button wrapper */
#skipintrooutro {
    position: absolute;
    bottom: 4.16vw;
    right: 1.04vw;
    z-index: 10000;
    pointer-events: none;
}

#skipintrooutro button {
    pointer-events: auto;
}

/* fullscreen positioning */
.plyr--fullscreen #skipintrooutro {
    position: fixed !important;
    bottom: 4.16vw;
    right: 1.04vw;
    z-index: 10000;
}

/* --- Autoplay toggle styles (from index.php) --- */
.autoplay-toggle-row {
    display: flex;
    align-items: center;
    gap: 1.2vw;
    margin: 0.7vw 0 1.2vw 0;
}
.autoplay-label {
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1vw;
    margin-right: 0.7vw;
    padding-left: 2vw;
}
.autoplay-option {
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1vw;
    padding: 0.18vw 1.1vw;
    border-radius: 0.5vw;
    cursor: pointer;
    border: 0.13vw solid transparent;
    transition: background 0.2s, color 0.2s, border 0.2s;
    user-select: none;
}
.autoplay-option.selected {
    color: #51d579;
    border: 0.13vw solid #51d579;
    background: rgba(81, 213, 121, 0.08);
}
.autoplay-option.selected-on {
    color: #51d579;
    border: 0.13vw solid #51d579;
    background: rgba(81, 213, 121, 0.08);
}
.autoplay-option.selected-off {
    color: #ff4d4d;
    border: 0.13vw solid #ff4d4d;
    background: rgba(255, 77, 77, 0.08);
}