:root {
            --bg-primary: #121212;
            --bg-secondary-glass: rgba(25, 25, 25, 0.5);
            --bg-modal-glass: rgba(30, 30, 30, 0.7);
            --text-primary: #F0F0F0;
            --text-secondary: #A0A0B0;
            --accent-color: #3b82f6;
            --accent-glow: rgba(59, 130, 246, 0.5);
            --border-color-glass: rgba(255, 255, 255, 0.15);
            --border-radius: 1rem;
            --shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.3);
            --rating-good: #22c55e;
            --rating-medium: #f59e0b;
            --rating-bad: #ef4444;
            --lilac-glass: rgba(191, 172, 226, 0.15);
            --lilac-glow: rgba(191, 172, 226, 0.3);
            --red-glass: rgba(239, 68, 68, 0.15);
            --red-glow: rgba(239, 68, 68, 0.4);
            --green-glass: rgba(34, 197, 94, 0.15);
            --green-glow: rgba(34, 197, 94, 0.4);
            --blue-glass: rgba(59, 130, 246, 0.15);
            --blue-glow: rgba(59, 130, 246, 0.4);
            --orange-color: #f97316;
            --orange-glow: rgba(249, 115, 22, 0.5);
            --orange-glass: rgba(249, 115, 22, 0.15);
            --gold-color: #FFD700;
            --gold-glow: rgba(255, 215, 0, 0.5);
            --gold-glass: rgba(255, 215, 0, 0.15);
            --update-color: #ff003c;
            --update-glow: rgba(255, 0, 60, 0.5);
            --update-glass: rgba(255, 0, 60, 0.15);
            --cyan-color: #00e1ff;
            --cyan-glow: rgba(0, 225, 255, 0.5);
            --cyan-glass: rgba(0, 225, 255, 0.15);
            --silver-color: #C0C0C0;
            --silver-glow: rgba(192, 192, 192, 0.5);
            --silver-glass: rgba(192, 192, 192, 0.15);
            --gray-glass: rgba(255, 255, 255, 0.08);
            --gray-glow: rgba(255, 255, 255, 0.15);
            --gray-panel: rgba(255, 255, 255, 0.05);
            --film-base: #2c1f18;
            --film-sprocket-hole: #d4c8be;
            --film-frame-inner: #1a1410;
            --font-family-persian: 'Beiruti', sans-serif;
            --font-family-english: 'Gugi', sans-serif;
            --font-size-sm: clamp(0.7rem, 0.5vw + 0.6rem, 0.8rem);
            --font-size-base: clamp(0.875rem, 1vw + 0.65rem, 1rem);
            --font-size-lg: clamp(1.25rem, 2vw + 0.8rem, 1.6rem);
            --font-size-xl: clamp(1.5rem, 3vw + 1rem, 2.5rem);
            --space-xs: clamp(0.25rem, 0.5vw + 0.15rem, 0.375rem);
            --space-sm: clamp(0.5rem, 1vw + 0.25rem, 0.75rem);
            --space-md: clamp(1rem, 2vw + 0.3rem, 1.1rem);
            --space-lg: clamp(1.5rem, 3vw + 0.75rem, 2rem);
            --space-xl: clamp(2rem, 4vw + 1rem, 3.125rem);
        }
        body.light-theme {
            --bg-primary: #cccccc;
            --bg-secondary-glass: rgba(255, 255, 255, 0.6);
            --bg-modal-glass: rgba(248, 250, 252, 0.7);
            --text-primary: #000000;
            --text-secondary: #4a5568;
            --border-color-glass: rgba(0, 0, 0, 0.1);
            --shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
            --film-base: #e2e8f0;
            --film-sprocket-hole: #4a5568;
            --film-frame-inner: #cbd5e0;
            --gray-glass: rgba(0, 0, 0, 0.05);
            --gray-glow: rgba(0, 0, 0, 0.1);
            --gray-panel: rgba(0, 0, 0, 0.03);
        }
        html { font-size: 15px; scroll-behavior: smooth; }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            background-color: var(--bg-primary);
            color: var(--text-primary);
            font-family: var(--font-family-persian), var(--font-family-english), sans-serif;
            line-height: 1.7;
            font-size: var(--font-size-base);
            overflow-x: hidden;
            position: relative;
            transition: background-color 0.3s, color 0.3s;
        }
        #particle-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; display: block; }
        body.modal-open, body.search-open { overflow: hidden; }
        .container { max-width: 1800px; margin: 0 auto; padding: 0 var(--space-md); }
        .glass-effect {
            background: var(--bg-secondary-glass);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-radius: var(--border-radius);
            border: 1px solid var(--border-color-glass);
            box-shadow: var(--shadow);
            transition: background-color 0.3s, border-color 0.3s;
        }
        #app-title-header {
            position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
            width: 95%; max-width: 1200px; z-index: 1001; display: flex;
            justify-content: center; align-items: center; padding: var(--space-sm) var(--space-lg);
            border-radius: 1.5rem;
        }
        .header-center-title { display: flex; align-items: center; width: 100%; justify-content: space-between; }
        .header-logo-img { height: clamp(2.5rem, 8vw, 3.5rem); width: clamp(2.5rem, 8vw, 3.5rem); border-radius: 25%; object-fit: cover; animation: logo-pulse 4s ease-in-out infinite; }
        @keyframes logo-pulse {
            0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px var(--lilac-glow)); }
            50% { transform: scale(1.1); filter: drop-shadow(0 0 20px var(--lilac-glow)); }
        }
        .glitch-title { position: relative; font-weight: 900; text-transform: uppercase; }
        .glitch-title.title-fa { font-family: 'Beiruti', sans-serif !important; color: #00ffff; }
        .glitch-title.title-en { font-family: 'Gugi', sans-serif !important; color: #00E4FF; }
        h1.glitch-title, .glitch-title { font-size: clamp(1.8rem, 4vw, 2.2rem); }
        .desktop-nav-cluster { display: none; }
        main.container { padding-top: 7rem; }
        .glitch-title { animation: glitch-main 725ms infinite; }
        @keyframes glitch-main {
            0%, 15% { text-shadow: 0.05em 0 0 var(--c1), -0.03em -0.04em 0 var(--c2), 0.025em 0.04em 0 var(--c3); }
            16%, 49% { text-shadow: -0.05em -0.025em 0 var(--c1), 0.025em 0.035em 0 var(--c2), -0.05em -0.05em 0 var(--c3); }
            50%, 99% { text-shadow: 0.05em 0.035em 0 var(--c1), 0.03em 0 0 var(--c2), 0 -0.04em 0 var(--c3); }
            100% { text-shadow: -0.05em 0 0 var(--c1), -0.025em -0.04em 0 var(--c2), -0.04em -0.025em 0 var(--c3); }
        }
        .title-fa { --c1: #FF0046; --c2: #87FF00; --c3: #00ffff; }
        .title-en { --c1: #FD004F; --c2: #D7FF00; --c3: #00FFEA; }
        @media (min-width: 769px) {
            #app-title-header { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-md); }
            .header-center-title { grid-column: 2 / 3; width: auto; justify-content: center; gap: var(--space-md); }
            .desktop-nav-cluster { display: flex; align-items: center; gap: var(--space-lg); }
            #desktop-nav-left { grid-column: 1 / 2; justify-content: flex-start; }
            #desktop-nav-right { grid-column: 3 / 4; justify-content: flex-end; }
            .desktop-nav-cluster .nav-item {
                color: var(--text-secondary); text-decoration: none; font-size: 1rem; font-weight: 500;
                padding: 0.5rem; display: flex; align-items: center; gap: 0.5rem; background: none;
                border: none; font-family: var(--font-family-persian); cursor: pointer;
                transition: color 0.3s ease, transform 0.3s ease;
            }
            .desktop-nav-cluster .nav-item:hover { color: var(--text-primary); transform: translateY(-2px); }
            .desktop-nav-cluster .nav-item.active { color: var(--accent-color); text-shadow: 0 0 10px var(--accent-glow); }
            .desktop-nav-cluster .nav-item .mdi { font-size: 1.3rem; }
        }
        .slider-section { margin-bottom: var(--space-xl); margin-top: 0; opacity: 0; animation: fadeIn 0.8s 0.2s forwards; padding: var(--space-sm) 0 var(--space-xl) 0; }
        .filmstrip-container { overflow: hidden; position: relative; width: 100%; -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%); mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%); -webkit-box-reflect: below 10px linear-gradient(to bottom, transparent, transparent 60%, rgba(0, 0, 0, 0.4)); }
        .swiper-container.filmstrip-slider { width: 100%; height: 20rem; }
        .swiper-wrapper { transition-timing-function: linear !important; }
        .swiper-slide.filmstrip-poster { width: 12rem; height: 100%; display: flex; flex-direction: column; background-color: var(--film-base); padding: 0.5rem; box-sizing: border-box; cursor: pointer; }
        .sprocket-strip { height: 1.5rem; flex-shrink: 0; background-image: repeating-linear-gradient(90deg, transparent, transparent 0.5rem, var(--film-sprocket-hole) 0.5rem, var(--film-sprocket-hole) 1rem, transparent 1rem); background-size: 1.5rem 100%; }
        .filmstrip-image-wrapper { flex-grow: 1; margin: 0.5rem 0; box-shadow: inset 0 0 10px 5px var(--film-frame-inner); overflow: hidden; transition: transform 0.3s ease; }
        .swiper-slide.filmstrip-poster:hover .filmstrip-image-wrapper { transform: scale(1.03); }
        .filmstrip-image-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(30%) saturate(1.1); }
        .content-section { opacity: 0; animation: fadeIn 0.8s forwards; }
        .category-box { margin-bottom: var(--space-sm); background: rgba(191, 172, 226, 0.03); padding: var(--space-sm); border-radius: 1.5rem; border: none; }
        .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-md); padding: 0 var(--space-md); }
        .section-header h2 { font-size: var(--font-size-lg); font-weight: 700; }
        .section-header .view-more-btn { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.3s ease; cursor: pointer; background: none; border: none; display: flex; align-items: center; gap: 0.25rem; }
        .section-header .view-more-btn:hover { color: var(--accent-color); }
        .horizontal-scroll-container { overflow-x: auto; overflow-y: hidden; padding-bottom: var(--space-md); scrollbar-width: none; -ms-overflow-style: none; }
        .horizontal-scroll-container::-webkit-scrollbar { display: none; }
        .horizontal-grid { display: flex; flex-wrap: nowrap; gap: var(--space-md); padding: 0 var(--space-md) 0.5rem var(--space-md); min-height: 18rem; }
        /* Cards are real anchors (each poster links to its own detail page) */
        .content-card { cursor: pointer; position: relative; width: 9.5rem; flex-shrink: 0; display: flex; flex-direction: column; transition: opacity 0.4s ease; opacity: 0.85; filter: saturate(0.8); content-visibility: auto; contain-intrinsic-size: 9.5rem 18rem; text-decoration: none; color: inherit; }
        .filmstrip-poster { text-decoration: none; color: inherit; }
        .horizontal-grid:hover .content-card:not(:hover) { opacity: 0.7; }
        .content-card:hover { opacity: 1; filter: saturate(1); }
        .poster-image-container { position: relative; width: 100%; height: 14rem; border-radius: var(--border-radius); overflow: hidden; transition: transform 0.4s ease, box-shadow 0.4s ease; will-change: transform, box-shadow; }
        .content-card:hover .poster-image-container { transform: translateY(-0.625rem) scale(1.03); box-shadow: 0 0 1.875rem var(--accent-glow); }
        .poster-image-container::after { content: ''; position: absolute; bottom: -100%; left: 0; width: 100%; height: 100%; background: inherit; transform: scaleY(-1); opacity: 0.15; -webkit-mask-image: linear-gradient(to bottom, transparent 20%, black 100%); mask-image: linear-gradient(to bottom, transparent 20%, black 100%); pointer-events: none; border-radius: var(--border-radius); }
        .poster-image-container img { width: 100%; height: 100%; object-fit: cover; }
        .content-info { padding: var(--space-sm) var(--space-xs); text-align: center; }
        .content-info h3 { font-size: 1rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-family-english), var(--font-family-persian); }
        .poster-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: var(--space-sm); display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
        .imdb-rating { position: relative; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(closest-side, var(--bg-primary) 79%, transparent 80% 100%), conic-gradient(var(--rating-color, #4a5568) var(--progress), #4a5568 0); font-size: var(--font-size-sm); font-weight: 700; color: var(--text-primary); box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.5), 0 0 0.5rem var(--rating-color, #4a5568); text-shadow: 0 0 0.5rem var(--rating-color, #4a5568); }
        .release-year { font-size: var(--font-size-sm); font-weight: 500; padding: 0.15rem 0.4rem; background-color: rgba(10, 12, 26, 0.7); border-radius: 0.25rem; backdrop-filter: blur(2px); color: #e5e7eb; text-shadow: 0 0 5px #e5e7eb, 0 0 10px var(--accent-glow); }
        .poster-type-tag { position: absolute; top: 0.5rem; right: 0.5rem; background-color: rgba(10, 12, 26, 0.8); backdrop-filter: blur(4px); color: var(--text-primary); padding: 0.2rem 0.6rem; border-radius: 0.5rem; font-size: 0.7rem; font-weight: 500; border: 1px solid var(--border-color-glass); }
        .grid-message { text-align: center; padding: 3.75rem; font-size: 1.1rem; color: var(--text-secondary); width: 100%; }
        #genre-categories-section { margin-bottom: 9rem; }
        #genre-categories-section .section-header { justify-content: center; margin-bottom: var(--space-lg); }
        .genre-selector-container { display: flex; flex-direction: column; gap: var(--space-lg); }
        .genre-selector-box { background: var(--bg-secondary-glass); border: 1px solid var(--border-color-glass); border-radius: var(--border-radius); padding: var(--space-lg); backdrop-filter: blur(5px); }
        .genre-selector-header { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-sm); }
        .genre-selector-header .mdi { font-size: 2rem; color: var(--accent-color); }
        .genre-selector-header h3 { font-size: var(--font-size-lg); font-weight: 700; margin: 0; }
        .genre-selector-subheader { color: var(--text-secondary); font-size: var(--font-size-sm); margin-bottom: var(--space-md); }
        .genre-list-container { overflow-x: auto; padding-bottom: var(--space-sm); scrollbar-width: none; -ms-overflow-style: none; }
        .genre-list-container::-webkit-scrollbar { display: none; }
        .genre-list-scroller { display: flex; flex-wrap: nowrap; gap: var(--space-md); }
        .genre-tag { color: var(--text-primary); padding: var(--space-sm) var(--space-lg); border-radius: 0.75rem; font-size: 1rem; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease; border: 1px solid var(--border-color-glass); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); font-family: var(--font-family-persian); }
        .genre-tag:hover { transform: translateY(-2px); }
        .genre-tag[data-color-theme="1"] { background-color: var(--blue-glass); }
        .genre-tag[data-color-theme="1"]:hover { background-color: var(--blue-glow); box-shadow: 0 0 12px var(--blue-glow); }
        .genre-tag[data-color-theme="2"] { background-color: var(--green-glass); }
        .genre-tag[data-color-theme="2"]:hover { background-color: var(--green-glow); box-shadow: 0 0 12px var(--green-glow); }
        .genre-tag[data-color-theme="3"] { background-color: var(--red-glass); }
        .genre-tag[data-color-theme="3"]:hover { background-color: var(--red-glow); box-shadow: 0 0 12px var(--red-glow); }
        .genre-tag[data-color-theme="4"] { background-color: var(--orange-glass); }
        .genre-tag[data-color-theme="4"]:hover { background-color: var(--orange-glow); box-shadow: 0 0 12px var(--orange-glow); }
        .genre-tag[data-color-theme="5"] { background-color: var(--gold-glass); }
        .genre-tag[data-color-theme="5"]:hover { background-color: var(--gold-glow); box-shadow: 0 0 12px var(--gold-glow); }
        .genre-tag[data-color-theme="6"] { background-color: var(--lilac-glass); }
        .genre-tag[data-color-theme="6"]:hover { background-color: var(--lilac-glow); box-shadow: 0 0 12px var(--lilac-glow); }
        #search-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1100; display: none; flex-direction: column; padding: var(--space-md); background: rgba(13, 17, 23, 0.8); backdrop-filter: blur(1.25rem); -webkit-backdrop-filter: blur(1.25rem); animation: fadeIn 0.3s ease; }
        .search-overlay-header { display: flex; align-items: center; gap: 1rem; margin-bottom: var(--space-md); flex-shrink: 0; }
        .search-input-wrapper { display: flex; flex-direction: column; width: 100%; }
        .search-label { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.5rem; padding-right: 0.2rem; }
        #search-overlay-input { width: 100%; padding: 0.875rem 1.25rem; font-size: 1.1rem; background-color: var(--bg-secondary-glass); color: var(--text-primary); border: 1px solid var(--border-color-glass); border-radius: var(--border-radius); outline: none; }
        #search-overlay-close { background: none; border: none; color: var(--text-primary); font-size: 2rem; cursor: pointer; }
        #search-results-container { overflow-y: auto; flex-grow: 1; }
        .results-grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: var(--space-md); padding-top: var(--space-md); }
        .bottom-nav { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); width: 90%; max-width: 20rem; z-index: 1001; }
        .bottom-nav-inner { display: flex; justify-content: space-around; align-items: center; padding: 0; box-shadow: 0 0 1.25rem rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.1); }
        .nav-item { display: flex; flex-direction: column; align-items: center; gap: 0; color: var(--text-secondary); font-size: 0.6rem; cursor: pointer; transition: color 0.3s ease, transform 0.3s ease; flex-grow: 1; position: relative; background: none; border: none; text-decoration: none; will-change: transform; }
        .nav-item span { color: var(--text-secondary); transition: color 0.3s ease; font-family: var(--font-family-persian); font-weight: 700; }
        .nav-item .mdi { transition: color 0.3s ease; }
        .nav-item:hover span, .nav-item.active span { color: var(--text-primary); }
        .nav-item:hover .mdi, .nav-item.active .mdi { color: var(--text-primary); }
        .nav-item:hover { transform: translateY(-0.1875rem); }
        .nav-item .mdi { font-size: 1.25rem; }
        .nav-item.home-item { transform: translateY(-0.8rem); }
        .nav-item.home-item:hover { transform: translateY(-1rem); }
        .nav-item.home-item .icon-bg { width: 4.5rem; height: 4.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; margin-bottom: 0.25rem; position: relative; z-index: 1; background: radial-gradient(circle at 30% 30%, rgba(200, 160, 255, 0.9), rgba(160, 97, 255, 0.6)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.3), inset 0 -5px 15px rgba(0, 0, 0, 0.4), 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 25px rgba(160, 97, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.2); transition: transform 0.3s ease, box-shadow 0.3s ease; }
        .nav-item.home-item:hover .icon-bg { transform: scale(1.1) rotateZ(-5deg); box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.5), 0 15px 25px rgba(0, 0, 0, 0.5), 0 0 35px rgba(160, 97, 255, 0.9); }
        .nav-item.home-item .icon-bg .mdi { font-size: 2rem; }
        .nav-item.home-item.active .mdi, .nav-item.home-item:hover .mdi { color: white; }
        .nav-badge { position: absolute; top: -0.25rem; right: 0.5rem; background-color: var(--rating-bad); color: white; border-radius: 50%; width: 1.25rem; height: 1.25rem; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; font-weight: 700; transform: scale(0); transition: transform 0.3s ease; }
        .nav-badge.visible { transform: scale(1); }
        main { padding-bottom: 20rem; }
        @media (min-width: 769px) { .bottom-nav { display: none; } main { padding-bottom: var(--space-xl); } }
        .modal { z-index: 2000; background-color: rgba(0, 0, 0, 0.7); position: fixed; left: 0; top: 0; width: 100%; height: 100%; display: none; align-items: center; justify-content: center; animation: fadeIn 0.3s ease; }
        .modal.active { display: flex; }
        .modal-content { background: var(--bg-modal-glass); backdrop-filter: blur(1.25rem); -webkit-backdrop-filter: blur(1.25rem); border: 1px solid var(--border-color-glass); box-shadow: var(--shadow); border-radius: 1.25rem; width: 95%; max-width: 56.25rem; max-height: 90vh; overflow-y: auto; animation: slideIn 0.4s ease-out; position: relative; display: flex; flex-direction: column; }
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        @keyframes slideIn { from { transform: translateY(-1.875rem); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        .modal-header { height: auto; position: relative; overflow: hidden; flex-shrink: 0; display: flex; flex-direction: column; border-bottom: 1px solid var(--border-color-glass); }
        .modal-header__bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(0.625rem); transform: scale(1.2); opacity: 0.3; }
        .modal-header__content { position: relative; z-index: 1; display: flex; padding: 1.25rem; gap: 1.25rem; height: 100%; }
        .modal-poster img { width: 8.125rem; height: 12.1875rem; border-radius: var(--border-radius); box-shadow: var(--shadow); object-fit: cover; flex-shrink: 0; }
        .modal-info { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.75rem; }
        .modal-info h2 { font-size: 2.2rem; margin-bottom: 0; font-weight: 700; font-family: var(--font-family-english), var(--font-family-persian); }
        .meta-info { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; color: var(--text-secondary); font-size: 0.9rem; }
        .meta-info span { display: flex; align-items: center; gap: 0.375rem; }
        .meta-info .mdi { font-size: 1.1rem; color: var(--text-secondary); }
        .genres { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.3125rem; }
        .genres span { background-color: rgba(255, 255, 255, 0.1); padding: 0.25rem 0.75rem; border-radius: 1.25rem; font-size: 0.8rem; font-weight: 300; }
        .modal-body { padding: 1.25rem; overflow-y: auto; }
        .modal-body p { font-size: 1.1rem; line-height: 1.8; color: var(--text-secondary); white-space: pre-wrap; font-weight: 400; }
        .download-section h3, .modal-body h3 { font-size: 1.2rem; margin-top: 1.25rem; margin-bottom: 1rem; padding-bottom: 0.3125rem; border-bottom: 1px solid var(--border-color-glass); }
        .close-btn { position: absolute; top: 1rem; right: 1rem; font-size: 1.5rem; color: white; cursor: pointer; z-index: 1001; background: rgba(0, 0, 0, 0.5); border-radius: 50%; width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; }

        /* Light theme overrides */
        body.light-theme #search-overlay { background: rgba(240, 242, 245, 0.8); }
        body.light-theme #category-overlay { background: rgba(145, 145, 145, 0.8); }
        body.light-theme .content-card { background-color: rgba(0, 0, 0, 0.1); border-radius: var(--border-radius); overflow: hidden; }
        body.light-theme .modal-content { border-color: rgba(0, 0, 0, 0.1); }
        body.light-theme .close-btn { color: var(--text-primary); background: rgba(0, 0, 0, 0.08); }
        body.light-theme .genres span { background-color: rgba(0, 0, 0, 0.05); color: var(--text-secondary); }
        body.light-theme .download-section h3, body.light-theme .modal-body h3 { border-bottom-color: var(--border-color-glass); color: var(--text-primary); }
        body.light-theme .modal-info h2 { color: var(--text-primary); }
        body.light-theme .modal-body p { color: var(--text-primary); }
        body.light-theme .accordion-header { background: rgba(0, 0, 0, 0.03); border-color: rgba(0, 0, 0, 0.08); color: var(--text-primary); }
        body.light-theme .accordion-header:hover { background: rgba(0, 0, 0, 0.06); }
        body.light-theme .accordion-panel { background-color: rgba(0, 0, 0, 0.02); border-color: rgba(0, 0, 0, 0.05); }
        body.light-theme .quality-link { background-color: rgba(0, 0, 0, 0.05); }
        body.light-theme .modal-action-buttons { background: rgba(0, 0, 0, 0.03); border-color: rgba(0, 0, 0, 0.08); }
        body.light-theme .poster-type-tag { background-color: rgba(0, 0, 0, 0.7); color: #fff; }

        .accordion-header { background: var(--lilac-glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); padding: 1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.2s ease, box-shadow 0.2s ease; margin-top: 0.625rem; border-radius: 0.75rem; font-size: 1rem; font-weight: 500; }
        .accordion-header:hover { background-color: var(--lilac-glow); box-shadow: 0 0 15px var(--lilac-glow); }
        .accordion-icon { font-size: 1.5rem; transition: transform 0.3s ease; }
        .accordion-header.active .accordion-icon { transform: rotate(180deg); }
        .accordion-panel { padding: 0 1rem; max-height: 0; overflow: hidden; background-color: rgba(0, 0, 0, 0.2); border-radius: 0 0 0.75rem 0.75rem; border: 1px solid rgba(255, 255, 255, 0.05); border-top: none; transition: max-height 0.35s ease, padding 0.35s ease; }
        .accordion-panel.open { padding: 1rem; max-height: 3000px; }
        .accordion-item.special-orange .accordion-header { background: var(--orange-glass); }
        .accordion-item.special-orange .accordion-header:hover { background-color: var(--orange-glow); box-shadow: 0 0 15px var(--orange-glow); }
        .accordion-item.special-red .accordion-header { background: var(--red-glass); }
        .accordion-item.special-red .accordion-header:hover { background-color: var(--red-glow); box-shadow: 0 0 15px var(--red-glow); }
        /* Story summary dropdown: frosted-glass gray look */
        .accordion-item.special-summary .accordion-header {
            background: var(--gray-glass);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border: 1px solid rgba(255, 255, 255, 0.15);
        }
        .accordion-item.special-summary .accordion-header:hover {
            background-color: var(--gray-glow);
            box-shadow: 0 0 15px var(--gray-glow);
        }
        .accordion-item.special-summary .accordion-panel {
            background-color: var(--gray-panel);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-top: none;
        }
        body.light-theme .accordion-item.special-summary .accordion-header { border-color: rgba(0, 0, 0, 0.1); }
        .quality-link-container { display: flex; flex-direction: column; gap: 0.625rem; }
        .quality-link { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; background-color: rgba(0, 0, 0, 0.2); padding: 0.75rem 1rem; border-radius: 0.5rem; }
        .quality-link-label { font-weight: 500; font-size: 0.95rem; flex-grow: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; }
        .quality-link-actions { display: flex; gap: 0.625rem; flex-shrink: 0; flex-wrap: wrap; }
        .quality-link-actions a, .quality-link-actions button { text-decoration: none; display: flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem; border-radius: 0.5rem; font-size: 0.85rem; font-weight: 500; border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color 0.2s, box-shadow 0.2s, color 0.2s; }
        .quality-link-actions a[data-action="download-link"] { background-color: var(--green-glass); color: var(--rating-good); }
        .quality-link-actions a[data-action="download-link"]:hover { background-color: var(--green-glow); box-shadow: 0 0 10px var(--green-glow); color: #fff; }
        .quality-link-actions a[data-action="copy-link"], .quality-link-actions button[data-action="copy-link"] { background-color: var(--blue-glass); color: var(--accent-color); }
        .quality-link-actions a[data-action="copy-link"]:hover, .quality-link-actions button[data-action="copy-link"]:hover { background-color: var(--blue-glow); box-shadow: 0 0 10px var(--blue-glow); color: #fff; }
        .quality-link-size { font-size: 0.85rem; color: var(--text-secondary); font-weight: 400; background: rgba(255,255,255,0.06); padding: 0.1rem 0.5rem; border-radius: 0.4rem; }
        .quality-group-header { display: flex; justify-content: space-between; align-items: center; background: var(--bg-secondary-glass); padding: 0.75rem 1rem; border-radius: 0.75rem; margin-bottom: 0.5rem; border: 1px solid var(--border-color-glass); }
        .copy-all-btn { cursor: pointer; border: 1px solid rgba(255, 215, 0, 0.3); font-family: var(--font-family-persian); text-decoration: none; display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.2rem; border-radius: 0.6rem; font-size: 0.9rem; font-weight: 500; transition: all 0.3s ease; background-color: var(--gold-glass); color: var(--gold-color); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); text-shadow: 0 0 8px var(--gold-glow); }
        .copy-all-btn:hover { background-color: var(--gold-glow); color: #fff; box-shadow: 0 0 15px var(--gold-glow); transform: translateY(-2px); }
        .modal-action-buttons { display: flex; justify-content: space-around; align-items: center; padding: var(--space-sm); margin: var(--space-md) var(--space-md) 0 var(--space-md); border: 1px solid var(--border-color-glass); border-radius: var(--border-radius); background: rgba(0, 0, 0, 0.2); }
        .modal-action-button { display: flex; flex-direction: column; justify-content: center; align-items: center; background: transparent; border: none; border-radius: 0.6rem; padding: 0.2rem 0.5rem; cursor: pointer; transition: color 0.2s, transform 0.2s, filter 0.2s; flex-shrink: 0; width: auto; height: auto; text-align: center; box-shadow: none; gap: 0.25rem; }
        .modal-action-button:hover { transform: translateY(-2px); filter: brightness(1.2); }
        .modal-action-button span { font-size: 0.75rem; font-weight: 400; pointer-events: none; }
        .modal-action-button .mdi { font-size: 1.2rem; transition: color 0.2s; }
        .modal-action-button[data-action="download"] { color: var(--rating-good); }
        .modal-action-button[data-action="download"] .mdi { color: var(--rating-good); }
        .modal-action-button[data-action="show-stream-guide"] { color: var(--orange-color); }
        .modal-action-button[data-action="show-stream-guide"] .mdi { color: var(--orange-color); }
        .modal-action-button[data-action="share"] { color: var(--accent-color); }
        .modal-action-button[data-action="share"] .mdi { color: var(--accent-color); }
        .modal-action-button[data-action="bookmark"] { color: var(--rating-medium); }
        .modal-action-button[data-action="bookmark"] .mdi { color: var(--rating-medium); }
        .modal-action-button[data-action="bookmark"].bookmarked { color: var(--rating-medium); }
        .modal-action-button[data-action="bookmark"].bookmarked .mdi { color: var(--rating-medium); }
        .load-more-card { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: var(--space-sm); background-color: var(--bg-secondary-glass); border: 1px dashed var(--border-color-glass); transition: background-color 0.3s ease; }
        .load-more-card:hover { background-color: var(--blue-glass); }
        .load-more-card .mdi { font-size: 2.5rem; color: var(--text-secondary); }
        .load-more-card span { font-weight: 500; color: var(--text-secondary); }
        .loader-spinner { width: 2rem; height: 2rem; border: 3px solid var(--border-color-glass); border-top-color: var(--accent-color); border-radius: 50%; animation: spin 1s linear infinite; }
        @keyframes spin { to { transform: rotate(360deg); } }
        #info-section { position: relative; padding: var(--space-lg) var(--space-md); padding-bottom: 7rem; }

        /* Settings */
        #settings-menu-toggle { position: absolute; top: 1.5rem; left: 1.5rem; z-index: 10; cursor: pointer; width: 2.5rem; height: 2.5rem; display: flex; flex-direction: column; justify-content: space-around; background: rgba(255, 255, 255, 0.1); padding: 0.5rem; border-radius: 50%; border: 1px solid var(--border-color-glass); }
        #settings-menu-toggle span { width: 100%; height: 2px; background-color: var(--text-primary); display: block; transition: all 0.3s ease-in-out; }
        #settings-menu { position: absolute; top: 5rem; left: 1.5rem; z-index: 9; width: 280px; padding: 1.5rem; opacity: 0; transform: translateY(-20px) scale(0.95); visibility: hidden; transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s; }
        #settings-menu.open { opacity: 1; transform: translateY(0) scale(1); visibility: visible; }
        .settings-group { margin-bottom: 1.5rem; }
        .settings-group:last-child { margin-bottom: 0; }
        .settings-group label { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; margin-bottom: 0.75rem; color: var(--text-primary); }
        .theme-switcher { position: relative; display: inline-block; width: 50px; height: 26px; }
        .theme-switcher input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 26px; }
        .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
        input:checked+.slider { background-color: var(--accent-color); }
        input:checked+.slider:before { transform: translateX(24px); }
        .font-selector { width: 100%; padding: 0.6rem 1rem; background-color: rgba(0, 0, 0, 0.2); color: var(--text-primary); border: 1px solid var(--border-color-glass); border-radius: 0.5rem; }
        .font-selector:focus { outline: none; box-shadow: 0 0 10px var(--accent-glow); }
        .font-size-control { display: flex; align-items: center; justify-content: space-between; background-color: rgba(0, 0, 0, 0.2); border-radius: 0.5rem; border: 1px solid var(--border-color-glass); padding: var(--space-xs); }
        .size-btn { background-color: var(--blue-glass); border: none; color: var(--text-primary); font-size: 1.5rem; font-weight: bold; cursor: pointer; width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; transition: background-color 0.2s; display: flex; align-items: center; justify-content: center; line-height: 1; }
        .size-btn:hover { background-color: var(--blue-glow); }
        #font-size-display { font-weight: 500; font-size: 1rem; padding: 0 1rem; }

        /* Profile & Glitch */
        .profile-card { text-align: center; padding: var(--space-lg); margin-top: 3rem; margin-bottom: var(--space-xl); }
        .profile-card .profile-image-container { position: relative; display: inline-block; margin-bottom: var(--space-md); animation: float-glow 6s ease-in-out infinite; }
        .profile-card img { width: 12rem; height: 12rem; object-fit: contain; filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3)); }
        @keyframes float-glow { 0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 15px var(--accent-glow)); } 50% { transform: translateY(-10px); filter: drop-shadow(0 0 30px var(--accent-glow)); } }
        .glitch-wrapper { display: flex; justify-content: center; align-items: center; margin-top: var(--space-sm); margin-bottom: var(--space-sm); padding: 0 1em; }
        .glitch-container { position: relative; font-family: "Orbitron", sans-serif; font-size: clamp(2rem, 8vw, 3rem); font-weight: 900; text-transform: uppercase; color: #00ffff; text-shadow: 0.05em 0 0 #ff00ff, -0.03em -0.04em 0 #ffff00, 0.025em 0.04em 0 #00ffff; animation: glitch 725ms infinite; }
        .glitch-container span { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
        .glitch-container span:first-of-type { animation: glitch 500ms infinite; clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%); transform: translate(-0.04em, -0.03em); opacity: 0.75; }
        .glitch-container span:last-of-type { animation: glitch 375ms infinite; clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%); transform: translate(0.04em, 0.03em); opacity: 0.75; }
        @keyframes glitch { 0%, 15% { text-shadow: 0.05em 0 0 #ff00ff, -0.03em -0.04em 0 #ffff00, 0.025em 0.04em 0 #00ffff; } 16%, 49% { text-shadow: -0.05em -0.025em 0 #ff00ff, 0.025em 0.035em 0 #ffff00, -0.05em -0.05em 0 #00ffff; } 50%, 99% { text-shadow: 0.05em 0.035em 0 #ff00ff, 0.03em 0 0 #ffff00, 0 -0.04em 0 #00ffff; } 100% { text-shadow: -0.05em 0 0 #ff00ff, -0.025em -0.04em 0 #ffff00, -0.04em -0.025em 0 #00ffff; } }
        .profile-card p { font-size: var(--font-size-base); color: var(--text-secondary); max-width: 600px; margin: var(--space-sm) auto 0; }

        .info-boxes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-xl); }
        .info-box { padding: var(--space-lg); background: var(--bg-secondary-glass); border: 1px solid var(--border-color-glass); border-radius: var(--border-radius); text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; }
        .info-boxes-grid a.info-box { text-decoration: none; color: inherit; }
        .info-box:hover { transform: translateY(-5px); box-shadow: 0 0 20px var(--accent-glow); }
        .info-box .mdi { font-size: 2.5rem; color: var(--accent-color); margin-bottom: var(--space-sm); }
        .info-box h4 { font-size: 1.2rem; margin-bottom: var(--space-xs); }
        .info-box p { font-size: 0.9rem; color: var(--text-secondary); }
        .info-box.info-box-special { background: linear-gradient(45deg, var(--update-glass), rgba(255, 0, 60, 0.25)); border-color: rgba(255, 0, 60, 0.3); }
        .info-box.info-box-special .mdi { color: var(--update-color); }
        .info-box.info-box-special:hover { box-shadow: 0 0 20px var(--update-glow); }
        .info-box.info-box-update { background: linear-gradient(45deg, var(--cyan-glass), rgba(0, 225, 255, 0.25)); border-color: rgba(0, 225, 255, 0.3); }
        .info-box.info-box-update .mdi { color: var(--cyan-color); }
        .info-box.info-box-update:hover { box-shadow: 0 0 20px var(--cyan-glow); }
        .info-box.info-box-silver { background: linear-gradient(45deg, var(--silver-glass), rgba(192, 192, 192, 0.25)); border-color: rgba(192, 192, 192, 0.3); }
        .info-box.info-box-silver .mdi { color: var(--silver-color); }
        .info-box.info-box-silver:hover { box-shadow: 0 0 20px var(--silver-glow); }

        .social-media-links { display: flex; justify-content: center; align-items: center; gap: var(--space-md); margin-bottom: var(--space-xl); }
        .social-media-links a { display: flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; font-size: 1.8rem; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); transition: all 0.3s ease; }
        .social-media-links a svg { width: 1.8rem; height: 1.8rem; fill: currentColor; }
        .social-media-links a.github { background-color: rgba(255, 165, 0, 0.15); color: #FFA500; }
        .social-media-links a.github:hover { background-color: rgba(255, 165, 0, 0.3); box-shadow: 0 0 15px rgba(255, 165, 0, 0.5); transform: translateY(-5px); }
        .social-media-links a.telegram { background-color: rgba(0, 136, 204, 0.15); color: #0088cc; }
        .social-media-links a.telegram:hover { background-color: rgba(0, 136, 204, 0.3); box-shadow: 0 0 15px rgba(0, 136, 204, 0.5); transform: translateY(-5px); }
        .social-media-links a.x-twitter { background-color: rgba(128, 128, 128, 0.15); color: #808080; }
        .social-media-links a.x-twitter:hover { background-color: rgba(128, 128, 128, 0.3); box-shadow: 0 0 15px rgba(128, 128, 128, 0.4); transform: translateY(-5px); }
        .help-section .accordion-panel p { color: var(--text-secondary); font-size: 1rem; line-height: 1.8; }

        /* Legacy #install-app-button rules removed: the button is now styled by
           .install-cta and must stay visible (the old `display:none` hid it). */
        #tv-section { padding: 0; margin: 0; height: calc(100vh - 7.25rem); overflow: hidden; }
        @media (min-width: 769px) { #tv-section { height: calc(100vh - 8rem); } }
        #tv-frame { width: 100%; height: 100%; border: none; }
        #stream-guide-modal { z-index: 2001; }
        .stream-guide-content { width: 95%; max-width: 40rem; max-height: 90vh; padding: var(--space-lg); text-align: center; }
        .stream-guide-content h3 { font-size: var(--font-size-lg); margin-bottom: var(--space-md); color: var(--orange-color); }
        .stream-guide-content p { margin-bottom: var(--space-lg); line-height: 1.8; }
        .player-download-links { display: flex; flex-direction: column; gap: var(--space-md); }
        .player-download-group { background: rgba(0, 0, 0, 0.2); padding: var(--space-md); border-radius: var(--border-radius); }
        .player-download-group h4 { font-size: 1.1rem; margin-bottom: var(--space-sm); }
        .player-download-group .links { display: flex; justify-content: center; gap: var(--space-sm); flex-wrap: wrap; }
        .player-download-group .links a { text-decoration: none; color: var(--text-primary); background: var(--blue-glass); padding: 0.5rem 1rem; border-radius: 0.5rem; transition: all 0.2s ease; }
        .player-download-group .links a:hover { background: var(--blue-glow); box-shadow: 0 0 10px var(--blue-glow); }
        #category-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1200; display: none; flex-direction: column; background: rgba(13, 17, 23, 0.8); backdrop-filter: blur(1.25rem); -webkit-backdrop-filter: blur(1.25rem); animation: fadeIn 0.3s ease; }
        .category-overlay-header { display: flex; align-items: center; gap: 1rem; padding: var(--space-md); flex-shrink: 0; border-bottom: 1px solid var(--border-color-glass); }
        #category-overlay-title { font-size: var(--font-size-lg); color: var(--text-primary); }
        #category-overlay-close { background: none; border: none; color: var(--text-primary); font-size: 2rem; cursor: pointer; }
        #category-overlay-grid-container { overflow-y: auto; flex-grow: 1; padding: var(--space-md); }
        #category-overlay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: var(--space-md); }
        #category-overlay-load-more { display: block; width: 100%; max-width: 200px; margin: var(--space-lg) auto; padding: 0.8rem 1rem; font-size: 1rem; font-weight: 700; color: #fff; background: var(--blue-glass); border: 1px solid var(--border-color-glass); border-radius: var(--border-radius); cursor: pointer; transition: all 0.3s ease; }
        #category-overlay-load-more:hover { background: var(--blue-glow); }
        #category-overlay-load-more.loading { pointer-events: none; }
        #main-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(10, 12, 26, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 9999; display: flex; justify-content: center; align-items: center; flex-direction: column; text-align: center; padding: var(--space-md); overflow-y: auto; transition: opacity 0.5s ease, visibility 0.5s ease; }
        #main-loader p { margin-top: 1rem; font-size: 1.1rem; font-weight: 500; color: var(--text-primary); text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); }

        /* ======================================================================
           1) Entry loader with install-app promo
           ====================================================================== */
        .loader-card {
            width: 100%; max-width: 32rem; margin: auto;
            display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
            background: rgba(20, 20, 26, 0.72);
            border: 1px solid var(--border-color-glass);
            border-radius: 1.5rem;
            box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
            padding: var(--space-lg) var(--space-md);
        }
        body.light-theme .loader-card { background: rgba(250, 250, 252, 0.88); }
        .loader-logo { width: 5rem; height: 5rem; border-radius: 25%; object-fit: cover; animation: logo-pulse 3.5s ease-in-out infinite; }
        .loader-card .loader-spinner { margin-top: 0.75rem; }
        .loader-progress { width: 100%; max-width: 18rem; height: 0.3rem; border-radius: 1rem; overflow: hidden; background: rgba(255, 255, 255, 0.12); margin-top: 0.25rem; }
        .loader-progress span { display: block; height: 100%; width: 40%; border-radius: 1rem; background: linear-gradient(90deg, var(--accent-color), #8A2BE2); animation: loader-slide 1.6s ease-in-out infinite; }
        @keyframes loader-slide {
            0% { transform: translateX(-120%); }
            100% { transform: translateX(320%); }
        }
        .loader-install {
            width: 100%; margin-top: var(--space-md); padding: var(--space-md);
            border-radius: var(--border-radius);
            background: rgba(59, 130, 246, 0.10);
            border: 1px solid rgba(255, 255, 255, 0.14);
            text-align: center;
        }
        .loader-install h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text-primary); }
        .loader-install h2 .mdi { color: var(--accent-color); margin-left: 0.3rem; }
        .loader-install p { margin-top: 0.2rem; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; text-shadow: none; }
        .loader-install-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: var(--space-md); }
        .loader-skip {
            margin-top: var(--space-md); background: transparent; border: 1px solid var(--border-color-glass);
            color: var(--text-secondary); padding: 0.55rem 1.4rem; border-radius: 2rem; cursor: pointer;
            font-family: var(--font-family-persian); font-size: 0.9rem; font-weight: 700;
            display: inline-flex; align-items: center; gap: 0.35rem; transition: all 0.25s ease;
        }
        .loader-skip:hover { color: var(--text-primary); border-color: var(--accent-color); box-shadow: 0 0 12px var(--accent-glow); }

        /* ======================================================================
           2) Shared install CTA buttons
           ====================================================================== */
        .install-cta {
            display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
            width: 100%; padding: 0.85rem 1.1rem; border: 1px solid transparent; border-radius: 0.9rem;
            font-family: var(--font-family-persian); font-size: 1rem; font-weight: 700;
            cursor: pointer; text-decoration: none; text-align: center; line-height: 1.4;
            transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
        }
        .install-cta .mdi { font-size: 1.25rem; }
        .install-cta:hover { transform: translateY(-2px); }
        .install-cta.pwa { color: #fff; background: linear-gradient(45deg, var(--accent-color), #8A2BE2); box-shadow: 0 0 18px var(--accent-glow); }
        .install-cta.pwa:hover { box-shadow: 0 0 28px var(--lilac-glow); }
        .install-cta.apk { color: #fff; background: linear-gradient(45deg, #16a34a, #22c55e); box-shadow: 0 0 18px var(--green-glow); }
        .install-cta.apk:hover { box-shadow: 0 0 28px var(--green-glow); }
        .install-cta.ghost { color: var(--text-primary); background: var(--gray-glass); border-color: var(--border-color-glass); }
        .install-cta.ghost:hover { background: var(--gray-glow); }

        /* ======================================================================
           3) Info-page install section
           ====================================================================== */
        .install-section { margin-bottom: var(--space-xl); padding: var(--space-lg) var(--space-md); }
        .install-section-head { display: flex; align-items: center; gap: var(--space-md); text-align: right; }
        .install-section-head img { width: 4rem; height: 4rem; border-radius: 22%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 15px var(--lilac-glow); }
        .install-section-head h3 { font-size: 1.15rem; font-weight: 700; }
        .install-section-head p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
        .install-section-actions { display: grid; grid-template-columns: 1fr; gap: 0.7rem; margin-top: var(--space-md); }
        @media (min-width: 700px) { .install-section-actions { grid-template-columns: 1fr 1fr; } .install-section-actions .install-cta.ghost { grid-column: 1 / -1; } }
        .install-section-ios {
            display: flex; align-items: flex-start; gap: 0.6rem; margin-top: var(--space-md);
            padding: 0.85rem 1rem; border-radius: 0.9rem;
            background: var(--gray-glass); border: 1px solid var(--border-color-glass);
            font-size: 0.9rem; color: var(--text-secondary); line-height: 1.8;
        }
        .install-section-ios > .mdi { font-size: 1.4rem; color: var(--text-primary); flex-shrink: 0; }
        .install-section-ios b { color: var(--text-primary); }

        .install-guide-steps { margin: 0.6rem 1.2rem 0.2rem; padding: 0; color: var(--text-secondary); font-size: 0.95rem; line-height: 2; text-align: right; }
        .install-guide-steps li { margin-bottom: 0.35rem; }
        .install-guide-steps b { color: var(--text-primary); }
        .accordion-item.special-install .accordion-header { background: var(--green-glass); }
        .accordion-item.special-install .accordion-header:hover { background-color: var(--green-glow); box-shadow: 0 0 15px var(--green-glow); }
        .accordion-panel .install-guide-actions { display: grid; grid-template-columns: 1fr; gap: 0.7rem; margin-top: var(--space-md); }
        @media (min-width: 700px) { .accordion-panel .install-guide-actions { grid-template-columns: 1fr 1fr; } }

        /* ======================================================================
           4) Install guide overlay (iOS / Android / Desktop)
           ====================================================================== */
        #install-guide-overlay {
            position: fixed; inset: 0; z-index: 3000; display: none;
            align-items: center; justify-content: center; padding: var(--space-md);
            background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
            overflow-y: auto;
        }
        #install-guide-overlay.open { display: flex; animation: fadeIn 0.25s ease; }
        body.install-guide-open { overflow: hidden; }
        .install-guide-card {
            position: relative; width: 100%; max-width: 33rem; margin: auto;
            padding: var(--space-lg) var(--space-md); text-align: right;
            animation: slideIn 0.3s ease-out;
        }
        .install-guide-close {
            position: absolute; top: 0.8rem; left: 0.8rem; width: 2.2rem; height: 2.2rem;
            display: flex; align-items: center; justify-content: center; border-radius: 50%;
            background: rgba(0, 0, 0, 0.4); border: none; color: #fff; font-size: 1.3rem; cursor: pointer;
        }
        body.light-theme .install-guide-close { background: rgba(0, 0, 0, 0.1); color: var(--text-primary); }
        .install-guide-head { display: flex; align-items: center; gap: var(--space-md); padding-bottom: var(--space-md); border-bottom: 1px solid var(--border-color-glass); }
        .install-guide-head img { width: 3.5rem; height: 3.5rem; border-radius: 22%; object-fit: cover; flex-shrink: 0; }
        .install-guide-head h3 { font-size: 1.15rem; font-weight: 700; }
        .install-guide-head p { font-size: 0.85rem; color: var(--text-secondary); }
        .install-guide-tabs { display: flex; gap: 0.4rem; margin: var(--space-md) 0; flex-wrap: wrap; }
        .install-guide-tab {
            flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
            padding: 0.55rem 0.7rem; border-radius: 0.7rem; cursor: pointer;
            background: var(--gray-glass); border: 1px solid var(--border-color-glass);
            color: var(--text-secondary); font-family: var(--font-family-persian); font-size: 0.85rem; font-weight: 700;
            transition: all 0.2s ease;
        }
        .install-guide-tab.active { color: #fff; background: var(--accent-color); border-color: var(--accent-color); box-shadow: 0 0 12px var(--accent-glow); }
        .install-guide-panel { display: none; }
        .install-guide-panel.active { display: block; }
        .install-guide-actions { display: grid; grid-template-columns: 1fr; gap: 0.7rem; margin-top: var(--space-md); }

        /* ======================================================================
           5) Small bottom install popup
           ====================================================================== */
        #install-popup {
            position: fixed; z-index: 1500;
            left: 0.75rem; right: 0.75rem; width: auto; max-width: 30rem;
            margin-inline: auto;
            bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
            transform: translateY(150%);
            display: flex; align-items: center; gap: 0.7rem;
            padding: 0.7rem 0.8rem; border-radius: 1.1rem;
            opacity: 0; pointer-events: none;
            transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
        }
        #install-popup.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
        .install-popup-icon { width: 2.6rem; height: 2.6rem; border-radius: 24%; object-fit: cover; flex-shrink: 0; }
        .install-popup-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.5; }
        .install-popup-text strong { font-size: 0.88rem; color: var(--text-primary); }
        .install-popup-text span { font-size: 0.72rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .install-popup-actions { display: flex; align-items: center; gap: 0.35rem; flex-shrink: 0; }
        .install-popup-btn {
            display: inline-flex; align-items: center; justify-content: center;
            padding: 0.45rem 0.85rem; border-radius: 0.7rem; cursor: pointer; text-decoration: none;
            font-family: var(--font-family-persian); font-size: 0.82rem; font-weight: 700; border: 1px solid transparent;
            transition: all 0.2s ease; white-space: nowrap;
        }
        .install-popup-btn.primary { color: #fff; background: linear-gradient(45deg, var(--accent-color), #8A2BE2); box-shadow: 0 0 12px var(--accent-glow); }
        .install-popup-btn.ghost { color: var(--rating-good); background: var(--green-glass); border-color: rgba(34, 197, 94, 0.35); }
        .install-popup-btn.ghost:hover { background: var(--green-glow); color: #fff; }
        .install-popup-close {
            position: absolute; top: -0.6rem; left: -0.4rem; width: 1.7rem; height: 1.7rem;
            display: flex; align-items: center; justify-content: center; border-radius: 50%;
            background: rgba(0, 0, 0, 0.75); border: 1px solid var(--border-color-glass);
            color: #fff; font-size: 0.9rem; cursor: pointer;
        }
        body.light-theme .install-popup-close { background: rgba(255, 255, 255, 0.95); color: #000; }
        @media (min-width: 769px) { #install-popup { bottom: 1.5rem; left: auto; right: 1.5rem; margin-inline: 0; width: min(26rem, calc(100% - 3rem)); } }

        /* iOS: the browser never fires beforeinstallprompt, so the "install" CTA
           always routes to the manual Add-to-Home-Screen guide (handled in JS). */
        body.pwa-standalone .install-only-web,
        body.pwa-standalone #install-popup { display: none !important; }

        /* ======================================================================
           6) Toast used by detail.html
           ====================================================================== */
        .dn-toast {
            position: fixed; bottom: 6rem; left: 50%; transform: translateX(-50%);
            background-color: rgba(10, 12, 26, 0.92); color: #fff; padding: 0.9rem 1.5rem;
            border-radius: 0.7rem; z-index: 9999; font-family: var(--font-family-persian);
            font-size: 0.9rem; text-align: center; max-width: min(26rem, 90vw);
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); border: 1px solid var(--border-color-glass);
            backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
            animation: dn-toast-inout 3.2s forwards;
        }
        @keyframes dn-toast-inout {
            0% { opacity: 0; transform: translate(-50%, 20px); }
            8% { opacity: 1; transform: translate(-50%, 0); }
            92% { opacity: 1; transform: translate(-50%, 0); }
            100% { opacity: 0; transform: translate(-50%, 20px); }
        }

        /* ======================================================================
           7) Dedicated detail page (detail.html)
           ====================================================================== */
        body.detail-page { padding-bottom: var(--space-xl); }
        #detail-header {
            position: sticky; top: 0.75rem; z-index: 900;
            width: min(1200px, calc(100% - 1.5rem)); margin: 0.75rem auto var(--space-md);
            display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm);
            padding: 0.6rem 0.9rem; border-radius: 1.2rem;
        }
        .detail-back-btn, .detail-brand, .detail-icon-btn {
            display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none;
            color: var(--text-primary); background: none; border: none; cursor: pointer;
            font-family: var(--font-family-persian); font-weight: 700; font-size: 0.9rem;
        }
        .detail-back-btn .mdi { font-size: 1.5rem; }
        .detail-brand img { width: 2.2rem; height: 2.2rem; border-radius: 25%; object-fit: cover; }
        .detail-brand-fa { color: #00ffff; font-size: 1.05rem; }
        body.light-theme .detail-brand-fa { color: #0b7285; }
        .detail-header-actions { display: flex; align-items: center; gap: 0.2rem; }
        .detail-icon-btn { padding: 0.4rem; border-radius: 0.6rem; color: var(--text-secondary); }
        .detail-icon-btn .mdi { font-size: 1.5rem; }
        .detail-icon-btn:hover { color: var(--text-primary); background: var(--gray-glass); }

        #detail-main { max-width: 1200px; }
        .detail-loading { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 5rem 0; text-align: center; }
        .detail-loading p { color: var(--text-secondary); }

        .detail-hero {
            position: relative; overflow: hidden; border-radius: 1.4rem;
            border: 1px solid var(--border-color-glass); box-shadow: var(--shadow);
            background: var(--bg-secondary-glass); margin-bottom: var(--space-lg);
        }
        .detail-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(1.1rem) saturate(1.2); transform: scale(1.25); opacity: 0.32; }
        .detail-hero-inner {
            position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: var(--space-lg);
            padding: var(--space-lg) var(--space-md);
            background: linear-gradient(to top, rgba(10, 12, 26, 0.85), rgba(10, 12, 26, 0.35));
        }
        body.light-theme .detail-hero-inner { background: linear-gradient(to top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55)); }
        .detail-poster { position: relative; flex-shrink: 0; margin: 0 auto; }
        .detail-poster img { width: 11rem; height: 16.5rem; object-fit: cover; border-radius: var(--border-radius); box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.55); display: block; }
        .detail-type-tag { position: absolute; top: 0.6rem; right: 0.6rem; padding: 0.2rem 0.7rem; border-radius: 1rem; font-size: 0.75rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.75); }
        .detail-hero-info { flex: 1 1 18rem; display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
        .detail-title { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 700; line-height: 1.35; font-family: var(--font-family-english), var(--font-family-persian); word-break: break-word; }
        .detail-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; color: var(--text-secondary); font-size: 0.9rem; }
        .detail-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
        .detail-score { color: var(--rating-color, var(--gold-color)) !important; font-weight: 700; padding: 0.15rem 0.7rem; border-radius: 1rem; background: rgba(255, 255, 255, 0.08); }
        /* Icon-only action bar: always ONE row, 5 equal cells inside one box */
        .detail-action-bar {
            display: flex; align-items: stretch; gap: 0.4rem; margin-top: 0.5rem;
            padding: 0.45rem; border-radius: 1rem;
            background: rgba(0, 0, 0, 0.28); border: 1px solid var(--border-color-glass);
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        }
        body.light-theme .detail-action-bar { background: rgba(0, 0, 0, 0.05); }
        .detail-icon-action {
            flex: 1 1 0; min-width: 0; aspect-ratio: 1 / 1; max-height: 3.1rem;
            display: flex; align-items: center; justify-content: center;
            border-radius: 0.75rem; cursor: pointer; text-decoration: none;
            background: var(--gray-glass); border: 1px solid var(--border-color-glass);
            color: var(--text-primary); transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
        }
        .detail-icon-action .mdi { font-size: 1.45rem; line-height: 1; }
        .detail-icon-action:hover { transform: translateY(-2px); }
        .detail-icon-action.download { color: var(--rating-good); background: var(--green-glass); border-color: rgba(34, 197, 94, 0.3); }
        .detail-icon-action.download:hover { background: var(--green-glow); color: #fff; box-shadow: 0 0 12px var(--green-glow); }
        .detail-icon-action.stream { color: var(--orange-color); background: var(--orange-glass); border-color: rgba(249, 115, 22, 0.3); }
        .detail-icon-action.stream:hover { background: var(--orange-glow); color: #fff; box-shadow: 0 0 12px var(--orange-glow); }
        .detail-icon-action.share { color: var(--accent-color); background: var(--blue-glass); border-color: rgba(59, 130, 246, 0.3); }
        .detail-icon-action.share:hover { background: var(--blue-glow); color: #fff; box-shadow: 0 0 12px var(--blue-glow); }
        .detail-icon-action.bookmark { color: var(--text-secondary); }
        .detail-icon-action.bookmark:hover { background: var(--gray-glow); color: var(--text-primary); }
        .detail-icon-action.bookmark.bookmarked { color: var(--gold-color); background: var(--gold-glass); border-color: rgba(255, 215, 0, 0.35); box-shadow: 0 0 12px var(--gold-glow); }
        .detail-icon-action.teaser { color: #c084fc; background: var(--lilac-glass); border-color: rgba(191, 172, 226, 0.3); }
        .detail-icon-action.teaser:hover { background: var(--lilac-glow); color: #fff; box-shadow: 0 0 12px var(--lilac-glow); }
        .detail-icon-action.disabled, .detail-icon-action:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

        /* Combined story + specs + cast dropdown (collapsed by default) */
        .detail-about-block { padding: var(--space-sm); }
        .detail-about-block .accordion-header { margin-top: 0; font-size: 1rem; font-weight: 700; }
        .detail-about-block .accordion-header span { display: inline-flex; align-items: center; gap: 0.45rem; }
        .detail-about-block .accordion-header span .mdi { font-size: 1.35rem; color: var(--accent-color); }
        .detail-about-block .accordion-panel.open { max-height: none; }
        .detail-subsection + .detail-subsection { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--border-color-glass); }
        .detail-subsection > h3 {
            display: flex; align-items: center; gap: 0.45rem;
            font-size: 1.02rem; font-weight: 700; margin-bottom: var(--space-md); color: var(--text-primary);
        }
        .detail-subsection > h3 .mdi { font-size: 1.25rem; color: var(--accent-color); }

        .detail-block {
            margin-bottom: var(--space-lg); padding: var(--space-md);
            border-radius: 1.2rem; background: var(--bg-secondary-glass);
            border: 1px solid var(--border-color-glass); box-shadow: var(--shadow);
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        }
        .detail-block > h2 {
            display: flex; align-items: center; gap: 0.5rem;
            font-size: 1.15rem; font-weight: 700; margin-bottom: var(--space-md);
            padding-bottom: 0.6rem; border-bottom: 1px solid var(--border-color-glass);
        }
        .detail-block > h2 .mdi { color: var(--accent-color); font-size: 1.4rem; }
        .detail-story { color: var(--text-secondary); font-size: 1.02rem; line-height: 2; white-space: pre-line; }
        .detail-empty { color: var(--text-secondary); padding: 0.5rem 0; }

        .detail-info-table { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
        @media (min-width: 800px) { .detail-info-table { grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; } }
        .detail-info-row {
            display: flex; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap;
            padding: 0.6rem 0.8rem; border-radius: 0.7rem; background: var(--gray-panel);
            border: 1px solid rgba(255, 255, 255, 0.06);
        }
        .detail-info-key { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-secondary); font-size: 0.86rem; font-weight: 700; flex-shrink: 0; min-width: 7rem; }
        .detail-info-key .mdi { font-size: 1.1rem; color: var(--accent-color); }
        .detail-info-value { color: var(--text-primary); font-size: 0.92rem; word-break: break-word; flex: 1; }

        .detail-people { display: flex; flex-direction: column; gap: var(--space-md); }
        .detail-people-group h4 { display: flex; align-items: center; gap: 0.4rem; font-size: 1rem; margin-bottom: 0.6rem; color: var(--text-secondary); }
        .detail-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
        .detail-chip { padding: 0.35rem 0.85rem; border-radius: 1.2rem; font-size: 0.85rem; background: var(--blue-glass); border: 1px solid rgba(59, 130, 246, 0.25); color: var(--text-primary); }
        .detail-chip.director { background: var(--gold-glass); border-color: rgba(255, 215, 0, 0.3); color: var(--gold-color); }

        #detail-links .quality-group { margin-bottom: var(--space-md); }
        #detail-links .accordion-header small { color: var(--text-secondary); font-weight: 400; }

        .detail-error { text-align: center; padding: var(--space-xl) var(--space-md); }
        .detail-error > .mdi { font-size: 3.5rem; color: var(--rating-bad); }
        .detail-error h2 { justify-content: center; border: none; margin-top: var(--space-md); }
        .detail-error p { color: var(--text-secondary); margin-bottom: var(--space-lg); line-height: 2; }
        .detail-error .install-cta { max-width: 18rem; margin: 0 auto; }

        .detail-footer {
            max-width: 1200px; margin: var(--space-xl) auto 0; padding: 0 var(--space-md) var(--space-xl);
            display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; align-items: center;
        }
        .detail-footer a {
            display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none;
            padding: 0.7rem 1.2rem; border-radius: 0.9rem; font-weight: 700; font-size: 0.9rem;
            border: 1px solid var(--border-color-glass);
        }
        .detail-footer-home { color: var(--text-primary); background: var(--gray-glass); }

        @media (max-width: 480px) {
            .detail-hero-inner { padding: var(--space-md) var(--space-sm); }
            .detail-poster img { width: 9.5rem; height: 14.25rem; }
            .detail-hero-info { text-align: center; align-items: center; }
            .detail-meta, .genres { justify-content: center; }
            .detail-action-bar { width: 100%; gap: 0.3rem; padding: 0.35rem; }
            .detail-icon-action .mdi { font-size: 1.3rem; }
            .install-popup-text span { display: none; }
        }