        :root {
            --bg-color: #0f172a;
            --glass-bg: rgba(30, 41, 59, 0.7);
            --glass-border: rgba(255, 255, 255, 0.08);
            --glass-highlight: rgba(255, 255, 255, 0.15);
            --primary: #6366f1;
            --accent: #ec4899;
            --text-main: #f8fafc;
            --text-sub: #94a3b8;
            --card-radius: 20px;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', 'Noto Sans SC', sans-serif; -webkit-tap-highlight-color: transparent; }

        body {
            background-color: var(--bg-color);
            color: var(--text-main);
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
        }

        /* 动态背景光效 */
        .bg-glow {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden;
        }
        .glow-blob {
            position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
            animation: float 15s infinite alternate;
        }
        .glow-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: #4f46e5; }
        .glow-2 { bottom: -10%; right: -10%; width: 40vw; height: 40vw; background: #db2777; animation-delay: -5s; }
        .glow-3 { top: 40%; left: 40%; width: 30vw; height: 30vw; background: #0ea5e9; animation-delay: -10s; }

        @keyframes float { 0% { transform: translate(0,0); } 100% { transform: translate(30px, 50px); } }

        /* 滚动条美化 */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

        /* 加载遮罩 */
        #preloader {
            position: fixed; inset: 0; background: #0f172a; z-index: 9999;
            display: flex; justify-content: center; align-items: center; flex-direction: column;
            transition: opacity 0.8s ease;
        }
        .loader-logo { font-size: 40px; font-weight: 800; background: linear-gradient(to right, #6366f1, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: pulse 2s infinite; }
        .loader-bar { width: 150px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 4px; margin-top: 20px; overflow: hidden; }
        .loader-progress { width: 0%; height: 100%; background: var(--primary); animation: progress 1.5s ease-in-out forwards; }
        @keyframes progress { 0% { width: 0%; } 100% { width: 100%; } }
        @keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.95); opacity: 0.7; } }

        /* 通用毛玻璃类 */
        .glass {
            background: var(--glass-bg);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--glass-border);
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
        }

        /* 侧边栏 */
        .sidebar {
            width: 280px; height: 100vh; position: fixed; left: 0; top: 0;
            z-index: 100; display: flex; flex-direction: column;
            border-right: 1px solid var(--glass-border);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(15px);
        }
        
        .sidebar-head {
            height: 200px; position: relative; display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            background: url('https://image.lolimi.cn/2025/04/04/67ef567e77960.jpg') center/cover;
        }
        .sidebar-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, #0f172a, transparent); }
        .avatar {
            width: 80px; height: 80px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.8);
            z-index: 1; box-shadow: 0 0 20px rgba(99, 102, 241, 0.5); object-fit: cover;
            transition: 0.3s;
        }
        .avatar:hover { transform: rotate(360deg); }
        .site-info { z-index: 1; text-align: center; margin-top: 10px; }
        .site-info h2 { font-size: 20px; font-weight: 700; color: white; }
        .site-info p { font-size: 12px; color: #cbd5e1; }

        .sidebar-nav { flex: 1; overflow-y: auto; padding: 20px 15px; }
        .nav-item {
            display: flex; align-items: center; padding: 14px 16px; margin-bottom: 5px;
            color: var(--text-sub); text-decoration: none; border-radius: 12px;
            transition: 0.3s; font-size: 14px; font-weight: 500;
        }
        .nav-item i { width: 24px; margin-right: 10px; font-size: 16px; transition: 0.3s; }
        .nav-item:hover, .nav-item.active { background: rgba(99, 102, 241, 0.1); color: white; }
        .nav-item:hover i { color: var(--accent); transform: scale(1.1); }

        /* 主内容区 */
        .main { margin-left: 280px; padding: 30px; min-height: 100vh; position: relative; z-index: 1; }
        
        /* 顶部导航 */
        .header {
            display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px;
            padding: 20px; border-radius: var(--card-radius);
        }
        .welcome h1 { font-size: 24px; font-weight: 700; background: linear-gradient(to right, #fff, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
        .search-wrap { position: relative; width: 350px; }
        .search-input {
            width: 100%; padding: 14px 20px 14px 45px; background: rgba(255,255,255,0.05);
            border: 1px solid var(--glass-border); border-radius: 50px; color: white;
            transition: 0.3s; outline: none;
        }
        .search-input:focus { background: rgba(255,255,255,0.1); border-color: var(--primary); box-shadow: 0 0 15px rgba(99, 102, 241, 0.3); }
        .search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-sub); }

        /* 合作伙伴 (服务器) */
        .partners-bar { margin-bottom: 40px; }
        .sec-title { font-size: 14px; letter-spacing: 1px; color: var(--accent); margin-bottom: 15px; text-transform: uppercase; font-weight: 700; display: flex; align-items: center; gap: 10px; }
        .sec-title::after { content: ''; height: 1px; flex: 1; background: linear-gradient(to right, var(--glass-border), transparent); }
        
        .partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
        .partner-card {
            display: flex; align-items: center; gap: 15px; padding: 20px; border-radius: 16px;
            text-decoration: none; color: white; transition: 0.3s; position: relative; overflow: hidden;
        }

        .partner-card::before {
            content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
            transform: translateX(-100%); transition: 0.5s;
        }
        .partner-card:hover::before { transform: translateX(100%); }
        .partner-card:hover { transform: translateY(-5px); border-color: var(--primary); }
        .partner-img { width: 40px; height: 40px; border-radius: 8px; }

        /* API 列表 */
        .api-container { min-height: 400px; } /* 防止高度塌陷 */
        .api-grid {
            display: grid; 
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
            gap: 25px;
            width: 100%;
        }
        
        .api-card {
            border-radius: var(--card-radius); padding: 25px;
            display: flex; flex-direction: column; position: relative;
            transition: 0.4s; height: 100%;
        }
        .api-card:hover {
            background: rgba(30, 41, 59, 0.9);
            transform: translateY(-10px) scale(1.02);
            border-color: var(--primary);
            box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
            z-index: 10;
        }
        
        .card-top { display: flex; align-items: center; margin-bottom: 20px; position: relative; padding-right: 120px; }
        .api-icon {
            width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
            font-size: 24px; color: white; margin-right: 15px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
            flex-shrink: 0;
        }
        .api-info-wrapper { display: flex; align-items: center; flex: 1; min-width: 0; }
        .api-info { flex: 1; min-width: 0; }
        .api-info h3 { font-size: 16px; font-weight: 600; color: white; margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .api-info span { font-size: 11px; color: var(--text-sub); background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 4px; }
        
        .api-stats { display: flex; flex-direction: column; gap: 8px; position: absolute; right: 0; top: 0; }
        .stat-row { display: flex; }
        .stat-item { display: flex; align-items: center; gap: 6px; justify-content: flex-end; white-space: nowrap; }
        .stat-icon { font-size: 11px; color: var(--text-sub); }
        .stat-label { font-size: 10px; color: var(--text-sub); flex-shrink: 0; }
        .stat-value { 
            font-size: 12px !important; 
            font-weight: 600 !important; 
            color: #10b981 !important; 
            background: rgba(16, 185, 129, 0.1) !important; 
            padding: 2px 6px !important; 
            border-radius: 6px !important; 
            border: 1px solid rgba(16, 185, 129, 0.2) !important; 
            min-width: auto !important; 
            text-align: center !important; 
            display: inline-block !important; 
            flex-shrink: 0 !important; 
            white-space: nowrap !important; 
        }

        .api-desc { font-size: 13px; color: var(--text-sub); line-height: 1.6; margin-bottom: 25px; flex-grow: 1; }
        
        .card-btm { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--glass-border); }
        .status { font-size: 12px; display: flex; align-items: center; gap: 6px; }
        .status.on { color: #10b981; }
        .status.off { color: #f43f5e; }
        .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

        .btn-doc {
            padding: 8px 18px; border-radius: 50px; background: rgba(255,255,255,0.05);
            color: white; text-decoration: none; font-size: 12px; border: 1px solid var(--glass-border);
            transition: 0.3s;
        }
        .btn-doc:hover { background: var(--primary); border-color: var(--primary); }

        /* 分页 */
        .pagination { display: flex; justify-content: center; gap: 10px; margin-top: 50px; }
        .page-btn {
            width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.05);
            border: 1px solid var(--glass-border); color: var(--text-sub); cursor: pointer; transition: 0.3s;
        }
        .page-btn:hover:not(:disabled) { background: var(--primary); color: white; border-color: var(--primary); }
        .page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

        /* 赞助商墙 (底部) */
        .sponsors-wall { margin-top: 60px; margin-bottom: 30px; }
        .sponsor-list {
            display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px;
        }
        .sponsor-chip {
            background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); padding: 15px;
            border-radius: 12px; text-align: center; text-decoration: none; color: var(--text-sub);
            transition: 0.3s; display: flex; flex-direction: column; align-items: center; gap: 10px;
        }
        .sponsor-chip img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
        .sponsor-chip:hover { background: rgba(255,255,255,0.08); transform: translateY(-3px); color: white; border-color: var(--accent); }

        /* 弹窗 */
        .modal-mask {
            position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
            z-index: 1000; display: none; justify-content: center; align-items: center; opacity: 0; transition: 0.3s;
        }
        .modal-mask.show { opacity: 1; }
        .modal-box {
            width: 90%; max-width: 550px; background: #1e293b; border: 1px solid var(--glass-border);
            border-radius: 20px; padding: 30px; transform: scale(0.9); transition: 0.3s;
            box-shadow: 0 20px 50px rgba(0,0,0,0.5); position: relative;
        }
        .modal-mask.show .modal-box { transform: scale(1); }
        .modal-close { position: absolute; top: 20px; right: 20px; cursor: pointer; color: #64748b; font-size: 20px; }
        .modal-close:hover { color: white; }
        .modal-title { font-size: 20px; font-weight: 700; color: white; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
        .modal-content { color: var(--text-sub); line-height: 1.7; max-height: 60vh; overflow-y: auto; font-size: 15px; }

        /* 主题切换按钮(侧边栏) */
        #theme-toggle {
            cursor: pointer;
        }
        
        #theme-toggle i {
            transition: all 0.3s ease;
        }

        /* 白天模式样式 */
        body.light-theme {
            --bg-color: #f5f7fa;
            --glass-bg: rgba(255, 255, 255, 0.9);
            --glass-border: rgba(0, 0, 0, 0.1);
            --glass-highlight: rgba(0, 0, 0, 0.05);
            --text-main: #1a1a2e;
            --text-sub: #6b7280;
        }

        body.light-theme .bg-glow { display: none; }

        body.light-theme .sidebar {
            background: rgba(255, 255, 255, 0.95);
            border-right: 1px solid rgba(0, 0, 0, 0.1);
        }

        body.light-theme .api-card:hover {
            background: rgba(255, 255, 255, 0.95);
        }

        /* 移动端适配 */
        .mob-btn { display: none; position: fixed; right: 20px; top: 20px; z-index: 200; width: 40px; height: 40px; background: var(--primary); border: none; border-radius: 10px; color: white; font-size: 18px; }
        
        @media (max-width: 900px) {
            .sidebar { transform: translateX(-100%); width: 280px; }
            .sidebar.active { transform: translateX(0); }
            .main { margin-left: 0; padding: 20px; }
            .mob-btn { display: block; }
            .header { flex-direction: column; align-items: flex-start; gap: 20px; }
            .search-wrap { width: 100%; }
        }