
            /* Self-hosted Outfit font */
            @font-face {
                font-family: 'Outfit';
                font-style: normal;
                font-weight: 400 800;
                font-display: swap;
                src: url(/fonts/outfit-latin.woff2) format('woff2');
                unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
            }
            @font-face {
                font-family: 'Outfit';
                font-style: normal;
                font-weight: 400 800;
                font-display: swap;
                src: url(/fonts/outfit-latin-ext.woff2) format('woff2');
                unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
            }

            :root {
                --bg: #f5f7fa;
                --bg-card: #ffffff;
                --bg-hover: #f8fafc;
                --text: #1a202c;
                --text-secondary: #4a5568;
                --text-light: #718096;
                --text-muted: #94a3b8;
                --link: #4c51bf;
                --link-hover: #434190;
                --border: #e2e8f0;
                --border-light: #f1f5f9;
                --header-bg: rgba(255,255,255,0.9);
                --tag-bg: #edf2f7;
                --tag-text: #4a5568;
                --time-bg: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
                --time-text: #4338ca;
                --time-sep: #a5b4fc;
            }

            [data-theme="dark"] {
                --bg: #0f172a;
                --bg-card: #1e293b;
                --bg-hover: #334155;
                --text: #f1f5f9;
                --text-secondary: #cbd5e1;
                --text-light: #94a3b8;
                --text-muted: #64748b;
                --link: #818cf8;
                --link-hover: #a5b4fc;
                --border: #334155;
                --border-light: #1e293b;
                --header-bg: rgba(15, 23, 42, 0.9);
                --tag-bg: #334155;
                --tag-text: #cbd5e1;
                --time-bg: linear-gradient(135deg, #312e81 0%, #3730a3 100%);
                --time-text: #c7d2fe;
                --time-sep: #6366f1;
            }

            body {
                font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
                font-size: 15px;
                line-height: 1.6;
                color: var(--text);
                background: var(--bg);
                margin: 0;
                padding: 0;
                -webkit-font-smoothing: antialiased;
                transition: background 0.3s ease, color 0.3s ease;
            }
            a { color: inherit; text-decoration: none; transition: all 0.2s; }
            a:hover { color: var(--link); }

            h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--text); line-height: 1.2; }

            .container { max-width: 1000px; margin: 0 auto; padding: 20px; }
            .main-content { width: 100%; }
            /* Sidebar removed */

            /* Header */
            header {
                background: var(--header-bg);
                backdrop-filter: blur(10px);
                border-bottom: 1px solid var(--border);
                padding: 16px 0;
                position: sticky;
                top: 0;
                z-index: 100;
            }
            .header-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
            .logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.05em; background: linear-gradient(135deg, #4c51bf 0%, #667eea 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
            .nav { display: flex; gap: 24px; font-size: 0.95rem; font-weight: 500; align-items: center; }
            .nav a { color: var(--text-secondary); position: relative; }
            .nav a:hover { color: var(--text); }
            .nav a.active::after { content: ''; position: absolute; bottom: -20px; left: 0; width: 100%; height: 2px; background: #4c51bf; }

            /* Search */
            .search-container { position: relative; display: flex; align-items: center; }
            .search-input {
                box-sizing: border-box;
                background: transparent;
                border: 1px solid transparent;
                color: transparent;
                padding: 6px 0 6px 32px;
                border-radius: 20px;
                font-size: 0.85rem;
                width: 32px;
                outline: none;
                transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                font-family: inherit;
                cursor: pointer;
            }
            .search-input:hover { background: var(--border-light); }
            .search-input:focus {
                background: var(--bg-card);
                border-color: var(--link);
                color: var(--text);
                width: 200px;
                padding-right: 12px;
                box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
                cursor: text;
            }
            .search-icon {
                position: absolute;
                left: 10px;
                width: 14px;
                height: 14px;
                color: var(--text-light);
                pointer-events: none;
            }

            /* Theme Toggle */
            .theme-toggle {
                background: var(--tag-bg);
                border: none;
                padding: 6px 10px;
                border-radius: 20px;
                cursor: pointer;
                display: flex;
                align-items: center;
                gap: 6px;
                font-size: 0.8rem;
                color: var(--text-secondary);
                transition: all 0.2s;
            }
            .theme-toggle:hover { background: var(--border); }
            .theme-toggle svg { width: 16px; height: 16px; }
            .sun-icon { display: none; }
            .moon-icon { display: block; }
            [data-theme="dark"] .sun-icon { display: block; }
            [data-theme="dark"] .moon-icon { display: none; }

            /* Category Bar */
            .category-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; scrollbar-width: none; }
            .category-bar::-webkit-scrollbar { display: none; }
            .chip { padding: 4px 14px; border-radius: 20px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-light); font-size: 0.85rem; font-weight: 500; transition: all 0.2s; white-space: nowrap; }
            .chip:hover { border-color: var(--link); color: var(--link); }
            .chip.active { background: #4c51bf; color: #fff; border-color: #4c51bf; }

            /* Sections */
            .home-section { margin-bottom: 40px; }
            .section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
            .section-title { font-size: 1.25rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
            .more-link { font-size: 0.85rem; color: var(--link); font-weight: 600; }
            .more-link:hover { text-decoration: underline; }

            /* Badges */
        .badge-group {
            position: absolute;
            top: 10px;
            right: 10px;
            display: flex;
            gap: 6px;
            z-index: 10;
        }
        .badge {
            font-size: 0.6rem;
            font-weight: 800;
            padding: 2px 5px;
            border-radius: 4px;
            text-transform: uppercase;
            box-shadow: 0 1px 2px rgba(0,0,0,0.2);
            backdrop-filter: blur(4px);
            line-height: 1;
        }
        .badge-18 {
            background: #dc2626;
            color: white;
            border: 1px solid rgba(255,255,255,0.2);
        }
        .badge-type {
            background: rgba(255,255,255,0.9);
            color: #1a202c;
            border: 1px solid rgba(255,255,255,0.5);
        }
        [data-theme="dark"] .badge-type {
            background: rgba(30, 41, 59, 0.9);
            color: #f1f5f9;
            border: 1px solid rgba(255,255,255,0.1);
        }

        /* Age Verification Modal */
        .modal-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.85); z-index: 10000;
            display: flex; align-items: center; justify-content: center;
            backdrop-filter: blur(8px);
        }
        .modal-content {
            background: var(--bg-card); padding: 40px; border-radius: 16px;
            text-align: center; max-width: 400px; width: 90%;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            border: 1px solid var(--border);
        }
        .modal-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 16px; color: var(--text); }
        .modal-text { color: var(--text-secondary); margin-bottom: 30px; line-height: 1.6; font-size: 1rem; }
        .modal-actions { display: flex; gap: 16px; justify-content: center; }
        .btn {
            padding: 10px 24px; border-radius: 8px; font-weight: 600; cursor: pointer;
            transition: all 0.2s; border: none; font-size: 0.95rem;
        }
        .btn-primary { background: #dc2626; color: white; }
        .btn-primary:hover { background: #b91c1c; }
        .btn-secondary { background: var(--bg-hover); color: var(--text); }
        .btn-secondary:hover { background: var(--border); }

        /* Card Grid */
            .grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 24px; }
            .card {
                background: var(--bg-card);
                border-radius: 6px;
                overflow: hidden;
                box-shadow: 0 1px 3px rgba(0,0,0,0.05);
                border: 1px solid var(--border);
                transition: all 0.2s ease;
                display: flex;
                flex-direction: column;
                height: 100%;
                text-decoration: none;
            }
            .card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
            .card-img {
                width: 100%;
                aspect-ratio: 2/3;
                background: var(--border-light);
                position: relative;
                overflow: hidden;
            }
            .card-img img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                transition: transform 0.5s ease, opacity 0.3s ease;
                display: block;
                opacity: 0;
            }
            .card-img img.loaded { opacity: 1; }
            .card:hover img { transform: scale(1.06); }
            .card-content { padding: 8px; flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-card); }
            .card-title { font-size: 0.85rem; margin-bottom: 2px; color: var(--text); font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
            .card-subtitle { font-size: 0.72rem; color: var(--text-light); margin-bottom: 6px; font-weight: 400; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
            .card-meta { margin-top: auto; font-size: 0.65rem; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; }

            .tag-pill {
                display: inline-block;
                background: var(--tag-bg);
                color: var(--tag-text);
                padding: 1px 5px;
                border-radius: 3px;
                font-size: 0.6rem;
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.02em;
            }

            /* Detail Page */
            /* Detail Page */
            .detail-header { display: grid; grid-template-columns: 200px 1fr; gap: 30px; margin-bottom: 40px; background: var(--bg-card); padding: 30px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); align-items: start; }
            .poster-lg { border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.1); background: var(--border-light); }
            .poster-lg img { width: 100%; display: block; opacity: 0; transition: opacity 0.3s ease; }
            .poster-lg img.loaded { opacity: 1; }
            .info h1 { font-size: 2.25rem; margin-bottom: 8px; letter-spacing: -0.025em; color: var(--text); }
            .info h2 { font-size: 1.25rem; color: var(--text-light); font-weight: 400; margin-bottom: 16px; }
            .meta-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
            .meta-item { background: var(--tag-bg); color: var(--tag-text); padding: 4px 10px; border-radius: 6px; font-size: 0.85rem; font-weight: 500; }
            .meta-label { font-size: 0.85rem; color: var(--text-light); margin-right: 4px; }
            .hover-effect:hover { background: var(--border); }

            .desc { font-size: 1rem; color: var(--text-secondary); line-height: 1.7; }

            /* Timeline */
            .section-title { font-size: 1.25rem; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; color: var(--text); }
            .timeline { background: var(--bg-card); border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); overflow: hidden; }
            .mark-item {
                padding: 20px 24px;
                border-bottom: 1px solid var(--border-light);
                display: flex;
                align-items: flex-start;
                gap: 16px;
                transition: all 0.2s ease;
                position: relative;
            }
            .mark-item:hover { background: var(--bg-hover); }
            .mark-item:last-child { border-bottom: none; }
            .mark-index {
                width: 28px;
                height: 28px;
                background: linear-gradient(135deg, #4c51bf 0%, #667eea 100%);
                color: #fff;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 0.75rem;
                font-weight: 700;
                flex-shrink: 0;
                box-shadow: 0 2px 8px rgba(76, 81, 191, 0.3);
            }
            .ep-badge {
                background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
                color: #fff;
                font-size: 0.7rem;
                font-weight: 700;
                padding: 2px 8px;
                border-radius: 4px;
                flex-shrink: 0;
                letter-spacing: 0.5px;
            }
            .time-badge {
                display: flex;
                align-items: center;
                gap: 6px;
                font-family: 'Monaco', 'Consolas', monospace;
                font-weight: 600;
                font-size: 0.85rem;
                flex-shrink: 0;
                min-width: 140px;
            }
            .time-start, .time-end {
                background: var(--time-bg);
                color: var(--time-text);
                padding: 6px 10px;
                border-radius: 6px;
            }
            .time-sep {
                color: var(--time-sep);
                font-size: 0.9rem;
            }
            .mark-content {
                flex: 1;
                font-size: 0.95rem;
                color: var(--text-secondary);
                line-height: 1.7;
                padding-top: 4px;
            }
            .mark-content p { margin: 0; }
            .mark-en { color: var(--text-light); font-size: 0.95rem; font-style: italic; }

            /* Ads - Hidden placeholders */
            .ad-slot { 
                background: transparent; 
                display: flex; 
                align-items: center; 
                justify-content: center; 
                margin-bottom: 20px; 
                min-height: 1px; 
            }
            .ad-header { width: 100%; max-width: 970px; height: 90px; margin: 20px auto; }
            .ad-sidebar { width: 300px; height: 250px; margin: 0 auto 20px; background: #fafafa; border: 1px solid #f0f0f0; display: none; }
            .ad-sidebar.visible { display: block; } 
            .google-ad-placeholder { display: none; }

            /* Utility */
            .pagination { display: flex; gap: 6px; margin-top: 40px; justify-content: center; align-items: center; flex-wrap: wrap; }
            .page-link {
                padding: 8px 12px;
                border: 1px solid var(--border);
                background: var(--bg-card);
                border-radius: 8px;
                font-weight: 500;
                font-size: 0.9rem;
                color: var(--text-secondary);
                min-width: 40px;
                text-align: center;
                transition: all 0.2s ease;
            }
            .page-link:hover { background: var(--tag-bg); text-decoration: none; transform: translateY(-1px); }
            .page-link.active { background: #4c51bf; color: #fff; border-color: #4c51bf; box-shadow: 0 2px 8px rgba(76, 81, 191, 0.3); }
            .page-link.page-nav { padding: 8px 10px; font-size: 1rem; }
            .page-ellipsis { color: var(--text-muted); padding: 0 4px; font-weight: 500; }

            /* Footer */
            footer { background: var(--bg-card); border-top: 1px solid var(--border); margin-top: 60px; padding: 40px 0; color: var(--text-light); font-size: 0.9rem; }

            /* Sidebar Widget */
            .widget { background: var(--bg-card); border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 24px; border: 1px solid var(--border); }
            .widget-title { font-size: 0.95rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border-light); padding-bottom: 8px; }
            .tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
            .tag-cloud a { background: var(--tag-bg); color: var(--tag-text); padding: 4px 10px; border-radius: 20px; font-size: 0.85rem; }
            .tag-cloud a:hover { background: var(--border); text-decoration: none; }

            /* No highlights state */
            .no-highlights { color: var(--text-light); text-align: center; padding: 40px; background: var(--bg-hover); }

            /* Explore Page */
            .explore-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
            .explore-count { font-size: 0.85rem; color: var(--text-light); font-weight: 500; }
            .explore-filters {
                background: var(--bg-card);
                border: 1px solid var(--border);
                border-radius: 12px;
                padding: 16px 20px;
                margin-bottom: 24px;
                display: flex;
                flex-direction: column;
                gap: 14px;
            }
            .filter-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
            .filter-group { display: flex; align-items: center; gap: 8px; }
            .filter-group-tags {
                width: 100%;
                padding-top: 12px;
                border-top: 1px solid var(--border-light);
                margin-top: -2px;
            }
            .filter-group-tags .filter-chips { flex: 1; min-width: 0; }
            .filter-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
            .filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
            button.chip { cursor: pointer; font-family: inherit; }
            .filter-select {
                -webkit-appearance: none;
                appearance: none;
                background-color: var(--bg);
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2394a3b8' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
                background-repeat: no-repeat;
                background-position: right 12px center;
                border: 1px solid var(--border);
                color: var(--text);
                padding: 5px 32px 5px 14px;
                border-radius: 20px;
                font-size: 0.85rem;
                font-weight: 500;
                cursor: pointer;
                outline: none;
                font-family: inherit;
                transition: border-color 0.2s, box-shadow 0.2s;
            }
            .filter-select:hover { border-color: var(--link); }
            .filter-select:focus { border-color: var(--link); box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.15); }
            .filter-select option { background: var(--bg-card); color: var(--text); }
            .explore-empty { text-align: center; color: var(--text-light); padding: 60px 20px; }
            .reset-filters-btn {
                display: inline-flex;
                align-items: center;
                gap: 6px;
                padding: 8px 14px;
                background: transparent;
                color: var(--text-light);
                border: 1px solid transparent;
                border-radius: 20px;
                font-size: 0.85rem;
                font-weight: 500;
                text-decoration: none;
                transition: all 0.2s ease;
                white-space: nowrap;
                opacity: 0.8;
            }
            .reset-filters-btn:hover {
                background: var(--bg-hover);
                color: var(--text);
                opacity: 1;
            }
            .reset-filters-btn svg { flex-shrink: 0; }

            /* Mobile Bottom Nav */
            .mobile-bottom-nav {
                display: none;
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                background: var(--bg-card);
                border-top: 1px solid var(--border);
                justify-content: space-around;
                align-items: center;
                height: 60px;
                z-index: 1000;
                padding-bottom: env(safe-area-inset-bottom);
            }
            .mobile-nav-item {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                font-size: 0.7rem;
                font-weight: 500;
                color: var(--text-secondary);
                text-decoration: none;
                flex: 1;
                height: 100%;
            }
            .mobile-nav-item svg { width: 24px; height: 24px; margin-bottom: 2px; }
            .mobile-nav-item.active { color: #4c51bf; }

            @media (max-width: 900px) {
                .container { flex-direction: column; padding: 16px; }
                /* Hide header text links on mobile */
                .nav > a:not(.chip) { display: none; }
                /* Show bottom nav */
                .mobile-bottom-nav { display: flex; }
                body { padding-bottom: 70px; }
                
                .sidebar { width: 100%; }
                .grid { grid-template-columns: repeat(4, 1fr); }
                .detail-header { grid-template-columns: 1fr; }
                .poster-lg { width: 200px; margin: 0 auto; }
                .info { text-align: center; }
                .meta-row { justify-content: center; }
                .mark-item { flex-wrap: wrap; padding: 16px; }
                .time-badge { min-width: auto; width: 100%; justify-content: flex-start; margin-bottom: 8px; order: 3; }
                .mark-index { order: 1; }
                .ep-badge { order: 2; }
                .mark-content { order: 4; width: 100%; padding-left: 44px; padding-top: 0; }
            }
            @media (max-width: 600px) {
                .grid { grid-template-columns: repeat(2, 1fr); }
            }
            @media (max-width: 400px) {
                .grid { grid-template-columns: repeat(2, 1fr); }
            }
        
body { font-family: 'Outfit', sans-serif; }
