/* ============================================================
   锈蚀死域社区 · 官网样式
   ============================================================ */

:root {
  --bg: #05070c;
  --bg-2: #080d16;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #e9eff8;
  --text-soft: #b6c2d4;
  --muted: #8493aa;
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --radius: 18px;
  --maxw: 1220px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", "Cascadia Code",
    Consolas, monospace;
}

* { box-sizing: border-box; }

/* 保证 hidden 属性优先于任何 display 声明 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; background: #05070c; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
.mono { font-family: var(--mono); }

/* ---------------- 背景层 ---------------- */

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(120, 160, 220, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 220, 0.075) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 20%, transparent 78%);
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}
.glow-a {
  width: 720px; height: 720px;
  top: -320px; left: -120px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
  opacity: 0.28;
}
.glow-b {
  width: 640px; height: 640px;
  top: 120px; right: -220px;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 68%);
  opacity: 0.26;
}

.bg-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.022) 0px,
    rgba(255, 255, 255, 0.022) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.5;
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-spot {
  position: fixed;
  width: 520px; height: 520px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.10) 0%, transparent 62%);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  opacity: 0;
}

/* ---------------- 导航 ---------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 8, 14, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; }
.brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  color: var(--accent);
  background: linear-gradient(140deg, rgba(56, 189, 248, 0.18), rgba(99, 102, 241, 0.14));
  border: 1px solid var(--border-strong);
}
.brand-mark.small { width: 28px; height: 28px; border-radius: 8px; }
.brand-img { height: 34px; width: auto; }
.brand-text { font-size: 17px; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 14.5px;
  color: var(--text-soft);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: #fff; background: var(--panel-2); }

.nav-burger { display: none; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn-primary {
  color: #04121e;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 30px -10px var(--accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px var(--accent); }
.btn-ghost {
  color: var(--text);
  background: var(--panel);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--panel-2); border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }
.nav-cta { padding: 9px 18px; font-size: 14px; }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  z-index: 2;
  padding: 150px 28px 0;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-soft);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(6px);
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16); }
  50% { box-shadow: 0 0 0 9px rgba(56, 189, 248, 0.03); }
}

.hero-title {
  margin: 24px 0 0;
  font-size: clamp(46px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero-title .grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 6px;
}
.hero-sub {
  margin-top: 22px;
  max-width: 540px;
  font-size: 17px;
  color: var(--text-soft);
}
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.stat-value {
  font-family: var(--mono);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

.hero-visual { position: relative; }
.terminal {
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(11, 17, 27, 0.92), rgba(7, 11, 18, 0.96));
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.terminal-body {
  padding: 18px 18px 22px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.95;
  min-height: 190px;
}
.terminal-body .t-line { color: var(--text-soft); white-space: pre-wrap; word-break: break-word; }
.terminal-body .t-line.cmd { color: var(--accent); }
.terminal-body .t-line.ok::after { content: ""; }
.terminal-body .t-line.ok { color: #7ee0a8; }
.terminal-body .t-caret {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--accent);
  vertical-align: -3px;
  animation: blink 1.05s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-card {
  margin-top: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
  min-height: 120px;
  display: grid;
  place-items: center;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card-fallback {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 26px;
  text-align: center;
}
.hero-card-fallback p {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.hero-card-hint {
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  max-width: 260px;
}

.hero-marquee {
  margin-top: 78px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 46px;
  padding: 15px 0;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  animation: marquee 38s linear infinite;
  width: max-content;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 46px; }
.marquee-track span::after {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- 通用 Section ---------------- */

.section {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 120px 28px;
}
.section-head { max-width: 640px; margin-bottom: 56px; }
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 750;
}
.section-sub { margin-top: 16px; color: var(--muted); font-size: 16px; }

/* ---------------- 特性 ---------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.feature-card {
  position: relative;
  padding: 30px 26px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1), border-color 0.3s;
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(56,189,248,0.13), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 13px;
  color: var(--accent);
  background: linear-gradient(140deg, rgba(56,189,248,0.16), rgba(99,102,241,0.12));
  border: 1px solid var(--border-strong);
  margin-bottom: 20px;
}
.feature-card h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.feature-card p { margin-top: 10px; font-size: 14.5px; color: var(--muted); line-height: 1.75; }
.feature-index {
  position: absolute;
  top: 22px; right: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255,255,255,0.18);
}

/* ---------------- 图集 ---------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
  background: var(--panel);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(.2,.7,.3,1); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
.gallery-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 20px 16px;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(to top, rgba(3,6,11,0.9), transparent);
}
.gallery-ph {
  width: 100%; height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(56,189,248,0.09), rgba(99,102,241,0.07)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 12px, transparent 12px 24px);
  color: rgba(150, 175, 205, 0.75);
}
.gallery-ph .ph-title {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  color: rgba(190, 208, 230, 0.9);
}
.gallery-ph .ph-hint {
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

/* ---------------- 下载 ---------------- */

.section-download { padding-top: 60px; }
.download-panel {
  position: relative;
  border-radius: 26px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(700px circle at 88% -10%, rgba(56,189,248,0.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.012));
  padding: 52px 46px 46px;
  overflow: hidden;
}
.download-head {
  display: flex;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}
.download-head .section-sub { max-width: 520px; }
.version-box {
  min-width: 260px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.28);
  padding: 16px 20px;
}
.version-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--muted);
  border-bottom: 1px dashed rgba(255,255,255,0.07);
}
.version-row:last-child { border-bottom: 0; }
.version-row strong { color: var(--text); font-weight: 600; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}
.platform-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: var(--panel);
  transition: transform 0.22s, border-color 0.22s, background 0.22s;
}
.platform-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--panel-2); }
.platform-card.primary {
  border-color: rgba(56,189,248,0.5);
  background: linear-gradient(120deg, rgba(56,189,248,0.12), rgba(99,102,241,0.08));
  box-shadow: 0 18px 50px -24px var(--accent);
}
.platform-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.platform-info { min-width: 0; }
.platform-name { font-size: 15.5px; font-weight: 650; }
.platform-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.platform-arrow { margin-left: auto; color: var(--muted); flex-shrink: 0; }

.mirror-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.mirror-label { font-size: 13px; color: var(--muted); }
.mirror-list { display: flex; gap: 10px; flex-wrap: wrap; }
.mirror-chip {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-soft);
  border: 1px solid var(--border);
  background: var(--panel);
  transition: color 0.2s, border-color 0.2s;
}
.mirror-chip:hover { color: #fff; border-color: var(--accent); }
.download-note { margin-top: 22px; font-size: 13px; color: var(--muted); }

/* ---------------- 关于 ---------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}
.about-copy p { margin-top: 18px; color: var(--text-soft); font-size: 15.5px; }
.about-points { display: grid; gap: 14px; }
.about-point {
  padding: 22px 24px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: var(--panel);
  transition: border-color 0.25s, transform 0.25s;
}
.about-point:hover { border-color: var(--border-strong); transform: translateX(4px); }
.about-point h4 {
  margin: 0 0 7px;
  font-size: 16px;
  font-weight: 650;
  display: flex; align-items: center; gap: 10px;
}
.about-point h4::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 2px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.about-point p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------------- 页脚 ---------------- */

.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  background: rgba(4, 7, 12, 0.6);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 46px 28px 56px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px 32px;
  align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 13.5px; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { grid-column: 1 / -1; font-size: 13px; color: var(--muted); padding-top: 22px; border-top: 1px solid var(--border); }
.footer-icp { grid-column: 1 / -1; font-size: 12.5px; color: rgba(255,255,255,0.28); }

/* ---------------- 滚动动效 ---------------- */

.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.75s cubic-bezier(.2,.7,.3,1), transform 0.75s cubic-bezier(.2,.7,.3,1); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 46px; }
  .hero { padding-top: 128px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .platform-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 68px; left: 16px; right: 16px;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(8, 12, 20, 0.96);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(14px);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-cta { display: none; }
  .nav-burger {
    display: grid;
    gap: 5px;
    margin-left: auto;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    cursor: pointer;
  }
  .nav-burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

  .hero { padding: 112px 20px 0; }
  .section { padding: 84px 20px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .feature-grid, .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: span 1; aspect-ratio: 16 / 10; }
  .download-panel { padding: 34px 22px 30px; border-radius: 20px; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-links { justify-content: center; }
}
