/* ==========================================
 * 像数学家一样思考 - 全局样式
 * ========================================== */

/* ========== 自定义字体：思源黑体（通过HTML link引入） ========== */

/* ========== 基础重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: '思源黑体', 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

/* ========== 天蓝色渐变紫色背景（所有页面通用） ========== */
.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #87CEEB 0%, #9B7EDE 50%, #A78BFA 100%);
  display: none;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.page.active {
  display: flex;
}

/* ========== 封面页样式 ========== */
.cover-content {
  text-align: center;
  animation: fadeInUp 1s ease-out;
}

.cover-title {
  font-size: 4rem;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.3rem;
  margin-bottom: 1.5rem;
}

.cover-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 3rem;
  letter-spacing: 0.1rem;
}

.btn-primary {
  padding: 16px 48px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.55);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-arrow {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(5px);
}

/* ========== 第二页：波利亚介绍页面 ========== */
#page-intro {
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  gap: 20px;
}

/* ========== 四步解题法卡片（2x2 居中网格，始终可见） ========== */
.step-cards {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 780px;
  max-width: 90vw;
  z-index: 10;
}

.step-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.08);
  opacity: 1;
  transform: none;
  pointer-events: auto;
  border-left: 5px solid #f59e0b;
}

/* 激活状态 */
.step-card.step-popup-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes stepPopupIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 兼容旧版 */
.step-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.step-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.step-number {
  font-size: 2rem;
  font-weight: bold;
  color: #d97706;
  min-width: 44px;
  line-height: 1.2;
  flex-shrink: 0;
  padding-top: 2px;
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e293b;
}

.step-desc {
  font-size: 1rem;
  color: #475569;
  line-height: 1.7;
}

/* ========== 第三页：历史回顾卡片（居中） ========== */
#page-logarithm {
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  gap: 20px;
}

.history-cards {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 820px;
  max-width: 90vw;
  z-index: 10;
  pointer-events: none;
}

.history-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  padding: 24px 28px;
  display: flex;
  gap: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.history-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.history-card:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* 年份标签 */
.history-year {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  min-width: 70px;
  line-height: 1;
  flex-shrink: 0;
  padding-top: 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 卡片主体 */
.history-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
}

.history-work {
  font-size: 0.88rem;
  color: #64748b;
  font-style: italic;
  margin-bottom: 4px;
}

.history-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.history-points li {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.55;
  padding-left: 16px;
  position: relative;
}

.history-points li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.1rem;
}

.history-points li strong {
  color: #334155;
  font-weight: 600;
}

/* 局限性提示 */
.history-limitation {
  margin-top: 6px;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 10px;
  font-size: 0.87rem;
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.history-limitation strong {
  font-weight: 700;
}

/* ========== 波利亚角色区（左下角固定） ========== */
.character-area {
  position: absolute;
  bottom: 20px;
  left: 28px;
  display: flex;
  align-items: flex-end;
  z-index: 5;
}

.character-img {
  width: 330px;
  height: auto;
  position: relative;
  z-index: 1;
  animation: bounceInLeft 0.8s ease-out;
}

/* 波利亚脚下的阴影（绑定到图片本身） */
.character-img::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

/* ========== 带背景图的页面 ========== */
.page-with-bg {
  overflow: hidden;
}

.page-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.page-with-bg .page-header {
  z-index: 10;
}

/* ========== 角色区：右侧定位 ========== */
.character-right {
  left: auto !important;
  right: 28px !important;
  bottom: 20px;
}

/* ========== 纳皮尔角色图片 ========== */
.character-img-napier {
  width: 380px;
  height: auto;
}

/* P4页面：纳皮尔移向画面中间 */
#page-napier .character-area.character-right {
  right: 22% !important;
}

/* P4/P5/P8/P9页面：背景图虚化30% */
#page-napier .page-bg-image,
#page-dialogue .page-bg-image,
#page-briggs .page-bg-image,
#page-dialogue2 .page-bg-image {
  filter: blur(3px);
}

/* ========== 说话人标签 ========== */
.speaker-tag {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: rgba(99, 102, 241, 0.8);
  padding: 3px 14px;
  border-radius: 12px;
  white-space: nowrap;
  letter-spacing: 0.05rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.speaker-tag.active {
  opacity: 1;
}

.character-right .speaker-tag {
  background: rgba(245, 158, 11, 0.85);
}

/* ========== 字幕区域（P3及以后使用） ========== */
.subtitle-area {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 85vw;
  text-align: center;
  z-index: 15;
  pointer-events: none;
}

.subtitle-area.hidden {
  display: none;
}

.subtitle-text {
  display: inline-block;
  background: rgba(14, 165, 233, 0.2);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.8;
  padding: 12px 32px;
  border-radius: 10px;
  letter-spacing: 0.04rem;
  white-space: pre-wrap;
  word-break: break-word;
  animation: subtitleFadeIn 0.3s ease-out;
}

@keyframes subtitleFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 气泡对话框 */
.speech-bubble {
  max-width: 700px;
  min-height: 80px;
  margin-left: 30px;
  margin-bottom: 60px;
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  animation: bubblePopIn 0.5s ease-out;
}

.speech-bubble.hidden {
  display: none;
}

/* 气泡淡出动画 */
.speech-bubble.fade-out {
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ========== 过渡按钮：开始思考之旅 ========== */
.btn-chapter {
  position: absolute;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 16px 40px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 20;
  letter-spacing: 0.08rem;
}

.btn-chapter.hidden {
  display: none;
}

.btn-chapter.btn-chapter-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.btn-briggs.btn-chapter-visible {
  transform: translateX(-50%) translateY(0) !important;
}

.btn-chapter:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.03);
}
  box-shadow: 0 10px 32px rgba(245, 158, 11, 0.55);
}

.btn-chapter:active {
  transform: translateX(-50%) translateY(0) scale(0.98);
}

.bubble-content {
  font-size: 1.2rem;
  line-height: 1.9;
  color: #334155;
  white-space: pre-wrap;
}

.bubble-tail {
  position: absolute;
  left: -18px;
  bottom: 35px;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-right: 20px solid rgba(255, 255, 255, 0.95);
  border-bottom: 14px solid transparent;
}

/* ========== 左上角页面标题（非封面页） ========== */
.page-header {
  position: absolute;
  top: 24px;
  left: 28px;
  font-size: 1.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.15rem;
  z-index: 100;
}

/* ========== 开发调试：页码标注 ========== */
.dev-page-label {
  position: absolute;
  bottom: 12px;
  left: 16px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.05rem;
  z-index: 50;
  pointer-events: none;
  user-select: none;
}

/* ========== 开发调试：下一页按钮（左下角） ========== */
.btn-dev-next {
  position: fixed;
  bottom: 24px;
  left: 20px;
  padding: 8px 18px;
  font-size: 0.85rem;
  color: #fff;
  background: rgba(99, 102, 241, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  z-index: 999;
  transition: all 0.2s ease;
  letter-spacing: 0.05rem;
}

.btn-dev-next:hover {
  background: rgba(99, 102, 241, 0.85);
  transform: translateY(-1px);
}

.btn-dev-next:active {
  transform: translateY(0);
}

/* ========== 返回上一页按钮（右上角） ========== */
.btn-back-page {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 20px;
  font-size: 0.9rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  transition: all 0.2s ease;
  letter-spacing: 0.05rem;
}

.btn-back-page:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-1px);
}

.btn-back-page:active {
  transform: translateY(0);
}

.btn-back-page.hidden {
  display: none;
}

/* ========== 全屏按钮（右下角全局） ========== */
.btn-fullscreen {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  transition: all 0.25s ease;
}

.btn-fullscreen:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.btn-fullscreen .fs-icon {
  width: 22px;
  height: 22px;
  color: #fff;
}

.btn-fullscreen .fs-icon.hidden {
  display: none;
}

/* ========== 状态指示器（右下角） ========== */
.status-indicator {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  z-index: 999;
  transition: all 0.3s ease;
}

.status-indicator.connecting {
  background: rgba(255, 193, 7, 0.2);
  color: #b45309;
}

.status-indicator.ready {
  background: rgba(34, 197, 94, 0.2);
  color: #166534;
}

.status-indicator.error {
  background: rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.connecting .status-dot {
  background: #fbbf24;
}

.ready .status-dot {
  background: #22c55e;
  animation: none;
}

.error .status-dot {
  background: #ef4444;
  animation: none;
}

/* ========== 动画关键帧 ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes bubblePopIn {
  from {
    opacity: 0;
    transform: scale(0.7) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ========== 打字机效果（文字逐字显示） ========== */
.typing-cursor::after {
  content: '|';
  animation: blink 0.7s infinite;
  color: #6366f1;
  font-weight: bold;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ========== 第六页：交互探索页面 (P6) ========== */
#page-explore {
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px 30px 80px;
  gap: 8px;
}

/* ===== 独立的底数输入框（显眼突出——加大版） ===== */
.base-input-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 28px; /* 增大内边距 */
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35), 0 0 0 2px rgba(212, 175, 55, 0.25);
  z-index: 25;
  transition: all 0.3s ease;
}

/* 可输入时：底板变荧光绿 */
.base-input-area.active-gold {
  background: linear-gradient(135deg, #d9f99d, #bef264);
  box-shadow: 0 4px 28px rgba(163, 230, 53, 0.6), 0 0 0 3px rgba(132, 204, 22, 0.5), inset 0 1px 8px rgba(250, 251, 255, 0.3), 0 6px 16px rgba(34, 197, 94, 0.3);
}

/* 不可输入时：保持白色（默认） */

.base-input-label {
  font-size: 1.2rem; /* 加大 */
  font-weight: 800;
  color: #4338ca;
  white-space: nowrap;
}

.base-input-large {
  width: 100px !important; /* 加宽 */
  height: 48px !important; /* 加高 */
  font-size: 1.4rem !important; /* 加大字号 */
  font-weight: 800 !important;
  text-align: center !important;
  border: 2.5px solid #c7d2fe !important;
  border-radius: 12px !important;
  outline: none !important;
  color: #4338ca !important;
  background: #fff !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12) !important;
}

.base-input-large:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), 0 4px 12px rgba(99, 102, 241, 0.25) !important;
}

.btn-try-large {
  padding: 12px 28px !important; /* 加大按钮 */
  font-size: 1.05rem !important; /* 加大字号 */
  font-weight: 800 !important;
}

/* ===== 四步进度条 ===== */
.polya-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  z-index: 30;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  transition: all 0.4s ease;
}

.step-num {
  font-weight: 700;
  font-size: 0.85rem;
}

.step-label {
  white-space: nowrap;
}

.step-item.active {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
}

.step-item.done {
  background: rgba(34, 197, 94, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

/* ===== 主交互区域 ===== */
.explore-main {
  display: flex;
  gap: 18px;
  width: 100%;
  max-width: 1200px;
  margin-top: 50px;
  flex: 1;
  min-height: 0;
  transform-origin: top center;
  transform: scale(0.88);
}

.explore-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 380px;
  flex-shrink: 0;
}

.explore-right {
  flex: 1;
  display: flex;
  min-width: 0;
}

/* ===== 表格卡片 ===== */
.table-card,
.chart-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.table-card {
  flex-shrink: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chart-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* 表格标题行 */
.table-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.table-title,
.chart-title {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.02rem;
  margin: 0;
}

/* 内嵌输入控件组（在表格标题右侧） */
.input-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.input-inline .base-label {
  font-size: 0.88rem;
  color: #4338ca;
  white-space: nowrap;
}

.input-inline .base-input {
  width: 58px;
  height: 32px;
  font-size: 0.95rem;
  border-width: 1.5px;
  border-radius: 8px;
}

.input-inline .btn-try {
  padding: 5px 14px;
  font-size: 0.85rem;
  border-radius: 10px;
}

.table-scroll-wrap {
  overflow-y: auto;
  overflow-x: auto;
  max-width: 100%;
  max-height: 320px; /* 限制幂次表最大高度，给下方输入框留空间 */
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  flex: 1;
  min-height: 0;
}

.power-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem; /* 缩小字号 */
  min-width: 300px;
}

.power-table th {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  padding: 5px 10px; /* 减小内边距 */
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.power-table th:first-child {
  border-radius: 8px 0 0 0;
  width: 70px;
}

.power-table th:last-child {
  border-radius: 0 8px 0 0;
}

.power-table td {
  padding: 4px 10px; /* 减小内边距 */
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  font-variant-numeric: tabular-nums;
  color: #475569;
}

.power-table tr:last-child td:first-child {
  border-radius: 0 0 0 8px;
}

.power-table tr:last-child td:last-child {
  border-radius: 0 0 8px 0;
}

.power-table tr:hover td {
  background: #f8fafc;
}

.power-table td:nth-child(2) {
  font-weight: 600;
  color: #6366f1;
}

/* 行间距高亮 - 用颜色渐变表示间距大小 */
.power-table .gap-large { background: rgba(239, 68, 68, 0.08); }
.power-table .gap-medium { background: rgba(245, 158, 11, 0.06); }
.power-table .gap-small { background: rgba(34, 197, 94, 0.05); }

.gap-highlight {
  color: #ef4444;
  font-weight: 600;
}

.table-hint {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* ===== 增长数据分析面板 ===== */
.growth-stats-card {
  margin-top: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0f4ff, #eef2ff);
  border-radius: 14px;
  border: 1px solid #c7d2fe;
}
.stats-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #4338ca;
  margin-bottom: 10px;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
}
.stat-item.stat-wide {
  grid-column: span 2;
}
.stat-label {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
}
.stat-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.stat-value.stat-highlight {
  color: #6366f1;
  font-size: 1rem;
}

/* ===== 滑块微调区（表格下方） ===== */
.slider-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.slider-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.slider-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #6366f1;
  min-width: 42px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 底数输入框（内嵌在标题行中） */
.base-input {
  width: 58px;
  height: 32px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border: 1.5px solid #c7d2fe;
  border-radius: 8px;
  outline: none;
  transition: all 0.25s ease;
  color: #4338ca;
  background: #eef2ff;
}

.base-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.base-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #4338ca;
  white-space: nowrap;
}

.base-slider {
  flex: 1;
  height: 8px;
  appearance: none;
  background: linear-gradient(to right, #c7d2fe, #a5b4fc);
  border-radius: 3px;
  cursor: pointer;
  outline: none;
}

.base-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
  transition: transform 0.15s ease;
}

.base-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.btn-try {
  padding: 8px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.25s ease;
  letter-spacing: 0.04rem;
}

.btn-try:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-try:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ===== 图表卡片 ===== */
.chart-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#explore-chart {
  width: 100%;
  flex: 1;
}

/* P6页面：调整波利亚角色位置，避免与表格重叠 */
#page-explore .character-area {
  left: 12px !important;
  bottom: 10px !important;
}

#page-explore .character-img {
  width: 280px !important;
}

#page-explore .subtitle-area {
  left: 45% !important;
}

/* ========== 第七页：问题回答页面 (P7) ========== */
#page-question {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  gap: 16px;
}

/* 问题回答面板 */
.qa-panel {
  width: 90%;
  max-width: 680px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  animation: fadeInUp 0.5s ease-out;
  z-index: 20;
}

.qa-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 12px;
  text-align: center;
}

.qa-hint {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 20px;
}

.qa-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qa-text-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.qa-text-input {
  flex: 1;
  height: 54px;
  font-size: 1.08rem;
  padding: 0 20px;
  border: 2px solid #c7d2fe;
  border-radius: 16px;
  outline: none;
  transition: all 0.25s ease;
  color: #334155;
  background: #f8fafc;
}

.qa-text-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: #fff;
}

.btn-submit-qa {
  padding: 12px 26px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.25s ease;
  letter-spacing: 0.04rem;
}

.btn-submit-qa:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.5);
}

.btn-voice-qa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  border: 2px dashed #c7d2fe;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-voice-qa:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: #a5b4fc;
}

.btn-voice-qa.recording {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
  animation: pulse 1.2s infinite;
}

.voice-icon {
  font-size: 1.15rem;
}

.qa-feedback {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.65;
  animation: fadeInUp 0.35s ease-out;
}

.qa-feedback.success {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.qa-feedback.info {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* 前往布里格斯按钮 */
.btn-briggs {
  z-index: 20;
  font-size: 1.05rem !important;
  padding: 14px 32px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(0) !important;
  animation: fadeInUp 0.5s ease-out 0.3s both;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ========== 第八页：布里格斯介绍页 (P8) ========== */
#page-briggs {
  justify-content: center;
  align-items: center;
}

.character-center-y {
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%);
}

.speaker-tag-briggs {
  background: linear-gradient(135deg, #f59e0b, #f97316) !important;
}

/* 暗色背景下的字幕区 */
.subtitle-area-dark .subtitle-text {
  background: rgba(14, 165, 233, 0.25);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.15);
}

.btn-chapter-light {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #334155 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  z-index: 20;
}

/* ========== 第九页：波利亚与布里格斯对话 (P9) ========== */
#page-dialogue2 {
  justify-content: flex-start;
  padding-top: 60px;
}

/* ========== 第十页：对数表对比探索 (P10) ========== */
#page-compare {
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 24px 70px;
  gap: 8px;
}

/* ========== P10 — 左右分栏布局：左侧操作 + 右侧记录 ========== */

.compare-main {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: 100%;
  flex: 1;
  min-height: 0;
  justify-content: center; /* 居中，避免与左侧波利亚图片重叠 */
}

/* 左侧操作区 (~44%)*/
.compare-left-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(480px, 42vw);
  flex-shrink: 0;
  min-height: 0;
}

/* 输入区 */
.pin-top {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 20px;
  text-align: center;
  border: 2px solid rgba(99,102,241,0.18);
  box-shadow: 0 2px 12px rgba(99,102,241,0.08);
  flex-shrink: 0;
}
.pin-title { font-size: 1rem; font-weight: 800; color: #334155; margin-bottom: 8px; }
.pin-input-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 4px; }

.compare-num-input-pin {
  width: 150px; height: 40px; font-size: 1.15rem; font-weight: 800;
  text-align: center; border: 2.5px solid #6366f1; border-radius: 11px;
  outline: none; color: #4338ca; background: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.15);
}
.compare-num-input-pin:focus { border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(99,102,241,0.2); }
.compare-num-input-pin:not(:disabled):hover { border-color: #818cf8; }
.compare-num-input-pin:disabled { opacity: 0.45; cursor: not-allowed; }

/* 输入框就绪状态 — 绿色高亮，提示用户可以输入 */
.compare-num-input-pin.ready {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.25), 0 0 20px rgba(34,197,94,0.3);
  animation: inputPulse 1.6s ease-in-out infinite;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}
@keyframes inputPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.25), 0 0 16px rgba(34,197,94,0.2); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0.35), 0 0 28px rgba(34,197,94,0.45); }
}

.btn-compare-calc {
  padding: 10px 22px; font-size: 0.92rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); border: none; border-radius: 11px;
  cursor: pointer; white-space: nowrap; box-shadow: 0 3px 12px rgba(99,102,241,0.35); transition: all 0.25s ease;
}
.btn-compare-calc:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,0.45); }
.btn-compare-calc:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.input-hint { font-size: 0.75rem; color: #94a3b8; margin: 2px 0 0; }

/* 双结果卡片区（输入下方，左右并排）— 限制高度 */
.result-cards-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-shrink: 0;
  height: 300px; /* 200px 的 1.5 倍 */
  min-height: 0;
}

.result-cards-row .calc-card {
  flex: 1;
  min-width: 0;
}

/* 计算器卡片基础（紧凑版）*/
.calc-card {
  background: rgba(255,255,255,0.96); border-radius: 13px; padding: 8px 10px;
  box-shadow: 0 3px 16px rgba(0,0,0,0.08); display: flex; flex-direction: column; gap: 4px;
  min-width: 0; border-top: 3px solid #8b5cf6;
}

.calc-card-b { border-top-color: #0369a1; }

.calc-card-head { display: flex; justify-content: space-between; align-items: center; gap: 4px; flex-wrap: wrap; }
.calc-title { font-size: 0.82rem; font-weight: 800; color: #334155; margin: 0; }
.calc-title-blue { color: #0369a1; }
.calc-base-control { display: flex; align-items: center; gap: 4px; }
.calc-base-label { font-size: 0.7rem; font-weight: 600; color: #64748b; }
.calc-base-badge { font-size: 0.68rem; font-weight: 700; color: #0369a1; background: rgba(3,105,161,0.1); padding: 2px 7px; border-radius: 5px; }
.lock-hint { font-size: 0.6rem; color: #f59e0b; background: rgba(245,158,11,0.1); padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.lock-hint.unlocked { color: #10b981; background: rgba(16,185,129,0.1); }

/* 计算器显示屏 — 天蓝色背景（紧凑版）*/
.calc-display {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 8px; border-radius: 10px; border: 2px dashed #7dd3fc;
  background: linear-gradient(180deg, #e0f2fe, #bae6fd); min-height: 30px; text-align: center;
}
.calc-display-blue { border-color: #38bdf8; background: linear-gradient(180deg, #cffafe, #a5f3fc); }
.calc-display.has-result { border-style: solid; border-color: #0ea5e9; background: linear-gradient(135deg, rgba(14,165,233,0.12), rgba(56,189,248,0.08)); }
.calc-display-blue.has-result { border-color: #0284c7; background: linear-gradient(135deg, rgba(2,132,199,0.12), rgba(14,116,144,0.08)); }
.calc-formula { font-size: 0.8rem; color: #0369a1; margin-bottom: 1px; font-weight: 600; }
.calc-result { font-size: 1.15rem; font-weight: 800; color: #0369a1; font-variant-numeric: tabular-nums; line-height: 1.15; }
.calc-result-blue { color: #075985; }

/* 底数输入框（小） */
.base-input-small {
  width: 50px; height: 26px; font-size: 0.82rem; text-align: center;
  border: 1.5px solid #e2e8f0; border-radius: 6px; outline: none; transition: all 0.25s ease;
  color: #4338ca; background: #fff;
}
.base-input-small:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.15); }
.base-input-small:not(:disabled):hover { border-color: #c7d2fe; }
.base-input-small:disabled { opacity: 0.55; cursor: not-allowed; }

/* ====== 底部比值公式条（左侧面板底部）====== */
.ratio-record-bar {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,0.94); border-radius: 13px;
  padding: 10px 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

/* 公式展示区 */
.rr-formula-wrap {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px; background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b; border-radius: 11px; opacity: 0.55; transition: all 0.3s ease; flex-shrink: 0;
}
.rr-formula-wrap.active { opacity: 1; box-shadow: 0 3px 14px rgba(245,158,11,0.22); }
.rr-label { font-size: 0.9rem; font-weight: 700; color: #78350f; white-space: nowrap; }
.rr-value { font-size: 1.5rem; font-weight: 900; color: #d97706; font-variant-numeric: tabular-nums; }
.rr-note { font-size: 0.72rem; color: #059669; font-weight: 600; background: rgba(16,185,129,0.12); padding: 2px 7px; border-radius: 6px; border: 1px solid rgba(16,185,129,0.25); }

/* ====== 右侧记录区 (缩减宽度+高度，与左侧比值公式框底部对齐) ====== */
.compare-right-panel {
  width: min(420px, 38vw);
  flex-shrink: 0;
  align-self: flex-start; /* 顶部对齐 */
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  height: 520px; /* 固定高度，与左侧比值公式框底部齐平 */
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* 记录区标题 */
.record-panel-header {
  text-align: center;
  flex-shrink: 0;
  padding-bottom: 6px;
  border-bottom: 2px dashed #e2e8f0;
}
.record-panel-title {
  font-size: 1.05rem; font-weight: 800; color: #4338ca; margin: 0 0 4px;
}
.record-panel-subtitle {
  font-size: 0.8rem; color: #64748b; font-style: italic;
}

/* 记录表格（右侧放大版）*/
.record-mini-wrap {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  max-height: none; /* 不限制最大高度，让表格撑满 */
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fafbfc;
}
.record-mini-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; } /* 放大字号 */
.record-mini-table thead th {
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
  padding: 8px 8px; font-weight: 700; font-size: 0.82rem; /* 加大 */
  position: sticky; top: 0; z-index: 1;
}
.record-mini-table thead th:first-child { border-radius: 7px 0 0 0; }
.record-mini-table thead th:last-child { border-radius: 0 7px 0 0; }
.record-mini-table tbody tr:nth-child(even) { background: #f8fafc; }
.record-mini-table tbody tr:hover { background: #eef2ff; }
.record-mini-table td {
  padding: 7px 8px; /* 加大内边距 */
  text-align: center; font-variant-numeric: tabular-nums;
  border-bottom: 1px solid #f1f5f9; color: #475569;
}
.record-mini-table .empty-row td { color: #94a3b8; padding: 24px 8px; font-size: 0.82rem; }
.record-mini-table .ratio-cell { font-weight: 800; color: #d97706; background: rgba(245,158,11,0.08); }

/* 进度条（右侧面板底部）*/
.exp-progress {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #f1f5f9;
  border-radius: 9px;
}
.progress-text { font-size: 0.78rem; font-weight: 600; color: #64748b; white-space: nowrap; }
.progress-bar-bg { flex: 1; height: 7px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); border-radius: 4px; transition: width 0.4s ease; }

/* 兼容：底数输入框 */
.base-input-small {
  width: 56px;
  height: 30px;
  font-size: 0.85rem;
  text-align: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  transition: all 0.25s ease;
  color: #4338ca;
  background: #f8fafc;
}
.base-input-small:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.15); }
.base-input-small:not(:disabled):hover { border-color: #a5b4fc; }
.base-input-small:disabled { opacity: 0.55; cursor: not-allowed; }

/* ========== 第十一页：欧拉介绍 (P11) ========== */
/* P11页面：欧拉移向画面中央 */
#page-euler .character-area.character-center {
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  top: 50% !important;
  transform: translate(-50%, -50%);
}

/* P11页面：背景图虚化30% */
#page-euler .page-bg-image {
  filter: blur(3px);
}

.speaker-tag-euler {
  background: linear-gradient(135deg, #059669, #10b981);
}

/* ========== 第十二页：推导换底公式 (P12) ========== */
#page-formula {
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px 24px 80px;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

/* 推理步骤容器 */
.formula-steps-container {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: min(620px, 85vw);
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.formula-steps-container.visible {
  opacity: 1;
}

/* 单个推理步骤 */
.formula-step-item {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 16px 22px;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #6366f1;
  opacity: 0;
  transform: translateY(15px);
  animation: formulaStepIn 0.5s ease forwards;
}

.formula-step-item .step-num-badge {
  display: inline-block;
  width: 28px; height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  font-size: 0.85rem; font-weight: 800;
  color: #fff; background: #6366f1;
  margin-right: 10px; vertical-align: middle;
}
.formula-step-item:nth-child(odd) .step-num-badge { background: #f59e0b; }
.formula-step-item .step-title { font-weight: 700; color: #1e293b; margin-right: 8px; }

/* 数学分式（上下结构） */
.math-fraction {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 0 3px;
  font-family: 'Times New Roman', serif;
}
.math-fraction .frac-num {
  display: block;
  line-height: 1.2;
  color: #4f46e5;
  font-weight: 600;
  font-style: italic;
}
.math-fraction .frac-line {
  width: 100%;
  min-width: 40px;
  height: 0;
  border-top: 1.5px solid #333;
  margin: 2px 0;
}
.math-fraction .frac-den {
  display: block;
  line-height: 1.2;
  color: #4f46e5;
  font-weight: 600;
  font-style: italic;
}

.formula-step-item:nth-child(odd) {
  border-left-color: #f59e0b;
}

@keyframes formulaStepIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.formula-step-text {
  font-size: 1.08rem;
  color: #334155;
  line-height: 1.7;
  margin: 0;
}

.formula-step-text .math-inline {
  font-family: 'Times New Roman', serif;
  font-style: italic;
  color: #4f46e5;
  font-weight: 600;
}

/* 换底公式高亮显示 */
.formula-final {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(249, 115, 22, 0.1));
  border: 2.5px solid #f59e0b;
  border-left-width: 5px;
  border-radius: 16px;
  padding: 22px 28px;
  text-align: center;
  box-shadow: 0 6px 28px rgba(245, 158, 11, 0.25);
  opacity: 0;
  transform: scale(0.92) translateY(10px);
  animation: formulaFinalIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes formulaFinalIn {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.formula-final-text {
  font-size: 1.45rem;
  font-weight: 800;
  color: #b45309;
  margin: 0;
  letter-spacing: 0.03rem;
  text-shadow: 0 1px 2px rgba(245, 158, 11, 0.2);
}

/* ========== 第十三页：运用对数知识解题 (P13) ========== */
/* 布局：左列(题目+底部分两栏:波利亚窄条+计算器宽区) + 右列(4步流程窄条+解题过程大区) */
#page-practice.active {
  display: flex;
}
#page-practice {
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  padding: 80px 24px 100px; /* 上方避开标题，下方留足空间给字幕 */
  gap: 14px;
  position: relative;
  overflow: hidden;
}

/* ====== 左侧列（~42%）：紧凑题目 + 底部(波利亚|计算器) ====== */
.practice-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, 40vw); /* 缩减左侧宽度，给右侧解题过程留更多空间 */
  height: calc(100vh - 180px); /* 给底部字幕留足够空间 */
  z-index: 5;
  flex-shrink: 0;
  position: relative;
}

/* 题目卡片（P13左侧列顶部——紧凑版） */
.problem-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 36px 18px; /* 增大垂直内边距 */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #6366f1;
  flex-shrink: 0;
}
.problem-title { font-size: 1.15rem; font-weight: 800; color: #4f46e5; margin: 0 0 12px; }
.problem-text { font-size: 1rem; color: #334155; line-height: 2; margin: 0; }
.problem-hint { display: inline-block; background: #fef3c7; color: #92400e; padding: 6px 12px; border-radius: 6px; font-size: 0.9rem; margin-top: 12px; }

/* 题目下方：波利亚区域 */
.practice-bottom-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-shrink: 0;
}

/* 波利亚——固定高度 */
#p13-polya-area {
  width: min(160px, 16vw);
  flex-shrink: 0;
  display: flex !important;
  align-items: flex-end;
  justify-content: center;
  position: static !important;
  left: auto !important;
  bottom: auto !important;
  overflow: hidden;
}
#p13-polya-area .character-img {
  width: auto !important;
  height: 330px !important;
  max-width: 100%;
  object-fit: contain;
}
#p13-polya-area .speaker-tag { opacity: 1; }

/* 计算器——绝对定位到红框位置（左侧列波利亚下方） */
.practice-bottom-row .calculator-card { display: none; }

#dialog-calculator {
  position: absolute;
  bottom: 10px;
  left: 30%;
  right: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}
#dialog-calculator .calc-title { font-size: 0.75rem; margin-bottom: 6px; }
#dialog-calculator .calc-display {
  font-size: 1rem;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  max-height: none;
  min-height: 32px;
}
#dialog-calculator .calc-buttons {
  gap: 4px;
}
#dialog-calculator .calc-btn {
  font-size: 1rem;
  font-weight: 700;
  padding: 8px 0;
  aspect-ratio: auto;
  border-radius: 6px;
}

/* ====== 右侧列（~58%）：4步流程窄条 + 解题过程大区 ====== */
.practice-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - min(438px, 41vw)); /* 缩减左侧占比，右侧更宽 */
  height: calc(100vh - 180px); /* 给底部字幕留足够空间 */
  z-index: 5;
  flex-shrink: 0;
  position: relative;
}

/* 四步法（P13右侧工具区顶部——白色底更显眼） */
.practice-steps-bar {
  flex-shrink: 0;
  padding: 8px 16px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}
.practice-steps-bar .step-item { flex: 1; font-size: 0.78rem; padding: 6px 10px; border-radius: 10px; color: #475569; font-weight: 600; } /* 白色底上的深色文字 */
/* 计算器（P13紧凑版） */
.calculator-card {
  background: linear-gradient(145deg, #1e293b, #334155);
  border-radius: 12px;
  padding: 10px; /* 减小内边距 */
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3), inset 0 1px 0 rgba(255,255,255,0.06);
}
#page-practice .calculator-card .calc-title { font-size: 0.75rem; font-weight: 700; color: #94a3b8; margin: 0 0 6px; text-align: center; }
#page-practice .calculator-card .calc-display {
  background: #0f172a;
  color: #38bdf8;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: right;
  margin-bottom: 6px;
  min-height: 32px;
  max-height: 52px;
  flex: none;
  word-break: break-all;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}
.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px; /* 减小按钮间距 */
}
.calc-btn {
  padding: 6px 0; /* 减小按钮高度 */
  border: none;
  border-radius: 6px;
  font-size: 0.8rem; /* 减小字号 */
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.calc-num { background: #e2e8f0; color: #1e293b; }
.calc-num:hover { background: #cbd5e1; transform: scale(1.05); }
.calc-num:active { transform: scale(0.96); }
.calc-op { background: #c7d2fe; color: #4338ca; }
.calc-op:hover { background: #a5b4fc; }
.calc-func { background: #fef3c7; color: #b45309; }
.calc-func:hover { background: #fde68a; }
.calc-clear { background: #fecaca; color: #dc2626; }
.calc-clear:hover { background: #fca5a5; }
.calc-equal { grid-column: span 2; background: #34d399; color: #065f46; font-size: 1.15rem; }
.calc-equal:hover { background: #10b981; }
.calc-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* 四步法（P13右侧工具区顶部） */
.practice-steps-bar {
  flex-shrink: 0;
}
.practice-steps-bar .step-item { flex: 1; font-size: 0.8rem; }

/* P13 波利亚角色：已纳入 practice-bottom-row 文档流，不再用绝对定位 */
/* （波利亚样式由 .practice-bottom-row #p13-polya-area 统一控制） */

/* P13 字幕区——全宽度底部 */
#page-practice .subtitle-area {
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 90vw !important;
  max-width: none !important;
  z-index: 20 !important;
}

.step-item.completed-step {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #fff !important;
  border: 1px solid rgba(34, 197, 94, 0.4);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}
.step-item.active-step {
  background: linear-gradient(135deg, #4ade80, #22c55e) !important;
  color: #065f46 !important;
  border: 1.5px solid rgba(74, 222, 128, 0.6);
  box-shadow: 0 3px 12px rgba(34, 197, 94, 0.35);
}

/* 对话区（P13右侧列主体 — 解题过程，紧凑版） */
.practice-dialog-area {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  min-height: 0;
}
.practice-chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px; /* 减小内边距 */
  display: flex;
  flex-direction: column;
  gap: 10px; /* 减小间距 */
  min-height: 100px;
}
.chat-msg {
  max-width: 90%;
  padding: 8px 12px; /* 减小内边距 */
  border-radius: 12px;
  font-size: 0.85rem; /* 减小字号 */
  line-height: 1.5;
  animation: chatIn 0.3s ease;
}
@keyframes chatIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.polya-msg {
  align-self: flex-start;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border-bottom-left-radius: 4px;
  color: #4c1d95;
  border: 1px solid #c4b5fd;
}
.chat-msg.student-msg {
  align-self: flex-end;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-bottom-right-radius: 4px;
  color: #1e40af;
  border: 1px solid #93c5fd;
}
.chat-msg.system-msg {
  align-self: center;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 0.84rem;
  text-align: center;
}

/* 思考中加载提示 */
.chat-msg.thinking-msg {
  align-self: flex-start;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-bottom-left-radius: 4px;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-style: italic;
  opacity: 0.9;
}
.chat-msg.thinking-msg .thinking-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-msg.thinking-msg .dot-anim {
  font-weight: bold;
  letter-spacing: 2px;
  min-width: 20px;
  display: inline-block;
}

/* ===== 语音消息气泡（类微信风格） ===== */
.voice-msg-audio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.6);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  border: 1px solid rgba(148,163,184,0.25);
}
.voice-msg-audio:hover { background: rgba(255,255,255,0.85); }
.voice-msg-audio.playing {
  background: #eff6ff;
  border-color: #93c5fd;
}

.voice-play-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.voice-play-btn::after { content: '▶'; margin-left: 1px; }
.voice-msg-audio.playing .voice-play-btn::after { content: '❚❚'; }

.voice-wave-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  width: 80px; /* 默认宽度，JS会根据时长调整 */
}
.wave-bar {
  width: 3px;
  background: #94a3b8;
  border-radius: 2px;
  transition: height 0.08s ease;
  animation: waveIdle 1.4s ease-in-out infinite;
}
.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }

/* 播放时波纹动画 */
.voice-msg-audio.playing .wave-bar {
  animation: wavePlay 0.5s ease-in-out infinite alternate;
  background: #6366f1;
}
@keyframes wavePlay {
  0%   { height: 4px; }
  100% { height: 16px; }
}
@keyframes waveIdle {
  0%, 100% { height: 5px; }
  50%     { height: 10px; }
}

.voice-duration {
  font-size: 0.72rem;
  color: #94a3b8;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.voice-msg-text {
  margin-top: 6px;
  padding: 6px 10px 4px;
  background: rgba(255,255,255,0.35);
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #334155;
  word-break: break-word;
}
/* 隐藏 audio 元素 */
.voice-msg-audio audio { display: none; }

/* ★ 图片消息预览样式 */
.chat-msg.image-msg {
  align-self: flex-end;
  padding: 8px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-bottom-right-radius: 4px;
  border: 1px solid #93c5fd;
  max-width: 85%;
}

.image-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.image-preview-img {
  max-width: 280px;
  max-height: 320px;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
  background: #fff;
}

.image-preview-img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(99,102,241,0.25);
}

.image-label {
  font-size: 0.78rem;
  color: #3b82f6;
  text-align: center;
  opacity: 0.85;
}

/* ★ 图片放大查看遮罩层 */
.image-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.overlay-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.overlay-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.close-btn {
  position: absolute;
  top: -14px; right: -14px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: #333;
  transition: all 0.15s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.close-btn:hover { background: #fff; transform: scale(1.1); }

/* 拍照上传按钮样式优化 */
.practice-photo-label {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #86efac;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.practice-photo-label:hover {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(34,197,94,0.3);
}
.practice-photo-label:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* 学生回答区 */
.student-answer-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}
.practice-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
  background: white;
  resize: vertical;
  min-height: 72px;
  max-height: 200px;
  line-height: 1.5;
  overflow-y: auto;
}
.practice-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.practice-input:disabled { background: #f1f5f9; cursor: not-allowed; }
.practice-send-btn {
  padding: 9px 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}
.practice-send-btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99,102,241,0.35); }
.practice-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.practice-voice-btn {
  width: 42px; height: 42px;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  background: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.practice-voice-btn:not(:disabled):hover { border-color: #6366f1; background: #eef2ff; }
.practice-voice-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.practice-voice-btn.recording {
  border-color: #ef4444;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  animation: voicePulse 1.2s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); transform: scale(1.05); }
}
.practice-photo-label {
  width: 42px; height: 42px;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  background: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.practice-photo-label:not(:disabled):hover { border-color: #6366f1; background: #eef2ff; }
.practice-photo-label:disabled { opacity: 0.4; cursor: not-allowed; }


/* ========== 第十四页：思路梳理 & 知识图谱 (P14) ========== */
#page-review {
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 20px 70px;
  gap: 6px;
  position: relative;
  overflow-y: auto; /* ★ 改为auto，避免裁剪grid内容 */
}
.review-content {
  /* ★ 四步法一屏展示：2×2网格布局 */
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, 94vw);
  height: calc(100vh - 220px);
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  z-index: 5;
  padding: 6px;
  overflow: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
/* 知识图谱模式时隐藏四步法 */
.review-content.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.review-section {
  background: rgba(255,255,255,0.97);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  animation: reviewFadeIn 0.5s ease forwards;
  opacity: 0;
  overflow-y: auto;
  min-height: 0; /* ★ grid子项关键：允许收缩 */
  display: flex;
  flex-direction: column;
}
@keyframes reviewFadeIn { to { opacity: 1; } }
.review-section h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #4f46e5;
  margin: 0 0 8px;
  padding-bottom: 5px;
  border-bottom: 2px solid #e0e7ff;
}
.review-section p, .review-section li {
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.65;
  margin: 3px 0;
}
.review-formula {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid #fcd34d;
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
  font-size: 0.98rem;
  font-family: 'Times New Roman', serif;
  font-style: italic;
  color: #92400e;
  margin: 6px 0;
  font-weight: 600;
}

/* ★ 整理成知识图谱 按钮 —— 页面上方 */
.btn-knowledge-graph {
  position: absolute;
  top: 48px;
  right: 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: 24px;
  padding: 10px 28px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(99,102,241,0.35);
  z-index: 20;
  transition: all 0.25s ease;
  animation: btnPulseIn 0.5s ease forwards;
}
.btn-knowledge-graph:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(99,102,241,0.45);
}
.btn-knowledge-graph:active {
  transform: scale(0.97);
}
.btn-knowledge-graph.hidden { display: none; }
@keyframes btnPulseIn {
  0%   { opacity: 0; transform: scale(0.85); }
  80%  { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

/* 知识图谱 —— 全屏显示 */
.knowledge-graph {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100vw - 40px);
  height: calc(100vh - 150px);
  background: rgba(255,255,255,0.985);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 15;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.knowledge-graph.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.graph-title {
  font-size: 1rem;
  font-weight: 800;
  color: #4f46e5;
  margin: 0 0 8px;
  text-align: center;
}
.knowledge-graph canvas {
  width: 100% !important;
  height: calc(100% - 60px) !important;
}

/* ★ 返回解题步骤 按钮 —— 知识图谱右上角 */
.btn-back-review {
  position: absolute;
  top: 10px;
  right: 14px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  border: none;
  border-radius: 18px;
  padding: 7px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(239,68,68,0.3);
  transition: all 0.2s ease;
  z-index: 25;
}
.btn-back-review:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239,68,68,0.4);
}
.btn-back-review.hidden { display: none; }


/* ========== 第十五页：学习分析报告 (P15) — 专业单屏版 ========== */
#page-report {
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 56px 24px 30px;
  position: relative;
  overflow-y: auto;
}

/* P15 标题更紧凑 */
#page-report .report-header {
  font-size: 1.35rem !important;
  letter-spacing: 0.08rem !important;
}

/* ===== 报告主体：左右分栏 ===== */
.report-content {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: min(1160px, 92vw);
  max-height: calc(100vh - 130px);
  z-index: 5;
  animation: reportFadeIn 0.6s ease forwards;
}

@keyframes reportFadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ---- 左栏：雷达图 + 指标 ---- */
.report-left {
  width: 42%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

/* ---- 右栏：信息卡片区 ---- */
.report-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* ===== 所有卡片统一样式 ===== */
.report-section {
  background: rgba(255,255,255,0.96);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.06), 0 0 0 1px rgba(99,102,241,0.05);
  backdrop-filter: blur(8px);
}

.report-section-title {
  font-size: 0.88rem;
  font-weight: 800;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e0e7ff;
  color: #4f46e5;
  letter-spacing: 0.02rem;
}

/* ===== 雷达图卡片 ===== */
.radar-card { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.radar-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.radar-wrap canvas {
  max-width: 100%;
  max-height: 100%;
}
/* 雷达图中心总分 */
.radar-center-score {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.radar-center-score .score-num {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: #6366f1;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.radar-center-score .score-label {
  display: block;
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: 0.05rem;
}

/* ===== 能力维度指标条形图 ===== */
.metrics-card { flex-shrink: 0; }
.metrics-list { display: flex; flex-direction: column; gap: 8px; }

.metric-row { display: flex; align-items: center; gap: 10px; }
.metric-name {
  width: 60px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}
.metric-bar-wrap {
  flex: 1;
  height: 18px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.metric-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
}
.metric-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: metricShimmer 2s infinite linear;
}
@keyframes metricShimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.metric-bar-fill.bar-reasoning { background: linear-gradient(90deg, #6366f1, #818cf8); }
.metric-bar-fill bar-understanding { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.metric-bar-fill.bar-calc { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.metric-bar-fill.bar-explore { background: linear-gradient(90deg, #22c55e, #4ade80); }
.metric-bar-fill.bar-express { background: linear-gradient(90deg, #ec4899, #f472b6); }

.metric-score {
  width: 32px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #334155;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ===== 基本信息卡片 ===== */
.basic-card { flex-shrink: 0; }
.basic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.basic-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.basic-icon { font-size: 1.2rem; flex-shrink: 0; }
.basic-data { display: flex; flex-direction: column; gap: 1px; }
.basic-label { font-size: 0.65rem; color: #94a3b8; font-weight: 600; }
.basic-value { font-size: 0.85rem; font-weight: 800; color: #1e293b; }

/* ===== 四步法执行情况 ===== */
.process-card { flex-shrink: 0; }
.process-bars { display: flex; flex-direction: column; gap: 6px; }
.process-step-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.process-step-label {
  width: 64px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
  white-space: nowrap;
}
.process-step-bar-wrap {
  flex: 1;
  height: 12px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
}
.process-step-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s ease;
}
.process-step-bar.step1-bg { background: linear-gradient(90deg, #ef4444, #f87171); }
.process-step-bar.step2-bg { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.process-step-bar.step3-bg { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.process-step-bar.step4-bg { background: linear-gradient(90deg, #22c55e, #4ade80); }
.process-step-stat {
  width: 48px;
  font-size: 0.66rem;
  color: #64748b;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ===== 综合表现分析 ===== */
.assess-card-wrap { flex-shrink: 0; }
.assess-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.assess-card {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.assess-card.good {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  color: #166534;
  border: 1px solid #bbf7d0;
}
.assess-card.weak {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #92400e;
  border: 1px solid #fde68a;
}
.assess-card.info {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ===== 底部：收获+建议两列 ===== */
.bottom-row {
  flex: 1;
  display: flex;
  gap: 10px;
  min-height: 0;
}
.gains-col, .suggest-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  min-height: 0;
}
.col-title {
  font-size: 0.82rem;
  font-weight: 800;
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 1.5px dashed #e2e8f0;
}
.gains-title { color: #16a34a; }
.suggest-title { color: #2563eb; }

.gains-list, .suggest-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.gains-list li {
  padding: 6px 10px;
  background: #f0fdf4;
  border-radius: 7px;
  border-left: 3px solid #22c55e;
  font-size: 0.76rem;
  color: #166534;
  line-height: 1.45;
}
.suggest-list li {
  padding: 6px 10px;
  background: #eff6ff;
  border-radius: 7px;
  border-left: 3px solid #3b82f6;
  font-size: 0.76rem;
  color: #1e40af;
  line-height: 1.45;
}

