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

:root {
    --bg-black: #05000a;
    --bg-deep: #0a0118;
    --neon-pink: #e0609a;
    --neon-cyan: #5cc8df;
    --neon-purple: #a66ef7;
    --neon-green: #4ade80;
    --neon-yellow: #f0d060;
    --neon-orange: #e08850;
    --hot-magenta: #d06098;
    --ice-blue: #7ac8e0;
    --white: #f0eaff;
    --muted: #9a8fb5;
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);

    --font-display: 'Orbitron', 'Microsoft YaHei', sans-serif;
    --font-body: 'Rajdhani', 'Microsoft YaHei', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-spring: cubic-bezier(0.22, 1.36, 0.36, 1);

    --nav-h: 70px;
    --sidebar-w: 260px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-black);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* ===== NAVIGATION ===== */
.nav-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 3rem; height: var(--nav-h);
    background: rgba(10, 5, 20, 0.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    backdrop-filter: blur(24px) saturate(1.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-logo { display: flex; align-items: center; }
.logo-img { height: 38px; width: auto; }

.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; }

.nav-link {
    color: var(--muted); text-decoration: none;
    font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    position: relative; padding: 0.4rem 0;
    transition: color 300ms ease;
}

.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    width: 0; height: 2px; border-radius: 1px;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
    transition: width 400ms var(--ease-out-expo), left 400ms var(--ease-out-expo);
}

.nav-link:hover { color: var(--neon-cyan); }
.nav-link:hover::after { width: 100%; left: 0; }
.nav-link.active { color: var(--neon-cyan); }
.nav-link.active::after { width: 100%; left: 0; }

.nav-accent-line {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    height: 1px; z-index: 99;
    background: linear-gradient(90deg, transparent, var(--neon-purple) 25%, var(--neon-pink) 50%, var(--neon-cyan) 75%, transparent);
    background-size: 200% 100%;
    animation: accent-sweep 4s linear infinite;
    opacity: 0.4;
}

@keyframes accent-sweep {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== HAMBURGER ===== */
.nav-hamburger {
    display: none; flex-direction: column; justify-content: center; align-items: center;
    width: 40px; height: 40px; cursor: pointer; z-index: 110; background: none; border: none;
}

.hamburger-line {
    width: 24px; height: 2px; background: var(--white);
    transition: transform 300ms ease, opacity 200ms ease;
}

.hamburger-line + .hamburger-line { margin-top: 6px; }
.nav-hamburger.open .hamburger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); background: var(--neon-pink); }
.nav-hamburger.open .hamburger-line:nth-child(2) { opacity: 0; }
.nav-hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background: var(--neon-pink); }

/* ===== MOBILE MENU ===== */
.mobile-menu {
    display: none; position: fixed; inset: 0; z-index: 105;
    background: rgba(5, 0, 10, 0.96);
    -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
    flex-direction: column; justify-content: center; align-items: center; gap: 2rem;
    opacity: 0; pointer-events: none; transition: opacity 300ms ease;
}

.mobile-menu.open { opacity: 1; pointer-events: all; }

.mobile-menu .mobile-link {
    color: var(--muted); text-decoration: none;
    font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
    letter-spacing: 0.15em; text-transform: uppercase;
    transition: color 200ms ease;
}

.mobile-menu .mobile-link:hover,
.mobile-menu .mobile-link.active { color: var(--white); }

/* ===== PAGE BACKGROUND (sub-pages) ===== */
.page-bg { position: fixed; inset: 0; z-index: 0; }
.page-bg-img { position: absolute; inset: 0; background: url('../picture/background.jpg') center center / cover no-repeat; }
.page-bg-overlay { position: absolute; inset: 0; background: rgba(5, 0, 10, 0.82); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-black); }
::-webkit-scrollbar-thumb { background: rgba(166,110,247,0.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(166,110,247,0.6); }

/* ===== RESPONSIVE: NAV ===== */
@media (max-width: 768px) {
    .nav-bar { padding: 0 1.5rem; }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .mobile-menu { display: flex; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
