/**
 * IELTS Atlas - 全科专属备考工作站样式套件
 * 完美适配 NewJeans 极光微光模式 & ASCII 墨染字花模式
 */

/* ========================================================
   1. 通用布局与头部小组件
   ======================================================== */
.suite-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.suite-subnav {
  display: inline-flex;
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.7));
  backdrop-filter: blur(16px);
  border: 1px solid var(--hero-border, rgba(255, 255, 255, 0.4));
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
}

.suite-subnav-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--hero-text-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}

.suite-subnav-btn:hover {
  color: var(--hero-text, #0f172a);
  background: rgba(0, 0, 0, 0.04);
}

.suite-subnav-btn.active {
  background: var(--hero-primary, #0ea5e9);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

/* ========================================================
   2. 口语工坊 (Speaking View)
   ======================================================== */
.speaking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.speaking-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.75));
  backdrop-filter: blur(12px);
  border: 1px solid var(--hero-border, rgba(226, 232, 240, 0.8));
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.speaking-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.speaking-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.speaking-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.speaking-badge.new {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.speaking-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--hero-text, #0f172a);
  margin-bottom: 4px;
}

.speaking-subtitle {
  font-size: 13px;
  color: var(--hero-text-muted, #64748b);
  margin-bottom: 12px;
}

.speaking-question-list {
  margin: 0 0 16px 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--hero-text, #334155);
}

.speaking-question-list li {
  margin-bottom: 6px;
}

.speaking-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--hero-border, #e2e8f0);
}

/* 口语全真抽题模拟器面板 */
.speaking-simulator-panel {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(16px);
}

.simulator-timer-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--hero-card-bg, #ffffff);
  border-radius: 12px;
  padding: 16px 24px;
  margin: 16px 0;
  border: 1px solid var(--hero-border, #e2e8f0);
}

.simulator-timer-val {
  font-size: 32px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #0ea5e9;
  letter-spacing: 2px;
}

.simulator-timer-val.warning {
  color: #f59e0b;
  animation: pulse 1s infinite;
}

.simulator-timer-val.danger {
  color: #ef4444;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ========================================================
   3. 写作工坊 (Writing View)
   ======================================================== */
.writing-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .writing-layout {
    grid-template-columns: 1fr;
  }
}

.writing-prompt-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(16px);
  border: 1px solid var(--hero-border, rgba(226, 232, 240, 0.8));
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.writing-editor-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(16px);
  border: 1px solid var(--hero-border, rgba(226, 232, 240, 0.8));
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.writing-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hero-border, #e2e8f0);
  margin-bottom: 14px;
}

.writing-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
}

.writing-stat-badge.ready {
  background: #ecfdf5;
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.writing-textarea {
  width: 100%;
  height: 460px;
  border: 1px solid var(--hero-border, #cbd5e1);
  border-radius: 10px;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--hero-text, #1e293b);
  background: var(--hero-input-bg, #ffffff);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.writing-textarea:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* 写作预测题库与范文卡片 */
.writing-prompt-previews {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 10px;
}

.writing-preview-item {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.writing-preview-item:hover {
  background: rgba(14, 165, 233, 0.05);
  border-color: #0ea5e9;
}

/* ========================================================
   4. 听力专区 (Listening View)
   ======================================================== */
.listening-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.listening-portal-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.75));
  backdrop-filter: blur(12px);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

.listening-portal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.listening-tips-section {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.75));
  backdrop-filter: blur(12px);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  padding: 24px;
  margin-top: 20px;
}

.listening-tip-card {
  background: rgba(248, 250, 252, 0.7);
  border-left: 4px solid #0ea5e9;
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin-bottom: 14px;
}

/* ========================================================
   5. 官方备考指南 (Guide View)
   ======================================================== */
.rubrics-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid var(--hero-border, #e2e8f0);
}

.rubrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.6;
}

.rubrics-table th {
  background: rgba(14, 165, 233, 0.08);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--hero-text, #0f172a);
  border-bottom: 1px solid var(--hero-border, #e2e8f0);
}

.rubrics-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--hero-border, #e2e8f0);
  color: var(--hero-text, #334155);
}

.rubrics-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

/* ========================================================
   6. 学习总览全景监控卡片 (Overview Upgrade)
   ======================================================== */
.overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.overview-kpi-card {
  background: var(--hero-card-bg, rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(14px);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.overview-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #0ea5e9;
}

.overview-kpi-icon {
  font-size: 30px;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.1);
}

.overview-kpi-title {
  font-size: 13px;
  color: var(--hero-text-muted, #64748b);
  margin-bottom: 4px;
}

.overview-kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
}

/* ASCII 墨染字花主题适配微调 */
body[data-bg-theme="ascii-flower"] .speaking-card,
[data-bg-theme="ascii-flower"] .speaking-card,
[data-theme="ascii-flower"] .speaking-card,
body[data-bg-theme="ascii-flower"] .writing-prompt-card,
[data-bg-theme="ascii-flower"] .writing-prompt-card,
body[data-bg-theme="ascii-flower"] .writing-editor-card,
[data-bg-theme="ascii-flower"] .writing-editor-card,
body[data-bg-theme="ascii-flower"] .listening-portal-card,
[data-bg-theme="ascii-flower"] .listening-portal-card,
body[data-bg-theme="ascii-flower"] .listening-tips-section,
[data-bg-theme="ascii-flower"] .listening-tips-section,
body[data-bg-theme="ascii-flower"] .listening-tip-card,
[data-bg-theme="ascii-flower"] .listening-tip-card,
body[data-bg-theme="ascii-flower"] .overview-kpi-card,
[data-bg-theme="ascii-flower"] .overview-kpi-card,
body[data-bg-theme="ascii-flower"] .speaking-simulator-panel,
[data-bg-theme="ascii-flower"] .speaking-simulator-panel,
body[data-bg-theme="ascii-flower"] .simulator-timer-box,
[data-bg-theme="ascii-flower"] .simulator-timer-box,
body[data-bg-theme="ascii-flower"] .suite-subnav,
[data-bg-theme="ascii-flower"] .suite-subnav {
  background: rgba(24, 24, 27, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f4f4f5 !important;
}

body[data-bg-theme="ascii-flower"] .speaking-title,
body[data-bg-theme="ascii-flower"] .overview-kpi-value,
body[data-bg-theme="ascii-flower"] .rubrics-table th,
body[data-bg-theme="ascii-flower"] .hero-panel__title {
  color: #fafafa !important;
}

body[data-bg-theme="ascii-flower"] .speaking-question-list,
body[data-bg-theme="ascii-flower"] .rubrics-table td,
body[data-bg-theme="ascii-flower"] .writing-textarea {
  color: #d4d4d8 !important;
  background: rgba(9, 9, 11, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* ========================================================
   系统设置模态卡片 (与成就弹窗一致，浮层卡片，不占领下方视图)
   ======================================================== */
.settings-modal-content {
  max-width: 660px !important;
  width: min(660px, 92vw) !important;
}

.settings-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.settings-modal-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.settings-modal-action-card:hover {
  background: #ffffff;
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.08);
  transform: translateY(-1px);
}

.settings-card-icon {
  font-size: 24px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.08);
  flex-shrink: 0;
}

.settings-card-info {
  flex: 1;
}

.settings-card-info h4 {
  margin: 0 0 3px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
}

.settings-card-info p {
  margin: 0;
  font-size: 12px;
  color: var(--hero-muted, #64748b);
  line-height: 1.4;
}

.settings-system-status-pill {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--hero-text, #334155);
}

/* 深色模式适配 */
body[data-bg-theme="ascii-flower"] .settings-modal-action-card {
  background: rgba(24, 24, 27, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-bg-theme="ascii-flower"] .settings-modal-action-card:hover {
  background: rgba(39, 39, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.25);
}

body[data-bg-theme="ascii-flower"] .settings-card-info h4 {
  color: #f4f4f5;
}

body[data-bg-theme="ascii-flower"] .settings-card-info p {
  color: #a1a1aa;
}

body[data-bg-theme="ascii-flower"] .settings-system-status-pill {
  background: rgba(9, 9, 11, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e4e4e7 !important;
}

/* ========================================================
   原生雅思机考听力工作站 (Native CBT Listening Station)
   ======================================================== */
.listening-tab-panel {
  animation: fadeIn 0.25s ease-out;
}

.cbt-listening-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cbt-selector-control-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 100%;
}

.cbt-book-picker-wrap,
.cbt-test-pills-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cbt-picker-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--hero-text, #0f172a);
  white-space: nowrap;
}

.cbt-select-dropdown {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid #0ea5e9;
  background: var(--hero-card-bg, #ffffff);
  color: var(--hero-text, #0f172a);
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cbt-select-dropdown:focus {
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}

.cbt-test-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cbt-test-pill-btn {
  padding: 5px 14px;
  border-radius: 8px;
  border: 1px solid var(--hero-border, #cbd5e1);
  background: rgba(0, 0, 0, 0.02);
  font-size: 13px;
  font-weight: 700;
  color: var(--hero-text, #475569);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.cbt-test-pill-btn:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.cbt-test-pill-btn.active {
  background: #0ea5e9 !important;
  color: #ffffff !important;
  border-color: #0ea5e9 !important;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

.cbt-pill-dot {
  font-size: 8px;
  color: #10b981;
}

.cbt-test-pill-btn.active .cbt-pill-dot {
  color: #ffffff;
}

.cbt-top-status-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cbt-audio-console-card {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
}

.cbt-audio-console-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.cbt-play-btn {
  font-weight: 700;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cbt-play-btn.playing {
  background: #10b981 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.cbt-audio-time {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--hero-text, #0f172a);
}

.cbt-audio-progress-wrap {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
}

.cbt-audio-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.cbt-audio-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  border-radius: 999px;
  transition: width 0.15s linear;
}

.cbt-speed-group {
  display: flex;
  border: 1px solid var(--hero-border, #cbd5e1);
  border-radius: 8px;
  overflow: hidden;
}

.cbt-speed-btn {
  border: none;
  background: transparent;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--hero-text, #475569);
  cursor: pointer;
  transition: background 0.15s;
}

.cbt-speed-btn.active {
  background: #0ea5e9;
  color: #fff;
}

.cbt-parts-tabs-bar {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--hero-border, #e2e8f0);
}

.cbt-part-tab {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--hero-border, #cbd5e1);
  background: rgba(0, 0, 0, 0.02);
  font-size: 13px;
  font-weight: 700;
  color: var(--hero-text, #475569);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cbt-part-tab:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.cbt-part-tab.active {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0ea5e9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

/* 题目呈现与交互 */
.cbt-exam-main-stage {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  margin-bottom: 16px;
}

.cbt-instruction-banner {
  background: rgba(14, 165, 233, 0.06);
  border-left: 4px solid #0ea5e9;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--hero-text, #0f172a);
  margin-bottom: 20px;
}

.cbt-questions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cbt-q-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 10px;
  transition: background 0.15s, border-color 0.15s;
}

.cbt-q-item:hover,
.cbt-q-item:focus-within {
  background: rgba(14, 165, 233, 0.03);
  border-color: #0ea5e9;
}

.cbt-q-num-badge {
  font-weight: 800;
  font-size: 13px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #0ea5e9;
  color: #fff;
  flex-shrink: 0;
  margin-top: 3px;
}

.cbt-q-prompt-text {
  font-size: 14px;
  line-height: 2;
  color: var(--hero-text, #0f172a);
  flex: 1;
}

.cbt-blank-input {
  display: inline-block;
  min-width: 130px;
  padding: 3px 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid #0ea5e9;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  outline: none;
  transition: all 0.2s;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.cbt-blank-input:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}

/* 单选与多选题 */
.cbt-choice-body {
  flex: 1;
}

.cbt-choice-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cbt-choice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--hero-border, #e2e8f0);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cbt-choice-option:hover {
  background: #ffffff;
  border-color: #0ea5e9;
}

.cbt-choice-option.selected {
  background: rgba(14, 165, 233, 0.1);
  border-color: #0ea5e9;
  font-weight: 600;
}

.cbt-choice-radio-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cbt-choice-option.selected .cbt-choice-radio-circle {
  border-color: #0ea5e9;
  background: #0ea5e9;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.cbt-choice-label {
  font-size: 13px;
  color: var(--hero-text, #0f172a);
}

/* 底部 1~40 题导航药丸 */
.cbt-bottom-navigator-bar {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.cbt-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cbt-q-pill {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--hero-border, #cbd5e1);
  background: rgba(0, 0, 0, 0.02);
  font-size: 12px;
  font-weight: 700;
  color: var(--hero-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbt-q-pill.in-current-part {
  border-color: #0ea5e9;
}

.cbt-q-pill.answered {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0ea5e9;
}

.cbt-q-pill.flagged {
  border-color: #f59e0b !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

/* ========================================================
   即听即打训练器 (Dictation Speedrun)
   ======================================================== */
.dictation-shell-card {
  background: var(--hero-card-bg, #ffffff);
  border: 1px solid var(--hero-border, #e2e8f0);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.dictation-stats-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
  color: var(--hero-text, #0f172a);
}

.dictation-practice-box {
  background: rgba(0, 0, 0, 0.015);
  border: 1px dashed var(--hero-border, #cbd5e1);
  border-radius: 14px;
  padding: 20px;
}

.dictation-audio-pulse {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
  animation: audioPulse 2s infinite ease-in-out;
}

@keyframes audioPulse {
  0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
  70% { transform: scale(1.04); box-shadow: 0 0 0 16px rgba(14, 165, 233, 0); }
  100% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.dictation-input {
  width: 100%;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  padding: 12px 18px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.dictation-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.2);
}

.dictation-input.correct {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
  color: #065f46 !important;
}

.dictation-input.incorrect {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  color: #991b1b !important;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* 深色模式适配 */
body[data-bg-theme="ascii-flower"] .cbt-audio-console-card,
body[data-bg-theme="ascii-flower"] .cbt-exam-main-stage,
body[data-bg-theme="ascii-flower"] .cbt-bottom-navigator-bar,
body[data-bg-theme="ascii-flower"] .dictation-shell-card {
  background: rgba(24, 24, 27, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f4f4f5 !important;
}

body[data-bg-theme="ascii-flower"] .cbt-q-item {
  background: rgba(9, 9, 11, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body[data-bg-theme="ascii-flower"] .cbt-blank-input {
  background: rgba(9, 9, 11, 0.9) !important;
  border-color: #38bdf8 !important;
  color: #f4f4f5 !important;
}

body[data-bg-theme="ascii-flower"] .cbt-choice-option {
  background: rgba(9, 9, 11, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body[data-bg-theme="ascii-flower"] .dictation-input {
  background: rgba(9, 9, 11, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fafafa !important;
}
