:root {
  --bg: #07111f;
  --bg-2: #0b1530;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --surface-soft: rgba(255, 255, 255, 0.62);
  --glass: rgba(255, 255, 255, 0.10);
  --glass-border: rgba(255, 255, 255, 0.22);
  --text: #0d1730;
  --text-strong: #061026;
  --muted: #667085;
  --muted-2: #7b8aa5;
  --border: rgba(116, 134, 170, 0.22);
  --primary: #6d5dfc;
  --primary-2: #33d6ff;
  --primary-3: #8f7dff;
  --success: #24c98b;
  --warning: #ffb647;
  --danger: #ff4f73;
  --cyan: #3fe6ff;
  --pink: #ff5bd7;
  --gold: #ffd166;
  --shadow: 0 24px 70px rgba(5, 14, 35, 0.22);
  --shadow-glow: 0 0 42px rgba(64, 214, 255, 0.25), 0 22px 60px rgba(26, 36, 91, 0.24);
  --radius: 28px;
  --radius-sm: 18px;
  --sidebar: 292px;
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 7%, rgba(70, 224, 255, 0.30) 0, rgba(70, 224, 255, 0.08) 24%, transparent 42%),
    radial-gradient(circle at 80% 0%, rgba(255, 86, 214, 0.24) 0, rgba(255, 86, 214, 0.08) 22%, transparent 44%),
    radial-gradient(circle at 78% 78%, rgba(110, 93, 252, 0.24) 0, rgba(110, 93, 252, 0.07) 27%, transparent 50%),
    linear-gradient(135deg, #081225 0%, #eef5ff 42%, #f9fbff 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.48), transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  right: -210px;
  top: 280px;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(circle, rgba(51,214,255,0.26), transparent 68%);
  filter: blur(12px);
  animation: floatGlow 9s ease-in-out infinite alternate;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: none; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(51, 214, 255, 0.42);
  outline-offset: 2px;
}

a { color: inherit; }

.app-shell {
  display: flex;
  min-height: 100vh;
  isolation: isolate;
}

.sidebar {
  width: var(--sidebar);
  min-height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 22px;
  background:
    linear-gradient(180deg, rgba(8, 16, 42, 0.96), rgba(7, 15, 34, 0.92)),
    radial-gradient(circle at top left, rgba(63, 230, 255, 0.24), transparent 46%);
  color: #f7fbff;
  border-right: 1px solid rgba(255,255,255,0.12);
  box-shadow: 22px 0 80px rgba(4, 9, 25, 0.30);
  overflow: hidden;
}

.sidebar::before,
.sidebar::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.sidebar::before {
  width: 210px;
  height: 210px;
  left: -120px;
  top: -70px;
  background: radial-gradient(circle, rgba(56, 219, 255, 0.42), transparent 70%);
}
.sidebar::after {
  width: 180px;
  height: 180px;
  right: -100px;
  bottom: 170px;
  background: radial-gradient(circle, rgba(255, 91, 215, 0.24), transparent 70%);
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 34px;
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-weight: 950;
  letter-spacing: -0.05em;
  color: #061026;
  background:
    linear-gradient(135deg, #7cffcb 0%, #48e0ff 45%, #9c7bff 100%);
  box-shadow: 0 0 34px rgba(63, 230, 255, 0.44), inset 0 1px 0 rgba(255,255,255,0.65);
}

.brand-title {
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  margin-top: 4px;
  color: rgba(228, 238, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.nav-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.nav-item {
  position: relative;
  width: 100%;
  min-height: 50px;
  padding: 0 18px 0 52px;
  border-radius: 18px;
  text-align: left;
  color: rgba(232, 240, 255, 0.78);
  background: transparent;
  font-weight: 850;
  transition: transform 0.20s ease, background 0.20s ease, color 0.20s ease, box-shadow 0.20s ease;
  overflow: hidden;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 7px;
  transform: translateY(-50%);
  background: linear-gradient(135deg, rgba(63,230,255,0.78), rgba(143,125,255,0.90));
  box-shadow: 0 0 18px rgba(63,230,255,0.24);
  opacity: 0.70;
}

.nav-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.20s ease;
}

.nav-item:hover {
  transform: translateX(4px);
  color: #ffffff;
  background: rgba(255,255,255,0.08);
}
.nav-item:hover::after { opacity: 1; }

.nav-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255,255,255,0.20), rgba(255,255,255,0.08));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16), 0 14px 35px rgba(0,0,0,0.15);
}
.nav-item.active::before { opacity: 1; }

.sidebar-card {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 20px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 22px 55px rgba(0,0,0,0.18);
  backdrop-filter: blur(18px);
}

.sidebar-card::before {
  content: "智能推荐";
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  color: #061026;
  background: linear-gradient(135deg, #7cffcb, #48e0ff);
}

.side-topic {
  margin: 2px 0 14px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 950;
}

.main {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 34px 38px 44px;
}

.main::before {
  content: "";
  position: fixed;
  inset: 16px 16px 16px calc(var(--sidebar) + 16px);
  z-index: -1;
  pointer-events: none;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(255,255,255,0.40), rgba(255,255,255,0.12));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  backdrop-filter: blur(2px);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 28px;
}

.topbar h1 {
  margin: 0;
  color: #071228;
  font-size: clamp(30px, 3.1vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.07em;
  font-weight: 1000;
}

.topbar p {
  margin: 12px 0 0;
  color: #54627e;
  font-size: 16px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #32415f;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 12px 32px rgba(22, 39, 77, 0.10);
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(14px);
}

.badge::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary-2);
  box-shadow: 0 0 16px currentColor;
}
.badge.ok { color: #0e8f68; }
.badge.ok::before { background: var(--success); }
.badge.warn { color: #a36800; }
.badge.warn::before { background: var(--warning); }
.badge.live { color: #5a4bca; }
.badge.live::before { background: var(--primary-3); }

.page { display: none; animation: pageIn 0.36s cubic-bezier(.2,.7,.2,1) both; }
.page.active { display: block; }

.hero-card,
.panel,
.stat-card,
.quiz-question,
.config-item,
.lesson-section,
.result-item,
.mastery-row,
.timeline-item,
.topic-item,
.history-item {
  position: relative;
  border: 1px solid rgba(255,255,255,0.62);
  background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,255,255,0.68));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.75fr) auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 22px;
  padding: clamp(24px, 3.2vw, 42px);
  border-radius: 36px;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(63,230,255,0.22), transparent 34%),
    radial-gradient(circle at 82% 32%, rgba(255,91,215,0.14), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,0.25), rgba(109,93,252,0.06));
  pointer-events: none;
}

.hero-copy, .hero-actions, .hero-visual { position: relative; z-index: 1; }
.hero-copy h2,
.hero-card h2 {
  margin: 8px 0 10px;
  color: #071228;
  font-size: clamp(30px, 4.8vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.08em;
  font-weight: 1000;
  max-width: 920px;
}

.hero-card p {
  margin: 0;
  max-width: 860px;
  color: #56647f;
  font-size: 16px;
  line-height: 1.76;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #4b39b7;
  background: linear-gradient(135deg, rgba(109,93,252,0.14), rgba(63,230,255,0.13));
  border: 1px solid rgba(109,93,252,0.18);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #33d6ff;
  box-shadow: 0 0 16px #33d6ff;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.hero-visual {
  min-height: 210px;
  display: grid;
  place-items: center;
}

.ai-orbit {
  position: relative;
  width: 230px;
  height: 230px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.74) 0 22%, rgba(63,230,255,0.10) 23% 55%, transparent 56%);
}

.ai-orbit::before,
.ai-orbit::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid rgba(109,93,252,0.24);
  animation: rotate 12s linear infinite;
}
.ai-orbit::after {
  inset: 36px;
  border-style: dashed;
  border-color: rgba(63,230,255,0.42);
  animation-duration: 18s;
  animation-direction: reverse;
}

.orbit-core {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  border-radius: 34px;
  display: grid;
  place-items: center;
  color: #061026;
  font-size: 34px;
  font-weight: 1000;
  background: linear-gradient(135deg, #7cffcb, #48e0ff 48%, #a98cff);
  box-shadow: 0 0 44px rgba(63,230,255,0.44), 0 26px 50px rgba(57, 76, 158, 0.22);
}

.orbit-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ff5bd7;
  box-shadow: 0 0 18px rgba(255,91,215,0.65);
}
.orbit-dot.one { left: 26px; top: 58px; }
.orbit-dot.two { right: 22px; top: 98px; background: #33d6ff; }
.orbit-dot.three { bottom: 38px; left: 92px; background: #ffd166; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.stat-card {
  min-height: 154px;
  padding: 24px;
  border-radius: 28px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--pink));
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -50px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109,93,252,0.12), transparent 66%);
}

.stat-label,
.tiny-label {
  color: #6b7792;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 12px;
  color: #071228;
  font-size: 36px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -0.06em;
}

.stat-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  margin-top: 20px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(95, 117, 160, 0.15);
  box-shadow: inset 0 0 0 1px rgba(95,117,160,0.10);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), #7cffcb);
  box-shadow: 0 0 22px rgba(51,214,255,0.36);
  transition: width .35s ease;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.80fr);
  gap: 20px;
}

.panel {
  margin-bottom: 20px;
  padding: 24px;
  border-radius: 30px;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
}

.wide-panel { padding: 26px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.panel h3,
.panel-head h3 {
  margin: 0;
  color: #071228;
  font-size: 23px;
  letter-spacing: -0.05em;
  font-weight: 1000;
}

.panel-head p,
.panel > p,
.muted {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.mini-btn,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 950;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #6d5dfc 0%, #4b79ff 45%, #33d6ff 100%);
  box-shadow: 0 16px 32px rgba(65, 95, 230, 0.24), 0 0 0 1px rgba(255,255,255,0.28) inset;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.mini-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active,
.danger-btn:active,
.mini-btn:active { transform: translateY(0); }

.secondary-btn {
  color: #3f38ab;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(109,93,252,0.18);
  box-shadow: 0 12px 28px rgba(32, 45, 92, 0.10);
}

.ghost-btn {
  color: #31405f;
  background: rgba(255,255,255,0.54);
  border: 1px solid rgba(116, 134, 170, 0.20);
}

.danger-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #ff4f73, #ff7e51);
  box-shadow: 0 14px 28px rgba(255, 79, 115, 0.20);
}

.mini-btn {
  width: 100%;
  color: #061026;
  background: linear-gradient(135deg, #7cffcb, #48e0ff);
  box-shadow: 0 14px 34px rgba(63,230,255,0.20);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none !important;
  filter: none !important;
}

.form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.15fr;
  gap: 16px;
  align-items: end;
}

.quiz-controls { grid-template-columns: 1fr 220px; max-width: 760px; }

.field {
  display: grid;
  gap: 8px;
  color: #56647f;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.01em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(116, 134, 170, 0.22);
  background: rgba(255,255,255,0.72);
  color: #0c1731;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.60);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input:hover,
select:hover,
textarea:hover { background: rgba(255,255,255,0.86); }
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(51,214,255,0.64);
  box-shadow: 0 0 0 4px rgba(51,214,255,0.12), inset 0 1px 0 rgba(255,255,255,0.72);
}

.button-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.button-row.compact { margin-top: 0; }

.path-list,
.timeline,
.topic-list,
.history-list,
.mastery-editor {
  display: grid;
  gap: 14px;
}

.empty-box {
  min-height: 62px;
  display: grid;
  align-items: center;
  color: #6b7792;
  border: 1px dashed rgba(116, 134, 170, 0.36);
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.54), rgba(255,255,255,0.32));
}

.path-card,
.timeline-item,
.topic-item,
.history-item,
.quiz-question,
.result-item,
.lesson-section,
.mastery-row {
  border-radius: 22px;
  padding: 18px;
  overflow: hidden;
}

.path-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.path-card:hover {
  transform: translateY(-3px);
  border-color: rgba(51,214,255,0.44);
  box-shadow: var(--shadow-glow);
}

.path-index {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #061026;
  font-weight: 1000;
  background: linear-gradient(135deg, #7cffcb, #48e0ff);
  box-shadow: 0 12px 26px rgba(63,230,255,0.20);
}

.path-title {
  color: #071228;
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: -0.02em;
}

.path-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.mastery-pill {
  min-width: 92px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 1000;
  text-align: center;
}
.mastery-pill.weak { background: rgba(255,79,115,0.12); color: #d93058; }
.mastery-pill.medium { background: rgba(255,182,71,0.18); color: #a16400; }
.mastery-pill.strong { background: rgba(36,201,139,0.14); color: #078059; }

.recommend-box {
  padding: 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(51,214,255,0.15), transparent 38%),
    linear-gradient(135deg, rgba(246,249,255,0.92), rgba(238,255,249,0.72));
  border: 1px solid rgba(255,255,255,0.72);
  line-height: 1.78;
  color: #2c3850;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.64);
}

.small-chart { height: 224px; margin-top: 16px; }

.study-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
}

.topic-item {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.topic-item:hover,
.topic-item.active {
  transform: translateY(-2px);
  border-color: rgba(51,214,255,0.42);
  box-shadow: 0 18px 42px rgba(26, 44, 91, 0.16);
}
.topic-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

.lesson-content {
  color: #26334e;
  line-height: 1.76;
}
.lesson-content h3 { margin: 0 0 10px; font-size: 26px; letter-spacing: -0.04em; }
.lesson-content h4 { margin: 0 0 8px; color: #071228; }
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.lesson-section ul { margin: 8px 0 0 18px; padding: 0; }
.lesson-section li { margin: 7px 0; }

.note-area {
  min-height: 150px;
  resize: vertical;
  line-height: 1.70;
}

.quiz-box {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
.quiz-question {
  display: grid;
  gap: 12px;
}
.quiz-question h4 {
  margin: 0 0 2px;
  color: #071228;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.02em;
}
.option-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  margin: 0;
  border: 1px solid rgba(116,134,170,0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(247,251,255,0.72));
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.option-row:hover {
  transform: translateX(4px);
  background: linear-gradient(135deg, rgba(244,250,255,0.96), rgba(255,255,255,0.88));
  border-color: rgba(51,214,255,0.50);
  box-shadow: 0 12px 28px rgba(18,31,68,0.08);
}
.option-row input[type="radio"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  background: transparent;
  accent-color: var(--primary);
  justify-self: center;
}
.option-row span {
  display: block;
  color: #18243d;
  line-height: 1.58;
  text-align: left;
}
.option-row span strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  margin-right: 6px;
  border-radius: 9px;
  color: #234dff;
  background: rgba(62,97,255,0.10);
}
.option-row:has(input[type="radio"]:checked) {
  border-color: rgba(76,99,255,0.58);
  background: linear-gradient(135deg, rgba(235,241,255,0.98), rgba(239,255,249,0.88));
  box-shadow: 0 14px 34px rgba(76,99,255,0.15);
}

.result-item.correct { border-color: rgba(36,201,139,0.34); background: linear-gradient(145deg, rgba(236,255,247,0.95), rgba(255,255,255,0.76)); }
.result-item.wrong { border-color: rgba(255,79,115,0.30); background: linear-gradient(145deg, rgba(255,241,244,0.95), rgba(255,255,255,0.76)); }

.chart-box {
  height: 440px;
  width: 100%;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(51,214,255,0.11), transparent 40%),
    rgba(255,255,255,0.44);
  border: 1px solid rgba(255,255,255,0.54);
  overflow: hidden;
}
.chart-box.small { height: 312px; }
.chart-empty {
  height: 100%;
  min-height: 170px;
  display: grid;
  place-items: center;
  color: #6b7792;
  border: 1px dashed rgba(116,134,170,0.36);
  border-radius: 22px;
  background: rgba(255,255,255,0.45);
}

.mastery-row {
  display: grid;
  grid-template-columns: 190px minmax(0,1fr) 70px;
  gap: 16px;
  align-items: center;
}
.mastery-row input[type="range"] { padding: 0; accent-color: var(--primary); box-shadow: none; }
.mastery-row span { font-weight: 1000; color: #071228; }

.history-item .time { color: var(--muted-2); font-size: 12px; font-weight: 800; }
.history-item .type { color: #071228; font-weight: 1000; }

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.config-item .key { color: var(--muted); font-size: 13px; font-weight: 900; margin-bottom: 7px; }
.config-item .value { color: #071228; font-weight: 900; word-break: break-all; line-height: 1.6; }

.code-block {
  color: #c8f6ff;
  background:
    radial-gradient(circle at top right, rgba(51,214,255,0.20), transparent 36%),
    linear-gradient(135deg, #07111f, #111a35);
  padding: 20px;
  border-radius: 22px;
  overflow-x: auto;
  line-height: 1.75;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 50;
  max-width: 460px;
  padding: 16px 18px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(7,17,31,0.96), rgba(21, 30, 62, 0.92));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 24px 70px rgba(4, 9, 25, 0.34);
  backdrop-filter: blur(16px);
  line-height: 1.55;
}
.toast.warn { background: linear-gradient(135deg, #7b4c00, #be7600); }
.toast.error { background: linear-gradient(135deg, #971f3a, #d13a62); }

.loading {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(7, 17, 31, 0.48);
  backdrop-filter: blur(12px);
}
.loading > div, .loading > p { grid-area: 1/1; }
.loading p {
  margin-top: 108px;
  color: #ffffff;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.30);
}
.loader {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 7px solid rgba(255,255,255,0.20);
  border-top-color: #48e0ff;
  border-right-color: #9c7bff;
  box-shadow: 0 0 32px rgba(72,224,255,0.34);
  animation: spin 0.85s linear infinite;
}

.hidden { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes floatGlow { from { transform: translate3d(0,0,0); } to { transform: translate3d(-30px,26px,0); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 1280px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; }
  .hero-visual { display: none; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 1060px) {
  :root { --sidebar: 0px; }
  .app-shell { display: block; }
  .sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
    padding: 22px;
  }
  .brand { margin-bottom: 18px; }
  .nav-list { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .sidebar-card { margin-top: 18px; }
  .main { padding: 28px 22px 38px; }
  .main::before { inset: 10px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .two-col, .study-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar, .panel-head { flex-direction: column; }
  .top-actions { justify-content: flex-start; }
  .hero-card, .panel, .stat-card { border-radius: 24px; }
  .stats-grid, .form-grid, .quiz-controls, .config-grid, .lesson-grid { grid-template-columns: 1fr; }
  .nav-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .path-card, .mastery-row { grid-template-columns: 1fr; }
  .primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .link-btn { width: 100%; }
  .button-row { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
