:root {
  --bg: #05070f;
  --bg-2: #0a0f1e;
  --panel: rgba(15, 22, 40, 0.62);
  --panel-border: rgba(148, 184, 255, 0.14);
  --text: #e8eefc;
  --text-dim: #93a1bd;
  --cyan: #38bdf8;
  --violet: #a78bfa;
  --pink: #f472b6;
  --amber: #facc15;
  --green: #34d399;
  --glass: rgba(255, 255, 255, 0.045);
  --radius: 18px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(56, 189, 248, 0.35); color: #fff; }

#particles-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(52% 42% at 12% 8%, rgba(56, 189, 248, 0.14), transparent 65%),
    radial-gradient(46% 40% at 88% 12%, rgba(167, 139, 250, 0.13), transparent 65%),
    radial-gradient(60% 46% at 50% 108%, rgba(244, 114, 182, 0.08), transparent 65%),
    var(--bg);
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(5, 7, 15, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--panel-border);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: linear-gradient(140deg, rgba(56, 189, 248, 0.22), rgba(167, 139, 250, 0.22));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.25);
}

.brand-name { background: linear-gradient(90deg, #7dd3fc, #c4b5fd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

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

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14.5px;
  transition: color 0.25s;
  position: relative;
}

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 0.3s;
}

.nav-links a:not(.nav-cta):hover { color: var(--text); }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  color: #fff !important;
  font-weight: 600;
  background: linear-gradient(120deg, var(--cyan), var(--violet));
  box-shadow: 0 4px 22px rgba(56, 189, 248, 0.35);
  transition: transform 0.25s, box-shadow 0.25s;
}

.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(167, 139, 250, 0.45); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 60px;
}

.hero-inner { position: relative; z-index: 2; max-width: 860px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.6px;
  color: #9fd8ff;
  background: var(--glass);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  margin-bottom: 26px;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: 0.45; transform: scale(0.8);} }

.hero-title {
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 2px;
  margin-bottom: 22px;
}

.grad-text {
  background: linear-gradient(92deg, #38bdf8 0%, #a78bfa 55%, #f472b6 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradflow 6s ease infinite;
}

@keyframes gradflow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hero-sub {
  font-size: clamp(17px, 2.6vw, 22px);
  color: var(--cyan);
  font-weight: 600;
  min-height: 1.6em;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.typed-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--cyan);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.9;
}

.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 60px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  will-change: transform;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, #0ea5e9, #8b5cf6);
  box-shadow: 0 6px 30px rgba(56, 189, 248, 0.4);
}

.btn-primary:hover { box-shadow: 0 10px 40px rgba(139, 92, 246, 0.55); }

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(148, 184, 255, 0.3);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover { border-color: rgba(56, 189, 248, 0.6); background: rgba(56, 189, 248, 0.08); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(30px, 8vw, 90px);
}

.stat b {
  display: block;
  font-size: 34px;
  font-weight: 800;
  background: linear-gradient(90deg, #7dd3fc, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat span { font-size: 13px; color: var(--text-dim); letter-spacing: 1px; }

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 3px;
}

.mouse {
  width: 22px;
  height: 36px;
  border: 1.5px solid rgba(148, 184, 255, 0.4);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.wheel {
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: var(--cyan);
  animation: wheel 1.6s ease infinite;
}

@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }

/* ---------- Sections ---------- */
main { position: relative; z-index: 2; }

/* ---------- Periodic Table Entry ---------- */
.ptable-entry { max-width: 1180px; margin: 60px auto 0; padding: 0 28px; }
.ptable-entry-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 36px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(56,189,248,0.08), rgba(167,139,250,0.06));
  border: 1px solid rgba(56,189,248,0.18);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.ptable-entry-inner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(60% 60% at 0% 50%, rgba(56,189,248,0.06), transparent);
  pointer-events: none;
}
.ptable-entry-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.2);
}
.ptable-entry-text { flex: 1; min-width: 0; }
.ptable-entry-text h3 { font-size: 18px; font-weight: 700; letter-spacing: 1px; margin-bottom: 6px; }
.ptable-entry-text p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.ptable-entry-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 999px; background: linear-gradient(120deg, #0ea5e9, #8b5cf6); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; transition: all 0.3s; }
.ptable-entry-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(56,189,248,0.25); }

@media (max-width: 640px) {
  .ptable-entry-inner { flex-direction: column; text-align: center; padding: 24px 20px; }
  .ptable-entry-btn { width: 100%; justify-content: center; }
}

.modules, .features { max-width: 1180px; margin: 0 auto; padding: 110px 28px 40px; }

.section-head { text-align: center; margin-bottom: 56px; }

.section-tag {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 4px;
  color: var(--cyan);
  opacity: 0.85;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section-head p { color: var(--text-dim); font-size: 15px; }

/* ---------- Module cards ---------- */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.module-group-header {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #9fd8ff;
  padding: 18px 0 6px;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 4px;
}

.module-card {
  position: relative;
  border-radius: var(--radius);
  padding: 30px 26px;
  min-height: 210px;
  background: linear-gradient(160deg, rgba(30, 41, 66, 0.55), rgba(12, 18, 34, 0.7));
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 20% 0%, rgba(56, 189, 248, 0.10), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
}

.module-card:hover { border-color: rgba(56, 189, 248, 0.45); box-shadow: 0 18px 50px rgba(2, 8, 24, 0.6); }
.module-card:hover::before { opacity: 1; }

.module-card.live { cursor: pointer; }

.module-card.locked { opacity: 0.55; cursor: not-allowed; }

.module-ribbon {
  position: absolute;
  top: 16px;
  right: -34px;
  transform: rotate(40deg);
  padding: 4px 38px;
  font-size: 11px;
  letter-spacing: 2px;
  color: #ffd28a;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.4);
  white-space: nowrap;
}

.module-top { display: flex; align-items: center; justify-content: space-between; }

.module-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: linear-gradient(140deg, rgba(56, 189, 248, 0.2), rgba(167, 139, 250, 0.16));
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.module-icon svg { width: 26px; height: 26px; }

.module-status {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 1px;
}

.module-status.on { color: var(--green); background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.35); }
.module-status.build { color: #7dd3fc; background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.35); }
.module-status.plan { color: #ffd28a; background: rgba(250, 204, 21, 0.08); border: 1px solid rgba(250, 204, 21, 0.3); }

.module-card h3 { font-size: 19px; font-weight: 700; letter-spacing: 0.5px; }

.module-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.8; flex: 1; }

.module-enter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cyan);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s;
}

.module-card.live:hover .module-enter { opacity: 1; transform: translateY(0); }
.module-card.live:hover h3 { color: #7dd3fc; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }

.feature-card { border-radius: var(--radius); padding: 36px 30px; transition: transform 0.35s, border-color 0.35s; border: 1px solid var(--panel-border); }

.feature-card:hover { transform: translateY(-6px); border-color: rgba(167, 139, 250, 0.4); }

.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: #fff;
}

.feature-icon svg { width: 26px; height: 26px; }

.f1 { background: linear-gradient(140deg, #0ea5e9, #2563eb); box-shadow: 0 8px 26px rgba(14, 165, 233, 0.4); }
.f2 { background: linear-gradient(140deg, #8b5cf6, #d946ef); box-shadow: 0 8px 26px rgba(139, 92, 246, 0.4); }
.f3 { background: linear-gradient(140deg, #f59e0b, #ef4444); box-shadow: 0 8px 26px rgba(245, 158, 11, 0.4); }

.feature-card h3 { font-size: 18.5px; margin-bottom: 10px; }

.feature-card p { font-size: 14px; color: var(--text-dim); line-height: 1.9; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 90px;
  border-top: 1px solid var(--panel-border);
  padding: 46px 28px;
  text-align: center;
  background: rgba(4, 6, 12, 0.6);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
  color: #9fd8ff;
}

.footer p { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }

.footer-links { display: flex; justify-content: center; gap: 22px; }

.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: var(--cyan); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding-top: 100px; }
  .hero-stats { gap: 34px; }
  .module-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
