: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.error { color: #d42b4d; }
.badge.error::before { background: #ff3868; }
.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);
}

.question-area {
  min-height: 150px;
  resize: vertical;
}

.tutor-layout { align-items: start; }
.tutor-controls { grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.3fr); }
.tutor-answer { margin-top: 18px; }
.tutor-history-item p { margin: 10px 0 0; color: #42526a; line-height: 1.7; }

.schedule-list,
.mistake-list {
  display: grid;
  gap: 14px;
}

.schedule-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.70));
  border: 1px solid rgba(116, 134, 170, 0.20);
  box-shadow: 0 18px 42px rgba(7, 17, 31, 0.10);
}
.schedule-card.weak { border-left: 5px solid var(--danger); }
.schedule-card.medium { border-left: 5px solid var(--warning); }
.schedule-card.strong { border-left: 5px solid var(--success); }
.schedule-day {
  font-weight: 950;
  color: var(--text-strong);
}
.schedule-day span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.compact-btn { padding: 10px 14px; min-height: auto; }

.mistake-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(255, 79, 115, 0.22);
  box-shadow: 0 18px 46px rgba(7, 17, 31, 0.10);
}
.mistake-card p { color: #42526a; line-height: 1.7; }
.mistake-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 950;
}
.import-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.import-row input[type="file"] {
  flex: 1 1 300px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
}

.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, .schedule-card, .tutor-controls { 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; }
}


/* ===== AI Edu Studio visual polish pack v2 ===== */
:root {
  --ink: #061021;
  --violet: #7b61ff;
  --blue: #34b8ff;
  --mint: #72ffd2;
  --rose: #ff6bd6;
  --glass-card: rgba(255, 255, 255, 0.74);
  --glass-card-strong: rgba(255, 255, 255, 0.90);
}

body {
  background:
    radial-gradient(circle at 16% 14%, rgba(114, 255, 210, 0.28) 0, transparent 26%),
    radial-gradient(circle at 78% 8%, rgba(255, 107, 214, 0.24) 0, transparent 28%),
    radial-gradient(circle at 78% 78%, rgba(123, 97, 255, 0.26) 0, transparent 33%),
    linear-gradient(135deg, #061021 0%, #0a1838 16%, #eef6ff 48%, #fbfdff 100%);
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  overflow: hidden;
}
.ambient-bg span {
  position: absolute;
  width: 36vw;
  height: 36vw;
  min-width: 420px;
  min-height: 420px;
  border-radius: 999px;
  filter: blur(38px);
  opacity: 0.34;
  mix-blend-mode: screen;
  animation: ambientFloat 16s ease-in-out infinite alternate;
}
.ambient-bg span:nth-child(1) { left: -12vw; top: -14vw; background: #33d6ff; }
.ambient-bg span:nth-child(2) { right: -11vw; top: 3vw; background: #ff5bd7; animation-delay: -4s; }
.ambient-bg span:nth-child(3) { right: 18vw; bottom: -18vw; background: #7cffcb; animation-delay: -8s; }

.sidebar {
  width: 304px;
  background:
    linear-gradient(180deg, rgba(5, 10, 29, 0.98), rgba(9, 16, 41, 0.94)),
    radial-gradient(circle at 20% 6%, rgba(72, 224, 255, 0.28), transparent 38%);
}
.sidebar::before { background: radial-gradient(circle, rgba(124, 255, 203, 0.36), transparent 70%); }
.brand-logo {
  position: relative;
  overflow: hidden;
}
.brand-logo::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.70), transparent 45%);
  transform: translateX(-80%) rotate(12deg);
  animation: logoShine 5.2s ease-in-out infinite;
}
.brand-title { text-shadow: 0 0 26px rgba(72,224,255,0.20); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
  min-height: 48px;
  letter-spacing: 0.01em;
}
.nav-item::before {
  content: attr(data-icon);
  position: static;
  transform: none;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  border-radius: 13px;
  color: #061026;
  font-size: 15px;
  background: linear-gradient(135deg, rgba(124,255,203,0.94), rgba(72,224,255,0.90) 58%, rgba(156,123,255,0.88));
  opacity: 0.95;
}
.nav-item.active::before { box-shadow: 0 0 26px rgba(72,224,255,0.36); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(72,224,255,0.10));
  border: 1px solid rgba(255,255,255,0.16);
}
.sidebar-card { padding-top: 22px; }
.sidebar-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,255,203,0.22), transparent 68%);
}

.main { padding-top: 30px; }
.main::before {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.52), rgba(255,255,255,0.12)),
    radial-gradient(circle at 0% 0%, rgba(72,224,255,0.12), transparent 36%);
  backdrop-filter: blur(5px);
}
.topbar {
  padding: 4px 2px 0;
}
.topbar h1 {
  color: var(--ink);
  text-wrap: balance;
  background: linear-gradient(135deg, #061021 12%, #2d4cff 58%, #02a8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.badge.live {
  color: #332a9d;
  background: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(237,241,255,0.70));
}
.icon-btn::after {
  content: "↻";
  margin-left: 8px;
  font-weight: 1000;
}

.hero-card {
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.58fr) minmax(220px, 0.33fr);
  min-height: 440px;
  border-radius: 42px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.90), rgba(255,255,255,0.60)),
    radial-gradient(circle at 72% 32%, rgba(123,97,255,0.14), transparent 38%);
}
.hero-card::before {
  background:
    radial-gradient(circle at 14% 18%, rgba(72,224,255,0.30), transparent 32%),
    radial-gradient(circle at 74% 8%, rgba(255,91,215,0.18), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,0.20), rgba(124,255,203,0.10));
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 32px;
  border: 1px solid rgba(255,255,255,0.58);
  pointer-events: none;
  mask-image: linear-gradient(135deg, #000, transparent 70%);
}
.hero-kicker {
  color: #061026;
  background: linear-gradient(135deg, rgba(124,255,203,0.52), rgba(72,224,255,0.25));
  box-shadow: 0 18px 42px rgba(72,224,255,0.12);
}
.hero-copy h2, .hero-card h2 {
  max-width: 760px;
  font-size: clamp(36px, 5vw, 68px);
}
.hero-actions {
  display: grid;
  gap: 12px;
  align-self: stretch;
  align-content: center;
}
.hero-actions .primary-btn,
.hero-actions .secondary-btn { min-height: 54px; }
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.hero-chips span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #44516a;
  background: rgba(255,255,255,0.56);
  border: 1px solid rgba(255,255,255,0.68);
  font-size: 12px;
  font-weight: 900;
}
.pulse-btn { animation: softPulse 2.8s ease-in-out infinite; }
.hero-visual { min-height: 320px; display: grid; place-items: center; }
.ai-orbit {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background:
    conic-gradient(from 120deg, rgba(123,97,255,0.18), rgba(72,224,255,0.32), rgba(124,255,203,0.20), rgba(255,91,215,0.24), rgba(123,97,255,0.18)),
    radial-gradient(circle, rgba(255,255,255,0.92) 0 21%, rgba(72,224,255,0.10) 22% 56%, transparent 57%);
  box-shadow: 0 0 84px rgba(72,224,255,0.25), inset 0 0 0 1px rgba(255,255,255,0.56);
}
.orbit-core {
  width: 124px;
  height: 124px;
  border-radius: 38px;
}
.floating-card {
  position: absolute;
  min-width: 106px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow: 0 20px 45px rgba(9,22,55,0.16);
  backdrop-filter: blur(14px);
  animation: cardFloat 4.6s ease-in-out infinite alternate;
}
.floating-card strong { display: block; color: #071228; font-size: 15px; }
.floating-card span { display: block; margin-top: 3px; color: #667085; font-size: 12px; font-weight: 850; }
.card-plan { left: -26px; top: 42px; }
.card-quiz { right: -34px; top: 96px; animation-delay: -1.4s; }
.card-map { left: 62px; bottom: 18px; animation-delay: -2.4s; }

.showcase-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 20px;
}
.feature-card,
.preview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.64);
  background: linear-gradient(145deg, rgba(255,255,255,0.84), rgba(255,255,255,0.58));
  border-radius: 26px;
  box-shadow: 0 24px 58px rgba(7,17,31,0.12);
  backdrop-filter: blur(18px);
}
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
}
.feature-card::after,
.preview-card::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -44px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72,224,255,0.20), transparent 68%);
}
.feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  border-radius: 18px;
  color: #061026;
  background: linear-gradient(135deg, #7cffcb, #48e0ff 58%, #a98cff);
  box-shadow: 0 16px 34px rgba(72,224,255,0.18);
}
.feature-card strong,
.preview-card strong { color: #071228; font-size: 16px; font-weight: 1000; }
.feature-card p,
.preview-card p { margin: 6px 0 0; color: #64708b; line-height: 1.6; font-size: 13px; }

.stats-grid { gap: 20px; }
.stat-card { min-height: 168px; background: linear-gradient(145deg, var(--glass-card-strong), rgba(255,255,255,0.60)); }
.stat-card:nth-child(1)::before { background: linear-gradient(90deg, #7b61ff, #34b8ff); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, #34b8ff, #72ffd2); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, #ffb647, #ff6bd6); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, #ff4f73, #7b61ff); }
.stat-value { font-size: 42px; }
.panel,
.stat-card,
.path-card,
.timeline-item,
.topic-item,
.history-item,
.quiz-question,
.result-item,
.lesson-section,
.mastery-row,
.config-item {
  background: linear-gradient(145deg, rgba(255,255,255,0.88), rgba(255,255,255,0.58));
}
.panel { border-radius: 32px; }
.panel h3, .panel-head h3 { font-size: 24px; }
.panel:hover { box-shadow: 0 28px 72px rgba(7, 17, 31, 0.18); }

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.mini-btn,
.link-btn {
  min-height: 48px;
  border-radius: 18px;
  letter-spacing: 0.01em;
}
.primary-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #765dff 0%, #3378ff 48%, #23d9ff 100%);
}
.primary-btn::after {
  content: "";
  position: absolute;
  inset: -80% -30%;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.55), transparent 58%);
  transform: translateX(-70%) rotate(10deg);
  transition: transform .6s ease;
}
.primary-btn:hover::after { transform: translateX(70%) rotate(10deg); }
.secondary-btn { background: rgba(255,255,255,0.78); }
.ghost-btn { background: rgba(255,255,255,0.58); }
input, select, textarea {
  background: rgba(255,255,255,0.78);
  border-color: rgba(122,139,176,0.26);
}
.form-grid { align-items: end; }

.planner-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
  margin: 0 0 20px;
}
.preview-card { padding: 20px; }
.preview-card span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 16px;
  color: #061026;
  background: linear-gradient(135deg, rgba(124,255,203,0.82), rgba(72,224,255,0.82));
  font-weight: 1000;
}

.path-card,
.topic-item,
.schedule-card,
.mistake-card,
.quiz-question,
.result-item,
.history-item,
.timeline-item {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.path-card:hover,
.topic-item:hover,
.schedule-card:hover,
.mistake-card:hover,
.quiz-question:hover,
.history-item:hover,
.timeline-item:hover {
  transform: translateY(-3px);
  border-color: rgba(52,184,255,0.38);
  box-shadow: 0 24px 58px rgba(7,17,31,0.14);
}
.empty-box {
  min-height: 78px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.56), rgba(239,246,255,0.48)),
    repeating-linear-gradient(135deg, transparent 0 9px, rgba(52,184,255,0.04) 9px 18px);
}
.chart-box {
  background:
    radial-gradient(circle at 18% 12%, rgba(124,255,203,0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(52,184,255,0.14), transparent 42%),
    rgba(255,255,255,0.50);
}
.option-row:has(input[type="radio"]:checked) span strong { color: #ffffff; background: linear-gradient(135deg, #765dff, #23d9ff); }
.toast { border-radius: 22px; }
.loading { background: rgba(6, 16, 33, 0.56); }
.loader { width: 84px; height: 84px; }

@keyframes ambientFloat {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(42px,32px,0) scale(1.08); }
}
@keyframes logoShine {
  0%, 62% { transform: translateX(-88%) rotate(12deg); }
  82%, 100% { transform: translateX(92%) rotate(12deg); }
}
@keyframes softPulse {
  0%, 100% { box-shadow: 0 16px 32px rgba(65, 95, 230, 0.24), 0 0 0 0 rgba(51,214,255,0.30); }
  50% { box-shadow: 0 16px 32px rgba(65, 95, 230, 0.24), 0 0 0 10px rgba(51,214,255,0.00); }
}
@keyframes cardFloat {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(0,-12px,0); }
}

@media (max-width: 1280px) {
  .hero-card { grid-template-columns: 1fr; min-height: auto; }
  .hero-actions { grid-template-columns: repeat(3, minmax(0,1fr)); align-content: start; }
  .hero-chips { grid-column: 1 / -1; }
}
@media (max-width: 1060px) {
  .sidebar { width: 100%; }
  .nav-item { padding-left: 12px; }
  .showcase-strip, .planner-preview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero-actions { grid-template-columns: 1fr; }
  .feature-card { padding: 16px; }
  .ambient-bg span { min-width: 300px; min-height: 300px; }
  .topbar h1 { font-size: 34px; }
}
