@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --bg: #060405;
    --bg-gradient: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(230, 60, 18, 0.15), transparent 70%), 
                   radial-gradient(ellipse 60% 60% at 10% 80%, rgba(255, 122, 53, 0.05), transparent 50%);
    --surface: rgba(18, 12, 14, 0.6);
    --surface-hover: rgba(28, 18, 22, 0.85);
    --border: rgba(255, 122, 53, 0.12);
    --border-hover: rgba(255, 122, 53, 0.35);
    --primary: #e63c12;
    --secondary: #ff7a35;
    --accent-glow: rgba(230, 60, 18, 0.15);
    --text: #ffffff;
    --text-sec: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.45);
    --gradient: linear-gradient(135deg, #e63c12 0%, #ff7a35 70%, #ffaa58 100%);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(230, 60, 18, 0.25);
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

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

body {
    background-color: var(--bg);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.25s ease;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 4, 5, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: 72px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-link {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-sec);
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary);
}

.search-bar {
    position: relative;
    width: 280px;
}

.search-bar input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 42px 8px 16px;
    color: var(--text);
    font-size: 13.5px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 15px rgba(255, 122, 53, 0.2);
}

.search-submit-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-submit-btn:hover {
    color: var(--secondary);
    background: rgba(255, 122, 53, 0.15);
}

/* Live Instant Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: rgba(18, 12, 14, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 122, 53, 0.15);
    z-index: 1000;
    overflow: hidden;
    display: none;
}

.search-dropdown.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 122, 53, 0.12);
}

.search-result-thumb {
    width: 36px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.search-result-meta {
    display: flex;
    gap: 6px;
    font-size: 10.5px;
    color: var(--text-muted);
}

.search-result-source {
    color: var(--secondary);
    font-weight: 700;
}

/* Featured Hero Banner */
.hero-banner {
    position: relative;
    max-width: 1200px;
    margin: 28px auto 36px auto;
    padding: 0 20px;
}

.hero-inner {
    border-radius: 24px;
    min-height: 420px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
    background: #090608;
}

.hero-backdrop {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(35px) brightness(0.55) saturate(1.4);
    transform: scale(1.1);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(6, 4, 5, 0.95) 0%, rgba(6, 4, 5, 0.75) 45%, rgba(6, 4, 5, 0.4) 100%),
                linear-gradient(0deg, rgba(6, 4, 5, 0.9) 0%, transparent 60%);
    z-index: 2;
}

.hero-layout {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 48px;
    gap: 40px;
    min-height: 420px;
}

.hero-content {
    flex: 1;
    max-width: 620px;
}

.hero-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 122, 53, 0.12);
    border: 1px solid rgba(255, 122, 53, 0.2);
    color: var(--secondary);
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-featured {
    background: linear-gradient(135deg, rgba(230, 60, 18, 0.25), rgba(255, 122, 53, 0.15));
    border-color: var(--secondary);
    color: #fff;
    font-weight: 700;
}

.badge-finished {
    background: rgba(134,239,172,0.1);
    border-color: rgba(134,239,172,0.25);
    color: #86efac;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 38px;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 14px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    color: #ffffff;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-poster-wrapper {
    flex-shrink: 0;
}

.hero-poster-card {
    display: block;
    position: relative;
    width: 220px;
    aspect-ratio: 3/4;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 122, 53, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 122, 53, 0.15);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.hero-poster-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.hero-poster-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--secondary);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 122, 53, 0.35);
}

.hero-poster-card:hover img {
    transform: scale(1.06);
}

.hero-poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(6, 4, 5, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 122, 53, 0.4);
    color: var(--secondary);
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 900px) {
    .hero-poster-wrapper {
        display: none;
    }
    .hero-layout {
        padding: 32px 24px;
    }
    .hero-title {
        font-size: 28px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient);
    color: #1a0606;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 14.5px;
    box-shadow: 0 4px 18px rgba(230, 60, 18, 0.3);
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 60, 18, 0.45);
}

/* API Slider Section Styles */
.api-slider-section {
    margin-bottom: 44px;
    position: relative;
}

.api-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    border-left: 4px solid var(--primary);
    padding-left: 14px;
}

.api-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.api-slider-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.api-slider-title span {
    color: var(--secondary);
}

.api-count-badge {
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 122, 53, 0.12);
    color: var(--secondary);
    border: 1px solid rgba(255, 122, 53, 0.25);
    padding: 3px 9px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
}

.slider-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.slider-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-sec);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.slider-btn:hover {
    background: rgba(255, 122, 53, 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
    transform: scale(1.06);
}

.slider-card-item {
    flex: 0 0 195px;
    max-width: 195px;
}

@media (max-width: 768px) {
    .slider-card-item {
        flex: 0 0 150px;
        max-width: 150px;
    }
}

.slider-track-wrapper, .genre-track-wrapper {
    position: relative;
    overflow: hidden;
    margin: 0 -4px;
    padding: 8px 4px 16px 4px;
    mask-image: linear-gradient(to right, transparent 0%, black 1.5%, black 98.5%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 1.5%, black 98.5%, transparent 100%);
}

.slider-track, .genre-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px;
    will-change: scroll-position;
}

.genre-track {
    gap: 12px;
}

.slider-track::-webkit-scrollbar, .genre-track::-webkit-scrollbar {
    display: none;
}

.slider-card-item .drama-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Compact Horizontal Genre Bar Slider */
.genre-bar-container {
    margin-bottom: 32px;
}

.genre-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.genre-bar-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.genre-bar-title span {
    color: var(--secondary);
}

.genre-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-sec);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.genre-pill:hover {
    background: rgba(255, 122, 53, 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-2px);
}

.genre-pill-all {
    background: linear-gradient(135deg, rgba(230, 60, 18, 0.2), rgba(255, 122, 53, 0.1));
    border-color: rgba(255, 122, 53, 0.3);
    color: var(--secondary);
}

.genre-card-arrow {
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.genre-card:hover .genre-card-arrow {
    color: var(--secondary);
    transform: translateX(4px);
}

/* Sections */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
    border-left: 4px solid var(--primary);
    padding-left: 14px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}

.section-title span {
    color: var(--secondary);
}

/* Drama Cards Grid */
.drama-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.drama-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.drama-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.card-img-wrapper {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #110c0e;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.drama-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-episode-count {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(6, 4, 5, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.card-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
}

.card-label {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-sec);
    font-size: 10.5px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Detail Page */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

.detail-sidebar img {
    width: 100%;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-glow);
    margin-bottom: 20px;
}

.detail-main h1 {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-desc {
    color: var(--text-sec);
    font-size: 15.5px;
    line-height: 1.7;
    margin-bottom: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 16px;
}

/* Episode List */
.episode-section-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-bottom: 40px;
}

.episode-btn {
    aspect-ratio: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.episode-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: var(--accent-glow);
}

.episode-btn.active {
    background: var(--gradient);
    color: #1a0606;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(230, 60, 18, 0.3);
}

.episode-btn.locked {
    position: relative;
    opacity: 0.8;
}

.episode-btn.locked::after {
    content: '🔒';
    position: absolute;
    font-size: 10px;
    top: 4px;
    right: 4px;
}

/* Video Player Page */
.player-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
}

.player-main {
    display: flex;
    flex-direction: column;
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-glow);
    margin-bottom: 20px;
}

.video-container video {
    width: 100%;
    height: 100%;
}

.player-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    max-height: 700px;
    display: flex;
    flex-direction: column;
}

.player-sidebar-episodes {
    flex-grow: 1;
    overflow-y: auto;
    margin-top: 14px;
    padding-right: 6px;
}

.player-sidebar-episodes::-webkit-scrollbar {
    width: 6px;
}
.player-sidebar-episodes::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.player-sidebar-episodes::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Filter Page */
.filter-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

.filter-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    height: fit-content;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.filter-select {
    width: 100%;
    background-color: #120c0e; /* Solid background matching theme card color */
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    color-scheme: dark; /* Forces native browser options dropdown to render in dark mode */
}

.filter-select:focus {
    border-color: var(--secondary);
}

.filter-select option {
    background-color: #120c0e;
    color: #ffffff;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-sec);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    cursor: pointer;
}

.filter-badge:hover, .filter-badge.active {
    background: var(--accent-glow);
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sec);
    font-weight: 500;
    cursor: pointer;
}

.pagination-btn:hover, .pagination-btn.active {
    border-color: var(--secondary);
    color: var(--secondary);
    background: var(--accent-glow);
}

.pagination-btn.active {
    background: var(--gradient);
    color: #1a0606;
    border-color: transparent;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    background: rgba(6, 4, 5, 0.9);
    margin-top: 80px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 20px;
    font-size: 13.5px;
    color: var(--text-sec);
}

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 992px) {
    .detail-layout, .player-layout, .filter-layout {
        grid-template-columns: 1fr;
    }
    .detail-sidebar {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 16px 20px;
        gap: 16px;
    }
    header {
        height: auto;
        position: relative;
    }
    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 18px;
    }
    .search-bar {
        width: 100%;
    }
    .hero-inner {
        height: 320px;
    }
    .hero-title {
        font-size: 26px;
    }
    .hero-content {
        padding: 24px;
    }
    .drama-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
}

/* Custom Premium Video Player CSS */
.custom-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000000;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    margin-bottom: 24px;
}

.custom-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Custom Controls Bar */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(9, 6, 7, 0.95) 0%, rgba(9, 6, 7, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
    padding: 16px 24px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.custom-player:hover .video-controls,
.custom-player.controls-active .video-controls {
    opacity: 1;
    transform: translateY(0);
}

/* Progress bar styles */
.progress-bar-container {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: height 0.2s ease;
}

.custom-player:hover .progress-bar-container {
    height: 8px;
}

.progress-bar-hover-zone {
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: 0;
    right: 0;
    z-index: 2;
}

.progress-bar-total {
    width: 100%;
    height: 100%;
}

.progress-bar-buffered {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    width: 0;
}

.progress-bar-current {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    width: 0;
    z-index: 1;
}

.progress-scrubber {
    position: absolute;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(230, 60, 18, 0.6);
    transform: translateX(-50%);
    z-index: 3;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.progress-bar-container:hover .progress-scrubber {
    opacity: 1;
}

/* Controls layout rows */
.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-sec);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.control-btn:hover {
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.08);
}

.control-btn svg {
    width: 22px;
    height: 22px;
}

/* Time counter */
.time-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
    color: var(--text-sec);
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.time-divider {
    color: var(--text-muted);
}

/* Volume control styles */
.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider-wrapper {
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
}

.volume-container:hover .volume-slider-wrapper {
    width: 80px;
}

.volume-slider {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    accent-color: var(--secondary);
}

/* Subtitles captions styling */
.custom-player video::cue {
    background: rgba(9, 6, 7, 0.85);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
}

/* Backlit Cinematic Header Backdrop */
.drama-backdrop {
    position: relative;
    width: 100%;
    min-height: 440px;
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    margin-bottom: 40px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    background-color: #0c0709; /* Dark fallback */
}

.drama-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(25px) brightness(0.35) saturate(1.2);
    transform: scale(1.08);
    z-index: 1;
    opacity: 0.75;
}

.drama-backdrop-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 6, 7, 0.15) 0%, rgba(9, 6, 7, 0.75) 60%, #090607 100%), 
                radial-gradient(circle at 50% 30%, rgba(230, 60, 18, 0.1), transparent 70%);
    z-index: 2;
}

.drama-header-content {
    position: relative;
    z-index: 3;
    padding: 40px;
    display: flex;
    gap: 40px;
    align-items: center;
    width: 100%;
}

.drama-header-poster {
    width: 220px;
    aspect-ratio: 3/4;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-hover);
    flex-shrink: 0;
}

.drama-header-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drama-header-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drama-title-banner {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.drama-ep-stats {
    font-size: 15px;
    color: var(--text-sec);
    font-weight: 500;
}

.drama-header-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.drama-header-genres {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-genre {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-sec);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.badge-genre:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: var(--accent-glow);
}

.badge-status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-status.ongoing {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.btn-watch-now {
    margin-top: 8px;
    width: fit-content;
}

/* Sidebar episode selectors watch view */
.sidebar-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    color: var(--secondary);
}

.episode-grid-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.episode-btn-sidebar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-sec);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.25s;
}

.episode-btn-sidebar:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    color: var(--text);
    transform: translateX(4px);
}

.episode-btn-sidebar.active {
    background: var(--gradient);
    color: #1a0606;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(230, 60, 18, 0.3);
}

@media (max-width: 768px) {
    .drama-header-content {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }
    .drama-header-poster {
        width: 160px;
    }
    .drama-title-banner {
        font-size: 28px;
    }
    .btn-watch-now {
        align-self: center;
    }
}

/* User Auth Navigation Items */
.nav-user {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-sec);
    margin-right: 8px;
    white-space: nowrap;
    align-self: center;
}

.btn-nav-auth {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: none;
    box-shadow: 0 4px 10px rgba(230, 60, 18, 0.2);
}

/* Modern Glass Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999999;
    width: calc(100% - 48px);
    max-width: 440px;
    background: rgba(18, 12, 14, 0.94);
    border: 1px solid rgba(255, 122, 53, 0.35);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(230, 60, 18, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, visibility 0.45s ease;
}

.cookie-consent-banner.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cookie-consent-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cookie-consent-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 122, 53, 0.15);
    border: 1px solid rgba(255, 122, 53, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 20px;
    flex-shrink: 0;
}

.cookie-consent-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.cookie-consent-body {
    font-size: 13px;
    color: var(--text-sec);
    line-height: 1.55;
    margin-bottom: 20px;
}

.cookie-consent-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-cookie-accept {
    flex: 1;
    padding: 12px 18px;
    background: var(--gradient);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(230, 60, 18, 0.3);
}

.btn-cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 122, 53, 0.45);
}

.btn-cookie-decline {
    flex: 1;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-sec);
    border-radius: 12px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s ease;
}

.btn-cookie-decline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 576px) {
    .cookie-consent-banner {
        left: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
        padding: 18px;
        border-radius: 16px;
    }
    .cookie-consent-actions {
        flex-direction: column;
    }
    .btn-cookie-accept, .btn-cookie-decline {
        width: 100%;
    }
}

/* VIP Premium Button & Shimmer Glow */
.btn-vip-premium {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF7A35 100%);
    background-size: 200% 200%;
    color: #120a02;
    border: none;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 13.5px;
    letter-spacing: 0.3px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: vipPulseGlow 3s infinite alternate;
}

.btn-vip-premium:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 122, 53, 0.4);
    color: #000000;
}

.btn-vip-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: rotate(30deg);
    animation: vipShimmer 3.5s infinite;
}

@keyframes vipShimmer {
    0% { transform: translateX(-100%) rotate(30deg); }
    30% { transform: translateX(100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

@keyframes vipPulseGlow {
    0% { box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3), 0 0 15px rgba(255, 215, 0, 0.2); }
    100% { box-shadow: 0 4px 22px rgba(255, 165, 0, 0.6), 0 0 25px rgba(255, 215, 0, 0.45); }
}

.vip-icon {
    font-size: 15px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* VIP Modal Styles */
.vip-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 4, 5, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.vip-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.vip-modal-card {
    background: linear-gradient(145deg, rgba(24, 16, 20, 0.95) 0%, rgba(12, 8, 10, 0.98) 100%);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 28px;
    max-width: 520px;
    width: 100%;
    padding: 36px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 50px rgba(255, 215, 0, 0.15);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.vip-modal-overlay.active .vip-modal-card {
    transform: scale(1) translateY(0);
}

.vip-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-sec);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.vip-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.vip-badge-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.vip-modal-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.vip-modal-title span {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.vip-modal-subtitle {
    font-size: 14px;
    color: var(--text-sec);
    margin-bottom: 24px;
    line-height: 1.5;
}

.vip-features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.vip-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    color: var(--text);
}

.vip-feature-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.vip-plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
}

.vip-plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.vip-plan-card.selected, .vip-plan-card:hover {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.06);
}

.vip-plan-tag {
    position: absolute;
    top: -10px;
    right: 12px;
    background: var(--gradient);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.vip-plan-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-sec);
    margin-bottom: 4px;
}

.vip-plan-price {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: #ffd700;
}

.vip-plan-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-vip-checkout {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF7A35 100%);
    color: #000000;
    border: none;
    border-radius: 16px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
    transition: all 0.25s;
}

.btn-vip-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6);
}

/* ==========================================================================
   MOBILE RESPONSIVE, TOUCH UX & IPHONE SAFE AREA ENHANCEMENTS
   Support: Android 10-16+ (Chrome/Samsung/Opera/Firefox), iPhone iOS 16-26+ (Safari/Chrome/Edge), iPad/Tablets
   ========================================================================== */

/* 1. Global Touch & Viewport Hardening */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

/* WCAG Minimum Touch Target Sizing (min 44px for buttons, inputs, links) */
button, input, select, textarea, .btn, .nav-link, .control-btn, .episode-btn-sidebar, .badge, .vip-plan-card {
    touch-action: manipulation;
}

/* iPhone Safe Area & Dynamic Island Support */
:root {
    --sat: env(safe-area-inset-top, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
    --sar: env(safe-area-inset-right, 0px);
}

header {
    padding-top: var(--sat);
    padding-left: max(20px, var(--sal));
    padding-right: max(20px, var(--sar));
}

footer {
    padding-bottom: calc(24px + var(--sab));
    padding-left: max(20px, var(--sal));
    padding-right: max(20px, var(--sar));
}

.auth-container, .vip-modal-container {
    padding-bottom: calc(30px + var(--sab));
}

/* 2. Tablet Breakpoint (max-width: 1024px) */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 16px;
    }
    .player-layout {
        flex-direction: column;
        gap: 24px;
    }
    .player-sidebar {
        width: 100%;
    }
    .episode-grid-sidebar {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        max-height: 280px;
    }
    .drama-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
}

/* 3. Mobile Breakpoint (max-width: 768px) */
@media (max-width: 768px) {
    /* Header Responsive Layout */
    header {
        height: auto;
        min-height: 64px;
        padding-top: calc(8px + var(--sat));
        padding-bottom: 8px;
    }
    .nav-container {
        flex-wrap: wrap;
        gap: 12px;
    }
    .logo {
        font-size: 20px;
    }
    .nav-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 6px;
        gap: 14px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    .search-bar {
        width: 100%;
        order: 10;
        margin-top: 4px;
    }
    .search-bar input {
        min-height: 44px;
        font-size: 14px;
    }

    /* Main Container & Hero Banner */
    .main-container {
        padding: 16px 12px;
    }
    .hero-banner {
        flex-direction: column;
        padding: 24px 16px;
        min-height: auto;
        border-radius: 20px;
        text-align: center;
    }
    .hero-poster {
        width: 160px;
        margin: 0 auto 16px;
    }
    .hero-title {
        font-size: 22px;
    }
    .hero-actions {
        justify-content: center;
        width: 100%;
    }
    .btn-hero-watch, .btn-hero-fav {
        min-height: 48px;
        padding: 12px 20px;
        font-size: 14px;
        flex: 1;
        justify-content: center;
    }

    /* Drama Backdrop / Header on Drama Details */
    .drama-backdrop {
        min-height: auto;
        padding: 24px 16px;
        border-radius: 20px;
    }
    .drama-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    .drama-header-poster {
        width: 150px;
    }
    .drama-title-banner {
        font-size: 22px;
    }
    .drama-header-tags, .drama-header-genres {
        justify-content: center;
    }
    .btn-watch-now {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }

    /* Drama Card Grids */
    .drama-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    .drama-card-title {
        font-size: 13px;
    }
    .drama-card-meta {
        font-size: 11px;
    }

    /* Custom Video Player Touch Tuning */
    .custom-player {
        border-radius: 16px;
    }
    .video-controls {
        padding: 12px 14px 14px;
    }
    .controls-row {
        gap: 8px;
    }
    .control-btn {
        width: 44px;
        height: 44px;
    }
    .progress-bar-container {
        height: 8px;
        margin-bottom: 12px;
    }
    .progress-bar-hover-zone {
        height: 28px;
        top: -10px;
    }
    .time-display {
        font-size: 12px;
    }

    /* Category Filter Page */
    .filter-header-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .filter-select {
        min-height: 44px;
        width: 100%;
    }
    .genres-scroll-bar {
        padding-bottom: 8px;
    }
    .genre-chip {
        min-height: 40px;
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Auth Containers & VIP Modals */
    .auth-container {
        padding: 24px 18px;
        border-radius: 20px;
    }
    .auth-container h1 {
        font-size: 22px;
    }
    .form-control {
        min-height: 48px;
        font-size: 14px;
    }
    .btn-submit {
        min-height: 48px;
        font-size: 15px;
    }
    .vip-modal-content {
        padding: 24px 16px;
        border-radius: 20px;
        max-height: 85dvh;
    }
    .vip-plans-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .vip-plan-card {
        min-height: 48px;
        padding: 14px;
    }

    /* Pagination */
    .pagination-container {
        gap: 6px;
        flex-wrap: wrap;
    }
    .page-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 14px;
    }
}

/* 4. Compact Mobile Breakpoint (max-width: 480px) */
@media (max-width: 480px) {
    .drama-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .episode-grid-sidebar {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    .episode-btn-sidebar {
        min-height: 44px;
        font-size: 12px;
        padding: 6px 4px;
    }
    .vip-header h2 {
        font-size: 20px;
    }
}

/* ==========================================================================
   USER EXPERIENCE (UX), MICRO-INTERACTIONS & ACCESSIBILITY HARDENING
   ========================================================================== */

/* 1. Hardware Accelerated Active Click Feedback */
button:active, .btn:active, .page-btn:active, .episode-btn-sidebar:active, .genre-chip:active, .vip-plan-card:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease-out;
}

/* 2. Skeleton Shimmer Loading Cards */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-card {
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.02) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 18px;
    height: 270px;
    border: 1px solid var(--border);
}

/* 3. Visual Empty State Component */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    background: var(--surface);
    border: 1px dashed var(--border-hover);
    border-radius: 24px;
    max-width: 560px;
    margin: 40px auto;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(255, 122, 53, 0.1);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-state-card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state-card p {
    color: var(--text-sec);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 440px;
}

/* 4. Glassmorphic Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: max(24px, calc(24px + var(--sab)));
    right: 24px;
    background: rgba(18, 12, 14, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--secondary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9999;
    animation: toast-in 0.3s ease-out;
}

@keyframes toast-in {
    from { transform: translateY(100%) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* 5. Smooth Focus outline for Accessibility (WCAG 2.4.7) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 3px;
    border-radius: 8px;
}
