/* --- 核心变量与重置 --- */
:root {
    --bg-body: #0b0e14;
    --bg-card: #151a23;
    --primary-text: #e0e6ed;
    --secondary-text: #94a3b8;
    --accent-color: #00f2ea;
    --accent-glow: rgba(0, 242, 234, 0.3);
    --border-color: #2d3748;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--primary-text);
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }

/* --- 布局 --- */
.main-wrapper { display: flex; max-width: 1200px; margin: 40px auto; padding: 0 20px; gap: 30px; }
aside { width: 260px; flex-shrink: 0; position: sticky; top: 30px; height: fit-content; display: flex; flex-direction: column; gap: 20px; }

/* --- 标题 --- */
.page-title { font-size: 1.5rem; font-weight: bold; background: linear-gradient(90deg, #00f2ea, #a25cff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- 搜索 --- */
.search-container { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; }
#search-input { width: 100%; padding: 12px 15px; background: #0f1219; border: 1px solid var(--border-color); border-radius: 8px; color: var(--primary-text); }
#search-input:focus { border-color: var(--accent-color); box-shadow: 0 0 10px var(--accent-glow); }

/* --- 菜单 --- */
.nav-menu { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 20px 0; }
.nav-menu ul { list-style: none; }
.nav-menu li { border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-menu li:last-child { border-bottom: none; }
.nav-menu a { display: block; padding: 14px 25px; color: var(--secondary-text); }
.nav-menu a:hover, .nav-menu a.active { color: var(--accent-color); background: linear-gradient(90deg, rgba(0, 242, 234, 0.1) 0%, transparent 100%); border-left: 3px solid var(--accent-color); }

/* --- 内容 --- */
main { flex: 1; padding-bottom: 60px; }
.category-section { margin-bottom: 50px; scroll-margin-top: 200px; }
.category-title { font-size: 1.3rem; margin-bottom: 20px; padding-left: 15px; border-left: 4px solid var(--accent-color); color: #fff; text-transform: uppercase; }

/* --- 卡片 --- */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.site-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; transition: transform 0.3s; }
.site-card:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: 0 5px 20px var(--accent-glow); }

.site-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.site-name { font-size: 1.1rem; font-weight: bold; color: #fff; display: flex; align-items: center; flex: 1; }
.site-icon { width: 28px; height: 28px; border-radius: 6px; margin-right: 10px; background: #fff; padding: 2px; }
.site-domain { display: block; font-size: 0.75rem; color: var(--accent-color); background: rgba(0, 242, 234, 0.05); padding: 4px 8px; border-radius: 4px; font-family: monospace; margin-top: 5px; border: 1px solid rgba(0, 242, 234, 0.1); }
.site-desc { font-size: 0.9rem; color: var(--secondary-text); margin: 15px 0; flex: 1; line-height: 1.5; }
.site-link { display: block; text-align: center; padding: 10px; border: 1px solid var(--border-color); color: var(--primary-text); border-radius: 6px; }
.site-card:hover .site-link { background: var(--accent-color); color: #000; border-color: var(--accent-color); font-weight: bold; }

/* --- 移动端 --- */
@media (max-width: 768px) {
    .main-wrapper { flex-direction: column; margin-top: 20px; }
    aside { width: 100%; position: relative; top: 0; background: transparent; padding: 0; box-shadow: none; border: none; }
    .page-title { text-align: left; margin-bottom: 15px; }
    .nav-menu { background: transparent; border: none; }
    .nav-menu ul { display: flex; overflow-x: auto; padding: 0 5px 15px 5px; gap: 10px; }
    .nav-menu li { border: none; flex-shrink: 0; }
    .nav-menu a { padding: 10px 20px; background: var(--bg-card); border-radius: 8px; border: 1px solid var(--border-color); }
    .nav-menu a:hover, .nav-menu a.active { border-left: none; }
}
