:root {
  --bg: #0b1119;
  --bg-2: #141e2b;
  --panel: rgba(19, 28, 40, 0.84);
  --panel-strong: rgba(24, 35, 51, 0.95);
  --text: #eff4fb;
  --muted: #9fb0c8;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #f0884f;
  --accent-2: #f2c87e;
  --accent-cool: #69c8e6;
  --shadow: 0 24px 60px rgba(3, 8, 14, 0.45);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shell: 1080px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Barlow", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 14% 18%, rgba(240, 136, 79, 0.14), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(105, 200, 230, 0.12), transparent 25%),
    radial-gradient(circle at 52% 115%, rgba(242, 200, 126, 0.12), transparent 34%),
    linear-gradient(180deg, var(--bg) 0%, #0d1520 46%, var(--bg-2) 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent);
  opacity: 0.26;
}

body::after {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.016) 0,
      rgba(255, 255, 255, 0.016) 1px,
      transparent 1px,
      transparent 5px
    );
  mix-blend-mode: screen;
  opacity: 0.04;
}

button,
input {
  font: inherit;
}

a {
  color: var(--accent-cool);
}

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

.app-shell {
  margin: 0 auto;
  padding: 16px 0 40px;
  position: relative;
  width: min(var(--shell), calc(100% - 28px));
  z-index: 1;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.panel {
  backdrop-filter: blur(14px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.panel::before {
  background:
    linear-gradient(140deg, rgba(240, 136, 79, 0.1), transparent 38%),
    linear-gradient(320deg, rgba(105, 200, 230, 0.07), transparent 42%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.hero {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: min(72svh, 640px);
  padding: clamp(20px, 2.6vw, 32px);
}

.hero-main,
.hero-side {
  position: relative;
  z-index: 1;
}

.hero-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: flex-start;
  padding: clamp(8px, 1.6vw, 14px);
}

.kicker,
.type-kicker {
  align-self: flex-start;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-2);
  display: inline-flex;
  font-size: 12px;
  gap: 10px;
  letter-spacing: 0.14em;
  padding: 9px 14px;
  text-transform: uppercase;
}

.hero-copy h1 {
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
  font-size: clamp(52px, 9.5vw, 104px);
  letter-spacing: -0.03em;
  line-height: 0.92;
  max-width: 7.6ch;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(240, 136, 79, 0.14);
}

.hero-copy h1 span {
  color: var(--accent);
  display: block;
}

.hero-sub {
  color: #dce5f4;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.82;
  margin-top: 16px;
  max-width: 680px;
}

.hero-sub strong {
  color: var(--accent-2);
  font-weight: 700;
}

.hero-actions,
.button-row,
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    opacity 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.btn-primary,
.btn-secondary {
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 13px 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 78%);
  box-shadow: 0 12px 28px rgba(240, 136, 79, 0.27);
  color: #151b24;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

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

.hero-stat,
.intel-card,
.legend-card,
.question,
.result-card,
.detail-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 1;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.05);
  padding: 16px 18px;
}

.hero-stat .label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.hero-stat .value,
.poster-code,
.top3-score {
  color: var(--text);
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
  font-weight: 700;
}

.hero-stat .value {
  font-size: 30px;
  line-height: 1;
}

.hero-stat .meta,
.poster-caption,
.type-subname,
.detail-card p,
.dim-item p,
.footer-note,
.disclaimer,
.progress-text,
.hint {
  color: var(--muted);
}

.hero-stat .meta,
.poster-caption,
.hint,
.footer-note,
.disclaimer {
  font-size: 13px;
  line-height: 1.8;
}

.hero-side,
.legend-list,
.intel-stack,
.question-list,
.result-layout,
.top3-list,
.dim-list {
  display: grid;
  gap: 16px;
}

.social-rail {
  align-content: center;
  gap: 10px;
  justify-items: end;
}

.social-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  min-width: 118px;
  padding: 8px 12px;
  text-decoration: none;
  transition:
    transform 0.14s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(105, 200, 230, 0.35);
  transform: translateX(-2px);
}

.social-link svg {
  fill: currentColor;
  flex-shrink: 0;
  height: 18px;
  width: 18px;
}

.social-link span {
  color: #dbe6f9;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.result-float-rail {
  display: grid;
  gap: 10px;
  position: fixed;
  right: max(12px, calc((100vw - var(--shell)) / 2 - 124px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
}

.result-float-link {
  align-content: center;
  backdrop-filter: blur(10px);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    rgba(19, 29, 41, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(3, 8, 14, 0.45);
  color: var(--text);
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 98px;
  padding: 12px 10px;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
  width: 114px;
}

.result-float-link:hover {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(22, 34, 48, 0.94);
  border-color: rgba(105, 200, 230, 0.45);
  box-shadow: 0 18px 36px rgba(8, 18, 30, 0.5);
  transform: translateX(-3px);
}

.result-float-link svg {
  fill: currentColor;
  height: 20px;
  width: 20px;
}

.result-float-link span {
  color: #dbe6f9;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.result-float-link strong {
  color: var(--accent-2);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.question-stage-meta {
  color: var(--accent-cool);
  font-size: 13px;
  letter-spacing: 0.08em;
  margin: 4px 0 12px;
  text-transform: uppercase;
}

.intel-card {
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
  padding: 24px;
}

.intel-card::after {
  background: radial-gradient(circle, rgba(255, 109, 58, 0.28), transparent 70%);
  border-radius: 50%;
  bottom: 18px;
  content: "";
  filter: blur(4px);
  height: 110px;
  pointer-events: none;
  position: absolute;
  right: 18px;
  width: 110px;
}

.intel-top,
.question-meta,
.topbar,
.actions-bottom,
.result-actions,
.dim-item-top,
.poster-kicker {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.intel-top strong,
.type-name {
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
}

.intel-top strong {
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intel-badge,
.badge,
.match,
.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
}

.intel-badge {
  background: rgba(255, 109, 58, 0.12);
  border-color: rgba(255, 109, 58, 0.32);
  color: var(--accent-2);
  font-size: 12px;
}

.intel-line {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 0;
}

.intel-line:first-child,
.legend-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.eyebrow {
  color: var(--muted);
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.intel-line .copy,
.question-title,
.analysis-text {
  color: #edf2fb;
  line-height: 1.85;
}

.intel-line .copy,
.detail-card p {
  font-size: 15px;
}

.legend-card,
.detail-card,
.result-card {
  padding: 18px;
}

.legend-card h3,
.section-title {
  color: var(--accent-cool);
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legend-item {
  align-items: start;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr;
  padding: 12px 0;
}

.legend-no {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: var(--accent-2);
  display: inline-flex;
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.legend-item strong,
.top3-item strong,
.dim-item-name,
.detail-card h3 {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.legend-item span,
.top3-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.test-wrap,
.result-wrap {
  margin-top: 18px;
  padding: 26px;
}

.progress {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  flex: 1;
  height: 12px;
  min-width: 200px;
  overflow: hidden;
}

.progress span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-cool));
  border-radius: inherit;
  box-shadow: 0 0 24px rgba(255, 109, 58, 0.4);
  display: block;
  height: 100%;
  transition: width 0.22s ease;
}

.question {
  overflow: hidden;
  padding: 18px;
}

.question-list-single {
  min-height: 300px;
}

.question::after {
  background: radial-gradient(circle, rgba(85, 214, 255, 0.1), transparent 70%);
  content: "";
  height: 120px;
  inset: auto -20px -20px auto;
  pointer-events: none;
  position: absolute;
  width: 120px;
}

.question-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.badge {
  color: var(--accent-2);
  display: inline-flex;
  gap: 6px;
}

.question-title,
.analysis-text {
  font-size: 16px;
  white-space: pre-wrap;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.option {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  padding: 14px;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(105, 200, 230, 0.3);
  transform: translateX(1px);
}

.option input {
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
  transform: scale(1.08);
}

.option-code {
  color: var(--accent-cool);
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
  font-weight: 700;
  min-width: 24px;
}

.result-top,
.detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

.detail-grid-single {
  grid-template-columns: 1fr;
}

.result-poster {
  background:
    radial-gradient(circle at top right, rgba(255, 109, 58, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(85, 214, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  display: grid;
  gap: 18px;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
}

.poster-kicker span,
.poster-role {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.poster-kicker span {
  font-size: 12px;
}

.poster-emblem {
  align-items: center;
  background:
    linear-gradient(145deg, rgba(255, 109, 58, 0.2), rgba(255, 109, 58, 0.02) 34%, rgba(85, 214, 255, 0.12) 100%),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  display: grid;
  min-height: 260px;
  overflow: hidden;
  place-items: center;
  position: relative;
}

.poster-image {
  height: calc(100% - 24px);
  left: 12px;
  object-fit: contain;
  object-position: center bottom;
  position: absolute;
  top: 12px;
  width: calc(100% - 24px);
  z-index: 0;
}

.hidden {
  display: none !important;
}

.poster-emblem::before,
.poster-emblem::after {
  border: 1px solid rgba(255, 255, 255, 0.08);
  clip-path: polygon(14% 0, 100% 0, 100% 84%, 86% 100%, 0 100%, 0 16%);
  content: "";
  inset: 18px;
  position: absolute;
}

.poster-emblem::after {
  border-color: rgba(255, 255, 255, 0.05);
  inset: 30px;
}

.poster-code {
  font-size: clamp(48px, 7vw, 92px);
  letter-spacing: 0.08em;
  line-height: 0.9;
  position: relative;
  text-align: center;
  text-shadow: 0 0 20px rgba(255, 109, 58, 0.18);
  text-transform: uppercase;
  z-index: 1;
}

.poster-role {
  font-size: 14px;
  margin-top: 12px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.type-name {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.03em;
  line-height: 0.96;
  margin-top: 12px;
}

.type-subname,
.detail-card p {
  font-size: 15px;
  line-height: 1.85;
  margin-top: 12px;
  white-space: pre-wrap;
}

.match {
  color: var(--accent-cool);
  display: inline-flex;
  font-size: 13px;
  margin-top: 18px;
}

.tag {
  color: #e2e8f4;
  font-size: 13px;
  padding: 9px 12px;
}

.top3-item,
.dim-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.top3-item {
  align-items: center;
  gap: 16px;
  grid-template-columns: 1fr auto;
}

.top3-score {
  color: var(--accent-2);
  font-size: 24px;
  white-space: nowrap;
}

.dim-item-score {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(240, 136, 79, 0);
  }

  50% {
    box-shadow: 0 0 18px rgba(240, 136, 79, 0.18);
  }
}

.hero .btn-primary {
  animation: pulseGlow 2.8s ease-in-out infinite;
}

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

  .result-float-rail {
    right: 10px;
  }

  .result-float-link {
    min-height: 88px;
    width: 102px;
  }

  .social-rail {
    align-content: start;
    grid-auto-flow: column;
    justify-content: start;
    justify-items: start;
  }

  .hero-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(var(--shell), calc(100% - 14px));
  }

  .hero,
  .test-wrap,
  .result-wrap {
    padding: 16px;
  }

  .question,
  .detail-card,
  .result-card,
  .legend-card {
    padding: 16px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .poster-emblem {
    min-height: 210px;
  }

  .button-row {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .button-row button {
    width: 100%;
  }

  .social-link {
    min-width: 108px;
    padding: 8px 10px;
  }

  .result-float-rail {
    display: flex;
    gap: 8px;
    left: 50%;
    right: auto;
    top: auto;
    transform: translateX(-50%);
    bottom: 12px;
  }

  .result-float-link {
    border-radius: 14px;
    min-height: 66px;
    padding: 8px 10px;
    width: 132px;
  }

  .actions-bottom,
  .result-actions,
  .topbar {
    align-items: stretch;
  }

  .topbar {
    gap: 10px;
  }

  .progress {
    min-width: 0;
    width: 100%;
  }

  .progress-text {
    text-align: right;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .hero-sub,
  .question-title,
  .analysis-text,
  .type-subname,
  .detail-card p {
    font-size: 14px;
    line-height: 1.75;
  }

  .hero-copy h1 {
    font-size: clamp(44px, 16vw, 62px);
    line-height: 0.95;
  }

  .button-row {
    grid-template-columns: 1fr;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 16px;
    width: 100%;
  }

  .top3-item {
    grid-template-columns: 1fr;
  }

  .question {
    padding: 14px;
  }

  .option {
    gap: 10px;
    padding: 12px;
  }

  .option-code {
    min-width: 20px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding-bottom: 36px;
    width: calc(100% - 10px);
  }

  .panel {
    border-radius: 18px;
  }

  .hero {
    min-height: auto;
    padding: 14px;
  }

  .test-wrap,
  .result-wrap {
    padding: 14px;
  }

  .poster-emblem {
    min-height: 188px;
  }

  .type-name {
    font-size: clamp(28px, 11vw, 36px);
  }
}
