:root {
  --bg-0: #061120;
  --bg-1: #0c1f37;
  --line: #2bc5ff;
  --line-soft: rgba(43, 197, 255, 0.35);
  --panel: rgba(8, 20, 38, 0.78);
  --panel-2: rgba(10, 27, 51, 0.82);
  --text: #e7f4ff;
  --muted: #9fc3d8;
  --accent: #32d2ff;
  --accent-2: #93ffe2;
  --warn: #ffb347;
  --danger: #ff7171;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 14%, rgba(21, 132, 194, 0.18), transparent 34%),
    radial-gradient(circle at 82% 22%, rgba(136, 62, 180, 0.2), transparent 28%),
    linear-gradient(145deg, #040b16, var(--bg-0) 42%, var(--bg-1));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(114, 177, 215, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 177, 215, 0.1) 1px, transparent 1px);
  background-size: 54px 54px;
  pointer-events: none;
  z-index: -2;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

.topbar {
  width: min(1280px, calc(100% - 2rem));
  margin: 1.2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(4, 17, 35, 0.75);
  backdrop-filter: blur(8px);
}

.site-footer {
  width: min(1280px, calc(100% - 2rem));
  margin: 1rem auto 1.5rem;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(180, 200, 230, 0.65);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(4, 17, 35, 0.45);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.brand {
  font-family: "Orbitron", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  text-shadow: 0 0 18px rgba(110, 248, 255, 0.6);
}

.badge {
  font-size: 0.84rem;
  color: var(--muted);
}

.app-shell {
  width: min(1280px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
}

.screen {
  display: none;
  animation: panelIn 420ms ease;
}

.screen.active {
  display: block;
}

.hero-panel,
.quiz-panel,
.result-panel {
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.25rem;
  padding: 1.4rem;
}

.hero-copy {
  padding: 0.5rem;
}

.eyebrow {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-size: 0.82rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

h1 {
  margin-top: 0.35rem;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.75rem, 2.8vw, 2.7rem);
  line-height: 1.15;
}

.lead {
  margin-top: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

.intro-hook {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: #a8c9dc;
  line-height: 1.6;
}

.highlights {
  margin: 1rem 0 0;
  padding-left: 1rem;
  color: #c8e7f8;
  line-height: 1.9;
}

.hero-actions {
  margin-top: 1.3rem;
}

.note {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  color: #88aec7;
}

.hero-art-wrap {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 220, 255, 0.4);
  background: #03182d;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  position: relative;
}

.hero-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.1) contrast(1.05);
}

.hero-art-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(1, 10, 20, 0.35), transparent 48%);
}

.quiz-panel,
.result-panel {
  padding: 1.25rem;
}

.quiz-top {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-text {
  font-family: "Orbitron", sans-serif;
  font-size: 0.95rem;
  color: var(--accent-2);
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(120, 169, 202, 0.28);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #32d2ff, #82ffc7);
  transition: width 220ms ease;
}

.question-card {
  margin-top: 1rem;
  border: 1px solid rgba(100, 179, 230, 0.34);
  border-radius: 18px;
  padding: 1.15rem;
  background: rgba(3, 14, 30, 0.55);
}

.axis-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(112, 201, 255, 0.5);
  color: #b2ecff;
  font-family: "Orbitron", sans-serif;
  font-size: 0.76rem;
  padding: 0.24rem 0.54rem;
  border-radius: 999px;
}

.question-title {
  margin-top: 0.85rem;
  line-height: 1.5;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
}

.option-list {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.65rem;
}

.option {
  width: 100%;
  border: 1px solid rgba(132, 178, 210, 0.5);
  color: #d9f0ff;
  background: linear-gradient(145deg, rgba(8, 24, 45, 0.9), rgba(10, 34, 61, 0.82));
  border-radius: 13px;
  text-align: left;
  padding: 0.78rem 0.9rem;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  font-size: 0.96rem;
  line-height: 1.55;
}

.option:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.option.selected {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 1px rgba(143, 255, 226, 0.45), 0 8px 24px rgba(80, 188, 255, 0.25);
}

.quiz-bottom,
.result-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 0.68rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  color: #03101d;
  background: linear-gradient(135deg, #32d2ff, #93ffe2);
}

.btn-secondary {
  color: var(--text);
  background: rgba(108, 155, 189, 0.24);
  border: 1px solid rgba(125, 188, 225, 0.45);
}

.result-head h2 {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
  margin-top: 0.3rem;
  color: var(--accent-2);
}

#typeName {
  margin-top: 0.2rem;
  font-size: 1.4rem;
}

.type-title {
  margin-top: 0.15rem;
  font-family: "Orbitron", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  opacity: 0.8;
}

.type-role {
  margin-top: 0.3rem;
  color: var(--muted);
}

.result-portrait-wrap {
  margin-top: 0.9rem;
  border: 1px solid rgba(137, 210, 255, 0.45);
  border-radius: 16px;
  overflow: hidden;
  max-width: 520px;
  background: rgba(5, 18, 35, 0.75);
}

.result-portrait {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.type-summary {
  margin-top: 0.95rem;
  color: #d6ebfa;
  line-height: 1.85;
}

.axis-bars {
  margin-top: 1rem;
  display: grid;
  gap: 0.7rem;
}

.axis-item {
  border: 1px solid rgba(123, 188, 225, 0.35);
  border-radius: 12px;
  padding: 0.68rem 0.8rem;
  background: rgba(9, 23, 42, 0.7);
}

.axis-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  color: #d0ebff;
}

.axis-bar {
  margin-top: 0.44rem;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(115, 165, 197, 0.3);
}

.axis-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #24c7ff, #8dffbc);
}

.result-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.result-grid h4,
.mission-box h4 {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.04em;
  font-size: 0.98rem;
  color: #9cecff;
}

.result-grid ul {
  margin: 0.62rem 0 0;
  padding-left: 1rem;
  line-height: 1.9;
  color: #cae7f8;
}

.mission-box {
  margin-top: 1rem;
  border: 1px solid rgba(140, 197, 228, 0.45);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: rgba(4, 17, 34, 0.7);
}

.mission-box p {
  margin: 0.52rem 0 0;
  line-height: 1.8;
  color: #d4efff;
}

.motto {
  color: var(--warn) !important;
  font-weight: 700;
}

.hero-video-wrap {
  margin-top: 1.2rem;
  border: 1px solid rgba(43, 197, 255, 0.25);
  border-radius: 14px;
  padding: 0.65rem 0.75rem 0.75rem;
  background: linear-gradient(145deg, rgba(6, 22, 42, 0.8), rgba(12, 31, 55, 0.7));
  max-width: 520px;
}

.hero-video-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.55rem;
  text-align: left;
}

/* 竖屏 9:16，与手游内录一致；与上方人物图同左对齐 */
.hero-video-frame {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #050a12;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hero-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.backstory-box {
  margin-top: 1rem;
  border: 1px solid rgba(43, 197, 255, 0.3);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: linear-gradient(145deg, rgba(6, 22, 42, 0.8), rgba(12, 31, 55, 0.7));
}

.backstory-box > h4 {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  color: var(--accent-2);
}

.backstory-box > p {
  margin: 0.6rem 0 0;
  line-height: 1.85;
  color: #d0e8f8;
}

.legion-role-wrap {
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(43, 197, 255, 0.18);
}

.legion-role-wrap h4 {
  font-family: "Orbitron", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: #9cecff;
}

.legion-role-tag {
  margin: 0.4rem 0 0;
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(147, 255, 226, 0.4);
  border-radius: 999px;
  font-size: 0.84rem;
  color: var(--accent-2);
  background: rgba(147, 255, 226, 0.08);
  letter-spacing: 0.02em;
}

.share-hint {
  margin-top: 1rem;
  text-align: center;
}

.share-hint p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--accent);
  opacity: 0.7;
  letter-spacing: 0.02em;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-art-wrap {
    min-height: 260px;
    order: -1;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    width: calc(100% - 1rem);
    margin-top: 0.5rem;
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
  }

  .badge {
    display: none;
  }

  .app-shell {
    width: calc(100% - 1rem);
    margin-top: 0.5rem;
  }

  .hero-panel,
  .quiz-panel,
  .result-panel {
    border-radius: 16px;
    padding: 0.88rem;
  }

  .result-head {
    text-align: center;
  }

  .result-portrait-wrap {
    max-width: 100%;
  }

  .quiz-bottom,
  .result-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .option {
    padding: 0.85rem 0.9rem;
    font-size: 0.92rem;
    min-height: 48px;
  }

  .backstory-box {
    padding: 0.75rem 0.8rem;
  }

  .legion-role-tag {
    font-size: 0.78rem;
  }

  .axis-meta {
    flex-direction: column;
    gap: 0.15rem;
  }

  h1 {
    font-size: clamp(1.4rem, 5.5vw, 2rem);
  }
}

@media (max-width: 380px) {
  .topbar {
    padding: 0.55rem 0.6rem;
  }

  .brand {
    font-size: 1.2rem;
  }

  .hero-panel,
  .quiz-panel,
  .result-panel {
    padding: 0.7rem;
  }

  .result-head h2 {
    font-size: 1.8rem;
  }
}

/* ── Cross-Promo Banner ── */
.cross-promo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(43,197,255,0.12), rgba(147,255,226,0.10));
  border: 1px solid rgba(43,197,255,0.35);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: promo-float 3s ease-in-out infinite, promo-glow 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
.cross-promo::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: promo-shimmer 4s ease-in-out infinite;
}
.cross-promo:hover {
  background: linear-gradient(135deg, rgba(43,197,255,0.22), rgba(147,255,226,0.18));
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(43,197,255,0.3);
}
.cross-promo-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg-0);
  font-family: "Orbitron", monospace;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: badge-pulse 2s ease-in-out infinite;
}
.cross-promo-text {
  flex: 1;
  font-size: 0.85rem;
  line-height: 1.5;
}
.cross-promo-text strong {
  color: var(--accent-2);
}
.cross-promo-arrow {
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--accent);
  animation: arrow-bounce 1.5s ease-in-out infinite;
}
.cross-promo:hover .cross-promo-arrow {
  animation: none;
  transform: translateX(6px);
}
@keyframes promo-glow {
  0%, 100% { border-color: rgba(43,197,255,0.25); }
  50% { border-color: rgba(147,255,226,0.55); }
}
@keyframes promo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes promo-shimmer {
  0% { left: -100%; }
  50% { left: 120%; }
  100% { left: 120%; }
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.08); }
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}
