:root {
  --bg: #08090c;
  --surface: #101218;
  --surface-2: #151822;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef1f7;
  --muted: #9aa3b2;
  --accent: #7c5cff;
  --accent-2: #35e0c8;
  --radius: 20px;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.18; letter-spacing: -0.025em; font-weight: 650; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(760px 520px at 12% -8%, rgba(124, 92, 255, 0.24), transparent 62%),
    radial-gradient(620px 460px at 92% 10%, rgba(53, 224, 200, 0.12), transparent 65%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 600;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 224, 200, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(53, 224, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 224, 200, 0); }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  background: rgba(8, 9, 12, 0.72);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }

.logo-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--accent), #4b34c9);
  font-size: 15px;
  color: #fff;
}

.logo-text { letter-spacing: -0.01em; }
.dot { color: var(--accent-2); }

.nav { display: flex; gap: 26px; font-size: 14.5px; color: var(--muted); }
.nav a { position: relative; padding: 4px 0; transition: color 0.2s ease; }
.nav a:hover { color: var(--text); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ---------- hero ---------- */

.style-hero { padding: 72px 0 34px; position: relative; z-index: 1; }

.style-hero h1 { font-size: clamp(38px, 6vw, 64px); }

.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin-top: 20px;
  max-width: 620px;
  color: var(--muted);
  font-size: 16.5px;
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  margin: 34px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.metrics dt { font-size: 28px; font-weight: 680; letter-spacing: -0.02em; }
.metrics dd { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- filters ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 8px;
  position: relative;
  z-index: 1;
}

.filter {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.24); }

.filter.is-active {
  color: #0b0c10;
  background: linear-gradient(120deg, var(--accent-2), #7ef0dd);
  border-color: transparent;
  font-weight: 600;
}

.filter .count { opacity: 0.6; margin-left: 6px; font-size: 12px; }

/* ---------- toolbar ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
  position: relative;
  z-index: 1;
}

.search {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 14px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search:focus-within { border-color: rgba(124, 92, 255, 0.55); background: rgba(124, 92, 255, 0.06); }

.search svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
}

.search input::-webkit-search-cancel-button { filter: invert(0.6); }

.search kbd {
  font: inherit;
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  flex: none;
}

.search:focus-within kbd { opacity: 0; }

.seg {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  height: 44px;
  align-items: center;
}

.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  padding: 7px 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.seg-btn:hover { color: var(--text); }
.seg-btn.is-active { color: var(--text); background: rgba(124, 92, 255, 0.22); }

.random-btn {
  appearance: none;
  height: 44px;
  border: 1px solid rgba(53, 224, 200, 0.3);
  background: rgba(53, 224, 200, 0.08);
  color: var(--accent-2);
  font: inherit;
  font-size: 14px;
  padding: 0 18px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.random-btn:hover { background: rgba(53, 224, 200, 0.16); border-color: rgba(53, 224, 200, 0.55); }

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 22px;
}

.result-hint { color: var(--muted); font-size: 13.5px; }

.clear-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.clear-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }

/* ---------- grid ---------- */

.style-grid {
  columns: 3;
  column-gap: 20px;
  padding-bottom: 48px;
}

.card {
  break-inside: avoid;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  padding: 0;
  color: inherit;
  font: inherit;
  width: 100%;
  transition: transform 0.35s var(--ease), border-color 0.3s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.card-media { position: relative; overflow: hidden; background: #05060a; }
.card-media img,
.card-media video {
  display: block;
  width: 100%;
  transition: transform 0.6s var(--ease);
}
.card:hover .card-media img,
.card:hover .card-media video { transform: scale(1.04); }

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(8, 9, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(6px);
}

.badge-video::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid var(--accent-2);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.card-body { padding: 15px 16px 17px; }

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.04em;
}

.card-meta .platform {
  color: var(--accent-2);
  border: 1px solid rgba(53, 224, 200, 0.25);
  background: rgba(53, 224, 200, 0.06);
  padding: 1px 8px;
  border-radius: 999px;
}

.card-body h3 { font-size: 16px; }
.card-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.tag {
  font-size: 11.5px;
  color: var(--accent-2);
  border: 1px solid rgba(53, 224, 200, 0.28);
  background: rgba(53, 224, 200, 0.07);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.empty { color: var(--muted); padding: 40px 0 80px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox[hidden] { display: none; }

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.82);
  backdrop-filter: blur(8px);
}

.lb-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  width: min(1040px, 100%);
  max-height: 88vh;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lb-media { background: #05060a; display: grid; place-items: center; }
.lb-media img,
.lb-media video { width: 100%; height: 100%; object-fit: contain; max-height: 88vh; }

.lb-body { padding: 30px 28px; overflow-y: auto; }

.lb-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lb-body h2 { font-size: 24px; margin-top: 12px; }
.lb-note { margin-top: 14px; color: var(--muted); font-size: 14.5px; }

.lb-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 18px 0 0; }

.lb-source {
  display: inline-block;
  margin-top: 22px;
  font-size: 14px;
  color: var(--accent-2);
  border-bottom: 1px solid rgba(53, 224, 200, 0.35);
  padding-bottom: 2px;
}

.lb-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.7);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.72);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lb-nav:hover, .lb-close:hover { background: rgba(124, 92, 255, 0.35); }
.lb-prev { left: 12px; }
.lb-next { right: calc(38% + 12px); }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .style-grid { columns: 2; }
  .lb-panel { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }
  .lb-media img, .lb-media video { max-height: 46vh; }
  .lb-next { right: 12px; }
}

@media (max-width: 640px) {
  .style-grid { columns: 1; }
  .nav { gap: 16px; font-size: 13.5px; }
  .metrics { gap: 28px; }
  .style-hero { padding-top: 48px; }
  .toolbar { gap: 10px; }
  .search { flex: 1 1 100%; }
  .seg { flex: 1 1 auto; justify-content: center; }
  .random-btn { flex: 1 1 100%; }
  .filter { font-size: 13px; padding: 7px 13px; }
}

/* ================= 视觉图鉴 ================= */

:root {
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

/* 分区导航 + 工具条 */

.subnav-wrap {
  position: sticky;
  top: 72px;
  z-index: 50;
  background: rgba(8, 9, 12, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.subnav-sections { display: flex; flex-wrap: wrap; gap: 6px; }

.sec-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  padding: 8px 13px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.sec-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

.sec-btn.is-active {
  color: var(--text);
  background: rgba(124, 92, 255, 0.18);
  border-color: rgba(124, 92, 255, 0.4);
}

.sec-no {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  opacity: 0.55;
}

.sec-btn .count,
.filter .count {
  font-family: var(--mono);
  font-size: 10.5px;
  opacity: 0.55;
}

.subnav .search { flex: 1 1 220px; height: 40px; border-radius: 12px; }
.subnav .seg { height: 40px; border-radius: 12px; }
.subnav .seg-btn { font-size: 13px; padding: 6px 13px; }
.subnav .random-btn { height: 40px; font-size: 13px; padding: 0 15px; border-radius: 12px; }

.filters { margin: 0 0 6px; }

/* 分区标题 */

.atlas-section { margin-bottom: 54px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-bottom: 20px;
}

.section-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  margin-top: 7px;
}

.count-badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-2);
  border: 1px solid rgba(53, 224, 200, 0.3);
  background: rgba(53, 224, 200, 0.07);
  border-radius: 999px;
  padding: 1px 8px;
  transform: translateY(2px);
}

.section-desc { margin-top: 7px; font-size: 13.8px; color: var(--muted); max-width: 560px; }

/* 词条卡片 */

.card-no {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(4, 5, 8, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 3px 8px;
  backdrop-filter: blur(6px);
}

.card-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.card-en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.card-def {
  margin-top: 6px;
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.palette { display: flex; gap: 5px; margin-top: 11px; }

.swatch {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-block;
}

.copy-btn {
  appearance: none;
  border: 1px solid rgba(53, 224, 200, 0.32);
  background: rgba(53, 224, 200, 0.08);
  color: var(--accent-2);
  font: inherit;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.copy-btn:hover { background: rgba(53, 224, 200, 0.18); border-color: rgba(53, 224, 200, 0.6); }

.card-copy { margin-top: 13px; width: 100%; }

/* 灯箱新增块 */

.lb-no {
  font-family: var(--mono);
  letter-spacing: 0.1em;
  color: var(--accent-2);
  text-transform: none;
}

.lb-en {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.lb-def { margin-top: 13px; font-size: 14.5px; line-height: 1.75; }

.lb-palette {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
}

.lb-palette .swatch { width: 24px; height: 24px; border-radius: 6px; }

.swatch-hex {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-right: 8px;
  text-transform: uppercase;
}

.prompt-block {
  margin-top: 18px;
  border: 1px solid rgba(53, 224, 200, 0.28);
  background: rgba(53, 224, 200, 0.06);
  border-radius: 14px;
  padding: 12px 14px 14px;
}

.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.prompt-text {
  margin-top: 9px;
  font-size: 13.5px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.lb-fields { margin: 20px 0 0; display: grid; gap: 14px; }

.lb-field dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
}

.lb-field dd { margin: 5px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--muted); }

.lb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.lb-date { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--muted); }
.lb-source { margin-top: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(53, 224, 200, 0.95);
  color: #05201c;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.toast[hidden] { display: none; }

@media (max-width: 1024px) {
  .subnav-wrap { position: static; }
  .subnav .search { flex: 1 1 100%; order: 3; }
  .subnav .random-btn { margin-left: auto; }
}

@media (max-width: 640px) {
  .section-head h2 { font-size: 22px; }
  .subnav { gap: 8px; }
  .sec-btn { padding: 7px 10px; }
  .card-copy { font-size: 12.5px; }
}

