* { box-sizing: border-box; }

:root {
  --lime: #b8ff5d;
  --cyan: #42d9ff;
  --blue: #4268ff;
  --black: #151923;
  --ink: #202838;
  --muted: #687082;
  --paper: rgba(255,255,255,.88);
  --line: rgba(32,40,56,.12);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(184,255,93,.35), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(66,217,255,.32), transparent 25%),
    linear-gradient(135deg, #f7fbff 0%, #eef4ff 46%, #f7ffe9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  color: var(--ink);
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(32,40,56,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,40,56,.055) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 92%);
}

.speed-line {
  position: fixed;
  width: 40vw;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(32,40,56,.2), transparent);
  transform: rotate(-16deg);
  pointer-events: none;
}
.line-a { left: -8vw; top: 18vh; }
.line-b { right: -10vw; bottom: 18vh; }

.badge-orb {
  position: fixed;
  width: 96px;
  height: 96px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  font-size: 38px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 18px 45px rgba(27,45,75,.13);
  transform: rotate(-10deg);
  animation: float 7s ease-in-out infinite;
  pointer-events: none;
}
.orb-a { left: 7vw; top: 14vh; }
.orb-b { right: 8vw; top: 18vh; animation-delay: -2s; transform: rotate(12deg); }
.orb-c { right: 13vw; bottom: 10vh; animation-delay: -4s; }

.page { width: 100%; padding: 32px; position: relative; z-index: 1; }

.quiz-card {
  position: relative;
  max-width: 930px;
  min-height: 620px;
  height: auto;
  margin: auto;
  padding: 38px;
  border-radius: 28px;
  background: var(--paper);
  border: 1px solid rgba(255,255,255,.92);
  box-shadow: 0 28px 80px rgba(21,25,35,.18);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.quiz-card::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 2px solid rgba(32,40,56,.08);
  border-radius: 20px;
  pointer-events: none;
}

.quiz-card::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,255,93,.45), transparent 68%);
  pointer-events: none;
}

.corner-tag {
  position: absolute;
  right: 28px;
  top: 28px;
  z-index: 2;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--black);
  color: var(--lime);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 1px;
  box-shadow: 0 12px 24px rgba(21,25,35,.2);
}

.top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-right: 145px;
}

.sub-title {
  margin: 0 0 8px;
  color: var(--blue);
  font-weight: 1000;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
  color: var(--black);
  letter-spacing: -1px;
}

.intro {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.counter {
  padding: 13px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--black), #2d3547);
  color: var(--lime);
  font-weight: 1000;
  box-shadow: 0 14px 30px rgba(21,25,35,.18);
  white-space: nowrap;
}

.decor-line {
  position: relative;
  z-index: 1;
  margin: 26px 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #354055;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 1px;
}

.decor-line::before,
.decor-line::after {
  content: "";
  height: 2px;
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(32,40,56,.22), transparent);
}

.progress-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 16px;
  margin: 0 0 28px;
  border-radius: 999px;
  background: rgba(32,40,56,.08);
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(21,25,35,.1);
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--lime));
  transition: width .45s ease;
}

.question-stage {
  position: relative;
  z-index: 1;
  min-height: 440px;
  overflow: visible;
}

.question-box {
  position: relative;
  padding: 34px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(245,249,255,.94)),
    linear-gradient(135deg, rgba(66,104,255,.12), rgba(184,255,93,.12));
  border: 1px solid rgba(32,40,56,.08);
  box-shadow: 0 18px 42px rgba(21,25,35,.1);
  animation: slideIn .36s ease forwards;
}

.question-box.leave { animation: slideOut .3s ease forwards; }

.bank-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(66,104,255,.1);
  color: var(--blue);
  font-weight: 1000;
  font-size: 13px;
  margin-bottom: 16px;
}

.question-title {
  font-size: 26px;
  line-height: 1.45;
  color: var(--black);
  margin: 0 0 26px;
  font-weight: 1000;
  word-break: break-word;
}

.options { display: grid; gap: 14px; }

.option {
  border: 1px solid rgba(32,40,56,.08);
  width: 100%;
  padding: 17px 20px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  color: #334055;
  font-size: 16px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(21,25,35,.07);
  transition: .2s ease;
}

.option::before {
  content: "⚡";
  color: var(--blue);
  margin-right: 10px;
}

.option:hover {
  transform: translateY(-3px) translateX(4px);
  background: linear-gradient(135deg, #f7fbff, #f5ffe8);
  border-color: rgba(66,104,255,.25);
  box-shadow: 0 16px 34px rgba(21,25,35,.13);
}

.loading-screen {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.loader-badge {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--black), #323c52);
  color: var(--lime);
  font-size: 30px;
  font-weight: 1000;
  box-shadow: 0 18px 42px rgba(21,25,35,.22);
  animation: pop 1s ease-in-out infinite;
}

.loading-screen h2 { margin: 24px 0 8px; color: var(--black); }
.loading-screen p { color: var(--muted); font-weight: 800; }

.result {
  padding: 30px 20px;
  text-align: center;
  color: var(--ink);
}

.result .label { font-size: 18px; color: var(--muted); font-weight: 900; }
.result strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--blue);
  font-size: 58px;
  line-height: 1;
}
.result h2 { margin: 8px 0 14px; font-size: 30px; color: var(--black); }
.result p { max-width: 680px; margin: 10px auto; line-height: 1.75; color: #4f5a70; font-weight: 800; }
.score-pill {
  display: inline-flex;
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(66,104,255,.1), rgba(184,255,93,.16));
  color: var(--blue);
  font-weight: 1000;
}
.result small { color: #748094; line-height: 1.7; }

.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.save-btn {
  border: none;
  padding: 14px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--black), #323c52);
  color: #fff;
  font-size: 16px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(21,25,35,.18);
  transition: .2s ease;
}

.home-btn { background: linear-gradient(135deg, var(--blue), var(--cyan)); }
.restart-btn { background: linear-gradient(135deg, #2f384d, var(--blue)); }

.save-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(21,25,35,.24); }
.save-btn:active { transform: translateY(0); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(70px) scale(.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes slideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(-70px) scale(.96); }
}
@keyframes pop {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

@media (max-width: 680px) {
  .page { padding: 18px; }
  .quiz-card { padding: 24px; min-height: 640px; border-radius: 24px; }
  .quiz-card::before { inset: 8px; }
  .corner-tag { position: relative; display: inline-flex; right: auto; top: auto; margin-bottom: 16px; }
  .top { align-items: flex-start; flex-direction: column; padding-right: 0; }
  h1 { font-size: 34px; }
  .decor-line { gap: 8px; font-size: 11px; }
  .question-stage { min-height: 470px; }
  .question-box { padding: 24px; }
  .question-title { font-size: 22px; }
  .option { font-size: 15px; padding: 15px 16px; }
  .result strong { font-size: 44px; }
  .badge-orb { opacity: .35; transform: scale(.8); }
}
