        :root {
            --primary-color: #050505;
            --primary-hover: #2563eb;
            --primary-dark: #0f172a;
            --primary-light: #94a3b8;
            --text-color: #f8fafc;
            --text-muted: #94a3b8;
            --background-color: #0a0a0a;
            --card-bg: #141212;
            --card-border: #1e293b;
            --shadow: rgba(0, 0, 0, 0.4);
            --popup-bg: #1e293b;
            --header-bg: #0a0a0a;
            --header-color: #ffffff;
            --accent-glow: rgba(59, 130, 246, 0.2);
            --radius-lg: 16px;
            --radius-md: 12px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            background-color: var(--background-color);
            background-image: 
                linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
            background-size: 50px 50px;
            color: var(--text-color);
            line-height: 1.5;
            min-height: 100vh;
            overflow-x: hidden;
        }

        .quote-container {
            max-width: 800px;
            margin: 2rem auto 0;
            padding: 1.5rem;
            background: rgba(255, 255, 255, 0.02);
            border: 1px border var(--card-border);
            border-radius: var(--radius-md);
            text-align: center;
            position: relative;
            transition: opacity 0.5s ease;
        }

        #quoteText {
            font-style: italic;
            font-size: 1.1rem;
            color: var(--text-color);
            margin-bottom: 0.5rem;
            display: block;
        }

        #quoteAuthor {
            font-size: 0.85rem;
            color: var(--primary-hover);
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        header {
            background: rgba(15, 23, 42, 0.8);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            color: var(--header-color);
            padding: 0.75rem 1rem;
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 1px solid var(--card-border);
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1400px;
            margin: 0 auto;
            gap: 1.5rem;
        }

        .logo {
            font-size: 1.6rem;
            font-weight: 900;
            display: flex;
            align-items: center;
            gap: 10px;
            letter-spacing: -0.5px;
            cursor: pointer;
            flex-shrink: 0;
            text-shadow: 0 0 1px rgba(255,255,255,0.3);
        }

        .logo i { color: #ffffff; }

        .search-container {
            display: flex;
            gap: 8px;
            flex: 1;
            max-width: 700px;
        }

        #searchBar {
            padding: 0.75rem 1.25rem;
            border-radius: var(--radius-md);
            border: 1px solid var(--card-border);
            flex-grow: 1;
            font-size: 15px;
            background: rgba(255, 255, 255, 0.03);
            color: white;
            transition: all 0.2s ease;
        }

        #searchBar:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.07);
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }

        #sortOptions {
            padding: 0.85rem 1.2rem;
            border-radius: 12px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            font-size: 16px;
            background: #1e293b;
            color: white;
            min-width: 140px;
            cursor: pointer;
            font-weight: 500;
        }

        #settings {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            padding: 0.85rem 1.8rem;
            border-radius: 12px;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.3s;
            font-weight: 600;
        }

        #settings:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }

        .stats-bar {
            padding: 0.75rem 1rem;
            background: rgba(15, 23, 42, 0.4);
            border-bottom: 1px solid var(--card-border);
        }

        .stats-content {
            max-width: 1400px;
            margin: 0 auto;
            font-size: 0.875rem;
            color: var(--text-muted);
            font-weight: 500;
        }

        main {
            max-width: 1400px;
            margin: 0 auto;
            padding: 1.5rem 1rem 4rem;
        }

        #container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 1.25rem;
        }

        @media (min-width: 640px) {
            #container { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
        }

        .zone-item {
            background-color: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: var(--radius-lg);
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            position: relative;
        }

        .zone-item:hover {
            transform: translateY(-4px);
            border-color: var(--primary-color);
            box-shadow: 0 12px 24px -10px rgba(0,0,0,0.5);
        }

        .zone-item.featured { border: 1.5px solid var(--primary-color); }

        .zone-item.featured::before {
            content: "FEATURED";
            position: absolute;
            top: 8px;
            right: 8px;
            background: var(--primary-color);
            color: white;
            padding: 2px 8px;
            border-radius: 6px;
            font-size: 0.65rem;
            font-weight: 800;
            z-index: 10;
        }

        .zone-item img {
            width: 100%;
            height: 160px;
            object-fit: cover;
            transition: transform 0.5s ease;
            filter: grayscale(20%);
        }

        .zone-item:hover img { transform: scale(1.08); }

        .zone-info {
            padding: 1rem;
            background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.2));
        }

        .zone-name {
            font-weight: 600;
            font-size: 0.95rem;
            color: var(--text-color);
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-align: center;
        }

        #zoneViewer {
            position: fixed;
            inset: 0;
            background-color: #000;
            z-index: 10000;
            display: none;
            flex-direction: column;
        }

        .zone-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #0f172a;
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #1e293b;
        }

        .zone-title {
            display: flex;
            flex-direction: column;
            overflow: hidden;
            margin-right: 1rem;
        }

        #zoneName {
            font-size: 1.1rem;
            font-weight: 700;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        #zoneAuthor {
            font-size: 0.75rem;
            color: var(--text-muted);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .zone-controls {
            display: flex;
            gap: 6px;
        }

        .zone-controls button {
            background: #1e293b;
            border: 1px solid #334155;
            color: white;
            padding: 0.6rem 0.8rem;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
        }

        .zone-controls button:hover {
            background: var(--primary-color);
            border-color: var(--primary-color);
        }

        .zone-controls button span { display: none; }

        @media (min-width: 1024px) {
            .zone-controls button span { display: inline; }
            .zone-controls { gap: 10px; }
        }

        #zoneFrame { flex-grow: 1; border: none; background: #fff; }

        #popupOverlay {
            position: fixed;
            inset: 0;
            background-color: rgba(2, 6, 23, 0.85);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            backdrop-filter: blur(8px);
            padding: 1rem;
        }

        .popup {
            background-color: var(--card-bg);
            border-radius: var(--radius-lg);
            width: 100%;
            max-width: 440px;
            animation: popupIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            border: 1px solid var(--card-border);
            overflow-y: auto;
            max-height: 90vh;
        }

        @keyframes popupIn {
            from { opacity: 0; transform: scale(0.95) translateY(10px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        .popup-header {
            padding: 1.25rem 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--card-border);
            position: sticky;
            top: 0;
            background: var(--card-bg);
            z-index: 10;
        }

        .btn-group {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.75rem;
        }

        .btn {
            padding: 0.85rem;
            border-radius: var(--radius-md);
            border: 1px solid transparent;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-weight: 600;
        }

        .btn-primary { background: var(--primary-color); color: white; }
        .btn-primary:hover { background: var(--primary-hover); }

        .btn-secondary { background: #1e293b; color: white; border-color: #334155; }
        .btn-secondary:hover { background: #334155; }

        .loading {
            grid-column: 1 / -1;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 4rem 0;
            color: var(--text-muted);
        }

        .loading i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1rem; }

        .setting-item { margin-bottom: 1.25rem; }
        .setting-label { display: block; margin-bottom: 0.5rem; font-size: 0.85rem; color: #94a3b8; font-weight: 600; }
        .setting-input { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #334155; background: #0f172a; color: white; font-size: 14px; }
        
        .credits-section {
            margin-top: 1.5rem;
            padding-top: 1rem;
            border-top: 1px solid var(--card-border);
            text-align: center;
        }

        .credits-list { font-size: 0.85rem; color: #94a3b8; line-height: 1.8; }
        .credits-list strong { color: white; }

        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: var(--background-color); }
        ::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 10px; }
