/* =========================================================
 *  style.css  ——  AI 化学老师
 *  主题：明亮 · 彩色 · 卡通 · 适合儿童/青少年学习
 * ========================================================= */

:root {
  --primary: #7b6cf6;
  --primary-2: #4ec8ff;
  --accent: #ff9bb3;
  --accent-2: #ffd56b;
  --green: #5dd39e;
  --red: #ff6b6b;
  --bg-1: #fef6ff;
  --bg-2: #eaf7ff;
  --bg-3: #fff8e7;
  --text: #2d2a4a;
  --text-soft: #6b6892;
  --card: rgba(255, 255, 255, 0.85);
  --card-border: rgba(255, 255, 255, 0.6);
  --shadow: 0 12px 30px rgba(123, 108, 246, 0.18);
  --shadow-strong: 0 20px 50px rgba(123, 108, 246, 0.28);
  --radius: 22px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 背景气泡动画 */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  z-index: -1;
  animation: floatBubble 14s ease-in-out infinite alternate;
}
body::before {
  width: 360px; height: 360px;
  background: radial-gradient(circle, #ffb3d9 0%, transparent 70%);
  top: -80px; left: -80px;
}
body::after {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #b3e5ff 0%, transparent 70%);
  bottom: -120px; right: -100px;
  animation-delay: -7s;
}

@keyframes floatBubble {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-30px, 80px) scale(0.95); }
}

/* ---------- 通用 ---------- */
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 28px 60px;
  position: relative;
  box-sizing: border-box;
}

.page { display: none; animation: pageIn 0.5s ease; }
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 顶部 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 14px 22px;
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; font-size: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-emoji {
  font-size: 28px;
  filter: drop-shadow(0 4px 6px rgba(123,108,246,0.35));
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}

.topbar-actions { display: flex; gap: 10px; align-items: center; }
.btn-back {
  border: 0; background: rgba(123,108,246,0.12);
  color: var(--primary); padding: 8px 16px;
  border-radius: 999px; font-weight: 700;
  transition: all .2s;
}
.btn-back:hover { background: rgba(123,108,246,0.22); transform: translateX(-2px); }

.progress-pill {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  color: #fff;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 6px 14px rgba(255,107,107,0.3);
}

/* ---------- 课程卡片网格 ---------- */
.hero {
  text-align: center;
  padding: 30px 12px 18px;
}
.hero h1 {
  font-size: 40px;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #7b6cf6, #ff9bb3);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}
.hero p {
  color: var(--text-soft);
  font-size: 16px;
  margin: 0;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 22px;
}
.course-card {
  position: relative;
  border-radius: var(--radius);
  padding: 22px;
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all .3s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}
.course-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--card-bg, linear-gradient(135deg, #7b6cf6, #4ec8ff));
  opacity: 0.08;
  z-index: 0;
  transition: opacity .3s;
}
.course-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-strong);
}
.course-card:hover::before { opacity: 0.16; }
.course-card > * { position: relative; z-index: 1; }

.course-card .emoji { font-size: 44px; margin-bottom: 6px; display: block; }
.course-card .chapter {
  font-size: 13px; color: var(--text-soft); font-weight: 700;
}
.course-card .title {
  font-size: 19px; font-weight: 800; margin: 6px 0 10px;
}
.course-card .sub {
  color: var(--text-soft); font-size: 13px; line-height: 1.5;
}
.course-card .go {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-weight: 700;
  box-shadow: 0 6px 14px rgba(123,108,246,0.35);
  transition: transform .2s;
}
.course-card:hover .go { transform: translateX(4px); }

/* ----- 学习进度环 ----- */
.course-card .progress-ring {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.course-card .progress-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.course-card .ring-bg {
  fill: rgba(255,255,255,0.85);
  stroke: rgba(0,0,0,0.08);
  stroke-width: 4;
}
.course-card .ring-fg {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s cubic-bezier(.2,.8,.2,1);
}
.course-card .progress-ring.is-new .ring-fg { stroke: #cbd5e1; }
.course-card .progress-ring.is-new .ring-pct { color: #94a3b8; }

.course-card .progress-ring.is-progress .ring-fg { stroke: #fbbf24; }
.course-card .progress-ring.is-progress .ring-pct { color: #b45309; font-weight: 800; }

.course-card .progress-ring.is-done .ring-fg { stroke: #10b981; }
.course-card .progress-ring.is-done .ring-pct { color: #047857; font-weight: 800; }

.course-card .progress-ring .ring-pct {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  line-height: 1;
}

.course-card.completed {
  box-shadow: 0 0 0 2px rgba(16,185,129,0.45), var(--shadow-strong);
}
.course-card.completed::before {
  opacity: 0.18;
}


/* ---------- 学习页 ---------- */
.lesson-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px 12px;
}
.lesson-hero .hero-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.lesson-hero .chip {
  display: inline-block;
  background: rgba(255,255,255,0.7);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 700;
  margin-bottom: 12px;
}
.lesson-hero h2 {
  font-size: 30px;
  margin: 6px 0 8px;
  color: var(--text);
}
.lesson-hero .sub { color: var(--text-soft); margin: 0; }
.hero-idol {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-idol img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: rgba(255,255,255,0.4);
  box-shadow: 0 6px 18px rgba(99,102,241,0.22), 0 2px 6px rgba(0,0,0,0.10);
  border: 3px solid rgba(255,255,255,0.85);
  display: block;
  animation: idol-breath 4s ease-in-out infinite;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.4,1.6,.6,1);
}
.hero-idol.idol-fade img {
  opacity: 0;
  transform: scale(0.85) translateY(-6px);
}
@keyframes idol-breath {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(99,102,241,0.22), 0 2px 6px rgba(0,0,0,0.10); }
  50%      { transform: scale(1.04); box-shadow: 0 10px 26px rgba(99,102,241,0.34), 0 4px 10px rgba(0,0,0,0.12); }
}

/* === v7 PPT 模式：图完整可见 + 文字 7 行 === */
.lesson-stage {
  margin-top: 12px;
  background: var(--card);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-visual {
  background: linear-gradient(135deg, #fff 0%, #f4f0ff 100%);
  border-radius: var(--radius-sm);
  padding: 10px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.stage-visual .anim-svg {
  width: auto;
  max-width: 100%;
  max-height: 360px;
  height: auto;
}
.stage-visual .anim-card {
  width: 100%;
  max-width: 280px;
  max-height: 320px;
}
.stage-visual .anim-multi {
  width: 100%;
  max-width: 100%;
  max-height: 360px;
}
.stage-visual .anim-single-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage-text {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.stage-text {
  width: 100%;
}
.stage-text h3 {
  margin: 0 0 10px;
  font-size: 22px;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.stage-text .script {
  background: rgba(123,108,246,0.06);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 16px 20px;
  /* 7 行文字：字号 18px × 行高 1.75 = 31.5px × 7 = ~220px */
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  min-height: 240px; /* 容纳 7 行的最小高度 */
}
.stage-text .script strong { color: var(--primary); }

/* === v6 PPT 翻页样式 === */
.script-segments.ppt {
  position: relative;
}
.script-segments .script-seg.is-hidden {
  display: none;
}
.script-segments .script-seg.is-current {
  animation: pptFadeIn 0.35s ease;
}
@keyframes pptFadeIn {
  0%   { opacity: 0; transform: translateX(8px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* PPT 控制栏：上一段 / 朗读 / 下一段 / 进度 */
.ppt-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.ppt-controls button {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(123,108,246,0.25);
  background: rgba(123,108,246,0.08);
  color: var(--primary);
  transition: all 0.2s;
  font-family: inherit;
}
.ppt-controls button:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}
.ppt-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ppt-controls .ppt-play {
  background: linear-gradient(135deg, #ff9bb3, #ff6b9d);
  color: #fff;
  border-color: transparent;
}
.ppt-controls .ppt-play:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff7da3, #ff5588);
}
.ppt-controls .ppt-next {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.ppt-controls .ppt-next:hover:not(:disabled) {
  background: #6c4ee6;
}
.ppt-progress {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-left: 8px;
  min-width: 80px;
  text-align: center;
}
.ppt-progress b { color: var(--primary); }

/* === v9: 每段一个动画，独占整个 visual 区 === */
.per-seg-anim-fullscreen {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.per-seg-slot {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.per-seg-slot.is-active {
  display: flex;
}
/* slot 内的 SVG / anim-svg 占满 */
.per-seg-slot svg,
.per-seg-slot .anim-svg,
.per-seg-slot .anim-card,
.per-seg-slot .anim-multi,
.per-seg-slot .anim-single-wrap {
  width: 100%;
  max-width: 760px;
  max-height: 100%;
  height: auto;
}
.per-seg-slot .anim-single-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 14px 0;
}
.tag {
  background: linear-gradient(135deg, #ffe5ec, #ffd6e0);
  color: #b03260;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- 按钮 ---------- */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: 0;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(123,108,246,0.35);
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 24px rgba(123,108,246,0.45); }

.btn-ghost {
  background: rgba(255,255,255,0.7);
  color: var(--primary);
  border: 2px solid rgba(123,108,246,0.25);
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: all .2s;
}
.btn-ghost:hover { background: rgba(123,108,246,0.1); }

.btn-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 18px;
}

.tts-btn {
  background: linear-gradient(135deg, #ff9bb3, #ff6b9d);
  color: #fff;
  border: 0;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(255,107,157,0.4);
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s;
}
.tts-btn:hover { transform: translateY(-2px) scale(1.04); }
.tts-btn.playing {
  animation: pulse 1.4s ease-in-out infinite;
  background: linear-gradient(135deg, #5dd39e, #2dc28a);
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(93,211,158,0.6); }
  50%     { box-shadow: 0 0 0 14px rgba(93,211,158,0); }
}

.tts-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
  opacity: 0.85;
}

.speaker-icon {
  width: 18px; height: 18px;
}

/* ---------- 进度条 ---------- */
.progress-wrap {
  margin-top: 18px;
  background: rgba(255,255,255,0.7);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--primary-2));
  background-size: 200% 100%;
  width: 0%;
  border-radius: 999px;
  transition: width .6s cubic-bezier(.2,.8,.2,1);
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ---------- 互动游戏 ---------- */
.game-card {
  margin-top: 24px;
  background: var(--card);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  padding: 26px;
}
.game-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}
.game-card .instruction {
  color: var(--text-soft);
  margin: 0 0 18px;
}

.play-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: center;
}
@media (max-width: 720px) { .play-area { grid-template-columns: 1fr; } }

.bucket {
  background: linear-gradient(180deg, var(--bucket-color, #e9eaff), #fff);
  border: 3px dashed rgba(123,108,246,0.35);
  border-radius: 22px;
  padding: 18px 16px;
  min-height: 200px;
  text-align: center;
  transition: all .25s;
}
.bucket.over {
  border-style: solid;
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(123,108,246,0.15), #fff);
  transform: scale(1.04);
}
.bucket .label {
  font-weight: 800;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.bucket .emoji { font-size: 28px; }
.bucket-list {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 12px;
  justify-content: center;
  min-height: 50px;
}

.drag-pool {
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  min-height: 100px;
}
.drag-item {
  background: linear-gradient(135deg, #fff, #f4f0ff);
  border: 2px solid rgba(123,108,246,0.25);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  cursor: grab;
  user-select: none;
  transition: all .2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  font-size: 16px;
}
.drag-item:active { cursor: grabbing; }
.drag-item.dragging { opacity: 0.4; transform: scale(0.9); }
.drag-item.correct {
  background: linear-gradient(135deg, #5dd39e, #2dc28a);
  color: #fff;
  border-color: #2dc28a;
  animation: correctPop .6s;
}
.drag-item.wrong {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  color: #fff;
  border-color: #ff5252;
  animation: shake .5s;
}
/* 拖错后挂在 item 下的"应该放哪里 + 为什么"持久化提示 */
.drag-hint {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #c62828;
  border: 1.5px dashed #ff5252;
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 82, 82, 0.18);
  z-index: 5;
  pointer-events: none;
}
.drag-hint::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: #fff;
  border-left: 1.5px solid #ff5252;
  border-top: 1.5px solid #ff5252;
}
.drag-hint-why {
  color: #6b7280;
  font-weight: 500;
  margin-left: 4px;
}
.drag-item.has-hint {
  position: relative;
  background: linear-gradient(135deg, #ffe5e5, #ffd0d0);
  border-color: #ff5252;
  color: #c62828;
  border-style: dashed;
}
@keyframes correctPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-6px); }
  75%     { transform: translateX(6px); }
}

/* ---------- 互动：判断对错 ---------- */
.tf-list { display: flex; flex-direction: column; gap: 14px; }
.tf-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fff, #f4f0ff);
  border: 2px solid rgba(123,108,246,0.18);
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: all .25s;
}
.tf-card.correct {
  background: linear-gradient(135deg, #5dd39e, #2dc28a);
  border-color: #2dc28a;
  color: #fff;
  animation: correctPop .6s;
}
.tf-card.wrong {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  border-color: #ff5252;
  color: #fff;
  animation: shake .5s;
}
.tf-index {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent, #7b6cf6);
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.tf-card.correct .tf-index { background: rgba(255,255,255,0.3); }
.tf-card.wrong   .tf-index { background: rgba(255,255,255,0.3); }
.tf-text { flex: 1; font-size: 16px; font-weight: 600; line-height: 1.5; }
.tf-btns { display: flex; gap: 10px; flex: 0 0 auto; }
.tf-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 3px solid;
  background: #fff;
  font-size: 28px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.tf-btn.tf-true  { border-color: #2dc28a; color: #2dc28a; }
.tf-btn.tf-false { border-color: #ff5252; color: #ff5252; }
.tf-btn:hover:not(:disabled) { transform: scale(1.08); }
.tf-btn:disabled { opacity: .45; cursor: default; }
.tf-btn.picked { color: #fff; }
.tf-btn.tf-true.picked  { background: #2dc28a; border-color: #2dc28a; }
.tf-btn.tf-false.picked { background: #ff5252; border-color: #ff5252; }
.tf-card.correct .tf-btn { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.5); color: #fff; }
.tf-card.wrong   .tf-btn { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.5); color: #fff; }
/* 让学生答错时也能看清哪个才是正确答案（覆盖 .tf-card.wrong .tf-btn 的暗化） */
.tf-btn.right-reveal.picked { background: #2dc28a !important; border-color: #2dc28a !important; color: #fff !important; box-shadow: 0 0 0 3px rgba(255,255,255,0.7); }
.tf-btn.picked.wrong-picked  { background: #ff5252 !important; border-color: #ff5252 !important; color: #fff !important; }
/* 解释文本（pass/fail 文案）— 改成白色卡片，badge 更醒目 */
.tf-explain {
  flex-basis: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* 标准答案 / 你的答案 徽章 */
.tf-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.tf-badge-pass {
  background: linear-gradient(135deg, #5dd39e, #2dc28a);
  color: #fff;
}
.tf-badge-fail {
  background: linear-gradient(135deg, #ff8a8a, #ff5252);
  color: #fff;
  animation: badgeShake .5s;
}
.tf-explain-head {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.tf-explain-body {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: #1f2937;
}
@keyframes badgeShake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* ============ True-False v2 卡片式 UI ============ */
.tf-card.tf-card-v2 {
  flex-direction: column;
  align-items: stretch;
  padding: 18px 20px;
  background: linear-gradient(135deg, #fff, #faf8ff);
  border: 2px solid rgba(123,108,246,0.15);
}
.tf-card-v2 .tf-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.tf-card-v2 .tf-card-type {
  background: linear-gradient(135deg, #7b6cf6, #5e4cd6);
  color: #fff;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(123,108,246,0.3);
}
.tf-card-v2 .tf-card-q {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
  color: #1f2937;
  margin: 8px 0 16px 0;
  padding: 0;
  flex-basis: auto;
  background: transparent;
  box-shadow: none;
}
.tf-card-v2 .tf-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex-basis: auto;
  margin: 0;
}
.tf-card-v2 .tf-action-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 64px;
  border-radius: 16px;
  border: 2.5px solid;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  transition: all .2s;
  outline: none;
  padding: 0 12px;
}
.tf-card-v2 .tf-action-btn.tf-action-true {
  border-color: #2dc28a;
  color: #2dc28a;
  background: #f0fbf6;
}
.tf-card-v2 .tf-action-btn.tf-action-false {
  border-color: #ff5252;
  color: #ff5252;
  background: #fff5f5;
}
.tf-card-v2 .tf-action-btn:not(:disabled):hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.tf-card-v2 .tf-action-btn:not(:disabled):active {
  transform: translateY(0);
}
.tf-card-v2 .tf-action-btn:disabled {
  cursor: default;
}
.tf-card-v2 .tf-action-icon {
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}
.tf-card-v2 .tf-action-label {
  font-size: 18px;
  letter-spacing: 2px;
  font-weight: 800;
}
.tf-card-v2 .tf-action-btn.is-correct {
  background: linear-gradient(135deg, #5dd39e, #2dc28a);
  border-color: #2dc28a;
  color: #fff;
  box-shadow: 0 4px 14px rgba(45,194,138,0.45);
}
.tf-card-v2 .tf-action-btn.is-wrong {
  background: linear-gradient(135deg, #ff8a8a, #ff5252);
  border-color: #ff5252;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255,82,82,0.4);
}
.tf-card-v2 .tf-action-btn.show-correct:not(.is-wrong) {
  background: linear-gradient(135deg, #5dd39e, #2dc28a);
  border-color: #2dc28a;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(45,194,138,0.25);
  animation: correctPulse 0.6s;
}
.tf-card-v2.is-correct {
  background: linear-gradient(135deg, #e8faf2, #c8f0dc);
  border-color: #2dc28a;
}
.tf-card-v2.is-wrong {
  background: linear-gradient(135deg, #ffe8e8, #ffd0d0);
  border-color: #ff5252;
}
.tf-card-v2 .tf-card-explain {
  flex-basis: auto;
  margin-top: 14px;
}
@keyframes correctPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@media (max-width: 720px) {
  .tf-card-v2 .tf-action-btn { height: 56px; gap: 8px; }
  .tf-card-v2 .tf-action-icon { font-size: 24px; }
  .tf-card-v2 .tf-action-label { font-size: 16px; letter-spacing: 1px; }
  .tf-card-v2 .tf-card-q { font-size: 16px; }
}

/* ============ 单选题 radio 样式 ============ */
.single-card .single-option-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid #c4b9f0;
  background: #fff;
  position: relative;
  flex: 0 0 auto;
  transition: all .2s;
}
.single-card .single-option.is-picked .single-option-dot {
  border-color: #7b6cf6;
  background: #7b6cf6;
  box-shadow: 0 0 0 3px rgba(123,108,246,0.18);
}
.single-card .single-option.is-picked .single-option-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

@media (max-width: 720px) {
  .tf-btn { width: 48px; height: 48px; font-size: 24px; }
  .tf-text { font-size: 15px; }
  .tf-explain { font-size: 13px; }
  .tf-explain-body { font-size: 13px; }
  .tf-badge { font-size: 12px; padding: 4px 10px; }
}

/* ---------- 通用题型容器（fill-blank / multi-select / match-pair） ---------- */
.generic-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(245,250,255,0.95));
  border: 2px solid var(--accent-2);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 14px;
  transition: all 0.3s;
}
.generic-card.is-correct { border-color: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,0.15); }
.generic-card.is-wrong   { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,0.15); }

.generic-index {
  display: inline-block;
  width: 26px; height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  text-align: center; line-height: 26px;
  font-weight: 800; font-size: 14px;
  margin-right: 10px;
}
.generic-card.is-correct .generic-index { background: #22c55e; }
.generic-card.is-wrong   .generic-index { background: #ef4444; }

.generic-text {
  font-size: 16px; font-weight: 600;
  color: var(--text); line-height: 1.7;
  margin: 8px 0 14px;
}

/* ---------- 填空题 ---------- */
.fill-blank-input {
  display: inline-block;
  width: 90px;
  padding: 4px 8px;
  margin: 0 4px;
  border: 2px solid var(--accent-2);
  border-radius: 8px;
  background: #fff;
  font-size: 15px; font-weight: 600;
  text-align: center;
  transition: all 0.2s;
}
.fill-blank-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(123,108,246,0.2); }
.fill-blank-input.is-right { border-color: #22c55e; background: rgba(34,197,94,0.1); color: #15803d; }
.fill-blank-input.is-wrong { border-color: #ef4444; background: rgba(239,68,68,0.1); color: #b91c1c; }
.fill-blank-actions { margin-top: 14px; display: flex; gap: 10px; align-items: center; }

/* ---------- 多选题 ---------- */
.multi-options {
  display: flex; flex-direction: column; gap: 8px;
  margin: 10px 0;
}
.multi-option {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 15px; font-weight: 600;
  transition: all 0.2s;
  user-select: none;
}
.multi-option:hover { border-color: var(--accent-2); background: rgba(78,200,255,0.05); }
.multi-option.is-picked { border-color: var(--accent); background: rgba(123,108,246,0.1); color: var(--accent); }
.multi-option.is-correct-pick { border-color: #22c55e; background: rgba(34,197,94,0.12); color: #15803d; }
.multi-option.is-missed     { border-color: #22c55e; background: rgba(34,197,94,0.06); color: #15803d; border-style: dashed; }
.multi-option.is-wrong-pick { border-color: #ef4444; background: rgba(239,68,68,0.1); color: #b91c1c; text-decoration: line-through; }
.multi-option-box {
  width: 22px; height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  flex-shrink: 0;
}
.multi-option.is-picked .multi-option-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.multi-actions { margin-top: 14px; display: flex; gap: 10px; align-items: center; }

/* ---------- 配对题 ---------- */
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 10px;
}
.match-col-title {
  font-size: 13px; font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 8px;
  text-align: center;
}
.match-list { display: flex; flex-direction: column; gap: 8px; }
.match-item {
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 15px; font-weight: 600;
  text-align: center;
  transition: all 0.2s;
  user-select: none;
}
.match-item:hover { border-color: var(--accent-2); background: rgba(78,200,255,0.05); }
.match-item.is-selected { border-color: var(--accent); background: rgba(123,108,246,0.1); color: var(--accent); }
.match-item.is-paired   { border-color: #cbd5e1; background: #f3f4f6; color: var(--text-soft); cursor: default; }
.match-item.is-correct  { border-color: #22c55e; background: rgba(34,197,94,0.12); color: #15803d; }
.match-item.is-wrong    { border-color: #ef4444; background: rgba(239,68,68,0.1); color: #b91c1c; }
.match-actions { margin-top: 14px; display: flex; gap: 10px; align-items: center; justify-content: center; }

/* ---------- 通用操作按钮 ---------- */
.check-btn {
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.check-btn:hover { background: #6b5ce6; }
.check-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.reset-btn {
  padding: 8px 18px;
  background: #f3f4f6;
  color: var(--text);
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.reset-btn:hover { background: #e5e7eb; }
.generic-explain {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 10px;
  border-left: 4px solid var(--accent);
  display: none;
}
.generic-card.is-correct .generic-explain { border-left-color: #22c55e; }
.generic-card.is-wrong   .generic-explain { border-left-color: #ef4444; }
.generic-card.is-correct .generic-explain,
.generic-card.is-wrong   .generic-explain { display: block; }
.generic-explain-head { font-size: 12px; font-weight: 700; color: #6b7280; letter-spacing: 0.5px; margin-bottom: 4px; }
.generic-explain-body { font-size: 14px; font-weight: 600; line-height: 1.6; color: #1f2937; }
@media (max-width: 720px) {
  .match-grid { grid-template-columns: 1fr; gap: 12px; }
  .fill-blank-input { width: 70px; }
}

.game-reward {
  margin-top: 18px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  display: none;
}
.game-reward.show { display: block; animation: pageIn .5s; }

/* ---------- AI 对话测试 ---------- */
.chat-card {
  margin-top: 24px;
  background: var(--card);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  padding: 26px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.chat-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd56b, #ff9bb3);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  box-shadow: 0 8px 16px rgba(255,155,179,0.4);
}
.chat-header .name { font-weight: 800; font-size: 18px; }
.chat-header .meta { color: var(--text-soft); font-size: 13px; }

.chat-log {
  background: rgba(255,255,255,0.65);
  border-radius: var(--radius-sm);
  padding: 16px;
  min-height: 260px;
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.6;
  animation: pageIn .35s ease;
  white-space: pre-wrap;
}
.bubble.npc {
  background: linear-gradient(135deg, #fff, #fff8e7);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  border: 1px solid rgba(255,213,107,0.3);
}
.bubble.user {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.bubble.npc.success {
  background: linear-gradient(135deg, #d6fbe9, #b8f1d4);
  border-color: #5dd39e;
}
.bubble.npc.fail {
  background: linear-gradient(135deg, #ffe5e5, #ffd0d0);
  border-color: #ff6b6b;
}
.bubble.streaming::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  color: var(--primary);
  animation: caret 0.8s steps(2) infinite;
}
@keyframes caret {
  50% { opacity: 0; }
}
/* 💭 Loading 气泡：AI 思考中 */
.bubble.npc.is-loading {
  background: linear-gradient(135deg, #faf6ee, #fff8e7);
  border-color: #e8c468;
  color: #8b6f3a;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bubble.npc.is-loading .loading-dots {
  display: inline-flex;
  gap: 2px;
}
.bubble.npc.is-loading .loading-dots span {
  animation: dotBlink 1.4s infinite ease-in-out both;
}
.bubble.npc.is-loading .loading-dots span:nth-child(1) { animation-delay: 0s; }
.bubble.npc.is-loading .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.bubble.npc.is-loading .loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBlink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

.stars {
  display: flex; gap: 6px; margin-top: 6px;
}
.star {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(123,108,246,0.15);
  position: relative;
  transition: all .3s;
}
.star.on {
  background: linear-gradient(135deg, #ffd56b, #ff9bb3);
  box-shadow: 0 0 10px rgba(255,213,107,0.6);
}

.chat-input {
  display: flex; gap: 10px;
  margin-top: 14px;
}
.chat-input input {
  flex: 1;
  border: 2px solid rgba(123,108,246,0.2);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 15px;
  outline: none;
  background: #fff;
  transition: border-color .2s;
}
.chat-input input:focus { border-color: var(--primary); }

.hint {
  color: var(--text-soft);
  font-size: 13px;
  margin-top: 8px;
  font-style: italic;
}

.final-card {
  margin-top: 22px;
  text-align: center;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff8e7, #ffe5ec);
  border: 2px solid rgba(255,155,179,0.3);
  display: none;
}
.final-card.show { display: block; animation: pageIn .6s; }
.final-card h3 {
  font-size: 28px;
  margin: 0 0 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.score-big {
  font-size: 56px;
  font-weight: 900;
  margin: 6px 0;
  background: linear-gradient(135deg, #ffd56b, #ff6b9d);
  -webkit-text-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- 动画 SVG 容器 ---------- */
.anim-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
}

/* === 多图并排（v3） === */
.anim-single-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.anim-multi {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
}
.anim-card {
  position: relative;
  flex: 1 1 200px;
  min-width: 200px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(123,108,246,0.18);
  border-radius: 10px;
  padding: 8px 10px 6px;
  box-shadow: 0 1px 4px rgba(123,108,246,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.anim-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123,108,246,0.15);
}
.anim-card-num {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(123,108,246,0.35);
}
.anim-card-svg {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.anim-card-svg .anim-svg {
  width: 100%;
  max-width: 280px;
  max-height: 220px;
  height: auto;
}
.anim-card-label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  line-height: 1.3;
  padding: 2px 6px;
  background: rgba(123,108,246,0.08);
  border-radius: 6px;
}

/* ---------- 工具提示 ---------- */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  background: rgba(45,42,74,0.92);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  z-index: 9999;
  animation: toastIn .3s;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}


/* ===== 嵌入 banner 右侧的偶像图（金主训 / 叶舒华） ===== */
/*  样式由上方 .hero-idol 定义；这里只放移动端规则  */
@media (max-width: 720px) {
  .lesson-hero { padding: 16px 16px 6px; gap: 14px; }
  .hero-idol img { width: 78px; height: 78px; }
  .lesson-hero h2 { font-size: 22px; }
}

/* ===== subPoint 卡片（知识点分页 + 公式 + 高亮） ===== */
.subpoint-card {
  background: linear-gradient(135deg, rgba(123,108,246,0.08), rgba(255,255,255,0.6));
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 16px 18px 12px;
  animation: spFadeIn 0.35s ease;
}
@keyframes spFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.sp-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.sp-num {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}
.sp-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.sp-text {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 10px;
}
.sp-text strong { color: var(--primary); }
.chem-formula {
  display: inline-block;
  background: #fff;
  border: 2px dashed var(--primary);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  margin: 6px 0 8px;
  font-family: "SF Mono", "Menlo", monospace;
}
.sp-highlight {
  display: inline-block;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: #c2410c;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-right: 6px;
}
.sp-pager {
  display: flex; justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.sp-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(123,108,246,0.25);
  cursor: pointer;
  transition: all 0.2s;
}
.sp-dot:hover { background: rgba(123,108,246,0.55); }
.sp-dot.is-on {
  background: var(--primary);
  width: 22px;
  border-radius: 999px;
}

/* === 文本分段 v2 === */
.script-segments {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0;
}
.script-seg {
  position: relative;
  padding: 12px 14px 12px 14px;
  border-left: 3px solid rgba(123,108,246,0.18);
  border-radius: 0 8px 8px 0;
  background: rgba(123,108,246,0.04);
  transition: all 0.25s ease;
}
.script-seg:hover {
  background: rgba(123,108,246,0.08);
  border-left-color: rgba(123,108,246,0.45);
}
.script-seg.is-playing {
  background: linear-gradient(90deg, rgba(123,108,246,0.18), rgba(123,108,246,0.05));
  border-left-color: var(--primary);
  box-shadow: 0 2px 8px rgba(123,108,246,0.15);
}
.script-seg.single {
  padding: 4px 0;
  border-left: none;
  background: transparent;
}
.seg-content {
  font-size: 15px;
  line-height: 1.85;
  color: #1e293b;
  letter-spacing: 0.01em;
}
.seg-content strong {
  color: var(--primary);
  font-weight: 700;
}
.seg-play {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(123,108,246,0.1);
  border: 1px solid rgba(123,108,246,0.25);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.seg-play:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}
.seg-play:active { transform: translateY(0); }
.seg-play-icon { font-size: 10px; line-height: 1; }
.seg-play-label { font-size: 11px; }
.script-seg.is-playing .seg-play {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  cursor: wait;
}
