/* ============================================
   赛博朋克共享样式 - 全站统一
   ============================================ */

/* 设计Token */
:root {
    --cyber-bg: #06061a;
    --cyber-bg-2: #0a0a2e;
    --cyber-bg-3: #1a1a3e;
    --neon-cyan: #00f0ff;
    --neon-pink: #ff006e;
    --neon-orange: #ff6b35;
    --neon-purple: #8b5cf6;
    --neon-green: #00ff88;
    --neon-yellow: #ffe600;
    --text-primary: #e0e0ff;
    --text-secondary: #8888aa;
    --glass-bg: rgba(10, 10, 46, 0.6);
    --glass-border: rgba(0, 240, 255, 0.15);
    --shadow-neon: 0 0 20px rgba(0, 240, 255, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, 'Segoe UI', 'PingFang SC', sans-serif;
    background: var(--cyber-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

a { color: var(--neon-cyan); text-decoration: none; }

/* 扫描线 */
.scanline {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 240, 255, 0.015) 2px,
        rgba(0, 240, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

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

.particle {
    position: absolute;
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ===== 导航栏 ===== */
.cyber-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    background: rgba(6, 6, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 0 20px;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.logo-icon { font-size: 28px; display: inline-flex; align-items: center; }
.logo-icon svg { width: 22px; height: 22px; }

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.08);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 50%;
    transform: translateX(-50%);
    width: 60%; height: 2px;
    background: var(--neon-cyan);
    border-radius: 1px;
    box-shadow: 0 0 8px var(--neon-cyan);
}

.share-link {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 0, 110, 0.15));
    border: 1px solid rgba(255, 107, 53, 0.3);
    color: var(--neon-orange) !important;
}

/* 汉堡菜单按钮（默认隐藏） */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.hamburger-btn:hover {
    background: rgba(0, 240, 255, 0.1);
}

/* 移动端样式 */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: rgba(6, 6, 26, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 12px;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links.mobile-active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 16px;
    }

    .nav-actions {
        display: none;
    }
}

.nav-actions {
    display: flex;
    gap: 10px;
}

.btn-login-cyber {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.btn-login-cyber:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: var(--shadow-neon);
}

.btn-register-cyber {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--neon-cyan), #0891b2);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.btn-register-cyber:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
    transform: translateY(-2px);
}

/* ===== 页面顶部 ===== */
.cyber-page-header {
    position: relative;
    padding: 120px 20px 60px;
    background: linear-gradient(180deg, var(--cyber-bg-2) 0%, var(--cyber-bg) 100%);
    overflow: hidden;
    text-align: center;
}

.header-bg-grid {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 70%);
}

.header-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }

.header-breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.header-breadcrumb .sep { margin: 0 8px; opacity: 0.5; }
.header-breadcrumb .current { color: var(--neon-cyan); }

.header-title {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff, var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.title-icon { margin-right: 12px; }

.header-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.header-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.pill-num {
    font-size: 20px;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.pill-label { font-size: 13px; color: var(--text-secondary); }

.header-scanner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 300px; height: 300px;
    pointer-events: none;
}

.scanner-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(0, 240, 255, 0.15);
}

.ring-1 { width: 200px; height: 200px; animation: ringPulse 3s ease-in-out infinite; }
.ring-2 { width: 300px; height: 300px; animation: ringPulse 3s ease-in-out infinite 1s; }

@keyframes ringPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.9); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* ===== 区块标题 ===== */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title-cyber {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 8px;
}

.title-glow {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.section-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== 按钮 ===== */
.btn-cyber-primary {
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--neon-cyan), #0891b2);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.btn-cyber-primary:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
    transform: translateY(-2px);
}

.btn-cyber-secondary {
    padding: 12px 32px;
    background: transparent;
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-sm);
    color: var(--neon-cyan);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cyber-secondary:hover {
    background: rgba(0, 240, 255, 0.08);
    box-shadow: var(--shadow-neon);
}

/* ===== 玻璃卡片基础 ===== */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: var(--shadow-neon);
    transform: translateY(-4px);
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 80px; right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-cyber {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    min-width: 280px;
    animation: toastIn 0.4s ease, toastOut 0.4s ease 2.6s forwards;
}

.toast-cyber.success { border-color: rgba(0, 255, 136, 0.4); }
.toast-cyber.error { border-color: rgba(255, 0, 110, 0.4); }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-20px); }
}

/* ===== 悬浮按钮 ===== */
.floating-btn-cyber {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--neon-cyan), #0891b2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
    transition: var(--transition);
}

.floating-btn-cyber:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.6);
}

.fab-pulse {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.5); opacity: 0; }
}

.fab-tooltip {
    position: absolute;
    right: 70px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.floating-btn-cyber:hover .fab-tooltip { opacity: 1; }

/* ===== 弹窗 ===== */
.modal-overlay-cyber {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay-cyber.active { display: flex; }

.modal-box-cyber {
    background: var(--cyber-bg-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    min-width: 360px;
    max-width: 420px;
    position: relative;
    animation: modalIn 0.4s ease;
}

.modal-box-cyber::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

@keyframes modalIn {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close-cyber {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close-cyber:hover {
    background: rgba(255, 0, 110, 0.15);
    color: var(--neon-pink);
}

/* ===== 通用详情弹窗 ===== */
.detail-modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(12px);
    display: none; align-items: center; justify-content: center;
}
.detail-modal-overlay.active { display: flex; }
.detail-modal-overlay .cyber-modal {
    max-width: 600px; width: 92%; max-height: 80vh;
    padding: 32px; overflow: hidden;
    animation: modalIn 0.35s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.detail-modal-body { font-size: 14px; line-height: 1.8; color: var(--text-secondary); }
.detail-modal-body strong { color: var(--text-primary); }
.detail-modal-body .meta-row {
    display: flex; gap: 16px; flex-wrap: wrap;
    padding: 12px 16px; margin: 10px 0;
    background: rgba(0,240,255,0.03);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    font-size: 13px;
}
.detail-modal-body .meta-row span { display: flex; align-items: center; gap: 4px; }
.detail-modal-body .tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.detail-modal-body .tag-row span {
    padding: 3px 10px; font-size: 11px; letter-spacing: 1px;
    border: 1px solid rgba(0,240,255,0.2); color: var(--neon-cyan); border-radius: 2px;
}
.detail-modal-body .btn-source {
    display: inline-block; margin-top: 12px;
    padding: 8px 20px; background: rgba(0,240,255,0.08);
    border: 1px solid rgba(0,240,255,0.25); color: var(--neon-cyan);
    border-radius: 4px; cursor: pointer; font-size: 13px; font-family: inherit;
    transition: all 0.3s ease; letter-spacing: 1px;
}
.detail-modal-body .btn-source:hover { background: rgba(0,240,255,0.15); }

/* ===== Footer ===== */
.cyber-footer {
    background: var(--cyber-bg-2);
    border-top: 1px solid var(--glass-border);
    padding: 60px 20px 20px;
    margin-top: 80px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 16px;
    color: var(--neon-cyan);
    margin-bottom: 16px;
}

.footer-col p, .footer-col a {
    font-size: 14px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
    transition: var(--transition);
}

.footer-col a:hover { color: var(--neon-cyan); }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Cookie Notice ===== */
.cookie-notice {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 8px;
    padding: 10px 20px;
    background: rgba(10,10,46,0.95); backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    font-size: 12px; color: var(--text-secondary);
}
.cookie-notice a { margin-left: 4px; text-decoration: underline; text-underline-offset: 2px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .header-title { font-size: 32px; }
    .header-stats { flex-direction: column; align-items: center; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ===== 登录态导航 (子页面共享) ===== */
.auth-user-state {
    display: flex;
    gap: 10px;
    align-items: center;
}
.auth-user-name {
    color: var(--neon-cyan);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.auth-btn-logout {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}
.auth-btn-logout:hover {
    border-color: rgba(255,0,110,0.3);
    color: var(--pink);
}
.auth-btn-login {
    background: transparent;
    border: 1px solid rgba(0,240,255,0.2);
    color: var(--neon-cyan);
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}
.auth-btn-login:hover {
    border-color: rgba(0,240,255,0.5);
    box-shadow: 0 0 20px rgba(0,240,255,0.1);
}
.auth-btn-reg {
    background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(139,92,246,0.15));
    border: 1px solid rgba(0,240,255,0.25);
    color: var(--neon-cyan);
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}
.auth-btn-reg:hover {
    background: linear-gradient(135deg, rgba(0,240,255,0.25), rgba(139,92,246,0.25));
    border-color: rgba(0,240,255,0.5);
    box-shadow: 0 0 20px rgba(0,240,255,0.15);
}
@media (max-width: 768px) {
    .auth-user-name { font-size: 12px; max-width: 80px; }
    .auth-btn-logout { padding: 4px 10px; font-size: 12px; }
}
