:root {
  --bg: #f5f3f9;
  --panel: #ffffff;
  --panel-alt: #faf8fc;
  --text: #1a1030;
  --muted: #6b5f80;
  --border: #e0d8ea;
  --accent: #7500ec;
  --accent-soft: rgba(117, 0, 236, 0.08);
  --success: #1d7a4a;
  --warning: #b25b00;
  --danger: #b42318;
  --shadow: 0 10px 30px rgba(30, 10, 60, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --module-1: #0f766e;
  --module-2: #7500ec;
  --module-3: #b45309;
  --module-4: #2563eb;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #f0ebff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
}

button, input, textarea, select {
  font: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

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

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7500ec, #a855f7);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow);
}

.brand h1 {
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0 0 6px 0;
}

.brand p {
  margin: 0;
  color: var(--muted);
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: 140ms ease;
  font-weight: 600;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn.ghost {
  background: transparent;
}

.btn.warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: var(--warning);
}

.btn.danger {
  background: #fff0f0;
  border-color: #fecaca;
  color: var(--danger);
}

.btn.small {
  padding: 8px 12px;
  font-size: 0.94rem;
}

.view-grid {
  display: grid;
  gap: 18px;
}

.home-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.25fr 0.95fr;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

.card.slim {
  padding: 16px 18px;
}

.card h2, .card h3, .card h4 {
  margin: 0 0 10px;
  line-height: 1.25;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.pill {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 700;
}

.pill.module-1 { background: rgba(15, 118, 110, 0.10); color: var(--module-1); }
.pill.module-2 { background: rgba(117, 0, 236, 0.10); color: var(--module-2); }
.pill.module-3 { background: rgba(180, 83, 9, 0.10); color: var(--module-3); }
.pill.module-4 { background: rgba(29, 78, 216, 0.10); color: var(--module-4); }

.hero-note {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1px dashed var(--border);
  color: var(--muted);
}

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

.stat {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 15px;
  background: var(--panel-alt);
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  margin-top: 4px;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

.option-grid {
  display: grid;
  gap: 10px;
}

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

.radio-card,
.check-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--panel);
  cursor: pointer;
  transition: 140ms ease;
}

.radio-card.active,
.check-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.radio-card input,
.check-card input {
  margin-right: 8px;
}

.radio-title {
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.radio-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.module-list {
  display: grid;
  gap: 10px;
}

.module-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--panel);
  display: grid;
  gap: 8px;
}

.module-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.module-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.module-title {
  font-weight: 700;
}

.module-focus {
  color: var(--muted);
  font-size: 0.94rem;
}

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

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.summary-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-key {
  color: var(--muted);
}

.summary-val {
  font-weight: 700;
  text-align: right;
}

.callout {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #854d0e;
}

.exam-layout {
  display: grid;
  grid-template-columns: 325px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
}

.exam-main {
  display: grid;
  gap: 16px;
}

.exam-topbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e7edf8;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7500ec, #a855f7);
  width: 0;
  transition: width 160ms ease;
}

.timer {
  min-width: 138px;
  text-align: center;
  font-weight: 800;
  font-size: 1.4rem;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.timer.warn {
  color: var(--warning);
  border-color: #fdba74;
  background: #fff7ed;
}

.timer.danger {
  color: var(--danger);
  border-color: #fca5a5;
  background: #fff0f0;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
}

.badge.module-1 { background: rgba(15, 118, 110, 0.10); color: var(--module-1); }
.badge.module-2 { background: rgba(117, 0, 236, 0.10); color: var(--module-2); }
.badge.module-3 { background: rgba(180, 83, 9, 0.10); color: var(--module-3); }
.badge.module-4 { background: rgba(29, 78, 216, 0.10); color: var(--module-4); }

.question-prompt {
  font-size: 1.18rem;
  line-height: 1.6;
  font-weight: 600;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 14px;
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(117, 0, 236, 0.06) 0%, rgba(168, 85, 247, 0.03) 100%);
  color: var(--text);
}

.answer-box {
  width: 100%;
  min-height: 290px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fcfdff;
  resize: vertical;
  line-height: 1.6;
}

.answer-box:focus {
  outline: 2px solid rgba(29, 78, 216, 0.20);
  border-color: var(--accent);
}

.hint-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}

.info-box {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-alt);
  padding: 14px 16px;
}

.info-box h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.info-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 16px;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.nav-section-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.nav-btn {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  min-height: 46px;
  font-weight: 700;
  cursor: pointer;
}

.nav-btn.answered {
  background: #effdf5;
  border-color: #86efac;
  color: var(--success);
}

.nav-btn.flagged {
  background: #fff7ed;
  border-color: #fdba74;
  color: var(--warning);
}

.nav-btn.current {
  box-shadow: inset 0 0 0 2px var(--accent);
  border-color: var(--accent);
  color: var(--accent);
}

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

.kpi {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-alt);
  padding: 14px 15px;
}

.kpi strong {
  display: block;
  font-size: 1.2rem;
}

.review-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

.score-card {
  display: grid;
  gap: 14px;
}

.score-big {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.score-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.score-state {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
}

.score-state.pass {
  background: #ecfdf3;
  color: var(--success);
}

.score-state.fail {
  background: #fff0f0;
  color: var(--danger);
}

.module-bars {
  display: grid;
  gap: 12px;
}

.module-bar-row {
  display: grid;
  gap: 6px;
}

.module-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.96rem;
}

.module-bar-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e7edf8;
  overflow: hidden;
}

.module-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.review-list {
  display: grid;
  gap: 14px;
}

.review-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.review-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 16px 18px;
  background: #fbfcff;
  cursor: pointer;
}

.review-body {
  padding: 0 18px 18px;
  display: none;
}

.review-item.open .review-body {
  display: block;
}

.answer-preview,
.model-answer,
.source-list {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-alt);
  padding: 14px 16px;
  margin-top: 14px;
}

.answer-preview p,
.model-answer p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
}

.rubric-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.rubric-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.rubric-item.auto-on {
  background: #f7fbff;
}

.rubric-item label {
  width: 100%;
  cursor: pointer;
}

.rubric-title {
  font-weight: 700;
  display: block;
}

.rubric-points {
  color: var(--muted);
  font-size: 0.92rem;
}

.rubric-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.source-list ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.inline-input {
  width: 110px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  margin-top: 18px;
  font-size: 0.94rem;
}

@media (max-width: 1150px) {
  .home-hero,
  .setup-grid,
  .review-hero,
  .exam-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .hint-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 20px, 100%);
  }

  .site-header {
    flex-direction: column;
  }

  .option-grid.two,
  .stats-grid,
  .kpi-row {
    grid-template-columns: 1fr;
  }

  .exam-topbar {
    grid-template-columns: 1fr;
  }

  .nav-buttons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .question-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .action-row {
    width: 100%;
  }

  .action-row .btn {
    flex: 1;
  }
}

/* === NEW v2 STYLES === */

.tabs {
  display: flex;
  gap: 4px;
  background: #e7edf8;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 18px;
}

.tab-btn {
  flex: 1;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
  transition: 140ms ease;
}

.tab-btn.active {
  background: var(--panel);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--panel);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.history-item .history-score {
  font-size: 1.3rem;
  font-weight: 800;
}

.history-item .history-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.history-item .pass { color: var(--success); }
.history-item .fail { color: var(--danger); }

.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 60px;
  padding: 4px 0;
}

.mini-chart .bar {
  flex: 1;
  min-width: 12px;
  max-width: 28px;
  border-radius: 4px 4px 0 0;
  transition: height 200ms ease;
  position: relative;
}

.mini-chart .bar.pass { background: linear-gradient(180deg, #22c55e, #16a34a); }
.mini-chart .bar.fail { background: linear-gradient(180deg, #f87171, #dc2626); }

.mini-chart .bar:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
  z-index: 10;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: min(680px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
}

.modal h2 { margin: 0 0 16px; }

.modal textarea {
  width: 100%;
  min-height: 200px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: monospace;
  font-size: 0.9rem;
  resize: vertical;
}

.modal .btn-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.question-count-input {
  width: 70px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-align: center;
  font-weight: 700;
}

.weak-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.weak-pill {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.weak-pill.red { background: #fff0f0; color: var(--danger); }
.weak-pill.orange { background: #fff7ed; color: var(--warning); }
.weak-pill.green { background: #ecfdf3; color: var(--success); }

.mastery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.mastery-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--panel-alt);
}

.mastery-item .mastery-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.mastery-track {
  height: 6px;
  border-radius: 999px;
  background: #e7edf8;
  overflow: hidden;
}

.mastery-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 200ms ease;
}

.mastery-fill.red { background: var(--danger); }
.mastery-fill.orange { background: var(--warning); }
.mastery-fill.green { background: var(--success); }

.import-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: 140ms ease;
  margin-bottom: 14px;
}

.import-drop-zone:hover,
.import-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.import-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.94rem;
}

.import-result.success { background: #ecfdf3; color: var(--success); }
.import-result.error { background: #fff0f0; color: var(--danger); }

/* === Disclaimer === */

.disclaimer {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: center;
}

/* === Mode Cards (Home) === */

.mode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 20px;
}

.mode-card .btn { margin-top: auto; }

.mode-card-disabled {
  opacity: 0.55;
}

.mode-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.5rem;
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  .mode-cards {
    grid-template-columns: 1fr;
  }
}

/* === Auth Gate === */

.auth-gate {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  width: min(400px, 100%);
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fcfdff;
}

.auth-input:focus {
  outline: 2px solid rgba(29, 78, 216, 0.20);
  border-color: var(--accent);
}

.auth-error {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff0f0;
  color: var(--danger);
  font-weight: 600;
  text-align: center;
  font-size: 0.94rem;
}

/* === Profile === */

.profile-list {
  display: grid;
  gap: 8px;
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  cursor: pointer;
  transition: 140ms ease;
}

.profile-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.profile-item .profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.profile-item .profile-info {
  flex: 1;
  min-width: 0;
}

.profile-item .profile-name {
  font-weight: 700;
  display: block;
}

.profile-item .profile-stats {
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-item .profile-delete {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.profile-item .profile-delete:hover {
  color: var(--danger);
  background: #fff0f0;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(117,0,236,0.1), rgba(168,85,247,0.1));
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
}

.profile-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .header-actions,
  .btn,
  .sidebar,
  .question-actions,
  .review-head button {
    display: none !important;
  }

  .shell {
    width: 100%;
    padding: 0;
  }

  .review-item {
    break-inside: avoid;
    box-shadow: none;
  }

  .review-body {
    display: block !important;
  }
}

/* AI Evaluation Result */
.ai-result {
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}
.ai-result.success { background: #ecfdf3; border: 1px solid #86efac; }
.ai-result.warning { background: #fff7ed; border: 1px solid #fdba74; }
.ai-result.danger { background: #fff0f0; border: 1px solid #fca5a5; }
.ai-result-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 1.1rem;
}
.ai-result p { margin: 6px 0; line-height: 1.5; }

/* === Vokabeltrainer === */

.vocab-card {
  text-align: center;
  padding: 32px 24px;
}

.vocab-term {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  padding: 24px 20px;
  margin: 16px 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(117, 0, 236, 0.07) 0%, rgba(168, 85, 247, 0.03) 100%);
  border: 2px solid rgba(117, 0, 236, 0.15);
}

.vocab-definition {
  font-size: 1.12rem;
  line-height: 1.7;
  padding: 20px;
  margin: 16px 0;
  border-radius: 14px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  text-align: left;
}

