/* ===== Icons (CSS Mask based) ===== */
.ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.ico-lg { width: 28px; height: 28px; }
.ico-xl { width: 36px; height: 36px; }
.ico-chat     { mask-image: url('./icons/chat.svg');     -webkit-mask-image: url('./icons/chat.svg'); }
.ico-chart    { mask-image: url('./icons/chart.svg');    -webkit-mask-image: url('./icons/chart.svg'); }
.ico-globe    { mask-image: url('./icons/globe.svg');    -webkit-mask-image: url('./icons/globe.svg'); }
.ico-folder   { mask-image: url('./icons/folder.svg');   -webkit-mask-image: url('./icons/folder.svg'); }
.ico-bolt     { mask-image: url('./icons/bolt.svg');     -webkit-mask-image: url('./icons/bolt.svg'); }
.ico-bot      { mask-image: url('./icons/bot.svg');      -webkit-mask-image: url('./icons/bot.svg'); }
.ico-puzzle   { mask-image: url('./icons/puzzle.svg');   -webkit-mask-image: url('./icons/puzzle.svg'); }
.ico-devices  { mask-image: url('./icons/devices.svg');  -webkit-mask-image: url('./icons/devices.svg'); }
.ico-windows  { mask-image: url('./icons/windows.svg');  -webkit-mask-image: url('./icons/windows.svg'); }
.ico-server   { mask-image: url('./icons/server.svg');   -webkit-mask-image: url('./icons/server.svg'); }
.ico-star     { mask-image: url('./icons/star.svg');     -webkit-mask-image: url('./icons/star.svg'); }
.ico-wrench   { mask-image: url('./icons/wrench.svg');   -webkit-mask-image: url('./icons/wrench.svg'); }
.ico-users    { mask-image: url('./icons/users.svg');    -webkit-mask-image: url('./icons/users.svg'); }
.ico-rocket   { mask-image: url('./icons/rocket.svg');   -webkit-mask-image: url('./icons/rocket.svg'); }
.ico-check    { mask-image: url('./icons/check.svg');    -webkit-mask-image: url('./icons/check.svg'); }
.ico-download { mask-image: url('./icons/download.svg'); -webkit-mask-image: url('./icons/download.svg'); }
.ico-cpu      { mask-image: url('./icons/cpu.svg');      -webkit-mask-image: url('./icons/cpu.svg'); }
.ico-package  { mask-image: url('./icons/package.svg');  -webkit-mask-image: url('./icons/package.svg'); }

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1a1f2e;
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
code { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; background: rgba(99,102,241,0.08); padding: 2px 6px; border-radius: 6px; }

:root {
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #ec4899;
  --bg-alt: #f7f8fc;
  --bg-dark: #0f1224;
  --text: #1a1f2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow-md: 0 4px 16px rgba(20, 24, 60, 0.06);
  --shadow-lg: 0 14px 40px rgba(20, 24, 60, 0.10);
}

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.grad { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: all .2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 18px rgba(99,102,241,0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(99,102,241,0.45); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255,255,255,0.78);
  border-bottom: 1px solid rgba(229,231,235,0.7);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff; font-weight: 800; font-size: 16px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: #4b5563; font-weight: 500; font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* Language switch */
.lang-switch { display: inline-flex; gap: 0; border: 1px solid #e5e7eb; border-radius: 999px; overflow: hidden; background: #fff; }
.lang-switch .lang-btn {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  padding: 6px 12px; font-size: 13px; font-weight: 600; color: #6b7280;
  transition: background .2s, color .2s;
}
.lang-switch .lang-btn:hover { color: var(--accent); }
.lang-switch .lang-btn.active { background: var(--accent); color: #fff; }
@media (max-width: 720px) { .lang-switch { margin-left: auto; } }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; }
.hero-bg {
  position: absolute; inset: -20%;
  background:
    radial-gradient(60% 50% at 20% 30%, rgba(99,102,241,0.18), transparent 60%),
    radial-gradient(50% 40% at 80% 20%, rgba(236,72,153,0.16), transparent 60%),
    radial-gradient(40% 50% at 60% 80%, rgba(139,92,246,0.18), transparent 60%);
  filter: blur(20px);
  z-index: -1;
}
.hero-inner { text-align: center; max-width: 880px; margin: 0 auto; }
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(99,102,241,0.10); color: var(--accent);
  font-size: 13px; font-weight: 600; margin-bottom: 24px;
}
.hero-title { font-size: clamp(36px, 6vw, 60px); font-weight: 800; letter-spacing: -0.03em; }
.hero-sub { margin: 24px auto 0; font-size: 18px; color: #4b5563; max-width: 680px; }
.hero-actions { margin-top: 36px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hero-meta { margin-top: 32px; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; color: var(--text-muted); font-size: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .ico { color: #10b981; width: 16px; height: 16px; }
.badge .ico { width: 14px; height: 14px; vertical-align: -0.2em; }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: #e5e7eb; }
.section-title { text-align: center; font-size: clamp(28px, 4vw, 40px); }
.section-title.light { color: #fff; }
.section-sub { text-align: center; color: var(--text-muted); margin-top: 12px; margin-bottom: 56px; font-size: 17px; }
.section-sub.light { color: #9ca3af; }

/* ===== Features ===== */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; transition: all .25s ease;
  box-shadow: var(--shadow-md);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(99,102,241,0.3); }
.icon-wrap {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font-size: 24px;
  margin-bottom: 18px;
}
.c1 { background: rgba(99,102,241,0.10);  color: #6366f1; }
.c2 { background: rgba(16,185,129,0.10);  color: #10b981; }
.c3 { background: rgba(59,130,246,0.10);  color: #3b82f6; }
.c4 { background: rgba(236,72,153,0.10);  color: #ec4899; }
.c5 { background: rgba(245,158,11,0.10);  color: #f59e0b; }
.c6 { background: rgba(139,92,246,0.10);  color: #8b5cf6; }
.c7 { background: rgba(244,63,94,0.10);   color: #f43f5e; }
.c8 { background: rgba(20,184,166,0.10);  color: #14b8a6; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 14.5px; }

/* ===== Skills ===== */
.skill-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.skill-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 22px;
}
.skill-tag {
  flex-shrink: 0;
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 12px; font-weight: 600; height: fit-content;
}
.skill-item h4 { font-size: 16px; margin-bottom: 6px; }
.skill-item p { color: var(--text-muted); font-size: 14px; }

/* ===== Download ===== */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.download-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column;
  box-shadow: var(--shadow-md);
}
.download-card.highlight { border-color: var(--accent); box-shadow: 0 14px 40px rgba(99,102,241,0.18); position: relative; }
.download-card.highlight::before {
  content: "推荐"; position: absolute; top: -10px; right: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.download-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.dl-icon { font-size: 36px; }
.dl-icon { color: var(--accent); display: inline-flex; }
.dl-icon .ico { width: 36px; height: 36px; }
.download-head h3 { font-size: 19px; }
.dl-features { list-style: none; padding: 0; margin: 0 0 24px; color: var(--text-muted); font-size: 14.5px; }
.dl-features li { padding: 6px 0; display: flex; align-items: center; gap: 10px; }
.dl-features .ico { color: var(--accent); width: 16px; height: 16px; }

/* ===== Server / Terminal ===== */
.terminal {
  position: relative;
  max-width: 820px; margin: 0 auto;
  background: #0a0d1c; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: #161a30;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.t-dot { width: 12px; height: 12px; border-radius: 50%; }
.t-dot.red { background: #ff5f56; }
.t-dot.yellow { background: #ffbd2e; }
.t-dot.green { background: #27c93f; }
.t-title { color: #9ca3af; font-size: 13px; margin-left: 10px; font-family: 'JetBrains Mono', monospace; }
.terminal-body { padding: 22px 24px; font-family: 'JetBrains Mono', monospace; font-size: 14px; color: #e5e7eb; }
.terminal-body pre { margin: 0 0 10px; white-space: pre-wrap; word-break: break-all; }
.terminal-body .prompt { color: #10b981; margin-right: 10px; }
.terminal-body .cmd { color: #f3f4f6; }
.terminal-body .muted { color: #6b7280; }
.terminal-body .comment { color: #6b7280; font-style: italic; }

.arch-tags {
  display: flex; justify-content: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 28px;
}
.arch-tag {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e5e7eb; font-size: 14px;
  padding: 8px 16px; border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  display: inline-flex; align-items: center; gap: 8px;
}
.arch-tag .ico { width: 16px; height: 16px; color: #a5b4fc; }

/* ===== Mirror Tabs ===== */
.mirror-tabs {
  display: flex; justify-content: center; gap: 8px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.mirror-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: #d1d5db; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .2s ease;
  font-family: inherit;
}
.mirror-tab:hover { background: rgba(255,255,255,0.08); color: #fff; }
.mirror-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}
.mirror-tab .ico { width: 16px; height: 16px; }
.hidden { display: none !important; }
.copy-btn {
  position: absolute; top: 12px; right: 16px;
  background: rgba(255,255,255,0.06); color: #e5e7eb;
  border: 1px solid rgba(255,255,255,0.12); padding: 6px 12px;
  border-radius: 8px; font-size: 12px; cursor: pointer; transition: all .2s;
  font-family: inherit;
}
.copy-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.server-features {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.server-features > div {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 18px;
}
.server-features strong { display: block; color: #fff; margin-bottom: 6px; }
.server-features span { color: #9ca3af; font-size: 14px; }
.server-features code { background: rgba(255,255,255,0.08); color: #e5e7eb; }

/* ===== Community ===== */
.community-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.community-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 24px; text-align: center; box-shadow: var(--shadow-md);
}
.qq-icon { font-size: 36px; margin-bottom: 14px; color: var(--accent); display: inline-flex; }
.community-card h3 { font-size: 18px; margin-bottom: 12px; }
.community-card p { color: var(--text-muted); font-size: 14.5px; margin-bottom: 18px; }
.qq-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 8px 0 20px;
  letter-spacing: 0.05em;
}

/* ===== Footer ===== */
.footer { background: #fafbfd; border-top: 1px solid var(--border); padding: 40px 0 32px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 14px; }
.footer-links a:hover { color: var(--accent); }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: #1a1f2e; color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all .25s ease;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero { padding: 72px 0 64px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
