:root {
  color-scheme: dark;
  --bg: #0a0a0f;
  --panel: rgba(17, 21, 32, 0.84);
  --panel-soft: rgba(15, 18, 28, 0.74);
  --panel-deep: rgba(10, 12, 20, 0.9);
  --line: rgba(145, 158, 196, 0.16);
  --line-strong: rgba(143, 245, 255, 0.26);
  --text: #f5f7ff;
  --muted: #afbad4;
  --dim: #7c88a7;
  --brand: #8ff5ff;
  --brand-strong: #00deec;
  --secondary: #c47fff;
  --accent: #ffd86f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(143, 245, 255, 0.18), transparent 26%),
    radial-gradient(circle at 100% 10%, rgba(196, 127, 255, 0.18), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(255, 216, 111, 0.08), transparent 24%),
    linear-gradient(180deg, #07080d 0%, #0a0c13 100%);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

input {
  border: 1px solid var(--line);
  background: rgba(10, 12, 20, 0.84);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: rgba(143, 245, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(143, 245, 255, 0.08);
}

.ambient {
  position: fixed;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.6;
  z-index: 0;
}

.ambient-a {
  width: 320px;
  height: 320px;
  background: rgba(143, 245, 255, 0.22);
  top: -120px;
  left: -90px;
}

.ambient-b {
  width: 360px;
  height: 360px;
  background: rgba(196, 127, 255, 0.2);
  top: 10%;
  right: -120px;
}

.ambient-c {
  width: 320px;
  height: 320px;
  background: rgba(255, 216, 111, 0.1);
  bottom: -120px;
  left: 28%;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1520px, calc(100vw - 32px));
  margin: 20px auto 36px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 15, 24, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(143, 245, 255, 0.18), rgba(196, 127, 255, 0.24));
  border: 1px solid rgba(143, 245, 255, 0.2);
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 4px;
  color: var(--dim);
  font-size: 13px;
}

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

.topnav a {
  color: var(--muted);
  transition: color 140ms ease;
}

.topnav a:hover {
  color: var(--brand);
}

.page {
  margin-top: 22px;
  display: grid;
  gap: 24px;
}

.surface-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(21, 24, 36, 0.92), rgba(11, 13, 22, 0.94));
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(143, 245, 255, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(20, 24, 38, 0.94), rgba(9, 12, 20, 0.98));
  box-shadow: var(--shadow);
}

.eyebrow,
.panel-label,
.region-count,
.creature-tag,
.detail-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
}

.eyebrow,
.panel-label,
.detail-kicker {
  color: var(--brand);
}

.hero-copy h1 {
  margin: 12px 0 16px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  max-width: 760px;
}

.hero-copy p {
  margin: 0;
  max-width: 740px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.primary-link,
.ghost-link,
.region-chip,
.detail-gallery-item,
.creature-card button,
.accordion summary {
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.primary-link {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #03252a;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(0, 222, 236, 0.22);
}

.ghost-link {
  color: var(--text);
  border-color: var(--line);
  background: rgba(17, 21, 32, 0.7);
}

.primary-link:hover,
.ghost-link:hover {
  transform: translateY(-1px);
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-panel {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(13, 16, 25, 0.82);
}

.hero-panel-highlight {
  background:
    linear-gradient(160deg, rgba(143, 245, 255, 0.12), rgba(196, 127, 255, 0.08)),
    rgba(13, 16, 25, 0.92);
  border-color: rgba(143, 245, 255, 0.18);
}

.hero-panel strong {
  display: block;
  margin: 12px 0 10px;
  font-size: 24px;
}

.hero-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(13, 16, 25, 0.8);
}

.stat-card strong,
.stat-card span {
  display: block;
}

.stat-card strong {
  font-size: 26px;
  margin-bottom: 8px;
}

.stat-card span {
  color: var(--muted);
  line-height: 1.6;
}

.region-strip,
.archive-panel,
.detail-panel {
  padding: 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: 28px;
}

.section-head p {
  margin: 0;
  max-width: 460px;
  color: var(--muted);
  line-height: 1.7;
}

.region-rail {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  overflow: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.region-chip {
  flex: 0 0 300px;
  width: 300px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(12, 15, 24, 0.72);
  color: var(--text);
  text-align: left;
  scroll-snap-align: start;
}

.region-chip:hover,
.region-chip.active {
  transform: translateY(-1px);
  border-color: rgba(143, 245, 255, 0.3);
  box-shadow: 0 14px 30px rgba(0, 222, 236, 0.1);
}

.region-chip.active {
  background: linear-gradient(135deg, rgba(143, 245, 255, 0.12), rgba(196, 127, 255, 0.08));
}

.region-chip strong,
.region-chip span {
  display: block;
}

.region-chip strong {
  margin: 10px 0 8px;
  font-size: 16px;
}

.region-chip span {
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.region-count {
  color: var(--accent);
}

.explore-grid {
  display: block;
}

.control-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-top: 18px;
}

.search-box {
  display: block;
  flex: 1;
}

.search-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.archive-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(12, 15, 24, 0.7);
  font-size: 13px;
}

.creature-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.creature-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(10, 12, 20, 0.88);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.creature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 245, 255, 0.24);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.creature-link {
  display: block;
  width: 100%;
  color: inherit;
}

.creature-link:hover {
  transform: none;
}

.creature-cover {
  position: relative;
  height: 220px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(143, 245, 255, 0.12), rgba(196, 127, 255, 0.06)),
    rgba(10, 12, 20, 0.95);
}

.creature-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.creature-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--dim);
  letter-spacing: 0.12em;
  font-size: 12px;
}

.creature-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 20px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(6, 8, 12, 0.94));
}

.creature-overlay strong,
.creature-overlay span {
  display: block;
}

.creature-overlay strong {
  font-size: 18px;
}

.creature-overlay span {
  margin-top: 6px;
  color: rgba(245, 247, 255, 0.74);
  font-size: 13px;
}

.creature-body {
  padding: 18px;
}

.creature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.creature-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(143, 245, 255, 0.08);
  border: 1px solid rgba(143, 245, 255, 0.14);
}

.creature-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.creature-cta {
  margin-top: 14px;
  color: var(--brand);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.detail-page {
  margin-top: 22px;
  display: grid;
  gap: 24px;
}

.detail-empty {
  min-height: 560px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px;
  color: var(--muted);
  line-height: 1.9;
}

.detail-article {
  padding: 28px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 22px;
}

.detail-cover {
  border-radius: 26px;
  overflow: hidden;
  height: 100%;
  min-height: 440px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(143, 245, 255, 0.08), rgba(196, 127, 255, 0.08)),
    rgba(10, 12, 20, 0.95);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-header h3 {
  margin: 10px 0 8px;
  font-size: clamp(34px, 4vw, 54px);
}

.detail-subtitle {
  margin: 0;
  color: var(--secondary);
  letter-spacing: 0.08em;
}

.detail-summary {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.detail-meta-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-meta-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(12, 15, 24, 0.72);
}

.detail-meta-card strong,
.detail-meta-card span {
  display: block;
}

.detail-meta-card strong {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.detail-meta-card span {
  color: var(--text);
  line-height: 1.6;
}

.detail-gallery {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
}

.detail-gallery-item {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(12, 15, 24, 0.74);
}

.detail-gallery-item:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 245, 255, 0.28);
}

.detail-gallery-item img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  display: block;
}

.detail-section {
  margin-top: 18px;
}

.detail-layout {
  display: grid;
  gap: 22px;
}

.detail-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 22px;
}

.detail-side-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.detail-backbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
}

.detail-backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.detail-backlink:hover {
  color: var(--brand);
}

.detail-related {
  display: grid;
  gap: 12px;
}

.related-card {
  display: block;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(12, 15, 24, 0.72);
}

.related-card:hover {
  border-color: rgba(143, 245, 255, 0.24);
}

.related-card strong,
.related-card span {
  display: block;
}

.related-card strong {
  margin-bottom: 8px;
}

.related-card span {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.accordion {
  display: grid;
  gap: 10px;
}

.accordion details {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(12, 15, 24, 0.72);
}

.accordion summary {
  list-style: none;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion details[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--brand);
}

.accordion-body {
  padding: 16px 18px 18px;
  color: var(--muted);
  line-height: 1.9;
  white-space: pre-line;
}

.detail-region-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(12, 15, 24, 0.78);
}

.detail-region-card strong,
.detail-region-card span {
  display: block;
}

.detail-region-card strong {
  margin: 10px 0 8px;
  font-size: 18px;
}

.detail-region-card span {
  color: var(--muted);
  line-height: 1.8;
}

.empty-state {
  padding: 32px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
}

.empty-note {
  color: #f8c7ff;
}

@media (max-width: 1180px) {
  .hero,
  .detail-hero,
  .detail-body-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: calc(100vw - 16px);
    margin-top: 8px;
  }

  .topbar,
  .hero,
  .region-strip,
  .archive-panel,
  .detail-article,
  .detail-backbar {
    padding: 18px;
    border-radius: 24px;
  }

  .topbar,
  .section-head,
  .control-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-meta-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .creature-cover {
    min-height: 220px;
  }
}
