/* ===== 波兰语语音评测智能体 - 美化版样式 ===== */
/* 版本号由 app.js 中的 APP_VERSION 统一管理，无需在此处维护 */

:root {
  --primary: #534AB7;
  --primary-light: #EEEDFE;
  --primary-dark: #3C3489;
  --secondary: #1D9E75;
  --secondary-light: #E1F5EE;
  --accent-warm: #BA7517;
  --accent-warm-light: #FAEEDA;
  --danger: #E24B4A;
  --danger-light: #FCEBEB;
  
  --bg-gradient-start: #667eea;
  --bg-gradient-end: #764ba2;
  --bg-main: #f0f2f5;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  
  --text-primary: #1a1a2e;
  --text-secondary: #6c757d;
  --text-tertiary: #adb5bd;
  --text-light: #ffffff;
  
  --border: #e9ecef;
  --border-focus: #534AB7;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --shadow-glow: 0 0 20px rgba(83,74,183,0.3);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 夜间模式变量 ===== */
[data-theme="dark"] {
  --primary: #7C6EE8;
  --primary-light: #1A1640;
  --primary-dark: #9D8CFF;
  --secondary: #34D399;
  --secondary-light: #0F2A1E;
  --accent-warm: #F59E0B;
  --accent-warm-light: #2A1F05;
  --danger: #F87171;
  --danger-light: #2A1010;

  --bg-gradient-start: #0a0a14;
  --bg-gradient-end: #0f0f1a;
  --bg-main: #0f0f1a;
  --bg-card: #16162a;
  --bg-sidebar: #121220;

  --text-primary: #C8C8D8;
  --text-secondary: #8888A0;
  --text-tertiary: #555568;
  --text-light: #E8E8F0;

  --border: #2A2A40;
  --border-focus: #7C6EE8;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.6);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.7);
  --shadow-glow: 0 0 20px rgba(124,110,232,0.2);

  /* 深色模式下的组件覆盖 */
}

[data-theme="dark"] header {
  background: linear-gradient(135deg, #0d0d20 0%, #161635 100%);
}

[data-theme="dark"] body {
  background: var(--bg-main);
}

[data-theme="dark"] .tutor-encouragement {
  background: linear-gradient(135deg, var(--secondary-light), #0a2018);
}

[data-theme="dark"] .drill-item {
  background: linear-gradient(135deg, var(--accent-warm-light), #1a1505);
}

[data-theme="dark"] .history-stats-bar {
  background: linear-gradient(135deg, var(--primary-light), #0d0d20);
}

[data-theme="dark"] .tutor-comparison {
  background: linear-gradient(135deg, #0a1020, #0d1530);
  border-color: var(--border);
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

html {
  scrollbar-gutter: stable;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: 60px;
}

/* ===== 背景装饰 ===== */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
}

.bg-circle-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -150px;
  right: -100px;
  filter: blur(80px);
}

.bg-circle-2 {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  bottom: -120px;
  left: -80px;
  filter: blur(70px);
}

.bg-circle-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-warm);
  top: 50%;
  left: 40%;
  transform: translate(-50%, -50%);
  filter: blur(60px);
}

/* ===== Header ===== */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-bottom: none;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(83, 74, 183, 0.3);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  max-width: 1600px;
  margin: 0 auto;
}

header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  font-weight: 400;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(83,74,183,0.12);
  box-shadow: 0 2px 8px rgba(83,74,183,0.08);
}

.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 6px;
  box-shadow: 0 0 6px rgba(83,74,183,0.5);
  transition: all 0.3s ease;
}

.header-logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 32px;
  line-height: 1;
}

.header-titles {
  display: flex;
  flex-direction: column;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== 后端状态小圆点 ===== */
.backend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
  flex-shrink: 0;
}
.backend-dot.online {
  background: #4CAF50;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
}
.backend-dot.offline {
  background: #F44336;
  box-shadow: 0 0 6px rgba(244, 67, 54, 0.5);
}

/* 夜间模式按钮：与移动端切换按钮格式完全一致 */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: var(--primary-light);
  transform: scale(1.1);
}

[data-theme="dark"] .theme-toggle-btn {
  background: var(--bg-sidebar);
  border-color: var(--border);
  color: #C8C8D8;
}

/* ===== 模式切换器 ===== */
.mode-switcher {
  position: relative;
}

.mode-toggle {
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  user-select: none;
}

.mode-toggle:hover {
  background: rgba(255,255,255,0.35) !important;
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mode-toggle:active {
  transform: scale(0.97);
}

.mode-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 500;
  overflow: hidden;
  animation: dropdown-fade-in 0.2s ease-out;
}

.mode-dropdown.show { display: block; }

@keyframes dropdown-fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mode-dropdown-header {
  padding: 10px 14px;
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

.mode-option:last-child { border-bottom: none; }

.mode-option:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.mode-option.active {
  background: #E8F5E9;
  color: #2E7D32;
}

.mode-option.active::before {
  content: "✓";
  margin-left: -4px;
  font-weight: 700;
  font-size: 14px;
}

.mode-option-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.mode-option-info {
  flex: 1;
  min-width: 0;
}

.mode-option-name {
  font-weight: 600;
  line-height: 1.3;
}

.mode-option-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mode-option.disabled {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(1);
}

/* ===== Main Layout ===== */
main {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 340px;
  /* 不用 align-items: stretch，由 JS syncColumnHeights 动态同步三列高度 */
  gap: 24px;
  padding: 24px;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
}

/* ===== Sidebar（左侧题库）===== */
.sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  min-width: 0;
}

.sidebar:hover {
  box-shadow: var(--shadow-md);
}

.level-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  background: var(--bg-main);
}

.tab {
  flex: 1;
  padding: 14px 8px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  position: relative;
}

.tab:hover { 
  background: var(--primary-light);
  color: var(--primary);
}

.tab.active {
  color: var(--primary);
  background: var(--bg-card);
  font-weight: 600;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}

.phrase-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 0; /* 关键：允许flex子项收缩到小于内容高度 */
  /* 悬停显示滚动条：默认透明，悬停时显示 */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.phrase-list:hover {
  scrollbar-color: rgba(128,128,128,0.4) transparent;
}

.phrase-list::-webkit-scrollbar { width: 6px; }
.phrase-list::-webkit-scrollbar-track { background: transparent; }
.phrase-list::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s;
}
.phrase-list:hover::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.4);
}

.loading-hint {
  text-align: center;
  color: var(--text-tertiary);
  padding: 40px 20px;
  font-size: 14px;
}

.phrase-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 8px;
  border: 2px solid transparent;
  background: var(--bg-main);
}

.phrase-item:hover { 
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateX(4px);
}

.phrase-item.active {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.phrase-item-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.phrase-item-translation {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== Practice Area（中间练习区）===== */
.practice-area {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  /* 不设固定高度，内容自然展示，由 JS 同步左右高度 */
  min-height: 200px;
  scrollbar-color: transparent transparent;
}

.practice-area:hover {
  scrollbar-color: rgba(128,128,128,0.4) transparent;
}

.practice-area::-webkit-scrollbar { width: 6px; }
.practice-area::-webkit-scrollbar-track { background: transparent; }
.practice-area::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s;
}
.practice-area:hover::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.4);
}

/* ===== Phrase Card Collapsible ===== */
.phrase-card-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

/* 切换按钮——始终可见 */
.phrase-card-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  cursor: pointer;
  user-select: none;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  font-size: 13px;
  color: var(--text-tertiary);
  overflow: hidden;
}

.phrase-card-toggle:hover { background: rgba(83,74,183,0.06); }

.phrase-card-toggle-icon {
  font-size: 10px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  display: inline-block;
}

.phrase-card-section:not(.collapsed) .phrase-card-toggle-icon {
  transform: rotate(90deg);
}

/* 播放按钮 */
.phrase-compact-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}
.phrase-compact-play:hover {
  background: var(--primary-dark);
  transform: scale(1.12);
  box-shadow: 0 2px 8px rgba(83,74,183,0.35);
}

/* 波兰语原文：主题紫色 */
.phrase-compact-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

/* 音标：浅灰色 */
.phrase-compact-ipa {
  font-size: 12px;
  font-family: "Doulos SIL", "Charis SIL", serif;
  color: #9ca3af;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 中文翻译 */
.phrase-compact-translation {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}


/* 卡片主体——展开/折叠动画 */
.phrase-card-body {
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease;
  max-height: 800px;
  opacity: 1;
  overflow: hidden;
}

.phrase-card-section.collapsed .phrase-card-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}.phrase-card-section.collapsed .phrase-card { padding: 0; }

.phrase-card {
  padding: 24px 16px 16px;
  text-align: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.phrase-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.phrase-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.phrase-text {
  font-size: 38px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.phrase-translation {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.phrase-ipa {
  font-size: 18px;
  color: var(--primary);
  font-family: "Doulos SIL", "Charis SIL", "IPA Font", serif;
  font-weight: 500;
  padding: 8px 16px;
  background: none;
  border: none;
  outline: none;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin: 8px auto;
  position: relative;
  line-height: 1.8;
  overflow: hidden;
}

/* 底部进度条 —— 默认不存在（content:none），播放时由 .ipa-playing 创建 */
.phrase-ipa::after {
  content: none;  /* ★ 完全不创建伪元素，从根源消除残留 ★ */
}

/* 播放中：创建进度条伪元素，由 --ipa-progress CSS 变量驱动 */
.phrase-ipa.ipa-playing::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
  transform-origin: left center;
  transform: scaleX(var(--ipa-progress, 0));
  pointer-events: none;
  will-change: transform;
}

/* 逐音素高亮 */

.ipa-phone {
  display: inline;
  padding: 0 1px;
  border-radius: 3px;
  transition: background 0.08s ease, color 0.08s ease, transform 0.1s ease;
}

/* 音节组：同一音节的音素紧贴，音节间有竖线分隔 */
.ipa-syllable {
  display: inline;
  position: relative;
  margin-right: 0.35em;
}

/* 音节之间的视觉分隔（短竖线） */
.ipa-syllable::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 0.9em;
  background: #c4b5e8;
  margin-left: 0.35em;
  vertical-align: middle;
  opacity: 0.7;
}

/* 最后一个音节不需要分隔线 */
.ipa-syllable:last-child::after {
  display: none;
}

.ipa-phone.active {
  background: var(--primary);
  color: white;
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(83, 74, 183, 0.3);
}

/* 上一个音素：弱高亮（视觉轨迹，120ms 后消失） */
.ipa-phone.just-active {
  background: rgba(83, 74, 183, 0.15);
  color: var(--primary);
  transform: scale(1.05);
  transition: all 0.1s ease;
}

/* 进度光标：闪烁竖线 */


.phrase-notes {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.6;
  padding: 12px 16px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
}

.tts-btn {
  margin-top: 16px;
  padding: 10px 28px;
  background: var(--primary-light);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 25px;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
}

.tts-btn::before {
  content: '🔊';
  font-size: 18px;
}

.tts-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

.tts-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 暂停状态：图标变为播放箭头 */
.tts-btn.tts-paused::before {
  content: '▶';
}

/* 播放速度控制 */
.tts-speed-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.tts-speed-control label {
  font-size: 13px;
  white-space: nowrap;
}
.tts-speed-control input[type="range"] {
  width: 100px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.tts-speed-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s;
}
.tts-speed-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
#tts-speed-label {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  font-size: 13px;
}

/* ===== Recorder（录音区）===== */
.recorder-visual {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

/* ===== 录音模块折叠面板 ===== */
.recorder-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: none;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.recorder-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  cursor: pointer;
  user-select: none;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  font-size: 13px;
  color: var(--text-tertiary);
}

.recorder-toggle:hover { background: rgba(83,74,183,0.06); }

.recorder-toggle-icon {
  font-size: 10px;
  transition: transform 0.3s ease;
  display: inline-block;
  flex-shrink: 0;
}

.recorder-section:not(.collapsed) .recorder-toggle-icon {
  transform: rotate(90deg);
}

.recorder-toggle-text {
  font-size: 13px;
  font-weight: normal;
  color: var(--text-tertiary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 快速录音按钮 —— 绝对定位在 toggle 行右侧 */
.quick-record-btn {
  position: absolute;
  top: 6px;
  right: 14px;
  z-index: 2;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.quick-record-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(83,74,183,0.3);
}

.quick-record-btn:active {
  transform: scale(0.95);
}

/* 录音中快速按钮：红色实心圆 + 白色停止方块 */
.quick-record-btn.recording {
  background: #EF4444;
  border-color: #EF4444;
  color: #fff;
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.4);
}

.quick-record-btn.recording::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 2px;
}

.quick-record-btn.recording:hover {
  background: #DC2626;
  border-color: #DC2626;
  transform: scale(1.05);
}

/* 录音模块展开时隐藏快速录音按钮 */
.recorder-section:not(.collapsed) .quick-record-btn {
  display: none;
}

.recorder-body {
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  max-height: 500px;
  opacity: 1;
  overflow: hidden;
}

.recorder-section.collapsed .recorder-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.recorder-area {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: none;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
 
.recorder-area:hover {
  box-shadow: var(--shadow-md);
}

.record-btn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  box-shadow: 0 4px 15px rgba(83, 74, 183, 0.4);
}

.record-btn:hover:not(:disabled) { 
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(83, 74, 183, 0.6);
}

.record-btn:disabled {
  background: var(--text-tertiary);
  cursor: not-allowed;
  box-shadow: none;
}

.record-btn.recording {
  background: linear-gradient(135deg, var(--danger) 0%, #c0392b 100%);
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(226, 75, 74, 0.5);
}

@keyframes pulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(226, 75, 74, 0.4);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 0 20px rgba(226, 75, 74, 0);
    transform: scale(1.05);
  }
}

.record-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  transition: var(--transition);
}

.record-btn.recording .record-icon {
  border-radius: 6px;
  height: 24px;
  width: 24px;
}

.record-text {
  position: absolute;
  bottom: -24px;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  font-weight: 500;
}

.recording-status {
  font-size: 14px;
  color: var(--text-secondary);
  min-height: 36px;
  font-weight: 500;
  line-height: 1.4;
}

.recording-status.active { 
  color: var(--danger); 
  font-weight: 600;
  animation: blink 1s ease-in-out infinite;
}

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

/* ===== Results Area（结果展示区）===== */
.result-area {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: none;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-shadow: var(--shadow-sm);
  animation: slideUp 0.5s ease-out;
}

/* 新手指引演示结果标记 */
.result-area.tut-demo {
  position: relative;
}
.result-area.tut-demo::before {
  content: "演示";
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(83, 74, 183, 0.1);
  color: #534AB7;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  z-index: 1;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 再试一次按钮 */
.retry-btn {
  display: block;
  width: 100%;
  padding: 14px 0;
  margin-top: 8px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.retry-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(83,74,183,0.25);
}

.retry-btn:active {
  transform: translateY(0);
}

.score-overview {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: center;
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 6px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.score-circle.good { 
  border-color: var(--secondary);
  box-shadow: 0 0 20px rgba(29, 158, 117, 0.3);
}

.score-circle.ok { 
  border-color: var(--accent-warm);
  box-shadow: 0 0 20px rgba(186, 117, 23, 0.3);
}

.score-circle.bad { 
  border-color: var(--danger);
  box-shadow: 0 0 20px rgba(226, 75, 74, 0.3);
}

.score-circle-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-unit {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-top: 2px;
}

.score-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 5;
}

.score-ring-fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-number {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.score-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.grade-badge {
  font-size: 20px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  letter-spacing: 0.5px;
}

.grade-badge.good { 
  background: var(--secondary-light); 
  color: var(--secondary);
  box-shadow: 0 4px 12px rgba(29, 158, 117, 0.2);
}

.grade-badge.ok { 
  background: var(--accent-warm-light); 
  color: var(--accent-warm);
  box-shadow: 0 4px 12px rgba(186, 117, 23, 0.2);
}

.grade-badge.bad { 
  background: var(--danger-light); 
  color: var(--danger);
  box-shadow: 0 4px 12px rgba(226, 75, 74, 0.2);
}

/* ⚡ 评测模式徽章（score-overview 下方居中） */
.eval-mode-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 18px auto 16px;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1;
  width: fit-content;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.eval-mode-badge:hover {
  transform: translateY(-1px);
}
.eval-mode-badge.precision {
  background: linear-gradient(135deg, #ede9fe 0%, #f3e8ff 50%, #fae8ff 100%);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.12), inset 0 1px 0 rgba(255,255,255,0.6);
}
.eval-mode-badge.precision:hover {
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.22), inset 0 1px 0 rgba(255,255,255,0.6);
}
.eval-mode-badge.fast {
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 50%, #f0fdf4 100%);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.18);
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.10), inset 0 1px 0 rgba(255,255,255,0.6);
}
.eval-mode-badge.fast:hover {
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.18), inset 0 1px 0 rgba(255,255,255,0.6);
}
.eval-mode-badge .mode-icon {
  font-size: 14px;
  animation: mode-pulse 2s ease-in-out infinite;
}
@keyframes mode-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
[data-theme="dark"] .eval-mode-badge.precision {
  background: linear-gradient(135deg, rgba(124,58,237,0.18) 0%, rgba(139,92,246,0.12) 100%);
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.15);
}
[data-theme="dark"] .eval-mode-badge.fast {
  background: linear-gradient(135deg, rgba(5,150,105,0.15) 0%, rgba(16,185,129,0.10) 100%);
  border-color: rgba(5, 150, 105, 0.25);
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.12);
}

/* 移动端切换链接按钮 */
.mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 1px solid var(--border);
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.mobile-link:hover {
  background: var(--primary-light);
  transform: scale(1.1);
}

[data-theme="dark"] .mobile-link {
  background: var(--bg-sidebar);
  border-color: var(--border);
}

/* ℹ️ Azure ASR 标注信息横幅（V5：仅展示，不扣分） */
/* 💡 特殊短语辅音丛说明（黄色框，mode-badge 和四维分数之间） */
.score-note {
  margin: 8px auto 28px;
  padding: 12px 16px 12px 44px;
  max-width: 520px;
  background: #FEF8E7;
  border: 1px solid #F5D76E;
  border-radius: var(--radius-md, 12px);
  font-size: 13px;
  color: #856404;
  line-height: 1.6;
  text-align: left;
  position: relative;
  box-shadow: 0 2px 8px rgba(245, 215, 110, 0.15);
}
.score-note::before {
  content: "💡";
  position: absolute;
  left: 14px;
  top: 12px;
  font-size: 16px;
}

/* 📝 整体评估（薄弱音素提示行，音素条下方） */
.summary-text {
  text-align: left;
  font-size: 13px;
  color: var(--text-primary);
  padding: 10px 14px;
  background: #FFF5F5;
  border-left: 3px solid var(--danger);
  border-radius: 6px;
  line-height: 1.6;
  font-weight: 500;
  margin: 20px auto 0;
  max-width: 520px;
  position: relative;
  box-shadow: 0 1px 4px rgba(226, 75, 74, 0.08);
}
.summary-text[data-warning="0"] {
  background: #F0FDF4;
  border-left-color: var(--secondary);
  box-shadow: 0 1px 4px rgba(29, 158, 117, 0.08);
}

.azure-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: #F0F4FF;
  border: 1px solid #C0D0FF;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  animation: azureSlideIn 0.4s ease-out;
}

.azure-info-banner.azure-mismatch {
  background: #FFF3CD;
  border-color: #FFD700;
}

.azure-info-banner.azure-partial {
  background: #FFF8E1;
  border-color: #FFB300;
}

.azure-info-banner.azure-matched {
  background: #EAF3DE;
  border-color: #97C459;
  padding: 8px 14px;
}

@keyframes azureSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.azure-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1.4;
}

.azure-body {
  flex: 1;
  min-width: 0;
}

.azure-title {
  font-size: 14px;
  font-weight: 700;
  color: #2B6CB0;
  margin-bottom: 4px;
}

.azure-info-banner.azure-mismatch .azure-title {
  color: #B8860B;
}

.azure-info-banner.azure-partial .azure-title {
  color: #E65100;
}

.azure-detail {
  font-size: 13px;
  color: #555;
  margin-bottom: 3px;
}

.azure-hint {
  font-size: 12px;
  color: #777;
  line-height: 1.5;
}

.score-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.score-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.score-item:hover {
  background: var(--primary-light);
  transform: translateX(4px);
}

.score-item-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.score-item-label {
  font-size: 14px;
  color: var(--text-secondary);
  width: 64px;
  flex-shrink: 0;
  font-weight: 500;
}

.score-bar {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 5px;
  width: 0;
  transition: width 1s ease-out;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.score-item-value {
  font-size: 14px;
  font-weight: 700;
  width: 40px;
  text-align: right;
  color: var(--primary);
}

.phoneme-chart h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.phoneme-chart h3::before {
  content: '🎯';
  font-size: 20px;
}

.phoneme-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.phoneme-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 56px;
  padding: 8px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.phoneme-bar:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.phoneme-bar-label {
  font-size: 16px;
  font-family: "Doulos SIL", "Charis SIL", serif;
  color: var(--text-primary);
  font-weight: 600;
}

.phoneme-bar-track {
  width: 100%;
  height: 64px;
  background: var(--border);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.phoneme-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  border-radius: 6px;
  transition: height 0.8s ease-out;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.phoneme-bar-score {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* ===== Tutor Panel（右侧AI辅导）===== */
.tutor-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.tutor-panel:hover {
  box-shadow: var(--shadow-md);
}

.tutor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 2px solid var(--border);
  background: linear-gradient(135deg, var(--primary-light), var(--bg-card));
}

.tutor-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tutor-header h2::before {
  content: '🤖';
  font-size: 22px;
}

.feedback-btn {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feedback-btn::before {
  content: '💡';
  font-size: 16px;
}

.feedback-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

.feedback-btn:disabled {
  border-color: var(--border);
  color: var(--text-tertiary);
  cursor: not-allowed;
  background: var(--bg-main);
}

.feedback-btn.loading {
  background: var(--primary);
  color: white;
  pointer-events: none;
  animation: pulse-btn 1.5s ease-in-out infinite;
}

@keyframes pulse-btn {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.tutor-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  font-size: 15px;
  line-height: 1.8;
  min-height: 0; /* 关键：允许flex子项收缩到小于内容高度 */
  /* 悬停显示滚动条：默认透明，悬停时显示 */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.tutor-content:hover {
  scrollbar-color: rgba(128,128,128,0.4) transparent;
}

.tutor-content::-webkit-scrollbar { width: 6px; }

.tutor-content::-webkit-scrollbar-track {
  background: transparent;
}

.tutor-content::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s;
}

.tutor-content:hover::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.4);
}

.tutor-hint {
  color: var(--text-tertiary);
  text-align: center;
  padding: 60px 20px;
  font-size: 15px;
}

.tutor-section {
  margin-bottom: 24px;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tutor-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* AI 辅导模式标识 */
.tutor-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  width: fit-content;
}

.tutor-mode-badge.ai {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.tutor-mode-badge.mock {
  background: var(--bg-main);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

[data-theme="dark"] .tutor-mode-badge.mock {
  background: var(--bg-sidebar);
  color: var(--text-tertiary);
}

.tutor-encouragement {
  font-size: 15px;
  color: var(--text-primary);
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--secondary-light), #f0fdf4);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border-left: 4px solid var(--secondary);
  font-weight: 500;
  line-height: 1.7;
}

.suggestion-card {
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  transition: var(--transition);
  background: var(--bg-card);
}
.suggestion-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.suggestion-card-header .suggestion-score {
  margin-left: auto;
}

/* 🔊 音素播放按钮 */
.phoneme-play {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0; line-height: 1;
}
.phoneme-play:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(83,74,183,0.35);
}
.phoneme-play:active { transform: scale(0.95); }

.suggestion-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.suggestion-phoneme {
  font-size: 18px;
  font-family: "Doulos SIL", "Charis SIL", serif;
  color: var(--primary);
  font-weight: 700;
}

.suggestion-score {
  font-size: 13px;
  color: var(--danger);
  font-weight: 700;
  padding: 2px 8px;
  background: var(--danger-light);
  border-radius: 4px;
  margin-left: 8px;
}

.suggestion-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0;
  line-height: 1.6;
}

.suggestion-tip {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  padding: 12px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.drill-item {
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--accent-warm-light), #fef3c7);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
  border-left: 4px solid var(--accent-warm);
  font-weight: 500;
}

.highlight-item {
  display: inline-block;
  padding: 6px 14px;
  background: var(--secondary-light);
  color: var(--secondary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-right: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  border: 1px solid var(--secondary);
}

/* ===== 遮罩层（侧边栏/辅导面板用） ===== */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 900;
  backdrop-filter: blur(4px);
}

.drawer-overlay.active { display: block; }

/* ===== 侧边抽屉面板 ===== */
.drawer-panel {
  position: fixed;
  top: 0;
  right: -480px;
  width: 480px;
  max-width: 92vw;
  height: 100vh;
  background: var(--bg-card);
  z-index: 910;
  box-shadow: var(--shadow-lg);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.drawer-panel.open { right: 0; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 2px solid var(--border);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.drawer-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: white;
}

[data-theme="dark"] .drawer-header {
  background: linear-gradient(135deg, #2a2460, #1e1b4a);
}

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.drawer-close-btn:hover { background: rgba(255,255,255,0.35); }

.drawer-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  background: var(--bg-main);
  overflow: hidden;
}

.drawer-tab {
  flex: 1;
  padding: 11px 10px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  white-space: nowrap;
}

.drawer-tab:hover { color: var(--primary); background: var(--primary-light); }

.drawer-tab.active {
  color: var(--primary);
  font-weight: 700;
  background: var(--bg-card);
  border-bottom: 3px solid var(--primary);
  margin-bottom: -2px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  /* 悬停显示滚动条：默认透明，悬停时显示 */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.drawer-body:hover {
  scrollbar-color: rgba(128,128,128,0.4) transparent;
}

.drawer-body::-webkit-scrollbar { width: 6px; }
.drawer-body::-webkit-scrollbar-track { background: transparent; }
.drawer-body::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s;
}
.drawer-body:hover::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.4);
}

/* 抽屉面板本身也用悬停显示滚动条 */
.drawer-panel {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.drawer-panel:hover {
  scrollbar-color: rgba(128,128,128,0.4) transparent;
}

.drawer-panel::-webkit-scrollbar { width: 6px; }
.drawer-panel::-webkit-scrollbar-track { background: transparent; }
.drawer-panel::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s;
}
.drawer-panel:hover::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.4);
}

/* 抽屉面板内所有元素用悬停显示滚动条 */
.drawer-panel * {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  -ms-overflow-style: none;
}
.drawer-panel *::-webkit-scrollbar { width: 6px; }
.drawer-panel *::-webkit-scrollbar-track { background: transparent; }
.drawer-panel *::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s;
}
.drawer-panel *:hover::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.4);
}

.drawer-body .drawer-tab-pane { display: none; }
.drawer-body .drawer-tab-pane.active { display: block; }

/* 紧凑状态栏 */
.compact-status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  z-index: 80;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.compact-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
}

.compact-stat strong {
  color: var(--primary);
  font-weight: 700;
}

.compact-divider { color: var(--text-tertiary); }

.open-drawer-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.open-drawer-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

/* 历史记录统计栏 */
.history-stats-bar {
  display: flex;
  gap: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--primary-light), #f0edff);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}

.history-stat {
  color: var(--text-secondary);
}

.history-stat strong {
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
}

/* 历史记录列表 */
.drawer-history-list {
  max-height: 400px;
  overflow-y: auto;
  /* 悬停显示滚动条 */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.drawer-history-list:hover {
  scrollbar-color: rgba(128,128,128,0.4) transparent;
}

.drawer-history-list::-webkit-scrollbar { width: 6px; }
.drawer-history-list::-webkit-scrollbar-track { background: transparent; }
.drawer-history-list::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s;
}
.drawer-history-list:hover::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.4);
}

.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  background: var(--bg-main);
  transition: var(--transition);
  border-left: 4px solid transparent;
}

.history-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.history-item.good { border-left-color: var(--secondary); }
.history-item.ok { border-left-color: var(--accent-warm); }
.history-item.bad { border-left-color: var(--danger); }

.history-item-time {
  min-width: 70px;
  font-size: 12px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.history-item-phrase {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.history-item-translation {
  font-size: 12px;
  color: var(--text-tertiary);
}

.history-item-score {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.history-score-badge {
  display: inline-block;
  min-width: 38px;
  text-align: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  color: white;
}

.history-item-grade {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.grade-A { background: var(--secondary-light); color: var(--secondary); }
.grade-B { background: var(--accent-warm-light); color: var(--accent-warm); }
.grade-C { background: #FFF3E0; color: #E65100; }
.grade-D { background: var(--danger-light); color: var(--danger); }

.load-more-btn {
  display: block;
  margin: 12px auto 4px;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: calc(100% - 16px);
  text-align: center;
}
.load-more-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light, #EEEDFE);
}
.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.load-more-btn.loading {
  pointer-events: none;
  color: var(--text-secondary);
}

.clear-history-btn {
  margin-top: 16px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.clear-history-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-light);
}

/* 薄弱音素 */
.weakness-summary {
  margin-bottom: 16px;
}

.weakness-summary h4 {
  font-size: 15px;
  color: var(--danger);
  margin-bottom: 8px;
}

.weakness-summary p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.weakness-list { margin-top: 12px; }

.weakness-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--bg-main);
  border-left: 4px solid var(--danger);
  transition: var(--transition);
}

.weakness-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.weakness-phoneme {
  font-size: 26px;
  font-family: "Doulos SIL", "Charis SIL", serif;
  font-weight: 700;
  color: var(--primary);
  min-width: 40px;
  text-align: center;
}

.weakness-info {
  flex: 1;
}

.weakness-info-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.weakness-info-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.weakness-bar-wrap {
  min-width: 130px;
}

.weakness-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.weakness-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.weakness-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease-out;
}

.weakness-bar-fill.low { background: var(--danger); }
.weakness-bar-fill.mid { background: var(--accent-warm); }
.weakness-bar-fill.high { background: var(--secondary); }

/* 智能化薄弱音素样式 */
.weakness-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}

.weakness-trend {
  font-size: 18px;
  cursor: help;
  transition: transform 0.2s;
}

.weakness-trend:hover {
  transform: scale(1.2);
}

/* 修改 weakness-item 为垂直布局 */
.weakness-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.weakness-phoneme {
  min-width: auto;
}

.weakness-bar-wrap {
  width: 100%;
  min-width: auto;
}

.weakness-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  background: #f0f7ff;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  width: 100%;
}

.weakness-tip-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.weakness-tip-text {
  flex: 1;
}

/* 分组样式 */
.weakness-group {
  margin-bottom: 16px;
}

.weakness-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  padding-left: 4px;
  border-left: 3px solid var(--primary);
}

/* 学习统计 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-main);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.stat-card-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.stats-chart-area {
  margin-top: 16px;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border);
}

.stats-chart-area h4 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.stats-chart-area canvas {
  max-width: 100%;
  height: auto !important;
}

/* 波谱动画容器 */
.wave-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 48px;
  width: 200px;
  margin: 0 auto 12px;
}

.wave-bar {
  width: 6px;
  height: 8px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transition: height 0.1s ease-out;
}

.wave-container.active .wave-bar {
  animation: wave-bounce 0.6s ease-in-out infinite alternate;
}

@keyframes wave-bounce {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* 庆祝动效 */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  opacity: 0;
}

.confetti-container.intense .confetti {
  animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  80% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg) scale(0.3);
  }
}

/* 高分提示 toast */
.celebration-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(83, 74, 183, 0.4);
  opacity: 0;
  pointer-events: none;
  z-index: 1100;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.celebration-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 分数跳动动画 */
.score-pop {
  animation: score-pop 0.4s ease-out;
}

/* 新手指引 — 聚光灯效果 */
.tutorial-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.42);
  transition: opacity 0.4s;
}
.tut-spotlight {
  position: absolute; z-index: 2001;
  box-shadow: 0 0 0 3px rgba(124,110,232,0.85), 0 0 50px rgba(124,110,232,0.5), 0 0 0 9999px rgba(0,0,0,0.42);
  border-radius: 12px;
  transition: box-shadow 0.35s ease, border-radius 0.35s ease;
  pointer-events: none;
}
.tut-tooltip {
  position: fixed; z-index: 2002;
  background: #fff; border-radius: 16px;
  padding: 24px; max-width: 360px; width: calc(100vw - 40px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  animation: tutFadeIn 0.25s;
  display: flex; gap: 16px;
  pointer-events: auto;
}
@keyframes tutFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tut-tip-icon { font-size: 40px; flex-shrink: 0; }
.tut-tip-body { flex: 1; min-width: 0; }
.tut-tip-body h3 { font-size: 17px; color: #1a1a2e; margin-bottom: 6px; }
.tut-tip-body p { font-size: 13px; color: #6c757d; line-height: 1.6; margin-bottom: 16px; }
.tut-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
}
.tut-skip {
  background: none; border: none; font-size: 12px; color: #adb5bd;
  cursor: pointer; transition: color 0.2s; padding: 0;
}
.tut-skip:hover { color: #495057; }
.tut-nav-right { display: flex; gap: 6px; }
.tut-btn {
  padding: 7px 16px; border-radius: 10px;
  border: none; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.tut-btn-prev { background: #f1f3f5; color: #495057; }
.tut-btn-prev:hover { background: #e9ecef; }
.tut-btn-next, .tut-btn-done {
  background: linear-gradient(135deg, #534AB7, #667eea);
  color: #fff; box-shadow: 0 4px 12px rgba(83,74,183,0.3);
}
.tut-btn-next:hover, .tut-btn-done:hover { transform: translateY(-1px); }
.tut-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.tut-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #dee2e6; transition: all 0.3s;
}
.tut-dot.active { background: #534AB7; width: 18px; border-radius: 3px; }

/* 用户账号菜单 */
.user-menu { position: relative; display: inline-block; }
.user-menu-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px;
  padding: 0 10px; border-radius: 16px;
  border: 1px solid rgba(83,74,183,0.15); background: #fff;
  font-size: 12px; color: #1a1a2e; cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.user-menu-toggle:hover {
  background: #f8f9fc;
  border-color: rgba(83,74,183,0.3);
  box-shadow: 0 2px 8px rgba(83,74,183,0.10);
  transform: translateY(-1px);
}
.user-menu-toggle:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(83,74,183,0.06);
}
.user-avatar { font-size: 13px; }
.user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.user-caret { font-size: 9px; color: #adb5bd; margin-left: 2px; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 190px; background: #fff; border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15); padding: 8px 0;
  z-index: 500;
  animation: fadeIn 0.2s;
}
.user-dropdown-header {
  padding: 8px 16px; font-size: 12px; color: #adb5bd;
  border-bottom: 1px solid #f1f3f5; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-dropdown-item {
  display: block; width: 100%; padding: 9px 16px;
  background: none; border: none; text-align: left;
  font-size: 13px; color: #495057; cursor: pointer;
  transition: background 0.15s; white-space: nowrap;
}
.user-dropdown-item:hover { background: #f8f9fc; color: #1a1a2e; }
[data-theme="dark"] .user-menu-toggle { background: #2a2a3e; border-color: rgba(255,255,255,0.1); color: #f1f1f1; }
[data-theme="dark"] .user-dropdown { background: #2a2a3e; }
[data-theme="dark"] .user-dropdown-header { color: #adb5bd; border-color: #3a3a4e; }
[data-theme="dark"] .user-dropdown-item:hover { background: #3a3a4e; }

@keyframes score-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* AI 辅导成绩对比 */
.tutor-comparison {
  margin-top: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f0f7ff, #e8f0fe);
  border-radius: var(--radius-md);
  border: 1px solid #c5d4f0;
}

.tutor-comparison-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.tutor-comparison-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.tutor-comparison-row span:last-child {
  font-weight: 700;
  color: var(--text-primary);
}

/* 音频播放器样式 */
#audio-playback {
  width: 100%;
  max-width: 320px;
  margin-top: 8px;
  border-radius: var(--radius-sm);
}

/* 短语等级标签 */
.phrase-level-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.phrase-level-badge.beginner {
  background: var(--secondary-light);
  color: var(--secondary);
}
.phrase-level-badge.intermediate {
  background: var(--accent-warm-light);
  color: var(--accent-warm);
}
.phrase-level-badge.advanced {
  background: var(--danger-light);
  color: var(--danger);
}


/* ===== 收藏与班级排名（桌面端新增 2026-07-28）===== */
.phrase-item { position: relative; padding-right: 34px; }
.phrase-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #c9a227;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: transform .15s ease, background .15s ease;
  z-index: 2;
}
.phrase-fav-btn:hover { background: rgba(201,162,39,.12); transform: scale(1.12); }
.phrase-fav-btn.faved { color: #f5b301; }

.fav-filter-bar { padding: 8px 12px 4px; }
.fav-filter-btn {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--card-bg, #fff);
  color: var(--text-secondary, #64748b);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
}
.fav-filter-btn:hover { border-color: #f5b301; color: #b8860b; }
.fav-filter-btn.active {
  background: #fff7e0;
  border-color: #f5b301;
  color: #b8860b;
  font-weight: 600;
}

.rank-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 18px 16px;
  margin: 8px 0;
}
.rank-card-title { font-size: 15px; font-weight: 700; color: var(--text-primary, #1e293b); margin-bottom: 12px; }
.rank-empty { font-size: 13px; color: var(--text-secondary, #64748b); text-align: center; padding: 12px 0; }
.rank-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.rank-tab {
  flex: 1;
  padding: 7px 0;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--card-bg, #fff);
  color: var(--text-secondary, #64748b);
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
}
.rank-tab.active { background: #eef2ff; border-color: #6366f1; color: #4338ca; font-weight: 600; }
.rank-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.rank-num { font-size: 30px; font-weight: 800; color: var(--primary, #1d9e75); }
.rank-of { font-size: 15px; font-weight: 500; color: var(--text-secondary, #64748b); margin-left: 4px; }
.rank-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}
.rank-bar {
  position: relative;
  height: 10px;
  background: var(--border, #e9ecef);
  border-radius: 999px;
  margin: 14px 0 22px;
}
.rank-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #1d9e75); border-radius: 999px; }
.rank-me {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: #4338ca;
  background: #fff;
  border: 1px solid #6366f1;
  border-radius: 999px;
  padding: 1px 6px;
  white-space: nowrap;
}
.rank-stats { display: flex; gap: 8px; }
.rank-stat {
  flex: 1;
  text-align: center;
  background: var(--bg-soft, #f8f9fa);
  border-radius: 10px;
  padding: 10px 4px;
}
.rank-rs-num { display: block; font-size: 18px; font-weight: 800; color: var(--text-primary, #1e293b); }
.rank-rs-label { display: block; font-size: 11px; color: var(--text-secondary, #64748b); margin-top: 2px; }

/* ===== 排名双卡并列（2026-07-28）===== RANK_DUAL_GRID_V1 */
.rank-grid { display: flex; flex-direction: column; gap: 14px; }
.rank-grid .rank-card { margin: 0; }

/* 标题行：左侧标题 + 右侧作用域 */
.rank-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.rank-card-title { margin-bottom: 0; }
.rank-card-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  background: var(--bg-soft, #f1f5f9);
  padding: 3px 10px;
  border-radius: 999px;
}

/* "差距"指示：上箭头=高于均值，平=持平，下箭头=低于均值 */
.rank-gap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border, #e2e8f0);
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  text-align: center;
}
.rank-gap.up { color: #1d9e75; font-weight: 600; }
.rank-gap.down { color: #d85a30; font-weight: 600; }
.rank-gap.flat { color: var(--text-secondary, #64748b); }

/* 底部提示卡 */
.rank-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f0f9ff, #eef2ff);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-secondary, #475569);
}
.rank-tip-icon { font-size: 16px; }
