
/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  position: relative;
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2.5px;
  background: var(--gradient-header);
  box-shadow: 0 0 20px var(--primary-overlay-hover), 0 0 40px var(--primary-overlay);
  transition: box-shadow var(--transition-base);
}

.avatar-ring:hover {
  box-shadow: 0 0 24px var(--primary-overlay-strong), 0 0 60px var(--primary-overlay);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface-avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar svg { width: 30px; height: 30px; }

.header-info { display: flex; flex-direction: column; gap: 1px; }

.title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  transition: all var(--transition-base);
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.2);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0; }
}

.status-text {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-normal);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: opacity var(--transition-base);
  padding: 6px 10px;
  border-radius: var(--radius-lg);
  background: var(--gradient-glass);
  border: 1px solid var(--surface-hover);
}

.volume-control:hover { opacity: 1; background: var(--gradient-glass-emphasis); }

.vol-icon { width: 16px; height: 16px; color: var(--text-muted); }

.volume-control input[type="range"] {
  width: 90px;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-300);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(196, 181, 253, 0.6), 0 0 20px var(--primary-overlay-strong);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.volume-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 14px rgba(196, 181, 253, 0.8), 0 0 28px var(--border-primary-hover);
}

.volume-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-300);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(196, 181, 253, 0.6);
}

/* ===== Welcome Screen ===== */
.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  gap: 0;
  justify-content: space-between;
}

.welcome-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.welcome-role-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* 主光晕 */
.welcome-glow {
  position: absolute;
  top: 0%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary-glow) 0%, var(--primary-overlay) 30%, transparent 60%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* 次级光晕 */
.welcome-glow-2 {
  position: absolute;
  top: 15%;
  left: 30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-avatar {
  position: relative;
  margin-bottom: 12px;
}

.welcome-avatar-inner {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--surface-avatar-glow);
  border: 2px solid var(--primary-overlay-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 30px var(--primary-overlay-hover), 0 0 60px var(--primary-overlay);
}

.welcome-avatar-inner svg { width: 48px; height: 48px; }

.welcome-ripple {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid var(--primary-overlay-hover);
  animation: ripple 3.5s ease-out infinite;
}

.welcome-ripple.delay { animation-delay: 1.5s; }

@keyframes ripple {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* 头像外围发光环 */
.welcome-avatar::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-overlay) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.welcome-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-tight);
  margin-bottom: 4px;
  background: var(--text-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(196, 181, 253, 0.15);
}

.welcome-role-title {
  font-size: var(--text-base);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
}

.call-btn {
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 40px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--white);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-smooth);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.call-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.call-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.45), inset 0 1px 0 rgba(255,255,255,0.15);
}

.call-btn:hover::before {
  left: 100%;
}

.call-btn:active { transform: translateY(0) scale(0.98); }

.call-btn-icon svg { width: 22px; height: 22px; }

/* 激活提示 */
.activation-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
}
.activation-prompt-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}
.activation-prompt-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(99, 102, 241, 0.08));
  color: #a78bfa;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.activation-prompt-btn:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.12));
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.15);
}

/* 开始对话按钮区 */
.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 480px;  /* 与 landing page 保持一致 */
  padding: 0 16px;
  margin-bottom: 8px;
}

/* 选择场景按钮 */
.scene-btn {
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border: 1.5px solid var(--surface-glass-hover);
  border-radius: var(--radius-full);
  background: var(--gradient-glass);
  color: var(--text);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: inherit;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.scene-btn:hover {
  border-color: var(--primary-overlay-strong);
  background: linear-gradient(145deg, var(--primary-overlay), var(--surface));
  transform: translateY(-1px);
}

.scene-btn:active {
  transform: translateY(0);
}

.scene-btn-icon {
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.scene-btn-icon svg {
  width: 20px;
  height: 20px;
}

/* 测评入口按钮：与选择场景并列，稍加高亮突出 */
.assess-entry-btn {
  border-color: var(--border-primary-hover);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.10), rgba(255, 255, 255, 0.02));
}
.assess-entry-btn:hover {
  border-color: var(--border-primary-strong);
  background: linear-gradient(145deg, var(--primary-overlay-hover), var(--surface-glass));
}
.assess-entry-tag {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--primary-300);
  background: var(--primary-overlay-hover);
  border-radius: var(--radius-xs);
  padding: 2px 8px;
  margin-left: 2px;
}

.welcome-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  padding: 8px 16px;
  letter-spacing: var(--tracking-normal);
  font-weight: var(--font-weight-normal);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.welcome-hint svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.6;
}

/* ===== Scene Selector ===== */
.scene-selector {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--bg-gradient);
  overflow: hidden;
}

.scene-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--surface-hover);
}

.scene-back-btn {
  will-change: transform;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--surface-emphasis);
  background: var(--gradient-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.scene-back-btn svg { width: 18px; height: 18px; }
.scene-back-btn:hover {
  color: var(--text);
  border-color: var(--primary-overlay-hover);
  background: linear-gradient(145deg, var(--primary-overlay), rgba(139, 92, 246, 0.02));
  transform: translateX(-2px);
}

.scene-selector-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}

.scene-header-spacer {
  width: 36px;
}

.scene-selector-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 0;
  -webkit-overflow-scrolling: touch;
}

.scene-selector-content::-webkit-scrollbar { width: 4px; }
.scene-selector-content::-webkit-scrollbar-thumb { background: var(--surface-emphasis); border-radius: 2px; }

/* 分类标签 */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 4px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 4px;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  will-change: transform;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--surface-emphasis);
  background: var(--gradient-glass);
  color: var(--text-secondary);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.category-tab:hover {
  border-color: var(--primary-overlay-hover);
  color: var(--text);
}

.category-tab.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 4px 16px var(--primary-overlay-strong);
}

/* 场景选择器底部 */
.scene-selector-footer {
  padding: 12px 16px 16px;
  flex-shrink: 0;
  border-top: 1px solid var(--surface-hover);
  background: var(--gradient-surface-bottom);
}

.assessment-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--gradient-glass);
  border: 1px solid var(--surface-emphasis);
  cursor: pointer;
  transition: all var(--transition-base);
  width: 100%;
  font-family: inherit;
  color: var(--text);
  text-align: left;
}

.assessment-entry:hover {
  border-color: var(--primary-overlay-hover);
  background: linear-gradient(145deg, var(--primary-overlay), var(--surface));
  transform: translateY(-1px);
}

.assessment-entry-icon {
  font-size: var(--text-2xl);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-300);
}
.assessment-entry-icon svg {
  width: 22px;
  height: 22px;
}

.assessment-entry-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.assessment-entry-label {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--text);
}

.assessment-entry-sublabel {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.assessment-entry-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.assessment-entry:hover .assessment-entry-arrow {
  color: var(--primary-300);
  transform: translateX(2px);
}

/* ===== Main Chat Area ===== */
.main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 78px; /* 底部留出电话式状态胶囊的空间，避免遮挡最后一条消息 */
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.messages::-webkit-scrollbar { width: 4px; }
.messages::-webkit-scrollbar-track { background: transparent; }
.messages::-webkit-scrollbar-thumb { background: var(--surface-emphasis); border-radius: 2px; }

/* Message Bubbles */
.message {
  display: flex;
  gap: 10px;
  max-width: 85%;
  animation: msgIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-assistant { align-self: flex-start; }

.message-label { display: none; }

.message-content {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: var(--text-md);
  line-height: 1.65;
  word-break: break-word;
  letter-spacing: var(--tracking-normal);
  font-weight: var(--font-weight-normal);
}

.message-user .message-content {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(109, 40, 217, 0.85));
  color: var(--white);
  border-bottom-right-radius: 8px;
  box-shadow: 0 4px 20px var(--primary-overlay-hover), inset 0 1px 0 rgba(255,255,255,0.1);
  font-weight: var(--font-weight-medium);
}

.message-assistant .message-content {
  background: var(--gradient-glass-emphasis);
  border: 1px solid var(--surface-emphasis);
  color: var(--text);
  border-bottom-left-radius: 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

.message-system {
  align-self: center;
  max-width: 90%;
}

.message-system .message-content {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-base);
  text-align: center;
  padding: 10px;
  letter-spacing: var(--tracking-normal);
}

/* Recording Indicator —— 电话式通话状态胶囊：横排、下移避免遮挡文字，全程可见传达"一直在听" */
.recording-indicator {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.16);
  pointer-events: none;
  z-index: 6;
}

/* AI 正在说：换红色调，和"正在聆听"形成明显区分 */
.recording-indicator.ai-speaking {
  background: rgba(255, 241, 242, 0.94);
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.18);
}
.recording-indicator.ai-speaking .wave-bars span {
  background: linear-gradient(180deg, #fda4af, #f43f5e);
  box-shadow: 0 0 5px rgba(244, 63, 94, 0.35);
}
.recording-indicator.ai-speaking .recording-text {
  color: #e11d48;
}

.wave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.wave-bars span {
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(196, 181, 253, 0.95), rgba(139, 92, 246, 0.55));
  animation: wave 1.1s ease-in-out infinite;
  box-shadow: 0 0 5px rgba(196, 181, 253, 0.25);
}

.wave-bars span:nth-child(1) { animation-delay: 0s; }
.wave-bars span:nth-child(2) { animation-delay: 0.1s; }
.wave-bars span:nth-child(3) { animation-delay: 0.2s; }
.wave-bars span:nth-child(4) { animation-delay: 0.3s; }
.wave-bars span:nth-child(5) { animation-delay: 0.4s; }
.wave-bars span:nth-child(6) { animation-delay: 0.5s; }
.wave-bars span:nth-child(7) { animation-delay: 0.4s; }
.wave-bars span:nth-child(8) { animation-delay: 0.3s; }
.wave-bars span:nth-child(9) { animation-delay: 0.2s; }
.wave-bars span:nth-child(10) { animation-delay: 0.1s; }

@keyframes wave {
  0%, 100% { height: 3px; opacity: 0.4; }
  50% { height: 12px; opacity: 1; }
}

.recording-text {
  font-size: 12px;
  line-height: 1;
  color: var(--primary-300);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
}

/* ===== Footer Controls ===== */
.footer {
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 10;
}

.footer::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(7, 5, 17, 0.9) 0%, transparent 100%);
  pointer-events: none;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.text-input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: var(--text-md);
  font-family: inherit;
  background: linear-gradient(145deg, var(--surface-glass), rgba(255, 255, 255, 0.02));
  color: var(--text);
  outline: none;
  transition: all var(--transition-base);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-xs);
}

.text-input::placeholder { color: var(--text-muted); font-weight: var(--font-weight-normal); }
.text-input:focus {
  border-color: var(--primary-overlay-strong);
  background: linear-gradient(145deg, var(--primary-overlay), rgba(139, 92, 246, 0.02));
  box-shadow: 0 0 20px var(--primary-overlay), var(--shadow-xs);
}

.send-btn {
  will-change: transform;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
  box-shadow: 0 2px 12px var(--primary-overlay-strong);
}

.send-btn svg { width: 20px; height: 20px; }
.send-btn:hover {
  background: var(--gradient-primary-hover);
  transform: scale(1.08);
  box-shadow: 0 4px 20px var(--border-primary-hover);
}
.send-btn:active { transform: scale(0.95); }

.control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mic-btn {
  will-change: transform;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: var(--gradient-glass);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.mic-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-overlay), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.mic-btn:hover:not(:disabled) {
  border-color: var(--primary-overlay-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.mic-btn:hover:not(:disabled)::before {
  opacity: 1;
}

.mic-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.mic-btn.recording {
  border-color: rgba(248, 113, 133, 0.4);
  background: linear-gradient(145deg, var(--danger-overlay-active), var(--danger-overlay));
  color: var(--danger);
  animation: micPulse 1.8s ease-in-out infinite;
  box-shadow: var(--shadow-danger-glow);
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 133, 0.3), 0 0 20px rgba(248, 113, 133, 0.1); }
  50% { box-shadow: 0 0 0 12px rgba(248, 113, 133, 0), 0 0 30px var(--danger-overlay-active); }
}

.end-btn {
  will-change: transform;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-danger);
  background: linear-gradient(145deg, var(--danger-overlay), rgba(248, 113, 133, 0.02));
  color: var(--danger);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.end-btn svg { width: 16px; height: 16px; transform: rotate(135deg); } /* 电话听筒旋转成"挂断"姿态 */
.end-btn:hover:not(:disabled) {
  background: linear-gradient(145deg, var(--danger-overlay-hover), var(--danger-overlay));
  border-color: var(--border-danger-hover);
  transform: translateY(-1px);
}
.end-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* 打断按钮（硬打断 AI 播报，不结束会话） */
.barge-btn {
  will-change: transform;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-overlay-strong);
  background: linear-gradient(145deg, var(--primary-overlay), rgba(139, 92, 246, 0.02));
  color: var(--primary-300);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.barge-btn svg { width: 16px; height: 16px; }
.barge-btn:hover:not(:disabled) {
  background: linear-gradient(145deg, var(--primary-overlay-hover), var(--primary-overlay));
  border-color: var(--border-primary-hover);
  transform: translateY(-1px);
}
.barge-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.barge-btn.active {
  background: linear-gradient(145deg, var(--primary-overlay-strong), var(--primary-glow));
  border-color: var(--border-primary-strong);
  box-shadow: 0 0 16px var(--primary-overlay-strong);
}

/* 语速调节按钮（R1：点击循环切换档位，通话中实时生效） */
.rate-btn {
  will-change: transform;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-overlay-strong);
  background: linear-gradient(145deg, var(--primary-overlay), rgba(6, 182, 212, 0.02));
  color: var(--primary-300);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}
.rate-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.rate-btn:hover:not(:disabled) {
  background: linear-gradient(145deg, var(--primary-overlay-hover), var(--primary-overlay));
  border-color: var(--border-primary-hover);
  transform: translateY(-1px);
}
.rate-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.rate-btn.active {
  background: linear-gradient(145deg, var(--primary-overlay-strong), var(--primary-glow));
  border-color: var(--border-primary-strong);
  box-shadow: 0 0 16px var(--primary-overlay-strong);
}

/* 语音输入模式按钮（手动开关 / 自动倾听） */
.mode-btn {
  will-change: transform;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--surface-emphasis);
  background: linear-gradient(145deg, var(--surface-hover), rgba(16, 185, 129, 0.04));
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
  white-space: nowrap;
  touch-action: manipulation;
}
.mode-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.mode-btn:hover:not(:disabled) {
  border-color: var(--primary-overlay-strong);
  color: var(--text);
}
.mode-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.mode-btn.manual {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.08), rgba(16, 185, 129, 0.04));
}

/* 语速选择面板（点击 rate-btn 弹出：自动联动 + 手动档位） */
.control-row {
  position: relative;
}
.rate-popover {
  position: absolute;
  right: 64px;
  bottom: calc(100% + 10px);
  width: 240px;
  max-width: calc(100vw - 32px);
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-strong, #1a1d2e);
  border: 1px solid var(--primary-overlay-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 60;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: msgIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.rate-popover-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: 10px;
}
.rate-popover-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rate-popover-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--surface-emphasis);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}
.rate-popover-option:hover {
  border-color: var(--primary-overlay-strong);
  background: var(--surface-hover);
}
.rate-popover-option.active {
  border-color: var(--border-primary-strong);
  background: var(--primary-overlay);
  color: var(--primary-300);
}
.rate-popover-opt-label {
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}
.rate-popover-opt-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rate-popover-hint {
  margin-top: 10px;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 语速分段控件（预留：详情页/设置页可复用的档位选择） */
.rate-options {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rate-option {
  padding: 4px 12px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
}
.rate-option:hover { color: var(--text); }
.rate-option.active {
  background: var(--primary-overlay-strong);
  color: #fff;
}

/* ===== 词汇量测试（R2）===== */
.vocab-quiz-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 32px;
  overflow-y: auto;
  gap: 20px;
  -webkit-overflow-scrolling: touch;
}

.vocab-word-card {
  text-align: center;
  padding: 32px 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--primary-overlay), rgba(6, 182, 212, 0.05));
  border: 1px solid var(--primary-overlay);
}

.vocab-word {
  font-size: 38px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  word-break: break-word;
}

.vocab-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* 词汇测试：每题限时倒计时（已按用户反馈移除，O27） */

/* ══════════ 英语水平测试中心（选择优先 · 口语/词汇可分别进入） ══════════ */
.level-test-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 引导语 */
.level-test-guide {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  padding: 0 10px;
}

/* 子测试卡片（整卡即入口，选择优先） */
.level-test-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.level-test-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--surface-emphasis);
  cursor: pointer;
  transition: all var(--transition-base);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.level-test-card:hover {
  border-color: var(--primary-overlay-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}
.level-test-card:active { transform: scale(0.99); }
.level-test-card:focus-visible {
  outline: 2px solid var(--primary-400, #a78bfa);
  outline-offset: 2px;
}
.level-test-card.tested {
  border-color: rgba(16, 185, 129, 0.35);
}
.level-test-card-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.10));
  border: 1px solid rgba(139, 92, 246, 0.2);
}
.level-test-card-main {
  flex: 1;
  min-width: 0;
}
.level-test-card-name {
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.level-test-card-time {
  font-size: 10px;
  font-weight: var(--font-weight-normal);
  color: var(--text-muted);
  background: var(--surface-hover);
  border: 1px solid var(--surface-emphasis);
  border-radius: 999px;
  padding: 1px 8px;
}
.level-test-card-desc {
  margin-top: 3px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}
.level-test-card-status {
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.level-test-card-status.done {
  color: #10b981;
  font-weight: var(--font-weight-semibold);
}
.level-test-card-cta {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.level-test-card:hover .level-test-card-cta {
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}
.level-test-card.tested .level-test-card-cta {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--surface-emphasis);
}

/* 综合结果摘要（下沉为底部，轻量化） */
.level-test-summary {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.04));
  border: 1px solid rgba(139, 92, 246, 0.18);
  text-align: center;
}
.level-test-summary.done {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.04));
}
.level-test-summary-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}
.level-test-summary-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}
.level-test-badge {
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
  font-variant-numeric: tabular-nums;
}
.level-test-badge.empty {
  background: var(--surface-emphasis);
  color: var(--text-muted);
  box-shadow: none;
}
.level-test-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text);
}
.level-test-detail {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.level-test-advice {
  margin-top: 8px;
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--surface-emphasis);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
}

/* 测完闭环：直接开始对话 */
.level-test-start-chat {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  touch-action: manipulation;
}
.level-test-start-chat:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.vocab-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vocab-option {
  text-align: left;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--surface-emphasis);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-md);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-base);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.vocab-option:hover {
  border-color: var(--primary-overlay-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.vocab-option.selected {
  border-color: var(--border-primary-strong);
  background: var(--primary-overlay);
  color: var(--primary-300);
}

/* V4：即时反馈（答对/答错 + 释义） */
.vocab-option.correct {
  border-color: rgba(16, 185, 129, 0.7);
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.vocab-option.wrong {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(248, 113, 113, 0.10);
  color: #f87171;
}
.vocab-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: var(--text-sm);
  line-height: 1.5;
  text-align: center;
  animation: msgIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.vocab-feedback.ok {
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}
.vocab-feedback.no {
  background: rgba(248, 113, 113, 0.10);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
}
/* V4：难度匹配指示 */
.vocab-est-level {
  margin-top: 10px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.vocab-est-level b {
  color: #a78bfa;
  font-weight: var(--font-weight-semibold);
}

/* V4：测量精度显示 */
.vocab-confidence {
  margin-top: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

.vocab-result-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 2px;
}

.vocab-result-count-num {
  font-size: 44px;
  font-weight: var(--font-weight-bold);
  background: linear-gradient(135deg, #a78bfa, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.vocab-result-count-unit {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* 词汇测试：阶段提示 */
.vocab-stage-hint {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--surface-hover);
  border: 1px dashed var(--surface-emphasis);
  border-radius: 10px;
  padding: 8px 12px;
}

/* 词汇测试："我不认识"选项（猜测控制） */
.vocab-dontknow {
  margin-top: 4px;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  border-style: dashed;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vocab-dontknow svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.vocab-dontknow:hover {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.06);
}
.vocab-dontknow.selected {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

/* 词汇测试：维度掌握度 */
.vocab-dims {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--surface-emphasis);
}
.vocab-dim-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.vocab-dim-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.vocab-dim-pct {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--primary-300);
}
.vocab-dim-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--surface-emphasis);
  overflow: hidden;
}
.vocab-dim-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #a78bfa, #06b6d4);
  transition: width 0.8s ease;
}

/* 词汇测试：百分位 + 考试对标 */
.vocab-percentile {
  margin-top: 10px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--success);
}
.vocab-exam {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 词汇测试：历史趋势 */
.vocab-history {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--surface-emphasis);
}
.vocab-history-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.vocab-history-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 110px;
}
.vocab-hist-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
  min-width: 0;
}
.vocab-hist-bar {
  width: 100%;
  max-width: 34px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #a78bfa, rgba(139, 92, 246, 0.35));
  min-height: 6px;
  transition: height 0.6s ease;
}
.vocab-hist-date {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}
.vocab-hist-val {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
}


/* ===== Header Buttons ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 级别徽章 + 下拉 */
.level-badge-wrap { position: relative; }
.level-badge-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 36px; height: 30px; padding: 0 10px;
  border: 1.5px solid var(--primary); border-radius: var(--radius-full);
  background: linear-gradient(145deg, rgba(139,92,246,0.1), rgba(6,182,212,0.08));
  color: var(--primary); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all var(--transition-smooth);
}
/* 徽章下拉箭头 */
.level-badge-btn::after {
  content: ''; display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--primary);
  opacity: 0.5; transition: opacity 0.15s;
}
.level-badge-btn:hover::after { opacity: 0.9; }
.level-badge-btn:hover {
  background: linear-gradient(145deg, rgba(139,92,246,0.2), rgba(6,182,212,0.15));
  box-shadow: 0 0 12px rgba(139,92,246,0.2);
}
.level-dropdown {
  position: absolute; top: 38px; left: 50%; transform: translateX(-50%); z-index: 100;
  min-width: 200px; padding: 6px;
  background: var(--surface); border: 1px solid var(--surface-emphasis);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.level-dropdown.hidden { display: none; }
.level-dropdown-item {
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--text-secondary); white-space: nowrap;
  transition: all 0.15s;
}
.level-dropdown-item:hover { background: var(--surface-hover); color: var(--text); }
.level-dropdown-item.active { background: rgba(139,92,246,0.1); color: var(--primary); font-weight: var(--font-weight-semibold); }

/* 窄屏下拉优化 */
@media (max-width: 400px) {
  .level-dropdown {
    min-width: 180px; left: 50%; transform: translateX(-50%);
  }
  .level-dropdown-item {
    padding: 7px 10px; font-size: 12px;
  }
}

.header-btn {
  will-change: transform;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--surface-emphasis);
  background: var(--gradient-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-btn svg { width: 18px; height: 18px; }
.header-btn:hover {
  color: var(--primary-300);
  border-color: var(--primary-overlay-hover);
  background: linear-gradient(145deg, var(--primary-overlay), rgba(139, 92, 246, 0.02));
  transform: translateY(-1px);
}

/* ===== Header 图标兼容（旧内核 fallback）=====
   百度浏览器兼容模式等旧内核（不支持 CSS Grid / 内联 SVG 渲染不稳）：
   默认显示 emoji fallback、隐藏 SVG；现代内核（@supports 生效）显示 SVG */
.header-btn-icon { display: none; }
.header-btn-fallback { display: inline-block; font-size: var(--text-lg); line-height: 1; }
@supports (display: grid) {
  .header-btn-icon { display: block; }
  .header-btn-fallback { display: none; }
}

/* ===== Usage Badge ===== */
.usage-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-overlay);
  border: 1px solid var(--primary-overlay-hover);
  font-size: var(--text-sm);
  color: var(--primary-300);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-normal);
}

.usage-badge.warning {
  background: var(--danger-overlay);
  border-color: rgba(248, 113, 133, 0.2);
  color: var(--danger);
  animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 133, 0.2); }
  50% { box-shadow: 0 0 0 4px rgba(248, 113, 133, 0); }
}

.usage-icon { width: 14px; height: 14px; }

/* ===== Scenario Grid ===== */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
  padding: 4px 8px;
}

.scenario-grid::-webkit-scrollbar { width: 4px; }
.scenario-grid::-webkit-scrollbar-thumb { background: var(--surface-emphasis); border-radius: 2px; }

.scenario-card {
  will-change: transform;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 14px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--surface-glass), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--surface-hover);
  cursor: pointer;
  transition: all var(--transition-expressive);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: left;
  position: relative;
  min-height: auto;
  overflow: visible;
}

.scenario-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--scenario-color, var(--primary)) 30%, var(--scenario-color, var(--primary)) 70%, transparent);
  border-radius: 0 0 2px 2px;
  opacity: 0.5;
  transition: opacity var(--transition-base);
}

.scenario-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-sm);
  padding: 1px;
  background: linear-gradient(135deg, var(--surface-hover) 0%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.01) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.scenario-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-glow);
  background: linear-gradient(145deg, var(--surface-glass), var(--surface));
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-overlay);
}

.scenario-card:hover::before {
  opacity: 1;
}

.scenario-card:hover::after {
  opacity: 1;
}

.scenario-card:active {
  transform: translateY(-1px);
  transition: all 0.1s ease;
}

.scenario-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.scenario-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  background: var(--surface-glass);
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.scenario-card:hover .scenario-icon {
  background: var(--primary-overlay);
  transform: scale(1.1);
}

.scenario-difficulty {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--surface-glass);
  border: 1px solid var(--surface-emphasis);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  flex-shrink: 0;
  letter-spacing: var(--tracking-wide);
  transition: all var(--transition-base);
}

.scenario-card:hover .scenario-difficulty {
  border-color: var(--primary-overlay-hover);
  color: var(--text);
}

.scenario-name {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
  letter-spacing: var(--tracking-normal);
}

.scenario-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.45;
  word-break: break-word;
  font-weight: var(--font-weight-normal);
  letter-spacing: var(--tracking-normal);
}

/* ===== Correction Card ===== */
.correction-card {
  margin: 4px 0 4px 50px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.06), rgba(251, 191, 36, 0.02));
  border: 1px solid rgba(251, 191, 36, 0.15);
  font-size: var(--text-base);
  animation: msgIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.correction-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  color: var(--warning);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.correction-original {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: var(--text-base);
  font-weight: var(--font-weight-normal);
}

.correction-arrow {
  color: var(--warning);
  margin: 0 6px;
  font-size: var(--text-sm);
}

.correction-corrected {
  color: var(--success);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-base);
}

.correction-reason {
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  letter-spacing: var(--tracking-normal);
}

/* ===== New Word Card ===== */
.newword-card {
  margin: 4px 0 4px 50px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.02));
  border: 1px solid rgba(16, 185, 129, 0.15);
  font-size: var(--text-base);
  animation: msgIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.newword-label {
  font-size: var(--text-xs);
  color: #10b981;
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}
.newword-word {
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.newword-def {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ===== 中文助教解释卡（双角色 R6/R7） ===== */
.zh-explain-card {
  margin: 4px 0 4px 50px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.02));
  border: 1px solid rgba(139, 92, 246, 0.2);
  animation: msgIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.zh-explain-label {
  font-size: var(--text-xs);
  color: #a78bfa;
  font-weight: var(--font-weight-semibold);
  margin-bottom: 4px;
  letter-spacing: var(--tracking-wider);
}
.zh-explain-text {
  font-size: var(--text-base);
  color: var(--text);
  line-height: 1.55;
}

/* ===== 生词句复述卡（已按产品反馈移除，O14） ===== */

/* ===== Gate Close Button ===== */
.gate-close-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-base);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.gate-close-btn:hover { color: var(--text-secondary); border-color: var(--text-muted); }

/* ===== Dialog Detail ===== */
.dialog-detail-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  background: var(--bg);
}

.dialog-detail-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dialog-detail-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.dialog-detail-content::-webkit-scrollbar { width: 4px; }
.dialog-detail-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.dialog-detail-message {
  margin-bottom: 10px;
  max-width: 85%;
}

.dialog-detail-message.user {
  align-self: flex-end;
  margin-left: auto;
}

.dialog-detail-message.assistant {
  align-self: flex-start;
}

.dialog-detail-message .msg-role {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 4px;
}

.dialog-detail-message .msg-text {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  line-height: 1.5;
}

.dialog-detail-message.user .msg-text {
  background: var(--gradient-primary);
  color: var(--white);
  border-bottom-right-radius: 6px;
}

.dialog-detail-message.assistant .msg-text {
  background: var(--surface-hover);
  border: 1px solid var(--border-glass);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

/* ===== Persona Selector (卡片网格，每张卡片含头像+名字+角色说明) ===== */
.persona-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin: 12px 0 8px;
  padding: 4px;
}

.persona-card {
  will-change: transform;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--gradient-glass);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  min-width: 0;
}

.persona-card:hover {
  background: var(--gradient-glass-emphasis);
  border-color: var(--primary-overlay-strong);
}

.persona-card.active {
  background: linear-gradient(135deg, var(--persona-color-1, var(--primary-500)), var(--persona-color-2, var(--primary-700)));
  border-color: transparent;
  box-shadow: 0 4px 20px var(--persona-glow, var(--primary-overlay-strong));
}

.persona-card.active .persona-name { color: var(--white); }
.persona-card.active .persona-tagline { color: rgba(255, 255, 255, 0.75); }

.persona-avatar {
  will-change: transform;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--persona-color-1, var(--primary-500)), var(--persona-color-2, var(--primary-700)));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.persona-card:hover .persona-avatar { transform: scale(1.06); }

.persona-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--persona-color-1, var(--primary-500)), var(--persona-color-2, var(--primary-700)));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.persona-avatar-inner svg {
  width: 24px;
  height: 24px;
}

.persona-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.persona-name {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  line-height: 1.2;
}

.persona-tagline {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 口音徽章（R10：美音/英音） */
.persona-accent-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  padding: 1px 5px;
  margin-left: 6px;
  border-radius: 999px;
  vertical-align: 1px;
  letter-spacing: 0.5px;
}
.persona-accent-badge.accent-us {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.persona-accent-badge.accent-uk {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.persona-card.active .persona-accent-badge.accent-us {
  color: #fff; background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.3);
}
.persona-card.active .persona-accent-badge.accent-uk {
  color: #fff; background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.3);
}

/* Role switching transition */
.welcome-title,
.welcome-role-title {
  transition: opacity 0.3s, transform 0.3s;
}

.welcome-title.switching,
.welcome-role-title.switching {
  opacity: 0;
  transform: translateY(-4px);
}

/* Role theme on welcome avatar */
.welcome-avatar-inner {
  transition: background 0.5s ease;
}

/* Role-specific message label colors */
.message-assistant.emma .message-label { color: var(--primary-300); }
.message-assistant.david .message-label { color: #7dd3fc; }
.message-assistant.lucy .message-label { color: #fcd34d; }
.message-assistant.dr_chen .message-label { color: #6ee7b7; }
.message-assistant.noah .message-label { color: #67e8f9; }

/* ===== Recommend Section ===== */
.recommend-section {
  width: 100%;
  margin-bottom: 16px;
}

.recommend-section.hidden {
  display: none;
}

/* ===== Assessment View (独立全屏视图) ===== */
.assessment-view {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  background: var(--bg-gradient);
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.assessment-view.hidden {
  opacity: 0;
  pointer-events: none;
}

.assessment-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 480px;
  margin: 0 auto;
  background: transparent;
  border-radius: 0;
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.assessment-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.assessment-page.hidden {
  display: none !important;
}

/* 欢迎页顶部导航栏 */
.assessment-welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  width: 100%;
  flex-shrink: 0;
}

/* ── 新版评估欢迎页 ── */
.assess-welcome-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.assess-welcome-halo {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 140px;
  background: radial-gradient(ellipse 50% 80% at 50% 0%, rgba(139,92,246,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.assess-welcome-badge {
  position: relative;
  width: 110px; height: 110px;
  margin: 16px auto 20px;
}

.assess-badge-ring {
  position: absolute;
  inset: 0;
}

.assess-badge-ring svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
  animation: badgeSpin 20s linear infinite;
}

@keyframes badgeSpin {
  from { transform: rotate(-90deg); }
  to { transform: rotate(270deg); }
}

.assess-badge-icon {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(109,40,217,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: 0 0 30px rgba(124,58,237,0.25), inset 0 0 20px rgba(255,255,255,0.02);
}

.assess-welcome-title {
  font-size: 22px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

.assess-welcome-sub {
  font-size: var(--text-base);
  color: var(--text-muted);
  margin: 0 0 28px;
  line-height: 1.5;
  max-width: 280px;
}

/* ── Feature List ── */
.assess-feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 24px;
}

.assess-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all var(--transition-base);
}

.assess-feature-item:hover {
  background: rgba(139,92,246,0.06);
  border-color: rgba(139,92,246,0.15);
}

.assess-feature-dot {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(6,182,212,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.assess-feature-body {
  flex: 1;
  text-align: left;
}

.assess-feature-label {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: 2px;
}

.assess-feature-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Exam Preview Tags ── */
.assess-exam-preview {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.assess-exam-tag {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
}

/* ── Start CTA ── */
.assess-start-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--white);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(124,58,237,0.3);
  position: relative;
  overflow: hidden;
}

.assess-start-btn svg { width: 20px; height: 20px; }

.assess-start-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: btnShine 3s ease-in-out infinite;
}

.assess-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,58,237,0.45);
}

.assess-start-btn:active { transform: translateY(0) scale(0.98); }

/* ── Share Row ── */
.assess-share-row {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.assess-share-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
}

.assess-share-link svg { width: 16px; height: 16px; }

.assess-share-link:hover {
  color: var(--primary-300);
  background: rgba(139,92,246,0.1);
}

/* ── Trust Text ── */
.assess-trust-text {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.5;
  margin: 16px 0 8px;
}

/* 旧版按钮（推荐页继续使用） */
.assessment-btn {
  will-change: transform;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--white);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: inherit;
  box-shadow: 0 8px 32px rgba(124,58,237,0.3);
}

.assessment-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,58,237,0.45);
}

.assessment-btn:active { transform: translateY(0) scale(0.98); }

.assessment-btn.secondary {
  background: var(--gradient-glass-emphasis);
  border: 1px solid var(--surface-emphasis);
  color: var(--text);
  box-shadow: none;
}

/* Assessment Chat */
.assessment-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-hover);
  flex-shrink: 0;
}

.assessment-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--surface-emphasis);
  background: var(--gradient-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
}

.assessment-back svg { width: 18px; height: 18px; }

.assessment-chat-title {
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
}

.assessment-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 评估页面音量控制 */
.volume-control.assessment-vol {
  padding: 4px 8px;
}
.volume-control.assessment-vol input[type="range"] {
  width: 60px;
}

.assessment-timer {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.15);
}

.assessment-timer.urgent {
  color: var(--danger);
  background: rgba(248,113,133,0.1);
  border-color: rgba(248,113,133,0.25);
  animation: timerUrgent 1s ease-in-out infinite;
}

@keyframes timerUrgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Progress Bar + Dots ── */
.assessment-progress-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.assessment-progress-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.assessment-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
  transition: width 0.5s ease;
}

.assessment-progress-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.prog-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.15);
  transition: all 0.3s ease;
}

.prog-dot.done {
  background: var(--primary-500);
  border-color: var(--primary-400);
  box-shadow: 0 0 8px rgba(139,92,246,0.4);
}

.prog-dot.current {
  border-color: var(--primary-300);
  box-shadow: 0 0 12px rgba(139,92,246,0.5);
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

.assessment-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assessment-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: var(--text-base);
  line-height: 1.5;
}

.assessment-msg.ai {
  align-self: flex-start;
  background: linear-gradient(145deg, var(--primary-overlay), rgba(6, 182, 212, 0.05));
  border: 1px solid var(--primary-overlay);
  color: var(--text);
}

.assessment-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary-overlay-hover), var(--primary-overlay));
  color: var(--white);
}

.assessment-msg.system {
  align-self: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: none;
  padding: 4px 12px;
}

.assessment-chat-controls {
  padding: 12px 16px;
  border-top: 1px solid var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.assessment-auto-mic-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.mic-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: micPulse 1.5s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.assessment-end-btn {
  padding: 10px 20px;
  border: 1px solid var(--surface-emphasis);
  border-radius: var(--radius-full);
  background: var(--gradient-glass);
  color: var(--text-secondary);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-base);
}

.assessment-end-btn:hover {
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

/* ============================================================
   New Assessment Result Page — Share-worthy design
   ============================================================ */

/* ── Result Card Container ── */
.result-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 32px 24px 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(20,12,40,0.95) 0%, rgba(10,6,24,0.98) 100%);
  border: 1px solid rgba(139,92,246,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  overflow: hidden;
}

/* ── Top halo glow ── */
.result-halo {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 150px;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(139,92,246,0.25) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Badge — large circular progress ── */
.result-badge-wrap {
  position: relative;
  width: 120px; height: 120px;
  margin-bottom: 4px;
}

.result-badge-ring {
  position: absolute;
  inset: 0;
}

.result-badge-arc {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}

.result-badge-inner {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(109,40,217,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(124,58,237,0.3), inset 0 0 20px rgba(255,255,255,0.03);
}

.result-level-letter {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #e9d5ff, #a78bfa, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  animation: levelReveal 0.6s cubic-bezier(0.16,1,0.3,1);
}

@keyframes levelReveal {
  from { opacity: 0; transform: scale(0.5); filter: blur(4px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

.result-level-name {
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin: 0;
}

.result-score {
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  color: var(--primary-300);
  margin-top: -8px;
}

.result-tagline {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.6);
  margin: -4px 0 0;
  font-style: italic;
  max-width: 280px;
}

.result-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
  margin: 0;
}

/* ── CEFR Progress Bar ── */
.result-cefr-bar {
  width: 100%;
  padding: 0 8px;
}

.result-cefr-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  overflow: visible;
  margin: 24px 0 28px;
}

.result-cefr-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #7c3aed, #a78bfa, #06b6d4);
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 12px rgba(124,58,237,0.5);
}

.result-cefr-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  font-weight: var(--font-weight-semibold);
  transition: all 0.4s;
}

.result-cefr-marker.active {
  color: #fff;
  font-size: 12px;
  text-shadow: 0 0 8px rgba(167,139,250,0.8);
}

.marker-a1  { left: 5%; }
.marker-a2  { left: 21%; }
.marker-b1  { left: 38%; }
.marker-b2  { left: 55%; }
.marker-c1  { left: 72%; }
.marker-c2  { left: 89%; }

/* O70（0916 #3）：等级统一为 1-9 级后的标记位置（L1-L9 均匀分布） */
.marker-l1 { left: 3%; }
.marker-l2 { left: 14%; }
.marker-l3 { left: 25%; }
.marker-l4 { left: 36%; }
.marker-l5 { left: 47%; }
.marker-l6 { left: 58%; }
.marker-l7 { left: 69%; }
.marker-l8 { left: 80%; }
.marker-l9 { left: 91%; }

/* ── Exam Cards ── */
.result-exam-cards {
  display: flex;
  gap: 8px;
  width: 100%;
}

.result-exam-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all var(--transition-base);
}

.result-exam-card:hover {
  background: rgba(139,92,246,0.08);
  border-color: rgba(139,92,246,0.2);
}

.result-exam-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.result-exam-name {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
}

.result-exam-value {
  font-size: 13px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  background: linear-gradient(135deg, var(--primary-300), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Stats Row ── */
.result-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 8px;
  background: rgba(255,255,255,0.02);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.04);
}

.result-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.result-stat-num {
  font-size: 22px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
}

.result-stat-txt {
  font-size: 11px;
  color: var(--text-muted);
}

.result-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.06);
}

/* ── Fun Fact ── */
.result-fun-fact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(245,158,11,0.04));
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: 14px;
  width: 100%;
}

.result-fun-emoji {
  font-size: 20px;
  flex-shrink: 0;
}

.result-fun-text {
  font-size: var(--text-sm);
  color: rgba(251,191,36,0.9);
  font-weight: var(--font-weight-medium);
}

/* ── Action Buttons ── */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.result-btn {
  will-change: transform;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.result-btn svg { width: 18px; height: 18px; }

.result-btn.share-btn {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.1);
}

.result-btn.share-btn:hover {
  background: linear-gradient(135deg, #334155, #475569);
  transform: translateY(-2px);
}

.result-btn.continue-btn {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 6px 24px rgba(124,58,237,0.25);
}

.result-btn.continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(124,58,237,0.4);
}

.result-btn:active { transform: translateY(0) scale(0.98); }

/* ── Share hint ── */
.result-share-hint {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.5;
  margin: -4px 0 0;
}

/* Hide old result elements */
.assessment-result-badge,
.assessment-level-card,
.assessment-level-mapping { display: none !important; }

/* Assessment Recommend Grid */
.assessment-recommend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 24px;
}

/* Report Overlay */
.report-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px;
}

.report-overlay.hidden {
  display: none !important;
}

.report-panel {
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-radius: 24px;
  border: 1px solid var(--primary-overlay);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-overlay);
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--surface-hover);
  flex-shrink: 0;
}

.report-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
}

.report-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--surface-emphasis);
  background: var(--gradient-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.report-close:hover {
  border-color: var(--primary-overlay-hover);
  color: var(--text);
}

.report-close svg { width: 16px; height: 16px; }

.report-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
}

.report-score-section {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.report-score-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--primary-glow) 0%, var(--primary-overlay) 40%, transparent 70%);
  pointer-events: none;
}

.report-score-section > * {
  position: relative;
  z-index: 1;
}

.report-big-score {
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-300), var(--primary-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

/* ---- 新版报告：概览区 ---- */
.report-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--surface-hover);
}
.report-overview-left { display: flex; flex-direction: column; gap: 6px; }
.report-scenario-badge { display: flex; align-items: center; gap: 6px; font-size: var(--text-base); font-weight: var(--font-weight-semibold); color: var(--text); }
.report-scenario-icon { font-size: 18px; }
.report-engagement { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: var(--font-weight-medium); }
.report-engagement-dot { width: 8px; height: 8px; border-radius: 50%; }
.report-engagement.level-high .report-engagement-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.report-engagement.level-high { color: var(--success); }
.report-engagement.level-medium .report-engagement-dot { background: var(--primary-400); box-shadow: 0 0 6px var(--primary-400); }
.report-engagement.level-medium { color: var(--primary-400); }
.report-engagement.level-low .report-engagement-dot { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.report-engagement.level-low { color: var(--warning); }
.report-engagement.level-none .report-engagement-dot { background: var(--text-tertiary); box-shadow: none; }
.report-engagement.level-none { color: var(--text-tertiary); }
.report-duration-badge { font-size: var(--text-sm); color: var(--text-secondary); padding: 4px 12px; border-radius: var(--radius-full); background: var(--surface-hover); }

/* ---- CEFR 等级 + 趋势 ---- */
.report-cefr-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-hover); }
.report-cefr-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 24px; padding: 0 8px; border-radius: var(--radius-full); background: linear-gradient(145deg, var(--primary), var(--primary-400)); color: #fff; font-size: 12px; font-weight: var(--font-weight-bold); }
.report-cefr-label { font-size: var(--text-xs); color: var(--text-secondary); }
.report-trend { font-size: var(--text-xs); margin-left: auto; }
.report-trend.up { color: var(--success); font-weight: var(--font-weight-semibold); }
.report-trend.new { color: var(--primary); font-weight: var(--font-weight-semibold); }

/* ---- 新版报告：数据卡片 ---- */
.report-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.report-stats-empty .report-stat-value { color: var(--text-tertiary); }
.report-stat {
  text-align: center;
  padding: 14px 8px;
  border-radius: 16px;
  background: var(--surface-hover);
  border: 1px solid transparent;
  transition: border-color var(--transition-base);
}
.report-stat:hover { border-color: var(--primary-overlay-hover); }
.report-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.report-stat-value#report-duration {
  font-size: 20px;
  background: linear-gradient(135deg, var(--primary-300), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.report-stat-value#report-corrections { color: var(--warning); }
.report-stat-value#report-new-words { color: var(--success); }
.report-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: var(--font-weight-medium);
}

.report-dimension {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-dimension-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-dimension-name {
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.report-dimension-value {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
}

.report-dimension-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-glass);
  overflow: hidden;
}

.report-dimension-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.8s ease;
}

.report-corrections {
  margin-bottom: 20px;
}

.report-section-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: 12px;
}

/* 练习报告评分条 */
.report-score-grid { display: flex; flex-direction: column; gap: 8px; }
.report-score-item { display: flex; align-items: center; gap: 8px; }
.report-score-label { width: 36px; font-size: 12px; color: var(--text-secondary); text-align: right; flex-shrink: 0; }
.report-score-bar { flex: 1; height: 8px; background: var(--bg-tertiary); border-radius: var(--radius-full); overflow: hidden; }
.report-score-fill { height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--primary), var(--primary-light, #0ea5e9)); transition: width 0.6s ease; }
.report-score-val { width: 28px; font-size: 12px; font-weight: var(--font-weight-semibold); color: var(--primary); text-align: left; flex-shrink: 0; }

.report-correction-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02));
  border: 1px solid rgba(239, 68, 68, 0.08);
  margin-bottom: 8px;
}

.report-correction-original {
  font-size: var(--text-base);
  color: var(--danger);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.report-correction-fixed {
  font-size: var(--text-base);
  color: var(--success);
}

.report-vocabulary {
  margin-bottom: 20px;
}

.report-vocab-item {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, var(--primary-overlay), rgba(6, 182, 212, 0.05));
  border: 1px solid var(--primary-overlay);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0 4px 6px 0;
}

.report-advice {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--gradient-glass);
  border: 1px solid var(--surface-glass);
}

.report-advice-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 新学词汇区块 */
.report-vocab-section {
  margin-bottom: 4px;
}

.report-vocab-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: 12px;
}

.report-vocab-list {
  display: flex;
  flex-wrap: wrap;
}

/* 报告底部操作按钮 */
.report-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--surface-hover);
  flex-shrink: 0;
  background: linear-gradient(to top, rgba(7, 5, 17, 0.5), transparent);
}

.report-btn {
  will-change: transform;
  flex: 1;
  padding: 13px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--white);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: inherit;
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.25);
}

.report-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(124, 58, 237, 0.4);
}

.report-btn:active { transform: translateY(0) scale(0.98); }

.report-btn.secondary {
  background: var(--gradient-glass-emphasis);
  border: 1px solid var(--surface-emphasis);
  color: var(--text);
  box-shadow: none;
}

.report-btn.secondary:hover {
  border-color: var(--primary-overlay-strong);
  background: linear-gradient(145deg, var(--primary-overlay), var(--surface));
  box-shadow: none;
}

/* ===== History Panel ===== */
.history-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity var(--transition-base);
}

.history-overlay.hidden {
  display: none !important;
}

.history-panel {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--primary-overlay);
  border-bottom: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--surface-hover);
  flex-shrink: 0;
}

.history-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
}

.history-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--surface-emphasis);
  background: var(--gradient-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
}

.history-close svg { width: 16px; height: 16px; }

/* 历史记录筛选条 */
.history-filter-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--surface-hover); flex-shrink: 0; }
.history-search { flex: 1; height: 32px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--surface-emphasis); background: var(--surface); color: var(--text); font-size: var(--text-sm); outline: none; }
.history-search:focus { border-color: var(--primary); }
.history-search::placeholder { color: var(--text-tertiary); }
.history-filter { height: 32px; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid var(--surface-emphasis); background: var(--surface); color: var(--text); font-size: var(--text-sm); cursor: pointer; outline: none; }
.history-count { font-size: var(--text-xs); color: var(--text-tertiary); white-space: nowrap; }

.history-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.history-item {
  will-change: transform;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--gradient-glass);
  border: 1px solid var(--surface-glass);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.history-item:hover {
  border-color: var(--primary-overlay);
  background: linear-gradient(145deg, var(--primary-overlay), rgba(139, 92, 246, 0.02));
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.history-item-scenario {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
}

.history-item-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.history-item-scores {
  display: flex;
  gap: 6px;
}

.history-score-badge {
  font-size: var(--text-xs);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
}

.history-score-badge.score {
  background: linear-gradient(135deg, var(--primary-overlay-hover), rgba(6, 182, 212, 0.1));
  color: var(--accent);
}

.history-score-badge.level {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
  color: var(--warning);
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: var(--text-base);
}

/* Detail overlay */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px;
}

.detail-overlay.hidden {
  display: none !important;
}

.detail-card {
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--primary-overlay);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-overlay);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-hover);
  flex-shrink: 0;
}

.detail-title {
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
}

.detail-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--surface-emphasis);
  background: var(--gradient-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
}

.detail-close svg { width: 14px; height: 14px; }

.detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ===== Gate Overlay ===== */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px;
}

.gate-overlay.hidden {
  display: none !important;
}

.gate-card {
  width: 100%;
  max-width: 360px;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-radius: 24px;
  border: 1px solid var(--primary-glow);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-overlay), 0 0 60px var(--primary-overlay);
}

.gate-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-overlay-hover), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  margin: 0 auto 16px;
  color: var(--primary-300);
}
.gate-icon svg {
  width: 28px;
  height: 28px;
}

.gate-title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin-bottom: 8px;
}

.gate-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.gate-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--surface-emphasis);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: var(--text-md);
  font-family: inherit;
  text-align: center;
  letter-spacing: var(--tracking-wide);
  margin-bottom: 12px;
  outline: none;
  transition: border-color var(--transition-base);
}

.gate-input:focus {
  border-color: var(--primary-overlay-strong);
  box-shadow: 0 0 0 3px var(--primary-overlay);
}

.gate-input::placeholder {
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
}

.gate-error {
  font-size: var(--text-sm);
  color: var(--danger);
  margin-bottom: 12px;
  text-align: center;
}

.gate-btn {
  will-change: transform, opacity;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--white);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
  margin-bottom: 16px;
}

.gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}

.gate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.gate-buy-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #10b981, #059669);
  color: var(--white);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
  margin-bottom: 12px;
}

.gate-buy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
}

.gate-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 8px 0;
}

.gate-divider::before,
.gate-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--surface-hover);
}

.gate-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

.gate-plans {
  display: none;
}

.recommend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}

.recommend-title {
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}

.recommend-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 0 4px;
}

/* Recommended card fix - ensure proper layout */
.recommend-card {
  will-change: transform;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--primary-overlay), rgba(6, 182, 212, 0.04));
  border: 1px solid var(--primary-glow);
  cursor: pointer;
  transition: all var(--transition-smooth);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.recommend-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.recommend-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  opacity: 0.5;
  transition: opacity var(--transition-base);
}

.recommend-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-overlay-hover);
  background: linear-gradient(145deg, var(--primary-glow), rgba(6, 182, 212, 0.06));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--primary-overlay);
}

.recommend-card:hover::before { opacity: 1; }
.recommend-card:active { transform: translateY(-1px); transition: all 0.1s ease; }

.recommend-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.9), rgba(6, 182, 212, 0.85));
  color: var(--white);
  font-size: 9px;
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-wide);
  z-index: 5;
  box-shadow: 0 2px 8px rgba(34, 211, 238, 0.3);
}

.recommend-card-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-overlay-hover), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
}

.recommend-card-name {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}

.recommend-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommend-card-reason {
  font-size: 10px;
  color: var(--accent);
  margin-top: 2px;
  font-weight: var(--font-weight-medium);
}

/* ============================================================
   Streak / Check-in Panel
   ============================================================ */
.streak-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.streak-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.streak-panel {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: linear-gradient(180deg, #0f0a1e 0%, #1a1025 100%);
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--primary-overlay);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform var(--transition-expressive);
}

.streak-overlay:not(.hidden) .streak-panel {
  transform: translateY(0);
}

.streak-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
  flex-shrink: 0;
}

.streak-title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}

.streak-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface-hover);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.streak-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.streak-close svg {
  width: 18px;
  height: 18px;
}

.streak-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Current streak big number */
.streak-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
}

.streak-number {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-300), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.streak-unit {
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
}

.streak-label {
  font-size: var(--text-base);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Calendar grid */
.streak-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 4px;
}

.streak-day-header {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  padding: 4px 0 8px;
}

.streak-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--surface-glass);
  transition: all var(--transition-fast);
}

.streak-day.active {
  background: linear-gradient(135deg, var(--primary-overlay-strong), rgba(109, 40, 217, 0.4));
  border-color: var(--primary-overlay-strong);
  color: var(--text);
  font-weight: var(--font-weight-semibold);
}

.streak-day.active-light {
  background: linear-gradient(135deg, var(--primary-overlay-hover), rgba(109, 40, 217, 0.2));
  border-color: var(--primary-overlay-hover);
  color: var(--primary-300);
}

.streak-day.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), inset 0 0 8px rgba(34, 211, 238, 0.1);
  color: var(--accent);
}

.streak-day.today.active,
.streak-day.today.active-light {
  box-shadow: 0 0 0 1px var(--accent), inset 0 0 12px rgba(34, 211, 238, 0.15);
}

/* Summary stats */
.streak-summary {
  display: flex;
  justify-content: space-around;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-glass);
}

.streak-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.streak-summary-value {
  font-size: 22px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
}

.streak-summary-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Check-in button */
.streak-checkin-btn {
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--gradient-primary);
  color: white;
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.3);
}

.streak-checkin-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(109, 40, 217, 0.4);
}

.streak-checkin-btn:active {
  transform: translateY(0);
}

.streak-checkin-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   会员中心弹窗
   ============================================================ */

.user-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.user-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.user-panel {
  background: var(--bg-card, #1e1b2e);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 380px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform var(--transition-fast);
}

.user-overlay:not(.hidden) .user-panel {
  transform: scale(1);
}

.user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--surface-hover);
}

.user-title {
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary, #f4f4f5);
  margin: 0;
}

.user-close {
  background: none;
  border: none;
  color: var(--text-muted, var(--text-secondary));
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  transition: all var(--transition-fast);
}

.user-close:hover {
  color: var(--text-primary, #f4f4f5);
  background: var(--surface-emphasis);
}

.user-close svg {
  width: 22px;
  height: 22px;
}

.user-content {
  padding: 20px 24px 24px;
}

/* 空状态 */
.user-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 0;
  color: var(--text-muted, var(--text-secondary));
}

.user-empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.user-empty p {
  font-size: var(--text-base);
  margin: 0;
}

/* 会员卡片 */
.member-card {
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.member-card.active {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.15), var(--primary-overlay));
  border: 1px solid var(--primary-overlay-strong);
}

.member-card.expired {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.member-card.free {
  background: var(--surface-glass);
  border: 1px solid var(--surface-emphasis);
}

.member-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 12px;
}

.member-badge.active {
  background: var(--gradient-primary);
  color: white;
}

.member-badge.expired {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.member-badge.free {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted, var(--text-secondary));
}

.member-plan-name {
  font-size: 22px;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary, #f4f4f5);
  margin-bottom: 4px;
}

.member-expire-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--surface-hover);
}

.member-expire-label {
  font-size: var(--text-base);
  color: var(--text-muted, var(--text-secondary));
}

.member-expire-date {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary, #d4d4d8);
}

.member-remaining {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.member-remaining.warn {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

/* 激活码输入区 */
.member-activate-section {
  margin-top: 8px;
}

.member-activate-section p {
  font-size: var(--text-base);
  color: var(--text-muted, var(--text-secondary));
  margin: 0 0 10px;
}

.member-activate-input {
  display: flex;
  gap: 8px;
}

.member-activate-input input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface-glass);
  color: var(--text-primary, #f4f4f5);
  font-size: var(--text-base);
  outline: none;
  transition: border-color 0.2s;
}

.member-activate-input input:focus {
  border-color: var(--primary);
}

.member-activate-input input::placeholder {
  color: var(--text-muted, var(--text-muted));
}

.member-activate-input button {
  padding: 10px 18px;
  border-radius: var(--radius-xs);
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: white;
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.member-activate-input button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

.member-activate-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.member-activate-error {
  font-size: var(--text-sm);
  color: var(--danger);
  margin-top: 8px;
  min-height: 16px;
}

/* 购买入口 */
.member-buy-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--surface-hover);
}

.member-buy-title {
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}

.member-plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.member-plan {
  position: relative;
  padding: 16px 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  overflow: hidden;
}

.member-plan::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.3), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.member-plan:hover {
  border-color: rgba(139,92,246,0.35);
  background: linear-gradient(180deg, rgba(139,92,246,0.1) 0%, rgba(139,92,246,0.03) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.member-plan:hover::before { opacity: 1; }

.member-plan:active { transform: scale(0.97); }

/* 推荐套餐高亮 */
.member-plan.featured {
  border-color: rgba(139,92,246,0.3);
  background: linear-gradient(180deg, rgba(139,92,246,0.12) 0%, rgba(139,92,246,0.04) 100%);
}

.member-plan.featured::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent, rgba(167,139,250,0.6), transparent);
}

.member-plan-popular {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124,58,237,0.8), rgba(109,40,217,0.7));
  color: #fff;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.member-plan-icon {
  font-size: 22px;
  margin-bottom: 6px;
  line-height: 1;
}

.member-plan-name-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: 6px;
}

.member-plan-price {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #e9d5ff, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.member-plan-unit {
  display: block;
  font-size: 11px;
  font-weight: var(--font-weight-normal);
  color: var(--text-muted);
  margin-top: 3px;
  -webkit-text-fill-color: var(--text-muted);
}

.member-plan-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.3;
}

.member-buy-btn {
  will-change: transform;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: white;
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.25);
}

.member-buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(109, 40, 217, 0.35);
}

.member-buy-hint {
  font-size: var(--text-sm);
  color: var(--text-muted, var(--text-muted));
  text-align: center;
  margin: 10px 0 0;
}

/* 会员中心快捷入口 */
.user-quick-links {
  display: flex; gap: 12px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--surface-emphasis);
}
.user-quick-link {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 0; border-radius: var(--radius-sm);
  border: 1px solid var(--surface-emphasis);
  background: var(--gradient-glass);
  color: var(--text-secondary);
  font-size: var(--text-sm); cursor: pointer;
  transition: all var(--transition-base);
}
.user-quick-link:hover {
  color: var(--primary-300);
  border-color: var(--primary-overlay-hover);
  background: linear-gradient(145deg, var(--primary-overlay), rgba(139, 92, 246, 0.02));
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 6000;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--white);
  background: rgba(30, 30, 40, 0.95);
  border: 1px solid var(--surface-emphasis);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform var(--transition-bounce), opacity var(--transition-base);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(40, 30, 10, 0.95);
}

.toast-warning::before {
  content: '\26A0\FE0F  ';
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(10, 40, 20, 0.95);
}

.toast-success::before {
  content: '\2705  ';
}

/* ============================================================
   Mobile Adaptation (2026-08)
   移动端适配优化：触摸交互 / 安全区 / 窄屏布局 / 缺失样式修复
   ============================================================ */

/* --- 全局触摸与点击优化 --- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
.scenario-card,
.history-item,
.member-plan,
.recommend-card,
.category-tab,
.persona-avatar,
.header-btn,
.assessment-btn,
.streak-checkin-btn,
.gate-btn,
.gate-close-btn,
.landing-btn,
.send-btn,
.mic-btn,
.barge-btn,
.rate-btn,
.end-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* --- 修复：history.js 渲染的新结构子元素（此前无样式） --- */
.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 24px;
  -webkit-overflow-scrolling: touch;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary-glow), rgba(6, 182, 212, 0.06));
  border: 1px solid var(--primary-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.history-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-item-name {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-meta {
  display: flex;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.history-item-preview {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-delete {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--surface-hover);
  background: var(--surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.history-item-delete:hover {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.2);
  background: rgba(251, 113, 133, 0.08);
}

.history-item-delete svg {
  width: 15px;
  height: 15px;
}

/* --- 修复：report.js 渲染的词汇标签（此前无样式） --- */
.report-vocab-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, var(--primary-overlay), rgba(6, 182, 212, 0.05));
  border: 1px solid var(--primary-overlay);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0 4px 6px 0;
}

/* --- 修复：dialog-detail 被 history-overlay 遮挡（z-index 30 < 2000） --- */
.dialog-detail-overlay {
  position: fixed;
  z-index: 2100;
}

.dialog-detail-panel {
  padding-top: env(safe-area-inset-top);
}

/* --- Toast 窄屏不溢出 --- */
.toast {
  max-width: calc(100vw - 32px);
  white-space: normal;
  word-break: break-word;
  text-align: center;
}

/* --- Gate 卡片矮屏可滚动（键盘弹出时） --- */
.gate-card {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- 纠错卡片移动端去固定左边距 --- */
@media (max-width: 480px) {
  .correction-card {
    margin-left: 0;
    word-break: break-word;
  }

  /* 窄屏：底部控制栏紧凑布局（mic / 打断 / 语速 / 结束） */
  .control-row {
    gap: 10px;
  }

  .barge-btn,
  .rate-btn {
    padding: 8px 10px;
  }

  .barge-btn span,
  .rate-btn span {
    display: none;
  }

  .barge-btn,
  .rate-btn {
    width: 38px;
    justify-content: center;
    padding: 8px;
  }
}

/* --- iOS 安全区：底部面板与输入区 --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .scene-selector-footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .streak-content {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .history-panel {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .user-panel {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .report-panel {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ===== 新版练习报告样式（覆盖旧版） ===== */
.report-overview { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--surface-hover); }
.report-overview-left { display: flex; flex-direction: column; gap: 6px; }
.report-scenario-badge { display: flex; align-items: center; gap: 6px; font-size: var(--text-base); font-weight: var(--font-weight-semibold); color: var(--text); }
.report-scenario-icon { font-size: 18px; }
.report-engagement { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: var(--font-weight-medium); }
.report-engagement-dot { width: 8px; height: 8px; border-radius: 50%; }
.report-engagement.level-high .report-engagement-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.report-engagement.level-high { color: var(--success); }
.report-engagement.level-medium .report-engagement-dot { background: var(--primary); box-shadow: 0 0 6px var(--primary); }
.report-engagement.level-medium { color: var(--primary); }
.report-engagement.level-low .report-engagement-dot { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.report-engagement.level-low { color: var(--warning); }
.report-engagement.level-none .report-engagement-dot { background: var(--text-tertiary); box-shadow: none; }
.report-engagement.level-none { color: var(--text-tertiary); }
.report-duration-badge { font-size: var(--text-sm); color: var(--text-secondary); padding: 4px 12px; border-radius: var(--radius-full); background: var(--surface-hover); }
.report-section { margin-bottom: 20px; }
.report-section-title { font-size: var(--text-base); font-weight: var(--font-weight-semibold); color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.report-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-full); background: linear-gradient(145deg, var(--primary-overlay), rgba(6, 182, 212, 0.08)); font-size: 12px; font-weight: var(--font-weight-semibold); color: var(--primary); }
.report-corrections { display: flex !important; flex-direction: column; gap: 10px; margin-bottom: 12px !important; }
.report-correction-item { padding: 12px !important; border-radius: 12px; background: rgba(245, 158, 11, 0.06) !important; border: 1px solid rgba(245, 158, 11, 0.12) !important; margin-bottom: 0 !important; }
.report-correction-original { color: var(--warning); text-decoration: line-through; text-decoration-color: rgba(245, 158, 11, 0.4); }
.report-correction-arrow { color: var(--text-tertiary); margin: 0 6px; }
.report-correction-fixed { color: var(--success); font-weight: var(--font-weight-medium); }
.report-correction-reason { font-size: var(--text-xs); color: var(--text-tertiary); margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(245, 158, 11, 0.08); }
.report-advice { margin-top: 0 !important; padding: 16px; border-radius: 14px; background: linear-gradient(145deg, var(--primary-overlay), rgba(139, 92, 246, 0.04)); border: 1px solid var(--primary-overlay); }
.report-advice-title { font-size: var(--text-base); color: var(--primary); font-weight: var(--font-weight-semibold); margin-bottom: 6px; font-style: normal; }
.report-advice-text { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; margin: 0; font-style: normal !important; }
.report-vocab-list { display: flex; flex-wrap: wrap; gap: 6px; }
.report-vocab-tag { display: inline-block; padding: 4px 10px; border-radius: var(--radius-full); background: linear-gradient(145deg, var(--primary-overlay), rgba(6, 182, 212, 0.05)); border: 1px solid var(--primary-overlay); font-size: var(--text-sm); color: var(--text-secondary); }

/* ---- 旧版报告评分区隐藏（已弃用） ---- */
.report-score-section { display: none !important; }
.report-dimensions { display: none !important; }
.report-dimension { display: none !important; }

/* --- 窄屏：header 紧凑布局（usage-badge 显示时不溢出） --- */
@media (max-width: 400px) {
  .header {
    padding: 12px 12px;
  }

  .header-right {
    gap: 8px;
  }

  .header-btn {
    width: 32px;
    height: 32px;
  }

  .header-btn svg {
    width: 16px;
    height: 16px;
  }

  .usage-badge {
    padding: 3px 8px;
    font-size: var(--text-xs);
    white-space: nowrap;
  }

  .volume-control {
    padding: 4px 6px;
    gap: 4px;
  }

  .volume-control input[type="range"] {
    width: 60px;
  }

  .avatar-ring {
    width: 42px;
    height: 42px;
  }
}

/* --- 窄屏：2 列网格降级为 1 列 --- */
@media (max-width: 380px) {
  .scenario-grid,
  .assessment-recommend-grid {
    grid-template-columns: 1fr;
  }

  .member-plans {
    grid-template-columns: repeat(2, 1fr);
  }

  .welcome {
    padding: 10px 14px 14px;
  }

  .call-btn {
    padding: 14px 28px;
  }
}

/* --- 矮屏：欢迎页与 landing 压缩，避免内容溢出 --- */
@media (max-height: 700px) {
  .welcome-avatar-inner {
    width: 72px;
    height: 72px;
  }

  .welcome-avatar-inner svg {
    width: 40px;
    height: 40px;
  }

  .welcome-title {
    font-size: var(--text-2xl);
  }

  .welcome-glow {
    width: 300px;
    height: 300px;
  }

  .welcome-actions {
    gap: 8px;
  }

  .call-btn {
    padding: 12px 32px;
    font-size: var(--text-md);
  }

  /* 矮屏：角色卡片压缩 */
  .persona-selector {
    gap: 6px;
    margin: 8px 0 4px;
  }

  .persona-card {
    padding: 6px 8px;
    gap: 8px;
  }

  .persona-avatar {
    width: 34px;
    height: 34px;
  }

  .persona-avatar-inner svg {
    width: 20px;
    height: 20px;
  }
}

/* --- 超矮屏：隐藏角色说明行，仅保留头像+名字 --- */
@media (max-height: 560px) {
  .persona-tagline {
    display: none;
  }
}

/* --- 窄屏：assessment 对话头部与底部控制区 --- */
@media (max-width: 400px) {
  .assessment-header-right {
    gap: 8px;
  }

  /* 窄屏隐藏音量滑块，避免挤压计时/轮次 */
  .volume-control.assessment-vol {
    display: none;
  }

  .assessment-chat-header {
    padding: 10px 12px;
  }

  .assessment-timer {
    font-size: var(--text-base);
  }

  .assessment-chat-controls {
    padding: 10px 12px;
    gap: 8px;
  }

  .assessment-auto-mic-status {
    font-size: var(--text-sm);
  }

  .assessment-end-btn {
    padding: 9px 16px;
    font-size: var(--text-sm);
    white-space: nowrap;
  }
}

/* --- 安全区：assessment 底部控制区 --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .assessment-chat-controls {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

/* ============================================================
   Share Modal — 全平台分享弹窗
   ============================================================ */

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.share-modal.hidden { display: none !important; }

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.share-modal-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #1a1033 0%, #0d0820 100%);
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(139,92,246,0.2);
  border-bottom: none;
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUp 0.3s cubic-bezier(0.16,1,0.3,1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.share-modal-title {
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin: 0;
}

.share-modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.share-modal-close svg { width: 16px; height: 16px; }

/* ── Mini Preview Card ── */
.share-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(6,182,212,0.06));
  border: 1px solid rgba(139,92,246,0.15);
}

.share-preview-badge {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124,58,237,0.4), rgba(109,40,217,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(124,58,237,0.3);
}

.share-preview-level {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #e9d5ff, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.share-preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.share-preview-name {
  font-size: var(--text-md);
  font-weight: var(--font-weight-bold);
  color: var(--text);
}

.share-preview-score {
  font-size: var(--text-sm);
  color: var(--primary-300);
  font-weight: var(--font-weight-medium);
}

.share-preview-exams {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.share-preview-exams span {
  font-size: 11px;
  color: var(--text-muted);
}

.share-preview-exams b {
  color: var(--text-secondary);
  font-weight: var(--font-weight-semibold);
}

/* ── Share Link Box ── */
.share-link-box { margin-top: 16px; }
.share-link-input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--surface-emphasis); background: var(--surface-hover);
  color: var(--text-secondary); font-size: var(--text-sm); text-align: center;
  outline: none; user-select: all;
}

/* ── Action Buttons ── */
.share-action-btn {
  will-change: transform;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.share-action-btn svg { width: 20px; height: 20px; }

.share-action-btn.primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 6px 24px rgba(124,58,237,0.3);
}

.share-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(124,58,237,0.45);
}

.share-action-btn.secondary {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.1);
}

.share-action-btn.secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.share-action-btn:active { transform: scale(0.97); }

/* ── Hint ── */
.share-modal-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.6;
  margin: -4px 0 0;
}

/* ── Copy Success Toast ── */
.share-copied-toast {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  animation: toastPop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.share-copied-toast.hidden { display: none !important; }

/* ── 分享落地页 ── */
.share-landing {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #0f172a 0%, #1a1438 40%, #0f172a 100%);
}
.share-landing.hidden { display: none; }
.share-landing-bg {
  position: absolute; inset: 0; opacity: 0.4;
  background: radial-gradient(ellipse at 50% -20%, rgba(139,92,246,0.4), transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(6,182,212,0.15), transparent 50%);
}
.share-landing-content {
  position: relative; z-index: 1; text-align: center;
  max-width: 400px; padding: 40px 24px;
}
.share-landing-badge-wrap {
  margin-bottom: 20px;
}
.share-landing-badge-ring {
  display: inline-flex; align-items: center; justify-content: center;
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(145deg, rgba(139,92,246,0.2), rgba(6,182,212,0.2));
  border: 3px solid rgba(139,92,246,0.4);
  box-shadow: 0 0 40px rgba(139,92,246,0.2), 0 0 80px rgba(139,92,246,0.05);
  animation: badgePulse 2.5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 40px rgba(139,92,246,0.2); }
  50% { box-shadow: 0 0 60px rgba(139,92,246,0.35); }
}
.share-landing-level {
  font-size: 32px; font-weight: 800; color: #fff;
  text-shadow: 0 0 20px rgba(139,92,246,0.5);
}
.share-landing-heading {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.5);
  margin: 0 0 8px; letter-spacing: 2px; text-transform: uppercase;
}
.share-landing-name {
  font-size: 22px; font-weight: 700; color: #fff; margin: 0 0 12px;
}
.share-landing-score-row {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-bottom: 20px;
}
.share-landing-score {
  font-size: 20px; font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #06b6d4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.share-landing-tagline {
  font-size: 13px; color: rgba(255,255,255,0.6);
}
.share-landing-exams {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 20px;
}
.share-landing-exam {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.share-landing-exam-label {
  font-size: 11px; color: rgba(255,255,255,0.4); text-transform: uppercase;
}
.share-landing-exam-val {
  font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.85);
}
.share-landing-fact {
  font-size: 14px; color: rgba(255,255,255,0.5);
  margin: 0 0 28px; line-height: 1.6;
}
.share-landing-cta {
  margin-bottom: 24px;
}
.share-landing-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 40px; border: none; border-radius: var(--radius-full);
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: #fff; font-size: 17px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(139,92,246,0.3);
  transition: all var(--transition-smooth);
}
.share-landing-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(139,92,246,0.5);
}
.share-landing-btn svg { width: 20px; height: 20px; }
.share-landing-sub {
  font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 12px;
}
.share-landing-brand {
  font-size: 12px; color: rgba(255,255,255,0.2);
  letter-spacing: 2px; text-transform: uppercase;
}

@keyframes toastPop {
  from { opacity: 0; transform: translateX(-50%) scale(0.8); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

/* ===== Assessment Result: AI 分析加载层 ===== */
.result-scoring-overlay {
  position: fixed;
  inset: 0;
  z-index: 2050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(8, 5, 20, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.scoring-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: #a78bfa;
  animation: scoringSpin 0.9s linear infinite;
}

@keyframes scoringSpin {
  to { transform: rotate(360deg); }
}

.scoring-title {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--white);
  margin: 0;
}

.scoring-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  padding: 0 32px;
  text-align: center;
  line-height: 1.6;
}

/* ===== Assessment Result: AI 智能点评 ===== */
.result-ai-review {
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.16);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
}

.ai-review-badge {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--white);
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
}

.ai-review-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.ai-review-cols {
  display: flex;
  gap: 10px;
}

.ai-review-col {
  flex: 1;
  min-width: 0;
}

.ai-review-col-title {
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  margin-bottom: 6px;
}

.ai-review-col-title.good { color: #34d399; }
.ai-review-col-title.bad { color: #fbbf24; }
.ai-review-col-title.tip { color: #60a5fa; }

.ai-review-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-review-list li {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.ai-review-list li::marker {
  color: rgba(139, 92, 246, 0.6);
}

/* 无效结果后的重新测试按钮 */
.result-btn.retry-btn {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.25);
}

/* 测评推荐页：场景卡片的推荐理由 */
.scenario-reason {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(139, 92, 246, 0.25);
  font-size: 11px;
  line-height: 1.5;
  color: rgba(167, 139, 250, 0.9);
}
