 :root {
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --primary-glow: rgba(99, 102, 241, 0.2);
            --bg: #0b0f1a;
            --bg-secondary: #111827;
            --text: #f1f5f9;
            --text-secondary: #94a3b8;
            --muted: #64748b;
            --card-bg: #1e293b;
            --card-hover: #334155;
            --border: rgba(255, 255, 255, 0.08);
            --shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
            --radius: 16px;
            --transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
        }

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

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.5;
            min-height: 100vh;
        }

        /* ========== TOPBAR HIDDEN / REVEAL ========== */
        .topbar-wrapper {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            transform: translateY(0);
        }

        .topbar-wrapper.hide {
            transform: translateY(-100%);
        }

        .topbar {
            background: rgba(11, 15, 26, 0.85);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--border);
            padding: 0.65rem 1.25rem;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
        }

        /* brand compacto */
        .brand {
            font-size: 1.3rem;
            font-weight: 800;
            text-decoration: none;
            background: linear-gradient(135deg, #818cf8, #c084fc);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            letter-spacing: -0.3px;
            white-space: nowrap;
        }

        /* buscador reducido */
        .nav-search {
            flex: 1;
            max-width: 320px;
            position: relative;
        }

        .nav-search input {
            width: 100%;
            padding: 0.5rem 2rem 0.5rem 1rem;
            border-radius: 40px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.05);
            color: var(--text);
            font-size: 0.8rem;
            font-weight: 500;
            transition: var(--transition);
        }

        .nav-search input:focus {
            border-color: var(--primary);
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 3px var(--primary-glow);
            outline: none;
        }

        .nav-search .search-icon {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 1rem;
            color: var(--text-secondary);
            pointer-events: none;
        }

        /* filtros compactos */
        .filters-wrapper {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }

        .genre-filter {
            padding: 0.45rem 0.9rem;
            border-radius: 40px;
            border: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.04);
            color: var(--text);
            font-size: 0.7rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            backdrop-filter: blur(4px);
        }

        .genre-filter:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: var(--primary);
        }

        .btn-theme {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid var(--border);
            padding: 0.45rem 0.9rem;
            border-radius: 40px;
            cursor: pointer;
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--text-secondary);
            transition: var(--transition);
            white-space: nowrap;
        }

        .btn-theme:hover {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text);
        }

        /* tiny indicator para saber que la barra existe */
        .topbar-peek {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary), var(--primary-dark));
            z-index: 1001;
            opacity: 0.6;
            pointer-events: none;
            transition: opacity 0.2s;
        }

        /* Hero minimalista (aprovecha espacio) */
        .hero-minimal {
            padding: 1.8rem 1.5rem 0.8rem;
            text-align: center;
            margin-top: 7rem;
            margin-bottom: 4rem;
        }

        .hero-minimal h1 {
            font-size: 1.8rem;
            font-weight: 700;
            background: linear-gradient(135deg, #e2e8f0, #a5b4fc);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            letter-spacing: -0.02em;
        }

        .hero-minimal p {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-top: 0.3rem;
        }

        /* Secciones modernas con título compacto */
        .section {
            max-width: 1300px;
            margin: 2rem auto 2.5rem;
            padding: 0 1.2rem;
        }

        .section-header {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            margin-bottom: 1rem;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .section-title {
            font-size: 1.25rem;
            font-weight: 700;
            letter-spacing: -0.3px;
            background: linear-gradient(135deg, #cbd5e1, #a5b4fc);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            border-left: 3px solid var(--primary);
            padding-left: 12px;
        }

        .section-count {
            font-size: 0.7rem;
            background: rgba(99, 102, 241, 0.15);
            padding: 0.2rem 0.7rem;
            border-radius: 40px;
            color: var(--primary);
            font-weight: 500;
        }

        /* Grid responsivo más denso */
        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1.2rem;
        }

        /* Tarjetas modernas */
        .card {
            background: transparent;
            border-radius: var(--radius);
            transition: var(--transition);
            cursor: pointer;
            position: relative;
        }

        .card:hover {
            transform: translateY(-4px);
        }

        .cover-wrapper {
            position: relative;
            width: 100%;
            aspect-ratio: 2 / 3;
            border-radius: 14px;
            overflow: hidden;
            box-shadow: var(--shadow);
            background: #0f172a;
        }

        .cover {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .card:hover .cover {
            transform: scale(1.03);
        }

        .status-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            background: var(--primary);
            color: white;
            font-size: 0.6rem;
            font-weight: 700;
            padding: 0.2rem 0.6rem;
            border-radius: 30px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            backdrop-filter: blur(4px);
            background: rgba(99, 102, 241, 0.9);
            z-index: 2;
        }

        .status-badge.finished {
            background: rgba(239, 68, 68, 0.9);
        }

        .card-body {
            padding: 0.6rem 0.2rem 0.2rem;
        }

        .title {
            font-size: 0.85rem;
            font-weight: 600;
            line-height: 1.3;
            margin-bottom: 0.2rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            color: var(--text);
        }

        .author {
            font-size: 0.7rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .meta-info {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            margin-top: 0.5rem;
            font-size: 0.65rem;
            color: var(--muted);
            flex-wrap: wrap;
        }

        .stat-group {
            display: inline-flex;
            align-items: center;
            gap: 3px;
        }

        .stat-icon {
            width: 14px;
            height: 14px;
            opacity: 0.7;
        }

        .heart-icon {
            fill: none;
            stroke: currentColor;
            stroke-width: 1.5;
        }

        .rating-count, .collections-count, .likes-count {
            font-weight: 500;
        }

        /* carga y errores */
        .loading-skeleton {
            text-align: center;
            padding: 3rem;
            color: var(--text-secondary);
        }

        /* responsive + espacio para topbar fija */
        body {
            padding-top: 0;
        }

        @media (max-width: 640px) {
            .topbar {
                padding: 0.5rem 0.9rem;
                gap: 0.5rem;
            }
            .brand {
                font-size: 1.1rem;
            }
            .nav-search {
                max-width: 200px;
            }
            .genre-filter, .btn-theme {
                font-size: 0.65rem;
                padding: 0.35rem 0.7rem;
            }
            .hero-minimal {
                padding: 1.2rem 1rem 0.5rem;
            }
            .hero-minimal h1 {
                font-size: 1.5rem;
            }
            .section {
                padding: 0 1rem;
                margin: 1.5rem auto;
            }
            .grid {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
                gap: 1rem;
                 margin-bottom: 3rem;
            }
            .title {
                font-size: 0.8rem;
            }
        }

        /* animación sutil para la barra peek */
        .topbar-peek {
            transition: opacity 0.2s;
        }
