:root {
    --primary-color: #ffd700;
    --primary-hover: #d4af37;
    --gold-gradient: linear-gradient(135deg, #ffe57f 0%, #ffd700 50%, #b8860b 100%);
    --bg-color: #0f0f0f;
    --card-bg: #1a1a1a;
    --text-color: #ffffff;
    --text-secondary: #cccccc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    letter-spacing: 0.2px;
    padding-bottom: env(safe-area-inset-bottom);
    user-select: none;
    -webkit-user-select: none;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

button, 
.btn, 
.tag, 
.theme-toggle-btn, 
.server-btn,
.slide-btn,
.hero-nav-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-primary { 
    background: #ffd700; 
    color: #000000 !important; 
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover, .btn-primary:active { 
    background: #e6c200;
    transform: translateY(-2px);
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6); }
    70% { box-shadow: 0 0 0 14px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

#heroPlayBtn {
    animation: pulse-glow 2s infinite;
}

.btn-secondary { 
    background: rgba(255, 255, 255, 0.15); 
    color: #ffffff !important; 
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.2);
    color: var(--primary-color) !important;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    padding-right: max(30px, env(safe-area-inset-right));
    padding-left: max(30px, env(safe-area-inset-left));
    background: rgba(15, 15, 15, 0.75) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 70px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.nav-brand-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1.4rem;
    cursor: pointer;
}

.logo a {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

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

.logo-icon {
    color: var(--primary-color);
    font-size: 1.4rem;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 2px 10px;
    height: 38px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 8px;
    width: 170px;
    font-family: inherit;
}

.search-box button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.search-box button:hover {
    color: var(--primary-hover);
}

.theme-toggle-btn {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--primary-color);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin: 0 !important;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: rgba(255, 215, 0, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.hero {
    height: 85vh;
    min-height: 480px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 50px;
    padding-right: max(50px, env(safe-area-inset-right));
    padding-left: max(50px, env(safe-area-inset-left));
    transition: background-image 0.8s ease-in-out;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(0deg, var(--bg-color) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 46px;
    font-weight: 900;
    margin: 10px 0;
    line-height: 1.2;
}

.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 700;
}

.meta-info i { color: var(--primary-color); }

.quality { 
    border: 1px solid var(--primary-color); 
    color: var(--primary-color); 
    padding: 0 6px; 
    border-radius: 3px; 
    font-size: 12px;
}

.description {
    color: #ddd;
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 16px;
    font-weight: 500;
}

.hero-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.hero-nav-btn:hover {
    background: var(--gold-gradient);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.hero-prev { right: 20px; }
.hero-next { left: 20px; }

.hero-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--primary-color);
    cursor: pointer;
    transition: 0.3s;
}

.hero-dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 10px;
}

.section-container {
    padding: 40px 50px;
    padding-right: max(50px, env(safe-area-inset-right));
    padding-left: max(50px, env(safe-area-inset-left));
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
}

.section-header h2 i {
    color: var(--primary-color);
}

.filter-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}
.filter-tags::-webkit-scrollbar { display: none; }

.filter-tags .tag {
    background: var(--card-bg);
    border: 1px solid #333;
    color: var(--text-color);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: 0.3s;
    white-space: nowrap;
}

.filter-tags .tag.active, .filter-tags .tag:hover {
    background: var(--gold-gradient);
    color: #000 !important;
    border-color: transparent;
}

.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.slider-grid {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 10px 5px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.searchResultsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    width: 100%;
}

.slider-grid::-webkit-scrollbar {
    display: none;
}

.slider-grid .movie-card {
    min-width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}

/* ==================== تصميم البطاقة والصورة كـ مربع كامل بالخارج ==================== */

/* الحاوية الكلية (غير مرئية كـ مربع، وظيفتها الحفاظ على ترتيب الصورة والنص) */
.movie-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* حركة تحويم خفيفة على البطاقة كاملة */
.movie-card:hover {
    transform: translateY(-6px);
}

/* مربع الصورة المستقل بكافة خصائصه وتأثيراته */
.movie-poster-wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px; /* انحناء زوايا المربع الخاص بالصورة */
    overflow: hidden;
    background: #1a1a1a;
    border: 1px solid rgba(255, 215, 0, 0.15); /* إطار المربع */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* توهج مربع الصورة وإطاره عند التمرير بالماوس */
.movie-card:hover .movie-poster-wrapper {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.25);
}

.movie-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

/* شارات الجودة والتقييم داخل مربع الصورة */
.badge-quality {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.badge-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.badge-rating i {
    color: #ffd700;
    font-size: 10px;
}

/* النصوص خارج المربع تماماً أسفله */
.movie-info {
    padding: 8px 2px 0 2px;
    background: transparent !important;
    width: 100%;
}

.movie-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
}

.movie-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 4px;
}

.movie-details i {
    color: var(--primary-color);
}

#continueWatchingSection .movie-details span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 800;
}

.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    opacity: 0;
}

.slider-wrapper:hover .slide-btn {
    opacity: 1;
}

.slide-btn:hover {
    background: var(--gold-gradient);
    color: #000;
    transform: translateY(-50%) scale(1.1);
}

.prev-btn { right: -15px; }
.next-btn { left: -15px; }

/* النافذة المنبثقة لمشغل الفيديو */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.modal-content {
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    background: #000;
    border: none;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.close-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    font-size: 28px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid var(--primary-color);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.close-btn:hover, .close-btn:active {
    background: var(--primary-color);
    color: #000000;
    transform: scale(1.1);
}

.iframe-container {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
    padding-bottom: 0;
}

.iframe-container iframe,
.iframe-container div {
    position: absolute;
    top: 0; left: 0; 
    width: 100%; 
    height: 100%; 
    border: none;
}

.server-options {
    padding: 10px 20px;
    background: rgba(20, 20, 20, 0.95);
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
    flex-wrap: wrap;
    z-index: 3050;
}

.server-btn {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.server-btn.active, .server-btn:hover { 
    background: var(--gold-gradient); 
    color: #000 !important;
    border-color: transparent;
}

.pin-modal-content {
    max-width: 350px;
    text-align: center;
    padding: 25px;
    height: auto;
    border-radius: 10px;
}

.pin-header {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.pin-input {
    width: 80%;
    padding: 10px;
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #222;
    color: #fff;
}

.pin-btn {
    margin: 0 auto;
}

.pin-error {
    color: #ff4d4d;
    font-size: 0.9rem;
    margin-top: 10px;
    display: none;
}

#adminModal {
    align-items: flex-start;
    overflow-y: auto;
    padding-top: 40px;
}

.admin-modal-content {
    max-width: 900px;
    width: 95%;
    height: auto;
    text-align: right;
    padding: 25px;
    margin-bottom: 40px;
    border-radius: 10px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.admin-header h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.admin-close {
    position: static;
}

.admin-subhead {
    margin-bottom: 15px;
    color: var(--text-color);
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
}

.admin-form label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.admin-form input, .admin-form select {
    width: 100%;
    padding: 8px;
    background: #252525;
    color: #fff;
    border: 1px solid #444;
    border-radius: 5px;
}

.full-width {
    grid-column: 1 / -1;
}

.form-btns {
    display: flex;
    gap: 10px;
}

.cancel-btn {
    display: none;
    justify-content: center;
    background: #444;
    color: #fff !important;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    text-align: right;
    border-radius: 10px;
    overflow: hidden;
}

.admin-table th {
    background: #252525;
    color: var(--primary-color);
    padding: 10px;
}

footer {
    padding: 30px 50px;
    padding-right: max(50px, env(safe-area-inset-right));
    padding-left: max(50px, env(safe-area-inset-left));
    background: #0a0a0a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 215, 0, 0.15);
    font-weight: 700;
}

.socials a {
    color: var(--text-secondary);
    font-size: 20px;
    margin-left: 15px;
    transition: 0.3s;
}

.socials a:hover {
    color: var(--primary-color);
}

body.light-mode {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #1a1a1a;
    --text-secondary: #4a4a4a;
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .search-box {
    background: #edf2f7;
    border: 1px solid #cbd5e0;
}

body.light-mode .search-box input {
    color: #1a202c;
}

body.light-mode .search-box input::placeholder {
    color: #718096;
}

body.light-mode .search-box button {
    color: #d69e2e;
}

body.light-mode .theme-toggle-btn {
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    color: #d69e2e !important;
}

body.light-mode .theme-toggle-btn:hover {
    background: #e2e8f0;
}

body.light-mode .btn-primary {
    background: #d69e2e !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(214, 158, 46, 0.3);
}

body.light-mode .btn-primary:hover {
    background: #b7791f !important;
}

body.light-mode .btn-secondary {
    background: #edf2f7 !important;
    color: #2d3748 !important;
    border: 1px solid #cbd5e0 !important;
}

body.light-mode .btn-secondary:hover {
    background: #e2e8f0 !important;
    color: #d69e2e !important;
}

body.light-mode .filter-tags .tag {
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    color: #4a5568;
}

body.light-mode .filter-tags .tag.active,
body.light-mode .filter-tags .tag:hover {
    background: #d69e2e !important;
    color: #ffffff !important;
    border-color: transparent;
}

body.light-mode .movie-poster-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

body.light-mode .movie-title {
    color: #1a202c;
}

body.light-mode .movie-details {
    color: #718096;
}

body.light-mode .server-options {
    background: #edf2f7;
    color: #1a202c;
}

body.light-mode .server-btn {
    background: #ffffff;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

body.light-mode .server-btn.active {
    background: #d69e2e;
    color: #ffffff !important;
    border-color: transparent;
}

body.light-mode footer {
    background: #edf2f7;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: 260px;
        height: 100vh;
        background: #141414;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 25px 30px;
        gap: 25px;
        z-index: 999;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }

    body.light-mode .nav-links {
        background: #ffffff;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .menu-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .navbar { 
        padding: 10px 15px; 
    }
    .search-box input { 
        width: 100px; 
    }
    .hero { 
        padding: 0 20px; 
        height: 70vh; 
        min-height: 400px;
    }
    .hero-content h1 { 
        font-size: 26px; 
    }
    .description {
        font-size: 14px;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .hero-nav-btn { 
        display: none; 
    }
    .section-container { 
        padding: 25px 15px; 
    }
    .slide-btn { 
        display: none; 
    }
    .slider-grid .movie-card { 
        min-width: 140px; 
        max-width: 140px; 
    }
    .searchResultsGrid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    .movie-card img {
        height: 200px;
    }
    .movie-title {
        font-size: 13px;
    }
    .movie-details {
        font-size: 11px;
    }
    footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px 15px;
    }
    .admin-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .close-btn {
        top: max(12px, env(safe-area-inset-top));
        left: max(12px, env(safe-area-inset-left));
        width: 38px;
        height: 38px;
        font-size: 22px;
    }

    .iframe-container {
        padding-top: 45px;
    }
}

@media (max-width: 480px) {
    .logo span span {
        display: none;
    }
    .search-box input {
        width: 75px;
    }
    .search-box {
        padding: 2px 5px;
    }
    .theme-toggle-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

.episodes-modal-content {
    max-width: 800px;
    height: auto;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
}

.series-header-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(0,0,0,0.8) 100%);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.series-header-banner img {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.series-banner-info h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 8px;
}

.series-banner-info p {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
}

.episodes-list-container {
    padding: 20px 25px 30px;
}

.episodes-list-container h3 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.episodes-list-container h3 i {
    color: var(--primary-color);
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-height: 350px;
    overflow-y: auto;
    padding-left: 5px;
}

.episode-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.episode-card:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.episode-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.episode-info {
    display: flex;
    flex-direction: column;
}

.ep-num {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: bold;
}

.ep-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-color);
}