:root {
  color-scheme: dark;
  --bg: #050914;
  --panel: rgba(7, 20, 36, 0.72);
  --panel-strong: rgba(10, 30, 54, 0.9);
  --line: rgba(91, 217, 255, 0.42);
  --line-bright: rgba(135, 231, 255, 0.88);
  --text: #edf8ff;
  --muted: #a5c1d5;
  --cyan: #49d9ff;
  --blue: #2f7dff;
  --violet: #9b6cff;
  --shadow: rgba(0, 160, 255, 0.32);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 78% 12%, rgba(42, 117, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #061121 0%, var(--bg) 46%, #02050b 100%);
  color: var(--text);
}

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

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

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: linear-gradient(180deg, rgba(2, 8, 18, 0.82), rgba(2, 8, 18, 0.1));
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #dff8ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 0 22px var(--shadow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease-out;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 120px clamp(22px, 6vw, 96px) 72px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.82) 0%, rgba(3, 7, 18, 0.38) 43%, rgba(3, 7, 18, 0.16) 100%),
    url("./assets/images/main_menu_background.png") center / cover no-repeat;
  transform: scale(1.03);
  animation: slowDrift 18s ease-in-out infinite alternate;
}

.hero-grid {
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(80, 210, 255, 0.28);
  pointer-events: none;
}

.hero-grid::before,
.hero-grid::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.hero-grid::before {
  left: 0;
  top: 46px;
}

.hero-grid::after {
  right: 0;
  bottom: 46px;
  transform: rotate(180deg);
}

.hero-content {
  position: relative;
  width: min(720px, 100%);
}

.eyebrow,
.section-kicker {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 12px 0 0;
  color: #f7fdff;
  font-size: clamp(46px, 8vw, 108px);
  line-height: 1.03;
  text-shadow:
    0 0 18px rgba(78, 203, 255, 0.72),
    0 0 48px rgba(51, 118, 255, 0.42);
}

.subtitle {
  max-width: 620px;
  margin: 24px 0 0;
  color: #d7ecf8;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.7;
}

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

.primary-action,
.secondary-action,
.gallery-button,
.download-card {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 55, 96, 0.86), rgba(8, 18, 36, 0.62));
  box-shadow: 0 0 24px rgba(43, 167, 255, 0.12), inset 0 0 18px rgba(90, 205, 255, 0.08);
  transition: transform 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out;
}

.primary-action,
.secondary-action {
  min-width: 150px;
  padding: 14px 24px;
  text-align: center;
  font-weight: 700;
}

.primary-action {
  color: #03121d;
  border-color: rgba(166, 241, 255, 0.95);
  background: linear-gradient(135deg, #90f2ff, #3d9bff);
}

.secondary-action {
  color: #dff8ff;
}

.primary-action:hover,
.secondary-action:hover,
.gallery-button:hover,
.download-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-bright);
  box-shadow: 0 0 34px rgba(73, 217, 255, 0.28);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: 46px 0 0;
}

.hero-meta div {
  padding: 14px 16px;
  border: 1px solid rgba(91, 217, 255, 0.22);
  background: rgba(4, 14, 28, 0.58);
}

.hero-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.hero-meta dd {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 104px 0;
}

.section h2 {
  margin: 10px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.18;
}

.section p {
  color: #c8dcea;
  font-size: 17px;
  line-height: 1.9;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 48px;
  align-items: center;
}

.signal-panel {
  display: grid;
  gap: 14px;
}

.signal-panel div {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(91, 217, 255, 0.28);
  background: rgba(7, 22, 42, 0.7);
  color: #eaf9ff;
  font-weight: 700;
}

.signal-panel span {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.character-card {
  min-height: 560px;
  display: grid;
  align-content: end;
  overflow: hidden;
  position: relative;
  padding: 22px;
  border: 1px solid rgba(91, 217, 255, 0.24);
  background:
    radial-gradient(circle at 50% 18%, rgba(63, 155, 255, 0.2), transparent 42%),
    rgba(6, 19, 36, 0.72);
}

.character-card img {
  position: absolute;
  left: 50%;
  top: 14px;
  width: min(86%, 310px);
  max-height: 380px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 28px rgba(70, 196, 255, 0.26));
}

.character-card div {
  position: relative;
  z-index: 1;
  padding-top: 340px;
}

.role {
  margin: 0;
  color: var(--cyan) !important;
  font-size: 13px !important;
  letter-spacing: 0.08em;
}

.character-card h3 {
  margin: 6px 0 8px;
  font-size: 28px;
}

.character-card p:last-child {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.75;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-button {
  color: var(--muted);
  padding: 10px 16px;
  cursor: pointer;
}

.gallery-button.is-active {
  color: #03121d;
  border-color: rgba(166, 241, 255, 0.95);
  background: linear-gradient(135deg, #8ff2ff, #367dff);
}

.showcase-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(91, 217, 255, 0.34);
  background: var(--panel);
  box-shadow: 0 0 40px rgba(0, 115, 255, 0.18);
}

.showcase-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.showcase-frame figcaption {
  padding: 16px 20px;
  color: #c9e7f5;
  border-top: 1px solid rgba(91, 217, 255, 0.2);
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.thumb-row button {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(91, 217, 255, 0.24);
  background: rgba(5, 14, 28, 0.8);
}

.thumb-row img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.68;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.thumb-row button:hover img,
.thumb-row button.is-active img {
  opacity: 1;
  transform: scale(1.03);
}

.download-section {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(420px, 1fr);
  gap: 38px;
  align-items: center;
}

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

.download-card {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 22px;
}

.download-card span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.download-card strong {
  font-size: 20px;
  line-height: 1.25;
}

.download-card small {
  align-self: end;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid rgba(91, 217, 255, 0.16);
  color: var(--muted);
  font-size: 13px;
}

@keyframes slowDrift {
  from { transform: scale(1.03) translate3d(-8px, -4px, 0); }
  to { transform: scale(1.06) translate3d(10px, 6px, 0); }
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 20px;
  }

  .hero {
    padding-top: 150px;
  }

  .hero-meta,
  .split-layout,
  .character-grid,
  .download-section,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .download-section {
    gap: 20px;
  }
}

@media (max-width: 620px) {
  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
  }

  .hero {
    min-height: 760px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-meta,
  .thumb-row {
    grid-template-columns: 1fr 1fr;
  }

  .character-card {
    min-height: 520px;
  }

  .site-footer {
    flex-direction: column;
  }
}
