:root {
  --bg: #0b0e14;
  --panel: #141924;
  --panel2: #1b2233;
  --line: #26304a;
  --text: #e7ecf5;
  --muted: #93a0b8;
  --accent: #4f9cf9;
  --accent2: #7c5cff;
  --ok: #3fbf7f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

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

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  background: linear-gradient(90deg, rgba(79,156,249,.12), rgba(124,92,255,.12));
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; color: var(--text); }
.tag { color: var(--muted); font-size: 13px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }

h1 { font-size: 30px; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 40px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
h3 { font-size: 16px; margin: 20px 0 8px; }
.sub { color: var(--muted); font-size: 15px; max-width: 820px; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.badge {
  font-size: 12px; padding: 4px 10px; border-radius: 20px;
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
}
.badge b { color: var(--text); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.card .k { color: var(--muted); font-size: 13px; }
.card .v { font-size: 22px; font-weight: 700; margin-top: 4px; }
.card .v small { font-size: 13px; font-weight: 400; color: var(--muted); }

.viewer-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; margin-top: 14px;
}
.viewer-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.viewer-toolbar select, .viewer-toolbar button {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 12px; font-size: 14px; cursor: pointer;
}
.viewer-toolbar select:focus, .viewer-toolbar button:hover { border-color: var(--accent); }
.viewer-toolbar .spacer { flex: 1; }
#viewer { width: 100%; height: 68vh; position: relative; background: #0a0c12; }
#viewer canvas { display: block; }
#hint {
  position: absolute; left: 14px; bottom: 12px; pointer-events: none;
  color: var(--muted); font-size: 12px;
}
#loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 15px; background: rgba(10,12,18,.55); pointer-events: none;
}
.pc-desc { padding: 12px 16px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

.slider-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }

.img-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
figure img { width: 100%; display: block; background: #000; }
figure figcaption { padding: 10px 14px; font-size: 13px; color: var(--muted); }

.frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.frames img { width: 100%; display: block; border-radius: 8px; border: 1px solid var(--line); }

.table-wrap { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; background: var(--panel); border-radius: 10px; overflow: hidden; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { background: var(--panel2); color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: none; }

code { background: #0e1420; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: .9em; }
pre { background: #0d1220; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
pre code { background: none; border: none; padding: 0; }

blockquote { margin: 12px 0; padding: 10px 16px; border-left: 3px solid var(--accent2); background: var(--panel); border-radius: 0 8px 8px 0; color: var(--muted); }

/* report page */
main.report { max-width: 980px; margin: 0 auto; padding: 32px 24px 90px; }
.report h1 { font-size: 26px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.report h2 { border-bottom: 1px solid var(--line); }
.report table { font-size: 13px; }

.downloads { list-style: none; padding: 0; margin: 8px 0; }
.downloads li { padding: 9px 4px; border-bottom: 1px dashed var(--line); }
.downloads .sz { color: var(--muted); font-size: 12px; }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; border-top: 1px solid var(--line); }
