:root {
    --bg-base: #141414;
    --bg-surface: #181818;
    --bg-card: #1f1f1f;
    --primary: #E50914;
    --primary-gradient: linear-gradient(135deg, #E50914 0%, #b81d24 100%);
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea {
    font-family: inherit;
}

/* =========================================================
   NAVBAR
   ========================================================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 4%;
    background: rgba(10, 11, 16, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
    gap: 16px;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

.logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar Navigation Tabs */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
}

.nav-item {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.25s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.nav-right-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    min-width: 0;
}

/* Navbar Sticky Search Bar Container */
.nav-search-container {
    position: relative;
    max-width: 280px;
    width: 100%;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-search-container.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.exit-app-btn {
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid rgba(229, 9, 20, 0.4);
    color: #ff4d4d;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 0;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
    flex-shrink: 0;
}

.exit-app-btn:hover {
    background: var(--primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.5);
    transform: scale(1.1);
}

.nav-search-container input {
    width: 100%;
    padding: 8px 40px 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.nav-search-container input:focus {
    border-color: var(--primary);
    background: rgba(18, 18, 18, 0.98);
    box-shadow: 0 0 18px rgba(229, 9, 20, 0.3);
}

.nav-search-container button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
    padding: 150px 5% 50px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.1) 0%, var(--bg-base) 100%),
        url('https://images.unsplash.com/photo-1536440136628-849c177e76a1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1925&q=80') center/cover no-repeat;
    position: relative;
    z-index: 100;
}

.hero h1 {
    font-size: 52px;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero p {
    color: #d4d4d8;
    font-size: 19px;
    margin-bottom: 35px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.search-container {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    position: relative;
    z-index: 101;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 50px;
    transform: scale(1);
    transition: transform 0.3s;
}

.search-container:focus-within {
    transform: scale(1.02);
}

.search-container input {
    width: 100%;
    padding: 18px 30px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(12px);
    color: white;
    font-size: 18px;
    outline: none;
    transition: all 0.3s ease;
}

.search-container input:focus {
    border-color: var(--primary);
    background: rgba(18, 18, 18, 0.95);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.2);
}

.search-container button {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    padding: 0 32px;
    border-radius: 40px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

/* =========================================================
   SEARCH SUGGESTIONS DROPDOWN
   ========================================================= */
.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(18, 18, 22, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    max-height: 380px;
    overflow-y: auto;
    text-align: left;
}

.suggestions-dropdown::-webkit-scrollbar {
    width: 6px;
}

.suggestions-dropdown::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 10px;
}

.suggestion-item {
    padding: 14px 24px;
    color: #e4e4e7;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: rgba(229, 9, 20, 0.2);
    color: #ffffff;
    padding-left: 28px;
}

.suggestion-item .icon {
    color: #60a5fa;
    font-size: 14px;
    flex-shrink: 0;
}

/* =========================================================
   CONTAINER & LAYOUT
   ========================================================= */
.container {
    padding: 0 5% 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* =========================================================
   CATALOG FILTER SECTION
   ========================================================= */
.filter-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: none;
}

.filter-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 15px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-label {
    width: 85px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    padding-top: 4px;
}

.filter-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    flex: 1;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d4d4d8;
    padding: 5px 14px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.filter-pill.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.35);
}

/* Category Header with More > Button */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.category-header .section-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.more-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #60a5fa;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    outline: none;
}

.more-btn:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    transform: translateX(3px);
}

.back-btn {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.back-btn:hover {
    background: var(--bg-surface);
    border-color: var(--primary);
    color: #60a5fa;
}

/* Category Block */
.category-block {
    margin-bottom: 45px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 380px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}

/* =========================================================
   CONTINUE WATCHING ROW (Strictly 1 Line Horizontal Scroll)
   ========================================================= */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
    padding-bottom: 10px;
}

.history-header .section-title {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.clear-history-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.clear-history-btn:hover {
    background: rgba(229, 9, 20, 0.25);
    border-color: rgba(229, 9, 20, 0.5);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
}

.history-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 16px !important;
    padding: 4px 4px 14px 4px !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(229, 9, 20, 0.5) transparent !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
}

.history-row::-webkit-scrollbar {
    height: 5px !important;
}

.history-row::-webkit-scrollbar-thumb {
    background: rgba(229, 9, 20, 0.5) !important;
    border-radius: 4px !important;
}

.history-row .card {
    flex: 0 0 170px !important;
    width: 170px !important;
    min-width: 170px !important;
    max-width: 170px !important;
}

@media (max-width: 768px) {
    .history-row .card {
        flex: 0 0 140px !important;
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
    }
}

/* =========================================================
   MOVIE CARDS
   ========================================================= */
.card {
    background: var(--bg-surface);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), border-color 0.25s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.04);
    will-change: transform;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 9, 20, 0.5);
    z-index: 2;
}

.poster {
    width: 100%;
    aspect-ratio: 2/3;
    position: relative;
    overflow: hidden;
    background: #161618;
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    will-change: transform;
    background-color: #161618;
}

.card:hover .poster img {
    transform: scale(1.06);
}

.ep-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #60a5fa;
    z-index: 3;
}

.soon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(234, 179, 8, 0.85);
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    color: #000;
    z-index: 3;
    text-transform: uppercase;
}

.year-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(34, 197, 94, 0.88);
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #000;
    z-index: 3;
}

.progress-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.card:hover .overlay {
    opacity: 1;
}

.play-btn {
    width: 54px;
    height: 54px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.85);
    transition: transform 0.3s ease;
}

.card:hover .play-btn {
    transform: scale(1);
}

.play-btn::after {
    content: '▶';
    color: white;
    font-size: 20px;
    margin-left: 3px;
}

.info {
    padding: 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    z-index: 1;
}

.title {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.rating {
    font-size: 13px;
    color: #fbbf24;
    font-weight: 800;
    margin-top: auto;
}

/* =========================================================
   BUTTONS & LOADERS
   ========================================================= */
.load-more-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 38px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(229, 9, 20, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
    outline: none;
}

.load-more-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 35px rgba(229, 9, 20, 0.5);
}

.load-more-btn:active {
    transform: translateY(0) scale(0.98);
}

.loader {
    display: none;
    text-align: center;
    margin: 50px 0;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   VIDEO PLAYER STYLING (Preserved & Styled)
   ========================================================= */
/* =========================================================
   VIDEO PLAYER STYLING & WATCH PAGE 2-COLUMN LAYOUT
   ========================================================= */
#playerContainer {
    margin: 75px auto 40px;
    max-width: 1800px;
    width: 96%;
}

.player-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.back-pill-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 9px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.25s ease;
    outline: none;
}

.back-pill-btn:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    transform: translateX(-3px);
}

.watch-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

.watch-main {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

#videoWrapper {
    width: 100%;
    aspect-ratio: var(--video-aspect, 16 / 9);
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
    border: 1px solid var(--border);
    position: relative;
    transition: aspect-ratio 0.25s ease, max-height 0.25s ease, max-width 0.25s ease;
}

#videoWrapper.portrait-mode {
    aspect-ratio: var(--video-aspect, 9 / 16) !important;
    max-height: 75vh !important;
    max-width: 480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    #videoWrapper.portrait-mode {
        aspect-ratio: var(--video-aspect, 9 / 16) !important;
        max-height: 68vh !important;
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 14px !important;
    }
}

#videoWrapper .art-video-player {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000 !important;
}

#videoWrapper .art-video-player .art-video {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0;
    left: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000000 !important;
}

#videoWrapper .art-video-player video,
#videoWrapper video,
.art-video-player video,
.art-video-player .art-video video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: var(--player-video-fit, contain) !important;
    transform: none !important;
    margin: auto !important;
}

.watch-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.meta-info {
    background: var(--bg-surface);
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.meta-info h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.meta-info #pMeta {
    color: #60a5fa;
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 12px;
}

.meta-info #pDesc {
    color: var(--text-muted);
    line-height: 1.4;
    font-size: 12px;
    max-height: 75px;
    overflow-y: auto;
    scrollbar-width: thin;
    margin: 0;
}

.meta-info #pDesc:empty {
    display: none;
}

.controls-area {
    margin-top: 0;
    padding: 14px 18px;
    background: var(--bg-surface);
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.control-group {
    margin-bottom: 14px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.control-header .control-label {
    margin-bottom: 0;
}

.season-nav-arrows {
    display: flex;
    gap: 5px;
}

.season-arrow-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e4e4e7;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.season-arrow-btn:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.4);
    transform: scale(1.08);
}

.control-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 2px;
}

/* Seasons List (Single-row horizontal scrollable pills with hidden scrollbar) */
#grpSeasons.btn-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 2px 0 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

#grpSeasons.btn-row::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

#grpSeasons .ctrl-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Episodes Grid (Scrollable inside box, max-height 380px) */
#grpEpisodes.btn-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.05);
}

#grpEpisodes.btn-row::-webkit-scrollbar {
    width: 6px;
}

#grpEpisodes.btn-row::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

#grpEpisodes .ctrl-btn {
    width: 100%;
    justify-content: center;
    padding: 8px 6px;
    font-size: 13px;
    text-align: center;
}

/* Downloads List (Side by side pills) */
#grpDownloads.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

#grpDownloads .ctrl-btn {
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
}

.ctrl-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.ctrl-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    color: white;
}

@media (max-width: 1024px) {
    .watch-layout {
        grid-template-columns: 1fr;
    }
    #playerContainer {
        margin-top: 80px;
        width: 100%;
        padding: 0 15px;
    }
    #grpEpisodes.btn-row {
        max-height: 260px;
    }
}

/* =========================================================

/* =========================================================
   MOBILE DOCK (BOTTOM NAVIGATION)
   ========================================================= */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(10, 10, 15, 0.94);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 99999;
    align-items: center;
    justify-content: space-around;
    padding: 4px 6px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.mobile-nav-item .icon {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.mobile-nav-item:hover {
    color: white;
}

.mobile-nav-item.active {
    color: #60a5fa;
    background: rgba(229, 9, 20, 0.15);
}

.mobile-nav-item.active .icon {
    transform: scale(1.15);
}

footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 14px;
    margin-top: auto;
}

footer a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

footer span i {
    margin-right: 4px;
    color: #60a5fa;
}

/* =========================================================
   SUBTITLE STYLING (Clean & Crisp on All Devices)
   ========================================================= */
.art-subtitle {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 4px #000000, 0 0 2px #000 !important;
}

.art-subtitle p {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 600 !important;
    font-size: clamp(14px, 2.8vw, 22px) !important;
    line-height: 1.4 !important;
    letter-spacing: 0.3px !important;
    color: #ffffff !important;
}

/* =========================================================
   RESPONSIVE QUERIES
   ========================================================= */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 38px;
    }
    .hero p {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    body {
        padding-bottom: 80px !important;
    }
    footer {
        padding-bottom: 95px !important;
    }
    .mobile-bottom-nav {
        display: flex !important;
    }
    .nav-menu {
        display: none !important;
    }
    nav {
        padding: 10px 4% !important;
        gap: 10px !important;
        justify-content: space-between !important;
    }
    .logo {
        font-size: 18px !important;
        flex-shrink: 0 !important;
    }
    .nav-right-area {
        gap: 6px !important;
        flex: 1 !important;
        justify-content: flex-end !important;
        min-width: 0 !important;
    }
    .nav-search-container {
        max-width: 180px !important;
        width: 100% !important;
        margin-left: auto !important;
    }
    .nav-search-container input {
        padding: 6px 32px 6px 12px !important;
        font-size: 12px !important;
        height: 34px !important;
        border-radius: 17px !important;
        width: 100% !important;
    }
    .nav-search-container button {
        width: 26px !important;
        height: 26px !important;
        padding: 0 !important;
        font-size: 11px !important;
        top: 4px !important;
        right: 4px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .exit-app-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
    }
    .nav-suggestions {
        left: -70px !important;
        right: 0 !important;
        width: calc(100vw - 30px) !important;
        max-width: 320px !important;
    }
    .filter-panel {
        padding: 16px !important;
    }
    .filter-label {
        width: 65px !important;
        font-size: 12px !important;
    }
    .filter-pill {
        font-size: 12px !important;
        padding: 4px 10px !important;
    }
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .container {
        padding: 0 4% 30px !important;
    }
    .hero {
        padding: 110px 4% 40px !important;
    }
    .hero h1 {
        font-size: 28px !important;
    }
    .hero p {
        font-size: 14px !important;
    }
    .search-container input {
        padding: 14px 20px !important;
        font-size: 15px !important;
    }
    .search-container button {
        padding: 0 20px !important;
        font-size: 14px !important;
    }
    .section-title {
        font-size: 19px !important;
        margin-bottom: 15px !important;
    }
    .title {
        font-size: 13px !important;
        line-height: 1.25 !important;
    }
    .rating {
        font-size: 12px !important;
    }
    .info {
        padding: 10px !important;
    }
    .more-btn {
        padding: 6px 14px !important;
        font-size: 12px !important;
    }
    #playerContainer {
        margin-top: 65px !important;
        padding: 0 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .watch-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .watch-main {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    .watch-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        gap: 10px !important;
    }
    .meta-info {
        padding: 12px 14px !important;
        border-radius: 12px !important;
    }
    .meta-info h2 {
        font-size: 1.15rem !important;
    }
    .controls-area {
        padding: 14px 12px !important;
        margin-top: 0 !important;
        border-radius: 12px !important;
    }
    #grpEpisodes.btn-row {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)) !important;
        gap: 6px !important;
        max-height: 280px !important;
        padding-right: 2px !important;
    }
    #grpEpisodes .ctrl-btn {
        width: 100% !important;
        padding: 7px 2px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
        justify-content: center !important;
        text-align: center !important;
    }
    #grpSeasons.btn-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        max-height: none !important;
        gap: 6px !important;
    }
    #grpSeasons .ctrl-btn {
        flex: 0 0 auto !important;
        padding: 6px 14px !important;
        font-size: 12px !important;
        border-radius: 16px !important;
    }
    #grpDownloads.btn-row {
        display: flex !important;
        flex-wrap: wrap !important;
        max-height: 120px !important;
        gap: 6px !important;
    }
    #grpDownloads .ctrl-btn {
        padding: 6px 14px !important;
        font-size: 12px !important;
        border-radius: 16px !important;
    }
}

/* ArtPlayer Control Selector Custom Styling (Clean, sleek Netflix styling) */
.art-control-selector {
    position: relative !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 3px !important;
}

/* The clickable pill value button on the control bar */
.art-control-selector .art-selector-value {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 4px 8px !important;
    min-height: 26px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #e5e5e5 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    white-space: nowrap !important;
    -webkit-tap-highlight-color: transparent !important;
}

.art-control-selector:hover .art-selector-value,
.art-control-selector.art-selector-open .art-selector-value {
    background: rgba(229, 9, 20, 0.25) !important;
    border-color: rgba(229, 9, 20, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3) !important;
}

/* Keep ArtPlayer bottom control bar visible while selector is open */
.art-video-player.art-selector-active .art-bottom,
.art-video-player.art-selector-active .art-controls,
.art-video-player:has(.art-control-selector.art-selector-open) .art-bottom {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Floating popup list above the control bar (or below if inside art-top) */
.art-control-selector .art-selector-list {
    position: absolute !important;
    bottom: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    width: max-content !important;
    min-width: auto !important;
    max-width: 240px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: rgba(18, 18, 18, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 8px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.2) !important;
    padding: 5px !important;
    z-index: 500 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(6px) !important;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease !important;
    scrollbar-width: thin !important;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.05) !important;
}

/* Direct Top-Right Screen Ratio Fit Button (Pure Icon Only) */
.player-top-right-fit {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 120 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease, visibility 0.25s ease !important;
}

.player-top-fit-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 6px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.95)) !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
    -webkit-tap-highlight-color: transparent !important;
}

.player-top-fit-btn i {
    font-size: 20px !important;
    color: #ffffff !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}

.player-top-fit-btn:hover i {
    color: var(--primary) !important;
    transform: scale(1.15) !important;
}

/* Visibility strictly tied to ArtPlayer controls */
.art-video-player.art-hover:not(.art-hide-cursor) .player-top-right-fit,
.art-video-player.art-control-show:not(.art-hide-cursor) .player-top-right-fit,
.art-video-player.art-selector-active .player-top-right-fit,
.player-top-right-fit.menu-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.art-video-player.art-hide-cursor .player-top-right-fit:not(.menu-open) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.player-top-fit-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    background: rgba(18, 18, 24, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9) !important;
    padding: 4px !important;
    display: none;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 130px !important;
    z-index: 150 !important;
}

.player-top-fit-menu.show {
    display: flex !important;
    animation: fitMenuAnim 0.16s ease-out !important;
}

.fit-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #dddddd !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.fit-menu-item:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.fit-menu-item.active {
    background: rgba(229, 9, 20, 0.28) !important;
    color: #ff4d4d !important;
    font-weight: 700 !important;
}

@keyframes fitMenuAnim {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* On Desktop: open on hover */
@media (hover: hover) and (pointer: fine) {
    .art-control-selector:hover .art-selector-list {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }
}

/* On Click / Active (.art-selector-open): always open! */
.art-control-selector.art-selector-open .art-selector-list {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

.art-control-selector .art-selector-list::-webkit-scrollbar {
    width: 4px !important;
}

.art-control-selector .art-selector-list::-webkit-scrollbar-thumb {
    background: var(--primary) !important;
    border-radius: 4px !important;
}

/* Items inside the dropdown list: compact, natural gap without huge empty space */
.art-control-selector .art-selector-list .art-selector-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #cccccc !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    margin-bottom: 2px !important;
}

.art-control-selector .art-selector-list .art-selector-item:last-child {
    margin-bottom: 0 !important;
}

.art-control-selector .art-selector-list .art-selector-item:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.art-control-selector .art-selector-list .art-selector-item.art-current {
    background: rgba(229, 9, 20, 0.25) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Fully suppress tooltip pseudo-elements on selector controls to eliminate red triangles */
.art-control-selector[class*=hint--]:before,
.art-control-selector[class*=hint--]:after,
.art-control-dubs[class*=hint--]:before,
.art-control-dubs[class*=hint--]:after,
.art-control-quality[class*=hint--]:before,
.art-control-quality[class*=hint--]:after,
.art-control-selector:hover[class*=hint--]:before,
.art-control-selector:hover[class*=hint--]:after,
.art-control-dubs:hover[class*=hint--]:before,
.art-control-dubs:hover[class*=hint--]:after,
.art-control-quality:hover[class*=hint--]:before,
.art-control-quality:hover[class*=hint--]:after {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* -------------------------------------------------------------
   SMARTPHONE / MOBILE ARTPLAYER RESPONSIVE CONTROLS
   - Fixes Play/Pause cut-off & preserves left control width
   - Hides volume & PIP on mobile to save space
   - Always shows Fullscreen button prominently on the right
   - Compacts selector buttons so all controls fit seamlessly
   ------------------------------------------------------------- */
.art-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
}

.art-controls-left {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
    min-width: max-content !important;
    gap: 4px !important;
}

.art-control-playAndPause {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin: 0 !important;
}

.art-controls-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-shrink: 1 !important;
    gap: 4px !important;
    overflow: visible !important;
}

.art-control-fullscreen,
.art-control-fullscreenWeb {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    order: 999 !important;
    flex-shrink: 0 !important;
    min-width: 32px !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (max-width: 768px), (pointer: coarse) {
    /* Hide volume and pip icons on smartphone screens to save crucial space */
    .art-control-volume,
    .art-control-volume-slider,
    .art-control-pip {
        display: none !important;
    }

    .art-controls {
        padding: 0 4px !important;
    }

    .art-controls-left {
        gap: 2px !important;
        flex-shrink: 0 !important;
        overflow: visible !important;
    }

    .art-control-playAndPause {
        min-width: 30px !important;
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
    }

    .art-controls-right {
        gap: 2px !important;
        flex-shrink: 1 !important;
    }

    .art-control-time {
        font-size: 11px !important;
        padding: 0 4px !important;
        white-space: nowrap !important;
        letter-spacing: -0.4px !important;
    }

    .art-control-selector {
        margin: 0 1px !important;
    }

    .art-control-selector .art-selector-value {
        padding: 3px 6px !important;
        min-height: 24px !important;
        font-size: 11px !important;
        gap: 3px !important;
        border-radius: 5px !important;
    }

    .art-control-fullscreen {
        min-width: 28px !important;
        padding: 0 2px !important;
    }
}

/* In Fullscreen mode on mobile / landscape, restore full luxury space */
.art-video-player.art-fullscreen .art-control-selector .art-selector-value,
.art-video-player.art-fullscreenWeb .art-control-selector .art-selector-value {
    padding: 5px 12px !important;
    font-size: 13px !important;
    min-height: 28px !important;
    gap: 6px !important;
}

/* =========================================================
   SUBTITLE STYLING (Clean & Crisp on All Devices)
   ========================================================= */
.art-subtitle {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 4px #000000, 0 0 2px #000 !important;
    bottom: 50px !important;
    pointer-events: none !important;
}

.art-subtitle p {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 600 !important;
    font-size: clamp(14px, 2.5vw, 22px) !important;
    line-height: 1.4 !important;
    letter-spacing: 0.3px !important;
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.65) !important;
    padding: 4px 12px !important;
    border-radius: 6px !important;
    display: inline-block !important;
}

/* =========================================================
   LAN MULTI-DEVICE SHARING (CAST / SHARE)
   ========================================================= */
.cast-btn {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.cast-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: #818cf8;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.cast-btn i {
    color: #818cf8;
}

.lan-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(10px);
    z-index: 1000000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lan-modal-content {
    background: #141622;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 26px 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.15);
}

.lan-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.lan-title-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lan-title-area h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.lan-icon {
    font-size: 22px;
}

.lan-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lan-close-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.lan-desc {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.lan-desc strong {
    color: #e2e8f0;
}

.lan-url-box {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 12px;
    padding: 6px 8px;
    margin-bottom: 14px;
}

.lan-url-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: #818cf8;
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    padding: 6px 8px;
    outline: none;
}

.lan-copy-btn {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.lan-copy-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.03);
}

.lan-actions {
    margin-bottom: 16px;
}

.lan-share-action-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 10px 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.lan-share-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.lan-tips {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tip-item {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tip-item strong {
    color: #cbd5e1;
}

@media (max-width: 768px) {
    .cast-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
        border-radius: 50%;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* =========================================================
   APP AUTO-UPDATE & NOTIFICATION MODAL
   ========================================================= */
.update-modal-card {
    max-width: 440px !important;
    border: 1px solid rgba(229, 9, 20, 0.3) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(229, 9, 20, 0.2) !important;
}

.update-ver-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.update-ver-badge {
    background: var(--primary-gradient);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.update-status-badge {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.update-changelog-box {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    max-height: 220px;
    overflow-y: auto;
}

.changelog-header {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.update-changelog-text {
    color: #e2e8f0;
    font-size: 12.5px;
    line-height: 1.7;
    white-space: pre-line;
    font-weight: 500;
}

.update-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.update-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.update-action-row {
    display: flex;
    gap: 10px;
}

.update-btn-install {
    flex: 1;
    background: var(--primary-gradient);
    border: none;
    color: #ffffff;
    padding: 12px 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 18px rgba(229, 9, 20, 0.4);
}

.update-btn-install:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(229, 9, 20, 0.55);
}

.update-btn-later {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.update-btn-later:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* =========================================================
   VIDEO PLAYER ENHANCED GESTURES & CONTROLS
   - 2X Hold Speed HUD
   - Brightness & Sound Vertical Gesture HUDs
   - Exact Center Play/Pause Hit Zone
   - Playback Speed Slider with 0.05 step
   ========================================================= */

/* Left (Brightness) & Right (Sound / Volume) Slim Minimal Gesture HUDs */
.player-gesture-hud {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.95);
    width: 28px;
    padding: 8px 4px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.player-gesture-hud.left-hud {
    left: 20px;
}

.player-gesture-hud.right-hud {
    right: 20px;
}

.player-gesture-hud.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.gesture-icon {
    font-size: 13px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 16px;
}

.left-hud .gesture-icon i {
    color: #fbbf24;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}

.right-hud .gesture-icon i {
    color: #38bdf8;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.6));
}

.gesture-bar {
    width: 3px;
    height: 90px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.gesture-bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    border-radius: 2px;
    transition: height 0.05s linear;
}

.left-hud .gesture-bar-fill {
    background: linear-gradient(to top, #d97706, #fbbf24);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}

.right-hud .gesture-bar-fill {
    background: linear-gradient(to top, #0284c7, #38bdf8);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}

.gesture-val {
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    text-align: center;
    line-height: 1;
}

/* =========================================================
   YOUTUBE-STYLE FIXED SPEED HEADER IN SETTINGS PANEL
   ========================================================= */
.yt-speed-fixed-header {
    background: #141416 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.yt-speed-fixed-header .speed-val-display {
    font-size: 20px !important;
    font-weight: 800 !important;
    text-align: center !important;
    color: #ffffff !important;
    font-variant-numeric: tabular-nums !important;
    margin-bottom: 8px !important;
    letter-spacing: -0.5px !important;
}

.yt-speed-fixed-header .speed-slider-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}

.yt-speed-fixed-header .speed-step-btn {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease, transform 0.1s ease !important;
}

.yt-speed-fixed-header .speed-step-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

.yt-speed-fixed-header .speed-step-btn:active {
    transform: scale(0.92) !important;
}

.yt-speed-fixed-header .speed-range-slider {
    flex: 1 !important;
    -webkit-appearance: none !important;
    height: 6px !important;
    border-radius: 3px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    outline: none !important;
    cursor: pointer !important;
}

.yt-speed-fixed-header .speed-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) !important;
    cursor: pointer !important;
}

.yt-speed-fixed-header .speed-range-slider::-moz-range-thumb {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) !important;
    cursor: pointer !important;
}

/* Dedicated Gesture Canvas Layer */
.player-gesture-canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 25 !important;
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}




/* =========================================================
   18+ ADULT FILTER STYLING & TOAST NOTIFICATION
   ========================================================= */
.adult-toggle-btn {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.adult-toggle-btn:hover {
    background: rgba(16, 185, 129, 0.28);
    border-color: #34d399;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

.adult-toggle-btn.adult-on {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.adult-toggle-btn.adult-on:hover {
    background: rgba(239, 68, 68, 0.32);
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.adult-toggle-btn .adult-icon {
    font-size: 14px;
}

.adult-toggle-btn .adult-text {
    letter-spacing: 0.5px;
}

/* Toast Notification */
.moviebox-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(18, 20, 29, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 10000000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.moviebox-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.moviebox-toast.toast-safe {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.25);
}

.moviebox-toast.toast-adult {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.25);
}

@media (max-width: 768px) {
    .adult-toggle-btn {
        height: 32px;
        padding: 0 9px;
        font-size: 11px;
        border-radius: 16px;
    }
    .adult-toggle-btn .adult-text {
        font-size: 11px;
    }
}
