:root {
  --bg: #07090d;
  --panel: rgba(12, 18, 26, 0.82);
  --panel-strong: rgba(16, 24, 36, 0.94);
  --ink: #f5f8ff;
  --muted: #98a7bb;
  --line: rgba(157, 184, 216, 0.2);
  --line-strong: rgba(99, 232, 255, 0.42);
  --accent: #45f0ff;
  --accent-2: #a6ff6a;
  --accent-3: #ff7a45;
  --soft: rgba(69, 240, 255, 0.1);
  --warn: rgba(255, 122, 69, 0.12);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  font-family:
    "SF Pro Display", "DIN Alternate", "Avenir Next", "PingFang SC",
    "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(69, 240, 255, 0.2), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(166, 255, 106, 0.13), transparent 24%),
    radial-gradient(circle at 72% 90%, rgba(255, 122, 69, 0.16), transparent 28%),
    linear-gradient(rgba(157, 184, 216, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 184, 216, 0.06) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, auto, 64px 64px, 64px 64px, auto;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(69, 240, 255, 0.08) 42% 42.2%, transparent 42.2%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  opacity: 0.54;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  position: relative;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: 312px minmax(0, 1fr);
  min-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 9, 13, 0.68);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
}

.workspace::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(69, 240, 255, 0.16), transparent 24%, transparent 76%, rgba(166, 255, 106, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 18%);
  mask: linear-gradient(#000, transparent 32%);
}

.sidebar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(18, 27, 40, 0.96), rgba(7, 9, 13, 0.82)),
    radial-gradient(circle at top left, rgba(69, 240, 255, 0.18), transparent 38%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #061013;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 12px;
  box-shadow: 0 0 32px rgba(69, 240, 255, 0.3);
  font-weight: 900;
  letter-spacing: 0;
}

.brand p,
.brand h1,
.topbar h2,
.question-head h3,
.rank-card h3 {
  margin: 0;
}

.brand p,
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand h1 {
  margin-top: 5px;
  font-size: 23px;
  letter-spacing: 0;
}

.status-block,
.score-panel,
.radar-panel,
.rank-card,
.leaderboard,
.courses,
.assessment-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.status-block {
  padding: 18px;
}

.status-block strong {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 24px;
}

.status-block small {
  color: var(--muted);
}

.progress {
  height: 10px;
  margin: 16px 0 8px;
  overflow: hidden;
  border: 1px solid rgba(69, 240, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px rgba(69, 240, 255, 0.72);
  transition: width 180ms ease;
}

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

.metric-grid div {
  position: relative;
  min-height: 88px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.metric-grid div::after {
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 60px;
  height: 60px;
  content: "";
  border: 1px solid rgba(69, 240, 255, 0.18);
  border-radius: 999px;
}

.metric-grid span,
.weakness-box span,
.rank-card p,
.score-row small,
.dimension-card span,
.course-card p {
  color: var(--muted);
}

.metric-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.section-nav {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.section-nav a {
  position: relative;
  padding: 12px 13px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 12px;
}

.section-nav a:hover {
  border-color: var(--line-strong);
  background: var(--soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.main-panel {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 28px;
  overflow: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar h2 {
  max-width: 820px;
  margin-top: 8px;
  font-size: clamp(32px, 4.2vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

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

.stage-card {
  position: relative;
  min-height: 118px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    radial-gradient(circle at top right, rgba(69, 240, 255, 0.11), transparent 44%);
}

.stage-card::after {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  content: "";
  border-right: 1px solid rgba(69, 240, 255, 0.24);
  border-bottom: 1px solid rgba(69, 240, 255, 0.24);
}

.stage-card span,
.stage-card small,
.stage-card em {
  display: block;
}

.stage-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.stage-card strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.stage-card small {
  margin-top: 6px;
  color: var(--muted);
}

.stage-card p {
  min-height: 40px;
  margin: 10px 0 0;
  color: #c2cfdd;
  font-size: 13px;
  line-height: 1.45;
}

.stage-card em {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.stage-card button {
  position: relative;
  z-index: 1;
  min-height: 34px;
  margin-top: 12px;
  padding: 0 13px;
  border: 1px solid rgba(69, 240, 255, 0.34);
  border-radius: 999px;
  background: rgba(69, 240, 255, 0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.stage-card button:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #031012;
}

.unlock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stage-card.active {
  border-color: rgba(69, 240, 255, 0.54);
  background:
    linear-gradient(145deg, rgba(69, 240, 255, 0.16), rgba(166, 255, 106, 0.06)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 28px rgba(69, 240, 255, 0.11);
}

.stage-card.active em {
  color: var(--accent);
}

.stage-card.done {
  border-color: rgba(166, 255, 106, 0.46);
}

.stage-card.done span,
.stage-card.done em {
  color: var(--accent-2);
}

.stage-card.recommended {
  border-color: rgba(255, 122, 69, 0.74);
  background:
    linear-gradient(145deg, rgba(255, 122, 69, 0.18), rgba(69, 240, 255, 0.07)),
    rgba(255, 255, 255, 0.04);
}

.stage-card.recommended::before {
  position: absolute;
  top: 12px;
  right: 12px;
  content: "推荐";
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 122, 69, 0.16);
  color: var(--accent-3);
  font-size: 11px;
  font-weight: 900;
}

.stage-card.recommended button,
.stage-card.pro-pack button {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-3), #ffd36b);
  color: #140905;
}

.stage-card.pro-pack {
  border-color: rgba(166, 255, 106, 0.52);
  background:
    linear-gradient(145deg, rgba(166, 255, 106, 0.14), rgba(69, 240, 255, 0.07)),
    rgba(255, 255, 255, 0.04);
}

.stage-card.locked {
  opacity: 0.45;
  filter: grayscale(0.8);
}

.stage-card.locked.recommended,
.stage-card.pro-pack {
  opacity: 1;
  filter: none;
}

.ghost-button,
.primary-button {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 800;
}

.ghost-button:hover {
  border-color: var(--line-strong);
  background: rgba(69, 240, 255, 0.1);
}

.primary-button {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #031012;
  box-shadow: 0 0 28px rgba(69, 240, 255, 0.26);
}

.primary-button:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.42;
  box-shadow: none;
}

.assessment-panel {
  position: relative;
  padding: 24px;
  overflow: hidden;
}

.assessment-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, rgba(69, 240, 255, 0.14), transparent 24%),
    linear-gradient(300deg, rgba(255, 122, 69, 0.08), transparent 24%);
}

.question-head,
.question-text,
.options,
.actions {
  position: relative;
  z-index: 1;
}

.question-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.tag,
.question-count,
.course-level,
.rank-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(69, 240, 255, 0.24);
  border-radius: 999px;
  background: rgba(69, 240, 255, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.question-count {
  min-width: 70px;
  justify-content: center;
  background: rgba(166, 255, 106, 0.12);
  color: var(--accent-2);
}

.question-head h3 {
  margin-top: 12px;
  font-size: 27px;
}

.question-text {
  max-width: 920px;
  margin: 16px 0 0;
  color: #dbe7f6;
  font-size: 18px;
  line-height: 1.72;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.option-card {
  position: relative;
  display: flex;
  min-height: 116px;
  gap: 13px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.option-card:hover {
  transform: translateY(-2px);
  border-color: rgba(69, 240, 255, 0.36);
  background: rgba(69, 240, 255, 0.075);
}

.option-card:has(input:checked) {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(69, 240, 255, 0.16), rgba(166, 255, 106, 0.08));
  box-shadow: inset 0 0 0 1px rgba(69, 240, 255, 0.28), 0 0 26px rgba(69, 240, 255, 0.12);
}

.option-card input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
}

.option-card strong {
  display: block;
  margin-bottom: 0;
  color: #edf7ff;
  line-height: 1.55;
}

.option-card span {
  color: var(--muted);
  line-height: 1.5;
}

.options.written-mode {
  grid-template-columns: 1fr;
}

.written-question {
  display: grid;
  gap: 14px;
}

.written-question img {
  width: min(100%, 360px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.written-question textarea {
  width: 100%;
  min-height: 168px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  outline: none;
  line-height: 1.7;
}

.written-question textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(69, 240, 255, 0.1);
}

.written-question small {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.report-grid,
.ranking-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 16px;
  margin-top: 16px;
}

.score-panel,
.radar-panel,
.rank-card,
.leaderboard,
.courses {
  padding: 22px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.score-row > strong {
  color: var(--accent-2);
  font-size: 76px;
  line-height: 0.9;
  text-shadow: 0 0 32px rgba(166, 255, 106, 0.28);
}

.score-row span {
  display: block;
  margin-bottom: 7px;
  font-size: 22px;
  font-weight: 900;
}

.weakness-box {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(255, 122, 69, 0.32);
  border-radius: 14px;
  background: var(--warn);
}

.weakness-box strong {
  display: block;
  margin-top: 6px;
  color: #ffd7c7;
  font-size: 20px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

canvas {
  width: 100%;
  max-width: 560px;
  height: auto;
  filter: drop-shadow(0 0 22px rgba(69, 240, 255, 0.12));
}

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

.dimension-card {
  min-height: 138px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.dimension-card strong {
  display: block;
  margin: 10px 0;
  color: var(--ink);
  font-size: 32px;
}

.mini-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.mini-bar i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(69, 240, 255, 0.58);
}

.rank-card h3 {
  margin-top: 9px;
  font-size: 30px;
}

.rank-card p {
  line-height: 1.65;
}

.leaderboard ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.leaderboard li strong {
  color: var(--accent);
}

.leaderboard .current-user {
  border-color: rgba(255, 122, 69, 0.55);
  background: rgba(255, 122, 69, 0.12);
}

.courses {
  margin-top: 16px;
}

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

.course-card {
  position: relative;
  min-height: 202px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    radial-gradient(circle at top right, rgba(69, 240, 255, 0.12), transparent 42%);
}

.course-card::after {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  content: "";
  border-right: 1px solid rgba(69, 240, 255, 0.28);
  border-bottom: 1px solid rgba(69, 240, 255, 0.28);
}

.course-card h4 {
  margin: 13px 0 9px;
  font-size: 19px;
}

.course-card p {
  line-height: 1.58;
}

.course-card small {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 6px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 122, 69, 0.14);
  color: var(--accent-3);
  font-weight: 900;
}

.mobile-conversion {
  display: none;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
  }

  .dimension-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 92px;
  }

  .shell {
    padding: 8px;
  }

  .workspace {
    display: block;
    min-height: calc(100vh - 20px);
    border-radius: 14px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .brand p {
    font-size: 9px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .status-block {
    padding: 12px;
  }

  .status-block strong {
    margin-top: 4px;
    font-size: 20px;
  }

  .progress {
    margin: 10px 0 6px;
  }

  .metric-grid,
  .section-nav {
    display: none;
  }

  .main-panel,
  .assessment-panel,
  .score-panel,
  .radar-panel,
  .rank-card,
  .leaderboard,
  .courses {
    padding: 14px;
  }

  .topbar,
  .question-head,
  .score-row,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar h2 {
    font-size: 28px;
    line-height: 1.08;
  }

  .stage-track {
    display: flex;
    gap: 10px;
    margin: -4px -2px 12px;
    overflow-x: auto;
    padding: 0 2px 4px;
    scroll-snap-type: x mandatory;
  }

  .stage-card {
    flex: 0 0 172px;
    min-height: 108px;
    padding: 13px;
    scroll-snap-align: start;
  }

  .stage-card strong {
    font-size: 16px;
  }

  .options,
  .report-grid,
  .ranking-grid,
  .course-grid,
  .dimension-list,
  .section-nav {
    grid-template-columns: 1fr;
  }

  .question-text {
    font-size: 16px;
  }

  .question-head h3 {
    font-size: 24px;
  }

  .option-card {
    min-height: auto;
    padding: 15px;
  }

  .written-question img {
    width: 100%;
  }

  .score-row > strong {
    font-size: 60px;
  }

  .course-card {
    min-height: 176px;
  }

  .mobile-conversion {
    position: fixed;
    z-index: 20;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(69, 240, 255, 0.35);
    border-radius: 18px;
    background: rgba(9, 14, 21, 0.94);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.52), 0 0 28px rgba(69, 240, 255, 0.16);
    backdrop-filter: blur(18px);
  }

  .mobile-conversion strong,
  .mobile-conversion span {
    display: block;
  }

  .mobile-conversion strong {
    max-width: 210px;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-conversion span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
  }

  .mobile-conversion a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    color: #031012;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
  }
}
