/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #050816;
  --bg-primary: #0a0e27;
  --bg-card: rgba(15, 20, 50, 0.7);
  --bg-glass: rgba(255,255,255,0.04);
  --border-glass: rgba(255,255,255,0.08);
  --accent: #00d4ff;
  --accent2: #7b61ff;
  --accent3: #00ff88;
  --text: #e8eaf6;
  --text2: #8892b0;
  --text3: #5a6380;
  --grad: linear-gradient(135deg, #00d4ff, #7b61ff);
  --grad2: linear-gradient(135deg, #00d4ff 0%, #7b61ff 50%, #ff6b9d 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; scrollbar-gutter: stable; overflow-y: scroll; }
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }

/* ===== Animated BG ===== */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(123,97,255,0.06) 0%, transparent 60%);
}
.bg-grid::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 48px; min-height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  transition: var(--transition);
  background: rgba(5,8,22,0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nav.scrolled {
  background: rgba(5,8,22,0.95);
  border-bottom: 1px solid var(--border-glass);
}
.nav-brand {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.nav-brand span { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 4px; list-style: none; flex-wrap: nowrap; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: var(--text2); transition: var(--transition); position: relative; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,0.06); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; border-radius: 1px; background: var(--accent);
}

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
  overflow: hidden;
}
.hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.12) 0%, rgba(123,97,255,0.06) 40%, transparent 70%);
  filter: blur(80px); pointer-events: none; animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.6; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.15); } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 20px; border-radius: 50px; font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(0,212,255,0.3); background: rgba(0,212,255,0.06);
  margin-bottom: 32px;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 2s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(36px, 6vw, 72px); font-weight: 800; line-height: 1.15;
  margin-bottom: 24px; position: relative;
}
.hero h1 .grad {
  background: var(--grad2); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(16px, 2vw, 20px); color: var(--text2); max-width: 640px;
  margin-bottom: 48px; line-height: 1.8;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 12px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: var(--transition); border: none; outline: none;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 4px 24px rgba(0,212,255,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,212,255,0.35); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-glass);
}
.btn-ghost:hover { background: var(--bg-glass); border-color: rgba(255,255,255,0.15); color: #fff; }

/* ===== Section ===== */
.section { position: relative; padding: 100px 24px; z-index: 1; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(28px, 4vw, 42px); font-weight: 700; margin-bottom: 16px;
}
.section-header h2 .grad { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.section-header p { font-size: 17px; color: var(--text2); max-width: 600px; margin: 0 auto; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius); padding: 36px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: var(--transition); position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.3), transparent);
  opacity: 0; transition: var(--transition);
}
.card:hover { transform: translateY(-4px); border-color: rgba(0,212,255,0.15); }
.card:hover::before { opacity: 1; }

.card-icon {
  width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(0,212,255,0.12), rgba(123,97,255,0.12));
  border: 1px solid rgba(0,212,255,0.15); margin-bottom: 24px; font-size: 24px;
}
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: #fff; }
.card p { font-size: 15px; color: var(--text2); line-height: 1.8; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.card-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 28px; }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 64px; }
.stat {
  text-align: center; padding: 32px 16px;
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  border-radius: var(--radius); transition: var(--transition);
}
.stat:hover { border-color: rgba(0,212,255,0.2); }
.stat-value {
  font-family: 'Noto Serif SC', serif;
  font-size: 36px; font-weight: 800; background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px;
}
.stat-label { font-size: 14px; color: var(--text2); }

/* ===== Page Header (for inner pages) ===== */
.page-hero {
  position: relative; padding: 160px 24px 80px; text-align: center; z-index: 1;
  overflow: hidden;
}
.page-hero .hero-glow { top: -300px; }
.page-hero h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(32px, 5vw, 52px); font-weight: 800; margin-bottom: 16px;
}
.page-hero h1 .grad { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.page-hero p { font-size: 18px; color: var(--text2); max-width: 600px; margin: 0 auto; }

/* ===== Feature List ===== */
.feature-list { list-style: none; margin-top: 20px; }
.feature-list li {
  padding: 10px 0; font-size: 15px; color: var(--text2);
  display: flex; align-items: flex-start; gap: 12px;
}
.feature-list li::before {
  content: ''; flex-shrink: 0; margin-top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ===== Download Card ===== */
.dl-card {
  display: flex; align-items: center; gap: 24px;
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius); padding: 28px 32px;
  backdrop-filter: blur(12px); transition: var(--transition);
  margin-bottom: 16px;
}
.dl-card:hover { border-color: rgba(0,212,255,0.2); transform: translateX(4px); }
.dl-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,107,53,0.15), rgba(255,107,53,0.05));
  border: 1px solid rgba(255,107,53,0.2); font-size: 24px;
}
.dl-info { flex: 1; }
.dl-info h4 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.dl-info p { font-size: 13px; color: var(--text3); }
.dl-btn {
  padding: 10px 24px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  color: var(--accent); cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.dl-btn:hover { background: rgba(0,212,255,0.1); border-color: rgba(0,212,255,0.3); color: #fff; }

/* ===== System Portal ===== */
.portal-card {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius); padding: 48px 40px;
  backdrop-filter: blur(12px); transition: var(--transition);
  text-align: center; position: relative; overflow: hidden;
}
.portal-card::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0,212,255,0.04), rgba(123,97,255,0.04));
  opacity: 0; transition: var(--transition);
}
.portal-card:hover { transform: translateY(-6px); border-color: rgba(0,212,255,0.2); }
.portal-card:hover::after { opacity: 1; }
.portal-icon {
  width: 80px; height: 80px; margin: 0 auto 24px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; font-size: 36px;
  background: linear-gradient(135deg, rgba(0,212,255,0.12), rgba(123,97,255,0.12));
  border: 1px solid rgba(0,212,255,0.15); position: relative; z-index: 1;
}
.portal-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 12px; position: relative; z-index: 1; }
.portal-card p { font-size: 15px; color: var(--text2); margin-bottom: 28px; position: relative; z-index: 1; }

/* ===== About ===== */
.about-content { max-width: 800px; margin: 0 auto; }
.about-content p { font-size: 16px; color: var(--text2); line-height: 2; margin-bottom: 24px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.contact-card {
  text-align: center; padding: 32px 20px;
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius); transition: var(--transition);
}
.contact-card:hover { border-color: rgba(0,212,255,0.2); }
.contact-icon { font-size: 28px; margin-bottom: 16px; }
.contact-card h4 { font-size: 14px; font-weight: 600; color: var(--text2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.contact-card p { font-size: 15px; color: #fff; }

/* ===== Footer ===== */
.footer {
  position: relative; z-index: 1;
  padding: 40px 24px; text-align: center;
  border-top: 1px solid var(--border-glass);
  font-size: 13px; color: var(--text3);
}

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .nav { padding: 0 20px; }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0;
    background: rgba(5,8,22,0.96); backdrop-filter: blur(20px);
    flex-direction: column; padding: 16px; gap: 4px;
    border-bottom: 1px solid var(--border-glass);
    transform: translateY(-120%); transition: var(--transition);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .card-grid, .card-grid-2 { grid-template-columns: 1fr; }
  .dl-card { flex-direction: column; text-align: center; }
  .hero-btns { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .section { padding: 64px 16px; }
  .card { padding: 24px; }
}
