:root {
    --cosmic-black: #0a0a1a;
    --deep-purple: #1a0033;
    --purple-mid: #2d1b69;
    --accent-cyan: #00d4ff;
    --accent-purple: #9d4edd;
    --text-light: #e0e0e0;
    --text-white: #ffffff;
    --glass-bg: rgba(45, 27, 105, 0.15);
    --glass-border: rgba(157, 78, 221, 0.3);
    --glass-blur: 12px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans SC', 'Inter', -apple-system, 'Microsoft YaHei', sans-serif;
    color: var(--text-light);
    overflow-x: hidden;
}

/* Navbar - fixed at top, dark solid background */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #0a0a1a;
    z-index: 100;
}
.logo img {
    height: 3.5rem;
    filter: brightness(1.4) drop-shadow(0 0 8px rgba(157, 78, 221, 0.5));
}
@media (min-width: 768px) {
    .logo img { height: 4.2rem; }
}

/* Nav links on dark background */
.nav-link {
    color: #d1d5db;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}
.nav-link:hover { color: var(--accent-cyan); }
.nav-link.active {
    color: var(--accent-cyan) !important;
    border-bottom-color: var(--accent-cyan);
}

/* Hero */
#hero { position: relative; }
#hero-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-content { position: relative; z-index: 10; }
.hero-title {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}
.hero-subtitle { animation: fadeInUp 1.2s ease-out; }

/* Ensure all content is above canvas */
#app-content, footer { position: relative; z-index: 10; }

/* CTA Button */
.cta-button {
    background: linear-gradient(135deg, var(--accent-purple), var(--purple-mid));
    color: var(--text-white);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.5), 0 0 40px rgba(0, 212, 255, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(157, 78, 221, 0.7), 0 0 60px rgba(0, 212, 255, 0.5);
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition-smooth);
    will-change: transform;
}
.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 8px 32px rgba(157, 78, 221, 0.3), 0 0 24px rgba(0, 212, 255, 0.2);
}

/* SPA Content */
#app-content { min-height: 60vh; }
.content-section { animation: fadeIn 0.4s ease-out; }

/* Video */
.video-container video {
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* History papers table */
#history-papers table { border-collapse: collapse; width: 100%; }
#history-papers th, #history-papers td {
    text-align: left;
    border-bottom: 1px solid rgba(157, 78, 221, 0.2);
}
#toggle-history { cursor: pointer; background: none; border: none; font-size: 1.1rem; }

/* Recruitment */
#careers img { border: 1px solid var(--glass-border); }

/* Footer */
footer {
    background: var(--cosmic-black);
    border-top: 1px solid rgba(157, 78, 221, 0.2);
}

/* Animations */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(157, 78, 221, 0.5), 0 0 40px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 30px rgba(157, 78, 221, 0.7), 0 0 60px rgba(0, 212, 255, 0.5); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    #history-papers { overflow-x: auto; }
}
