:root {
  --bg: #080c14;
  --bg-elev: #0f1624;
  --surface: rgba(20, 28, 46, 0.72);
  --surface-solid: #141c2e;
  --border: rgba(148, 163, 184, 0.16);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --primary-a: #3b82f6;
  --primary-b: #8b5cf6;
  --ok: #22c55e;
  --warn: #f59e0b;
  --teal: #14b8a6;
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(56, 189, 248, 0.16), transparent 60%),
    radial-gradient(700px 420px at 10% 10%, rgba(139, 92, 246, 0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* Header */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 12, 20, 0.82);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  white-space: nowrap;
}

.brand:hover { text-decoration: none; }

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a { color: var(--muted); white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.lang-btn.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent);
}

.lang-btn:hover:not(.active) {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 68px 0 42px;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 820px;
  margin: 0 auto 18px;
}

.hero h1 span {
  background: linear-gradient(135deg, #60a5fa, #38bdf8, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  font-size: 17px;
  max-width: 700px;
  margin: 0 auto 28px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, filter .14s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.45);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-a), var(--primary-b));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.28);
}

.btn-primary:hover { filter: brightness(1.08); border-color: transparent; }

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

/* Checksums */
.checksum-wrap {
  max-width: 780px;
  margin: 22px auto 0;
  text-align: left;
  background: rgba(15, 22, 36, 0.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
}

.checksum-wrap summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.checksum-wrap summary::-webkit-details-marker { display: none; }
.checksum-wrap summary:hover { color: var(--text); }

.checksum-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checksum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  flex-wrap: wrap;
}

.checksum-arch {
  font-weight: 700;
  color: var(--accent);
  min-width: 58px;
}

.checksum-hash {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  color: #cbd5e1;
  word-break: break-all;
  flex: 1;
}

.copy-btn {
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.8);
  color: var(--text);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease;
}

.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { border-color: var(--ok); color: var(--ok); }

/* Sections */
.section { padding: 44px 0; }

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

.section-head h2 {
  font-size: 28px;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.section-head p { color: var(--muted); font-size: 15px; max-width: 660px; margin: 0 auto; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--text);
}

.card p {
  color: var(--muted);
  font-size: 14.5px;
}

.badge-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 10px;
}

/* Gallery & App UI Preview Mockups */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.shot {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ui-preview {
  padding: 18px;
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, #16181d 0%, #1c1e24 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  color: #e2e8f0;
}

.ui-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 12.5px;
  color: #93c5fd;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ui-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #7dd3fc;
}

.ui-pill.ok {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}

.ui-field {
  background: #2b2d33;
  border: 1px solid #3f424a;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11.5px;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ui-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ui-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  color: #94a3b8;
}

.ui-row.selected {
  background: rgba(47, 111, 237, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #f1f5f9;
}

.disk-bar {
  display: grid;
  grid-template-columns: 18% 58% 24%;
  gap: 5px;
  margin-top: 2px;
}

.part-tile {
  background: rgba(16, 70, 67, 0.85);
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-radius: 8px;
  padding: 9px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.part-tile strong {
  font-size: 11px;
  color: #99f6e4;
}

.part-tile span {
  font-size: 10px;
  color: #cbd5e1;
}

.ui-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.ui-chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #252830;
  border: 1px solid #3a3e48;
  color: #cbd5e1;
}

.ui-chip.on {
  background: rgba(47, 111, 237, 0.22);
  border-color: rgba(96, 165, 250, 0.45);
  color: #e0f2fe;
}

.shot figcaption {
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Warning / Safety Banner */
.notice-banner {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  padding: 18px 22px;
  color: #fde68a;
  font-size: 14.5px;
}

.notice-banner strong { color: #fef3c7; }

/* Article pages (Privacy / Support) */
.page-main {
  flex: 1;
  padding: 52px 0 64px;
}

.doc {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.doc h1 {
  font-size: 30px;
  margin-bottom: 8px;
}

.doc .meta {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.doc h2 {
  font-size: 19px;
  margin: 28px 0 10px;
  color: #e2e8f0;
}

.doc p, .doc li {
  color: #cbd5e1;
  font-size: 15px;
}

.doc ul, .doc ol {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 14px;
}

.callout {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #e0f2fe;
  font-size: 14.5px;
}

.callout-warn {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fde68a;
  font-size: 14.5px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13.5px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  color: #7dd3fc;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 26px 0;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 720px) {
  .nav { height: auto; padding: 12px 0; flex-wrap: wrap; }
  .nav-right { width: 100%; justify-content: space-between; }
  .nav-links { gap: 14px; font-size: 13px; }
  .doc { padding: 24px 18px; }
}
