:root {
  --bg: #060711;
  --bg-soft: #0d1022;
  --panel: rgba(13, 17, 36, 0.82);
  --panel-strong: rgba(7, 9, 20, 0.94);
  --text: #f4f7ff;
  --muted: #b7c0db;
  --cyan: #52dfff;
  --pink: #f453c7;
  --gold: #ffc26b;
  --red: #ff5367;
  --line: rgba(135, 220, 255, 0.24);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(82, 223, 255, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(244, 83, 199, 0.15), transparent 34rem),
    linear-gradient(180deg, #060711 0%, #0b0e1c 42%, #05050b 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.025) 50%, rgba(0,0,0,0.06) 50%),
    linear-gradient(90deg, rgba(255,0,160,0.025), rgba(0,255,255,0.018));
  background-size: 100% 4px, 7px 100%;
  mix-blend-mode: screen;
  opacity: 0.38;
  z-index: 4;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  overflow: hidden;
}

.hero {
  min-height: 94vh;
  position: relative;
  padding: 20px clamp(18px, 4vw, 64px) 72px;
  background:
    linear-gradient(90deg, rgba(4, 5, 13, 0.90), rgba(8, 9, 20, 0.50) 58%, rgba(4, 5, 13, 0.88)),
    url("assets/images/background_universe.png") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(0deg, var(--bg), transparent);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5, 7, 16, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.language-picker {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.language-picker:focus-within {
  color: var(--text);
  background: rgba(82, 223, 255, 0.10);
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(135, 220, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.language-picker span {
  color: var(--muted);
  font-size: 12px;
}

.language-picker select {
  min-width: 116px;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-weight: 700;
}

.language-picker option {
  color: #101320;
  background: #f4f7ff;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 8px 12px;
  font-size: 20px;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
  max-width: 1180px;
  margin: 9vh auto 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(82, 223, 255, 0.32);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
}

.hero-lead,
.world-copy p,
.card-body p,
.place-card p,
.map-card p,
.timeline p,
.glossary-grid p {
  color: var(--muted);
  line-height: 1.72;
}

.hero-lead {
  max-width: 720px;
  font-size: clamp(17px, 2vw, 20px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.button.primary {
  color: #06101b;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 0 32px rgba(82, 223, 255, 0.28);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.06);
}

.hero-card {
  position: relative;
  min-height: 560px;
}

.hero-character {
  width: min(430px, 90%);
  margin: 0 auto;
  filter: drop-shadow(0 0 34px rgba(82, 223, 255, 0.22));
}

.status-card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  max-width: 380px;
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5, 8, 18, 0.82);
  box-shadow: var(--shadow);
}

.status-card p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  float: right;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
}

.quick-search,
.section,
.site-footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.quick-search {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  transform: translateY(-32px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.quick-search h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 38px);
}

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

.search-box input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
}

.search-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(82, 223, 255, 0.12);
}

.section {
  padding: 68px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.wiki-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.wiki-card,
.place-card,
.map-card,
.download-card,
.glossary-grid article {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(16, 21, 46, 0.92), rgba(7, 9, 20, 0.86));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.wiki-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 0.58fr 1fr;
}

.download-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
  align-items: center;
}

.download-icon-wrap {
  display: grid;
  place-items: center;
  min-height: 240px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 20%, rgba(244, 83, 199, 0.18), transparent 55%),
    rgba(0, 0, 0, 0.22);
}

.download-icon {
  width: 168px;
  height: 168px;
  border-radius: 34px;
  object-fit: cover;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

.download-copy p {
  color: var(--muted);
  line-height: 1.72;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.card-media {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 20%, rgba(82, 223, 255, 0.18), transparent 55%),
    rgba(0, 0, 0, 0.22);
}

.card-media img {
  max-height: 410px;
  object-fit: contain;
}

.danger .card-media img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 18px;
}

.card-body {
  padding: 28px;
}

.tag {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #06101b;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tag.red {
  background: var(--red);
  color: white;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.facts div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.facts dt {
  color: var(--cyan);
  font-weight: 800;
}

.facts dd {
  margin: 0;
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  align-items: center;
}

.world-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.world-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.world-figure figcaption {
  padding: 16px 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.place-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  align-items: center;
}

.place-card img {
  width: 180px;
  height: 132px;
  border-radius: 18px;
  object-fit: cover;
}

.map-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) 1fr;
  gap: 28px;
  padding: 22px;
  align-items: center;
}

.map-card img {
  width: 100%;
  border-radius: 20px;
}

.timeline {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}

.timeline span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #07111d;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  font-weight: 950;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.glossary-grid article {
  padding: 22px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 30px 0 46px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(5, 7, 16, 0.96);
  }

  .language-picker {
    justify-content: space-between;
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero-grid,
  .quick-search,
  .split-section,
  .map-card,
  .download-card {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: auto;
  }

  .status-card {
    position: static;
    margin-top: 16px;
  }

  .wiki-grid,
  .place-grid,
  .glossary-grid {
    grid-template-columns: 1fr;
  }

  .wiki-card.featured {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: auto;
    padding-bottom: 56px;
  }

  .hero-grid {
    margin-top: 44px;
  }

  .place-card {
    grid-template-columns: 1fr;
  }

  .place-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .download-actions .button {
    width: 100%;
  }
}
