/* ============================================
   🛸 NEXUS — 科技感暗色玻璃态主题
   ============================================ */

/* 字体 & 变量 */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --surface: rgba(255,255,255,0.04);
    --surface-hover: rgba(255,255,255,0.08);
    --glass: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.10);
    --glass-hover: rgba(255,255,255,0.12);
    --text-primary: #e8e8f0;
    --text-secondary: #8888aa;
    --text-muted: #666688;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-glow: rgba(108,92,231,0.3);
    --gradient-accent: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-fire: linear-gradient(135deg, #ff6b6b, #ee5a24);
    --gradient-bus: linear-gradient(135deg, #00b894, #00cec9);
    --gradient-tools: linear-gradient(135deg, #2d3436, #636e72);
    --gradient-knowledge: linear-gradient(135deg, #0984e3, #74b9ff);
    --gradient-dating: linear-gradient(135deg, #e84393, #fd79a8);
    --gradient-disease: linear-gradient(135deg, #00b894, #55efc4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 30px rgba(108,92,231,0.15);
    --font: 'Inter', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a { color: var(--accent-light); text-decoration: none; transition: 0.2s; }
a:hover { color: #fff; }

/* 粒子背景 */
#particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}
#particles canvas { display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(10,10,26,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0;
    height: 64px;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}
.brand-icon { font-size: 1.6rem; }
.brand-text {
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}
.brand-dot {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent); }
    50% { opacity: 0.4; box-shadow: 0 0 12px var(--accent); }
}

.nav-links { display: flex; gap: 4px; align-items: center; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.nav-link:hover {
    color: #fff;
    background: var(--surface-hover);
    border-color: var(--glass-border);
}
.nav-link.active {
    color: #fff;
    background: var(--accent-glow);
    border-color: rgba(108,92,231,0.3);
    box-shadow: 0 0 20px rgba(108,92,231,0.1);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

/* ===== 主内容 ===== */
.main-content {
    padding-top: 80px;
    min-height: calc(100vh - 60px);
}

/* ===== 页脚 ===== */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 20px 0;
    margin-top: 40px;
    background: rgba(10,10,26,0.5);
    backdrop-filter: blur(10px);
}
.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.footer-sep { opacity: 0.3; }
.status-dot {
    display: inline-block;
    width: 6px; height: 6px;
    background: #00b894;
    border-radius: 50%;
    margin-right: 4px;
    box-shadow: 0 0 6px #00b894;
    animation: pulse-dot 2s infinite;
}

/* ===== 通用组件 ===== */

/* 页面标题横幅 */
.page-header {
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    pointer-events: none;
}
.page-header h5 { margin: 0; font-weight: 700; font-size: 1.1rem; position: relative; z-index: 1; }

/* 玻璃卡片 */
.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    transition: all 0.3s;
}
.glass-card:hover {
    border-color: rgba(255,255,255,0.2);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* 标题 */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.section-title i { color: var(--accent-light); margin-right: 6px; }

/* 按钮 */
.btn-nexus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff;
    background: var(--gradient-accent);
    box-shadow: 0 0 20px rgba(108,92,231,0.2);
}
.btn-nexus:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(108,92,231,0.4);
}
.btn-nexus:active { transform: translateY(0); }

.btn-ghost {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    box-shadow: none;
}
.btn-ghost:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(108,92,231,0.1);
}

/* 输入框 */
input[type="text"],
input[type="password"],
input[type="search"],
select,
textarea {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: all 0.2s;
    width: 100%;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(108,92,231,0.15);
}

/* 徽章 */
.badge-nexus {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

/* 加载动画 */
.nexus-spinner {
    width: 3rem; height: 3rem;
    border: 2px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: nexus-spin 0.8s linear infinite;
}
@keyframes nexus-spin { to { transform: rotate(360deg); } }

/* 动效 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease; }

@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px rgba(108,92,231,0.1); }
    50% { box-shadow: 0 0 25px rgba(108,92,231,0.25); }
}

/* 网格布局 */
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* 响应式 */
@media (max-width: 992px) {
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px; left: 0; right: 0;
        background: rgba(10,10,26,0.95);
        backdrop-filter: blur(20px);
        padding: 12px;
        flex-direction: column;
        border-bottom: 1px solid var(--glass-border);
    }
    .nav-links.show { display: flex; }
    .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-content { flex-direction: column; gap: 4px; }
    .footer-sep { display: none; }
}
@media (max-width: 480px) {
    .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--surface-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
