:root {
  color-scheme: dark;
  --bg: #070b14;
  --panel: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e8eefc;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --primary-2: #0ea5e9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("./assets/website-hero-bg.png") no-repeat right bottom / cover;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: block;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: contain;
}

.hero-copy {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.github-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.github-link:hover {
  color: white;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 36px;
}

.eyebrow {
  margin: 0;
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 16px 0 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(100deg, #fff, #60a5fa 55%, #22d3ee);
  background-clip: text;
  -webkit-background-clip: text;
}

.lead {
  margin: 18px 0 0;
  max-width: 540px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}

.platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.platform-row span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.note {
  margin: 18px 0 0;
  max-width: 560px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.hero-panel .window {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.window-bar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.35);
}

.window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
}

.window-bar span:nth-child(1) { background: #f87171; }
.window-bar span:nth-child(2) { background: #fbbf24; }
.window-bar span:nth-child(3) { background: #34d399; }

.window-body {
  padding: 28px;
}

.chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
}

.window-body h2 {
  margin: 16px 0 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.window-body p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.stats div {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.35);
}

.stats strong {
  display: block;
  font-size: 16px;
}

.stats small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.downloads {
  margin: 24px 0 72px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.downloads h2 {
  margin: 0 0 18px;
  font-size: 20px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.download-card {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.35);
  color: inherit;
  text-align: left;
  padding: 16px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.download-card:hover,
.download-card.linkish:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(30, 41, 59, 0.65);
}

.download-card strong {
  display: block;
  font-size: 15px;
}

.download-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  color: #64748b;
  font-size: 12px;
}

footer a {
  color: #94a3b8;
}

footer a:hover {
  color: white;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(440px, 100%);
  position: relative;
  padding: 28px 24px 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.modal h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.modal-desc {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.modal-actions .btn {
  width: 100%;
}

.modal-hint {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .download-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .download-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
