:root {
  --bg: #16171a;
  --panel: #1c1d21;
  --panel-2: #222327;
  --line: #2a2b30;
  --text: #e4e4e7;
  --muted: #8a8a92;
  --accent: #ffffff;
  --accent-2: #c9c9ce;
  --green: #6ee7a0;
  --star: #f5c542;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

.wrap { max-width: 1020px; margin: 0 auto; padding: 0 16px; }

/* ---- top bar ---- */
.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; user-select: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 6px; display: block; }

/* ---- breadcrumb ---- */
.breadcrumb { font-size: 13px; color: var(--muted); padding: 18px 0 14px; }
.breadcrumb .crumb { color: var(--muted); }
.breadcrumb .crumb + .crumb::before { content: "/"; margin: 0 8px; color: #3a3b40; }

/* ---- hero ---- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  flex-wrap: wrap;
}
.hero-left { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; }
.hero-info { min-width: 0; }
.hero-info h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.3; }
.hero-info h1 .sub-label { font-weight: 400; color: var(--muted); font-size: 16px; margin-left: 8px; }
.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.hero-meta .stars { color: var(--star); letter-spacing: 1px; }
.hero-meta .rating-num { color: var(--text); font-weight: 600; }
.dl-btn-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--accent);
  color: #18181b;
  border: none;
  border-radius: var(--radius);
  padding: 14px 36px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.dl-btn-hero:hover { background: #d4d4d8; }
.dl-btn-text { font-size: 16px; font-weight: 700; }
.dl-btn-sub { font-size: 12px; opacity: .7; margin-top: 2px; }
.hero-right { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-pw .dl-pw {
  background: transparent;
  border: none;
  padding: 0;
  justify-content: center;
}

/* ---- password + VT row ---- */
.pw-vt-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.dl-pw {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.dl-pw-label { color: var(--muted); font-size: 12.5px; }
.dl-pw-code {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  font-family: Consolas, "Courier New", monospace;
  user-select: all;
  letter-spacing: .5px;
}
.dl-pw-copy {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: inherit;
  font-size: 12px;
  transition: color .2s, border-color .2s, background .2s;
}
.dl-pw-copy:hover { color: var(--text); border-color: #45464d; background: var(--line); }
.dl-pw-copy .dl-pw-check-icon { display: none; }
.dl-pw-copy.copied { color: var(--green); border-color: rgba(110,231,160,.4); background: rgba(110,231,160,.08); }
.dl-pw-copy.copied .dl-pw-copy-icon { display: none; }
.dl-pw-copy.copied .dl-pw-check-icon { display: inline; }
.dl-pw-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.4;
}
.dl-pw-note svg { flex: none; opacity: .6; }
.vt-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
}
a.vt-badge:hover { text-decoration: none; background: var(--panel-2); }
.vt-icon { width: 24px; height: 24px; flex: none; color: var(--green); }
.vt-txt { display: flex; flex-direction: column; line-height: 1.35; font-size: 12.5px; }
.vt-txt b { font-size: 13px; }
.vt-ratio { color: var(--green); font-weight: 600; }
.vt-label { color: var(--muted); font-size: 11.5px; }

/* ---- content grid ---- */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  margin-top: 20px;
}
.content-main { min-width: 0; }
.content-side {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 76px;
}
.content-side h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }

/* ---- tabs ---- */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 18px;
  font-size: 14px;
  color: var(--muted);
  cursor: default;
  user-select: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab:not(.active) { cursor: pointer; }
.tab:not(.active):hover { color: var(--accent-2); }
.tab-content[hidden] { display: none; }

/* ---- description ---- */
.description h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.description p { margin: 0 0 14px; color: var(--accent-2); line-height: 1.7; }

/* ---- features ---- */
.features {
  margin-top: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.features h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.features ul { margin: 0; padding: 0; list-style: none; }
.features li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--accent-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.features li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}

/* ---- specs sidebar ---- */
.specs { margin: 0; }
.specs dt {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-top: 12px;
}
.specs dt:first-of-type { margin-top: 0; }
.specs dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.hash {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  color: #6c7686;
  word-break: break-all;
  line-height: 1.5;
}

/* ---- reviews ---- */
.reviews { display: flex; flex-direction: column; gap: 12px; }
.review {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}
.review-author { font-weight: 600; color: var(--text); }
.review-stars { color: var(--star); font-size: 12px; letter-spacing: 1px; }
.review-date { color: var(--muted); margin-left: auto; font-size: 12px; }
.review p { margin: 0; color: var(--accent-2); line-height: 1.6; font-size: 14px; }

/* ---- changelog ---- */
.changelog { display: flex; flex-direction: column; gap: 16px; }
.cl-entry {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.cl-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.cl-version {
  font-weight: 700;
  font-size: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 2px 10px;
  border-radius: 4px;
}
.cl-date { color: var(--muted); font-size: 12px; }
.cl-entry ul { margin: 0; padding: 0 0 0 18px; }
.cl-entry li { font-size: 14px; color: var(--accent-2); padding: 2px 0; }

.empty-tab { color: var(--muted); font-size: 14px; padding: 20px 0; }

/* ---- footer ---- */
.footer {
  margin-top: 40px;
  padding: 20px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---- reveal ---- */
#main-content, #footer {
  transition: opacity .3s ease;
}

/* ---- error ---- */
.error {
  background: #2a1c1c;
  border: 1px solid #5c3030;
  border-radius: var(--radius);
  padding: 16px 18px;
  color: #e8b4b4;
}
.error code { color: #f0d0a0; }

/* ---- responsive ---- */
@media (max-width: 720px) {
  .content-grid { grid-template-columns: 1fr; }
  .content-side { position: static; }
  .hero { flex-direction: column; align-items: stretch; }
  .hero-right { width: 100%; }
  .dl-btn-hero { width: 100%; }
  .pw-vt-row { flex-direction: column; }
  .dl-pw, .vt-badge, .dl-pw-note { width: 100%; }
}
