:root {
  color-scheme: dark;
  --bg: #0d0f13;
  --bg-soft: #10141a;
  --surface: #141920;
  --surface-raised: #191f28;
  --surface-hover: #1d2530;
  --line: #29313d;
  --line-strong: #394453;
  --text: #eef1f5;
  --muted: #98a2b1;
  --subtle: #6f7a89;
  --accent: #8eabff;
  --accent-strong: #a9bcff;
  --accent-soft: rgba(142, 171, 255, .11);
  --ok: #71d6a6;
  --danger: #f08b8b;
  --warning: #e7c47e;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 55px rgba(0, 0, 0, .22);
  --content: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(800px 420px at 82% -12%, rgba(126, 153, 214, .08), transparent 68%);
}
::selection { background: rgba(142, 171, 255, .28); color: #fff; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.wrap { position: relative; width: min(100% - 48px, var(--content)); margin: 0 auto; }
.narrow { max-width: 690px; }
.hidden { display: none !important; }

/* Header and navigation */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(13, 15, 19, .88);
  border-bottom: 1px solid rgba(255, 255, 255, .075);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav { min-height: 68px; display: flex; align-items: center; gap: 28px; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.025em;
}
.logo-mark {
  display: block;
  width: 32px;
  height: 32px;
  padding: 3px;
  object-fit: contain;
  border-radius: 9px;
  background: #151d2a;
  border: 1px solid rgba(142, 171, 255, .22);
}
.nav-links { display: flex; align-items: center; gap: 5px; margin-left: auto; font-size: 13px; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255, 255, 255, .055); }
.nav-links a.active { box-shadow: inset 0 -1px 0 rgba(142, 171, 255, .75); }
@media (max-width: 760px) {
  .wrap { width: min(100% - 32px, var(--content)); }
  .nav { min-height: 62px; flex-wrap: wrap; gap: 8px 16px; padding: 12px 0 10px; }
  .nav-links { order: 2; width: 100%; margin: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; min-height: 34px; padding: 0 10px; font-size: 12px; }
}

/* Type and shared page elements */
h1, h2, h3, h4 { color: var(--text); line-height: 1.2; letter-spacing: -.035em; }
h1 { font-size: clamp(38px, 5vw, 58px); font-weight: 690; }
h1 .grad { color: var(--accent-strong); }
h2 { font-size: 26px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 620; }
p { color: var(--muted); }
.eyebrow, .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 16px; height: 1px; background: var(--accent); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.page-head { padding: 64px 0 20px; }
.page-head h1 { margin: 10px 0 12px; font-size: clamp(34px, 4vw, 44px); }
.page-head p { max-width: 660px; font-size: 14px; }
.page-body { padding: 22px 0 76px; }
.lead { max-width: 570px; margin: 20px 0 28px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--subtle); font-size: 12px; }
.meta i { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--subtle); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: #e7ecf5; color: #131923; }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.btn-danger { background: rgba(240, 139, 139, .09); border-color: rgba(240, 139, 139, .22); color: #f0a4a4; }
.btn-danger:hover { background: rgba(240, 139, 139, .15); }
.btn-sm { min-height: 32px; padding: 0 11px; border-radius: 7px; font-size: 11.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 25px; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: clamp(34px, 6vw, 76px); align-items: center; padding: 86px 0 76px; }
.hero h1 { max-width: 650px; margin-top: 20px; }
.hero .lead { margin-top: 20px; }
.console {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(145deg, #171d26, #11161d 70%);
  box-shadow: var(--shadow);
}
.console-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 0 18px; border-bottom: 1px solid var(--line); color: #d9dee7; font-size: 12px; font-weight: 620; }
.console-bar .tag { color: var(--subtle); font-size: 10px; font-weight: 550; letter-spacing: .08em; text-transform: uppercase; }
.console-body { padding: 22px; }
.timer { color: #f1f4f8; font: 600 44px/1.1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: -.055em; }
.timer small { display: block; margin-bottom: 9px; color: var(--subtle); font-size: 10px; font-weight: 600; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; }
.bars { display: grid; gap: 8px; margin-top: 24px; }
.bar { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid rgba(255, 255, 255, .055); border-radius: 8px; background: rgba(0, 0, 0, .13); color: var(--muted); font-size: 12px; }
.bar b { color: var(--text); font-weight: 600; }
.bar .run { color: var(--ok); }
.bar .hunt { color: #e6a0a0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 17px; }
.chip { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--subtle); font-size: 10.5px; }
.home-section { padding: 54px 0 74px; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.sec-head h2 { margin-bottom: 7px; }
.sec-head p { font-size: 13px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 38px; padding: 62px 0 54px; } .console { max-width: 620px; } }
@media (max-width: 520px) { .hero { padding-top: 48px; } .timer { font-size: 38px; } .console-body { padding: 17px; } .sec-head { align-items: start; flex-direction: column; } }

/* Cards, feature grid and shared sections */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.card:hover { border-color: var(--line-strong); background: #171e27; transform: translateY(-2px); }
.card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card p { font-size: 13px; line-height: 1.8; }
.ico { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid rgba(142, 171, 255, .18); border-radius: 8px; background: rgba(142, 171, 255, .075); }
.ico svg { width: 15px; height: 15px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.product-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin-top: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.product-strip > div { padding: 16px 18px; background: var(--surface); }
.product-strip strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 13px; }
.product-strip span { color: var(--subtle); font-size: 11.5px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid, .grid.cols-2, .product-strip { grid-template-columns: 1fr; } }

/* Installation */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; counter-reset: install; }
.step { position: relative; min-height: 190px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); counter-increment: install; }
.step .num { display: grid; place-items: center; width: 29px; height: 29px; margin-bottom: 22px; border: 1px solid rgba(142, 171, 255, .26); border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 700; }
.step h3 { margin-bottom: 9px; }
.step p { font-size: 13px; line-height: 1.8; }
code { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255, 255, 255, .045); color: #c4d2fa; font: 11.5px ui-monospace, SFMono-Regular, Consolas, monospace; }

/* Changelog and FAQ */
.log { display: grid; gap: 12px; max-width: 860px; }
.log-item { padding: 21px 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.log-top { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; }
.ver { color: var(--text); font-size: 15px; font-weight: 700; }
.date { margin-left: auto; color: var(--subtle); font-size: 11.5px; }
.pill, .pill-off { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10.5px; }
.pill { border-color: rgba(113, 214, 166, .22); background: rgba(113, 214, 166, .06); color: var(--ok); }
.pill-off { background: rgba(255, 255, 255, .025); }
.log ul { display: grid; gap: 7px; padding-left: 17px; color: var(--muted); }
.log li { padding-left: 2px; font-size: 12.5px; line-height: 1.75; }
.log li::marker { color: var(--subtle); }
details { margin-bottom: 9px; padding: 0 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
details[open] { border-color: var(--line-strong); }
summary { display: flex; justify-content: space-between; gap: 12px; padding: 15px 0; color: var(--text); cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--subtle); font-size: 17px; font-weight: 400; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { padding: 0 0 16px; font-size: 12.5px; line-height: 1.8; }

/* Download flow */
.download-intro { padding: 58px 0 8px; }
.download-intro h1 { margin: 10px 0 11px; font-size: clamp(34px, 4vw, 43px); }
.download-intro p { max-width: 570px; font-size: 14px; }
.download-box { margin: 22px 0 70px; padding: 27px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.download-step { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--text); font-size: 12.5px; font-weight: 650; }
.download-step span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-strong); font-size: 10px; }
.picks { display: flex; flex-wrap: wrap; gap: 9px; }
.pick { display: flex; flex: 1 1 180px; flex-direction: column; gap: 4px; min-height: 65px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #11161d; color: var(--text); text-align: left; font-size: 13px; font-weight: 620; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.pick small { color: var(--subtle); font-size: 11px; font-weight: 450; }
.pick:hover { border-color: var(--line-strong); }
.pick.active { border-color: rgba(142, 171, 255, .58); background: rgba(142, 171, 255, .085); box-shadow: inset 0 0 0 1px rgba(142, 171, 255, .08); }
.field { min-width: 0; margin-bottom: 17px; }
.field label { display: block; width: fit-content; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 570; }
.input, .textarea, .select { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #0f141a; color: var(--text); font-size: 13px; transition: border-color .16s ease, box-shadow .16s ease; }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(142, 171, 255, .66); box-shadow: 0 0 0 3px rgba(142, 171, 255, .09); }
.input::placeholder, .textarea::placeholder { color: #697483; }
.input.code { font: 600 16px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.textarea { min-height: 92px; resize: vertical; line-height: 1.65; }
.hint { margin-top: 7px; color: var(--subtle); font-size: 11.5px; line-height: 1.7; }
.msg { display: none; margin-top: 13px; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; font-size: 12.5px; }
.msg.show { display: block; }
.msg.err { border-color: rgba(240, 139, 139, .2); background: rgba(240, 139, 139, .07); color: #efaaaa; }
.msg.ok { border-color: rgba(113, 214, 166, .2); background: rgba(113, 214, 166, .07); color: var(--ok); }
.result { display: none; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.result.show { display: block; }
.result-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; color: var(--muted); font-size: 12.5px; }
.result-row b { color: var(--text); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.download-footnote { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 11px; }
@media (max-width: 560px) { .download-box { padding: 19px; } .pick { flex-basis: 100%; } }

/* Footer */
footer { padding: 28px 0 38px; border-top: 1px solid var(--line); color: var(--subtle); text-align: center; font-size: 11.5px; }
footer span { display: block; }

/* Admin */
.admin-main { padding-top: 34px; padding-bottom: 48px; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 26px 0 22px; }
.admin-heading h1 { margin: 8px 0 8px; font-size: 31px; }
.admin-heading p { color: var(--muted); font-size: 12.5px; }
.admin-session { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 12px; }
.admin-session b { color: var(--text); }
.admin-workspace { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; gap: 20px; margin-top: 20px; }
.tabs { position: sticky; top: 88px; display: grid; gap: 4px; padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.tab { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); text-align: left; font-size: 12px; cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.tab:hover { background: rgba(255, 255, 255, .035); color: var(--text); }
.tab.active { border-color: rgba(142, 171, 255, .16); background: var(--accent-soft); color: var(--accent-strong); }
.admin-content { min-width: 0; }
.tabpane { min-width: 0; }
.panel { min-width: 0; margin-bottom: 14px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel h3 { margin-bottom: 15px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.table-wrap { overflow-x: auto; width: 100%; border: 1px solid rgba(255, 255, 255, .055); border-radius: 9px; }
table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
th, td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, .065); text-align: left; white-space: nowrap; }
th { background: rgba(255, 255, 255, .025); color: var(--subtle); font-size: 10.5px; font-weight: 650; }
td { color: #d7dce5; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .018); }
td.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .025em; }
.empty { padding: 26px 18px; color: var(--subtle); text-align: center; font-size: 12px; }
.stat { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.stat > div { min-width: 120px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #11161d; color: var(--muted); font-size: 10.5px; }
.stat b { display: block; margin-top: 4px; color: var(--text); font-size: 20px; line-height: 1.2; font-weight: 650; }
.login-box { max-width: 420px; margin: 82px auto 96px; }
.login-box .panel { padding: 27px; }
.login-box h3 { margin-bottom: 21px; font-size: 19px; }
.login-box .btn { width: 100%; }
#createdCodes { padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 9px; background: rgba(255, 255, 255, .018); overflow-wrap: anywhere; }
@media (max-width: 820px) { .admin-workspace { grid-template-columns: 1fr; gap: 12px; } .tabs { position: static; display: flex; overflow-x: auto; } .tab { width: auto; flex: 0 0 auto; white-space: nowrap; } }
@media (max-width: 640px) { .admin-heading { align-items: start; flex-direction: column; } .row { grid-template-columns: 1fr; } .panel { padding: 16px; } .admin-session { align-items: start; } }

/* Feedback, focus and motion */
.toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; max-width: min(90vw, 460px); padding: 10px 15px; border: 1px solid var(--line-strong); border-radius: 9px; background: #202833; color: var(--text); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .18s ease, transform .18s ease; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

@media (max-width: 900px) { #overviewStats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 420px) { #overviewStats { grid-template-columns: 1fr 1fr !important; gap: 8px; } #overviewStats .card { padding: 14px; } #overviewStats h2 { font-size: 22px; } }
