* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #8b5cf6;
  --primary-light: #c4b5fd;
  --primary-dark: #6d28d9;
  --accent: #22d3ee;
  --success: #34d399;
  --danger: #fb7185;
  --bg: #070511;
  --bg-gradient: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
                 radial-gradient(ellipse 60% 50% at 80% 50%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
                 linear-gradient(180deg, #070511 0%, #0c0918 40%, #070511 100%);
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-light: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --radius-full: 9999px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-2xl: 24px;
  --spacing-3xl: 32px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-primary: 0 4px 20px rgba(139, 92, 246, 0.2);
  --shadow-primary-hover: 0 6px 24px rgba(139, 92, 246, 0.3);
  --shadow-card: 0 -20px 60px rgba(0, 0, 0, 0.5);
  --shadow-overlay: 0 24px 80px rgba(0, 0, 0, 0.5);
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-gradient);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* 环境光晕层 */
.app::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ===== 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: linear-gradient(135deg, rgba(139, 92, 246, 0.6), rgba(6, 182, 212, 0.4));
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15), 0 0 40px rgba(139, 92, 246, 0.05);
  transition: box-shadow 0.3s;
}

.avatar-ring:hover {
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.25), 0 0 60px rgba(139, 92, 246, 0.08);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1033, #0d0820);
  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: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  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 0.3s;
  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: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: opacity 0.3s;
  padding: 6px 10px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.volume-control:hover { opacity: 1; background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)); }

.vol-icon { width: 16px; height: 16px; color: var(--text-muted); }

.volume-control input[type="range"] {
  width: 72px;
  height: 4px;
  -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: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-light);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(196, 181, 253, 0.6), 0 0 20px rgba(139, 92, 246, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.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 rgba(139, 92, 246, 0.4);
}

.volume-control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-light);
  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, rgba(139, 92, 246, 0.12) 0%, rgba(139, 92, 246, 0.04) 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: linear-gradient(135deg, rgba(46, 16, 101, 0.8), rgba(30, 27, 75, 0.6));
  border: 2px solid rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.15), 0 0 60px rgba(139, 92, 246, 0.05);
}

.welcome-avatar-inner svg { width: 48px; height: 48px; }

.welcome-ripple {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.15);
  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, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.welcome-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 60%, #a78bfa 100%);
  -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: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.call-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  border: none;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  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; }

/* 开始对话按钮区 */
.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 480px;  /* 与 landing page 保持一致 */
  padding: 0 16px;
  margin-bottom: 8px;
}

/* 选择场景按钮 */
.scene-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.scene-btn:hover {
  border-color: rgba(139, 92, 246, 0.25);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.06), rgba(255, 255, 255, 0.03));
  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;
}

.welcome-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 16px;
  letter-spacing: 0.03em;
  font-weight: 400;
  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 rgba(255, 255, 255, 0.06);
}

.scene-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.scene-back-btn svg { width: 18px; height: 18px; }
.scene-back-btn:hover {
  color: var(--text);
  border-color: rgba(139, 92, 246, 0.2);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.06), rgba(139, 92, 246, 0.02));
  transform: translateX(-2px);
}

.scene-selector-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.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: rgba(255,255,255,0.08); 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 {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.category-tab:hover {
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--text);
}

.category-tab.active {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}

/* 场景选择器底部 */
.scene-selector-footer {
  padding: 12px 16px 16px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(to top, rgba(7, 5, 17, 0.9) 0%, rgba(7, 5, 17, 0.6) 60%, transparent 100%);
}

.assessment-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  font-family: inherit;
  color: var(--text);
  text-align: left;
}

.assessment-entry:hover {
  border-color: rgba(139, 92, 246, 0.15);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.04), rgba(255, 255, 255, 0.03));
  transform: translateY(-1px);
}

.assessment-entry-icon {
  font-size: 24px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light, #a78bfa);
}
.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: 14px;
  font-weight: 500;
  color: var(--text);
}

.assessment-entry-sublabel {
  font-size: 12px;
  color: var(--text-muted);
}

.assessment-entry-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.3s;
}

.assessment-entry:hover .assessment-entry-arrow {
  color: var(--primary-light);
  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 24px;
  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: rgba(255,255,255,0.08); 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: 20px;
  font-size: 15px;
  line-height: 1.65;
  word-break: break-word;
  letter-spacing: 0.01em;
  font-weight: 400;
}

.message-user .message-content {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(109, 40, 217, 0.85));
  color: #fff;
  border-bottom-right-radius: 8px;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  font-weight: 500;
}

.message-assistant .message-content {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-bottom-left-radius: 8px;
  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: 13px;
  text-align: center;
  padding: 10px;
  letter-spacing: 0.03em;
}

/* Recording Indicator */
.recording-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  margin-bottom: 4px;
}

.wave-bars {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
}

.wave-bars span {
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(196, 181, 253, 0.9), rgba(139, 92, 246, 0.5));
  animation: wave 1.2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(196, 181, 253, 0.3);
}

.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: 6px; opacity: 0.4; }
  50% { height: 24px; opacity: 1; }
}

.recording-text {
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ===== 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(--glass-border);
  border-radius: var(--radius-full);
  font-size: 15px;
  font-family: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: var(--text);
  outline: none;
  transition: all 0.3s;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.text-input::placeholder { color: var(--text-muted); font-weight: 400; }
.text-input:focus {
  border-color: rgba(139, 92, 246, 0.3);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.06), rgba(139, 92, 246, 0.02));
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.08), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
}

.send-btn svg { width: 20px; height: 20px; }
.send-btn:hover {
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}
.send-btn:active { transform: scale(0.95); }

.control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mic-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.mic-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.mic-btn:hover:not(:disabled) {
  border-color: rgba(139, 92, 246, 0.25);
  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, rgba(248, 113, 133, 0.15), rgba(248, 113, 133, 0.08));
  color: var(--danger);
  animation: micPulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 24px rgba(248, 113, 133, 0.2);
}

@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 rgba(248, 113, 133, 0.15); }
}

.end-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(248, 113, 133, 0.25);
  background: linear-gradient(145deg, rgba(248, 113, 133, 0.06), rgba(248, 113, 133, 0.02));
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  backdrop-filter: blur(8px);
}

.end-btn svg { width: 16px; height: 16px; }
.end-btn:hover:not(:disabled) {
  background: linear-gradient(145deg, rgba(248, 113, 133, 0.12), rgba(248, 113, 133, 0.06));
  border-color: rgba(248, 113, 133, 0.35);
  transform: translateY(-1px);
}
.end-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ===== Utilities ===== */
.hidden { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .app { max-width: 100%; }
  .welcome { padding: 12px 16px 16px; }
  .welcome-title { font-size: 24px; }
  .scenario-grid { gap: 10px; }
  .message { max-width: 90%; }
}

@media (min-width: 481px) {
  .app {
    border-left: 1px solid rgba(255,255,255,0.04);
    border-right: 1px solid rgba(255,255,255,0.04);
  }
}

/* Desktop centering */
@media (min-width: 768px) {
  body { display: flex; align-items: center; justify-content: center; background: #0f0d1a; }
  .app {
    height: 92vh;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 120px rgba(139, 92, 246, 0.06);
  }
  .app::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), transparent 40%, transparent 60%, rgba(6, 182, 212, 0.04)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
  }
}

/* ===== Header Buttons ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(12px);
}

.header-btn svg { width: 18px; height: 18px; }
.header-btn:hover {
  color: var(--primary-light);
  border-color: rgba(139, 92, 246, 0.2);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.06), rgba(139, 92, 246, 0.02));
  transform: translateY(-1px);
}

/* ===== Usage Badge ===== */
.usage-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  font-size: 12px;
  color: var(--primary-light);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.usage-badge.warning {
  background: rgba(248, 113, 133, 0.08);
  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: rgba(255,255,255,0.08); border-radius: 2px; }

.scenario-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 14px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  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 0.3s;
}

.scenario-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-sm);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 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 0.3s;
}

.scenario-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(139, 92, 246, 0.06);
}

.scenario-card:hover::before {
  opacity: 1;
}

.scenario-card:hover::after {
  opacity: 1;
}

.scenario-card:active {
  transform: translateY(-1px);
  transition: all 0.1s;
}

.scenario-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.scenario-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  transition: all 0.3s;
}

.scenario-card:hover .scenario-icon {
  background: rgba(139, 92, 246, 0.1);
  transform: scale(1.1);
}

.scenario-difficulty {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
  letter-spacing: 0.04em;
  transition: all 0.3s;
}

.scenario-card:hover .scenario-difficulty {
  border-color: rgba(139, 92, 246, 0.15);
  color: var(--text);
}

.scenario-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
  letter-spacing: 0.01em;
}

.scenario-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  word-break: break-word;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ===== Correction Card ===== */
.correction-card {
  margin: 4px 0 4px 50px;
  padding: 14px 16px;
  border-radius: 14px;
  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: 13px;
  animation: msgIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  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: 11px;
  color: #fbbf24;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.correction-original {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 13px;
  font-weight: 400;
}

.correction-arrow {
  color: #fbbf24;
  margin: 0 6px;
  font-size: 12px;
}

.correction-corrected {
  color: #34d399;
  font-weight: 600;
  font-size: 14px;
}

.correction-reason {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

/* ===== Gate Close Button ===== */
.gate-close-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.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;
  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: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.dialog-detail-message .msg-text {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.dialog-detail-message.user .msg-text {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.dialog-detail-message.assistant .msg-text {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

/* ===== Persona Selector ===== */
.persona-selector {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin: 12px 0 8px;
  padding: 8px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.persona-selector::before,
.persona-selector::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  z-index: 2;
}
.persona-selector::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-dark), transparent);
}
.persona-selector::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-dark), transparent);
}

.persona-selector::-webkit-scrollbar { display: none; }

.persona-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
}

.persona-avatar::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--persona-color-1, #8b5cf6), var(--persona-color-2, #6d28d9));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
  filter: blur(8px);
}

.persona-avatar:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
}

.persona-avatar:hover::before { opacity: 0.5; }

.persona-avatar.active {
  background: linear-gradient(135deg, var(--persona-color-1, #8b5cf6), var(--persona-color-2, #6d28d9));
  box-shadow: 0 0 20px var(--persona-glow, rgba(139, 92, 246, 0.3)), 0 0 40px var(--persona-glow, rgba(139, 92, 246, 0.1));
}

.persona-avatar.active::before { opacity: 0.8; }

.persona-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--persona-color-1, #8b5cf6), var(--persona-color-2, #6d28d9));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.persona-avatar-inner svg {
  width: 28px;
  height: 28px;
}

.persona-avatar-name {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
}

.persona-avatar:hover .persona-avatar-name,
.persona-avatar.active .persona-avatar-name {
  opacity: 1;
}

/* 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: #c4b5fd; }
.message-assistant.david .message-label { color: #7dd3fc; }
.message-assistant.lucy .message-label { color: #fcd34d; }
.message-assistant.dr_chen .message-label { color: #6ee7b7; }

/* ===== 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;
}

.assessment-view.hidden {
  display: none !important;
}

.assessment-panel {
  width: 100%;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: transparent;
  border-radius: 0;
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.assessment-page {
  flex: 1;
  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;
}

.assessment-illustration {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--primary-light, #a78bfa);
}
.assessment-illustration svg {
  width: 32px;
  height: 32px;
}

.assessment-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}

.assessment-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-align: center;
}

.assessment-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.assessment-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.assessment-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: var(--primary-light, #a78bfa);
}
.assessment-info-icon svg {
  width: 20px;
  height: 20px;
}

.assessment-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);
  font-family: inherit;
}

.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: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  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 rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.assessment-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  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: 16px;
  font-weight: 600;
  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: 14px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.assessment-round {
  font-size: 13px;
  color: var(--text-secondary);
}

.assessment-messages {
  flex: 1;
  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: 14px;
  line-height: 1.5;
}

.assessment-msg.ai {
  align-self: flex-start;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.1);
  color: var(--text);
}

.assessment-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(124, 58, 237, 0.1));
  color: #fff;
}

.assessment-msg.system {
  align-self: center;
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  padding: 4px 12px;
}

.assessment-chat-controls {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  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: 13px;
  color: var(--text-secondary);
}

.mic-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  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 rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.assessment-end-btn:hover {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Assessment Result */
.assessment-result-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
  color: var(--primary-light, #a78bfa);
}
.assessment-result-badge svg {
  width: 28px;
  height: 28px;
}

.assessment-level-card {
  width: 100%;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.04));
  border: 1px solid rgba(139, 92, 246, 0.1);
  text-align: center;
  margin-bottom: 24px;
}

.assessment-level-letter {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.assessment-level-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.assessment-level-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 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, #0d0b1a 0%, #070511 100%);
  border-radius: 24px;
  border: 1px solid rgba(139, 92, 246, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.report-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.report-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.report-close:hover {
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--text);
}

.report-close svg { width: 16px; height: 16px; }

.report-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.report-score-section {
  text-align: center;
  margin-bottom: 24px;
}

.report-big-score {
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.report-score-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.report-dimensions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.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: 13px;
  color: var(--text-secondary);
}

.report-dimension-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.report-dimension-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  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: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.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: 13px;
  color: #ef4444;
  text-decoration: line-through;
  margin-bottom: 2px;
}

.report-correction-fixed {
  font-size: 13px;
  color: #34d399;
}

.report-vocabulary {
  margin-bottom: 20px;
}

.report-vocab-item {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.08);
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 4px 6px 0;
}

.report-advice {
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.report-advice-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== 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 0.3s ease;
}

.history-overlay.hidden {
  display: none !important;
}

.history-panel {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: linear-gradient(180deg, #0d0b1a 0%, #070511 100%);
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-bottom: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.history-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.history-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
}

.history-close svg { width: 16px; height: 16px; }

.history-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.history-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.history-item:hover {
  border-color: rgba(139, 92, 246, 0.1);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.05), 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: 13px;
  font-weight: 600;
  color: var(--text);
}

.history-item-date {
  font-size: 11px;
  color: var(--text-muted);
}

.history-item-scores {
  display: flex;
  gap: 6px;
}

.history-score-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.history-score-badge.score {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), 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: #fbbf24;
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* 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, #0d0b1a 0%, #070511 100%);
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.detail-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.detail-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  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: 14px;
  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, #0d0b1a 0%, #070511 100%);
  border-radius: 24px;
  border: 1px solid rgba(139, 92, 246, 0.12);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(139, 92, 246, 0.06);
}

.gate-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
  color: var(--primary-light, #a78bfa);
}
.gate-icon svg {
  width: 28px;
  height: 28px;
}

.gate-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.gate-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.gate-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.3s;
}

.gate-input:focus {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.05);
}

.gate-input::placeholder {
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.gate-error {
  font-size: 12px;
  color: #ef4444;
  margin-bottom: 12px;
  text-align: center;
}

.gate-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  margin-bottom: 16px;
}

.gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}

.gate-buy-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  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: 12px;
  color: var(--text-muted);
  margin: 8px 0;
}

.gate-divider::before,
.gate-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.gate-hint {
  font-size: 12px;
  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: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.recommend-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 0 4px;
}

/* Recommended card fix - ensure proper layout */
.recommend-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.04));
  border: 1px solid rgba(139, 92, 246, 0.12);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  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 0.3s;
}

.recommend-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.2);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.12), rgba(6, 182, 212, 0.06));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(139, 92, 246, 0.08);
}

.recommend-card:hover::before { opacity: 1; }
.recommend-card:active { transform: translateY(-1px); transition: all 0.1s; }

.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: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  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, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.recommend-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.recommend-card-desc {
  font-size: 12px;
  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: 500;
}

/* ============================================================
   Streak / Check-in Panel
   ============================================================ */
.streak-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.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 rgba(139, 92, 246, 0.1);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.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: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.streak-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.streak-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.streak-close svg {
  width: 18px;
  height: 18px;
}

.streak-content {
  flex: 1;
  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-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.streak-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.streak-label {
  font-size: 13px;
  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 {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s;
}

.streak-day.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(109, 40, 217, 0.4));
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--text);
  font-weight: 600;
}

.streak-day.active-light {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(109, 40, 217, 0.2));
  border-color: rgba(139, 92, 246, 0.15);
  color: var(--primary-light);
}

.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 rgba(255, 255, 255, 0.04);
}

.streak-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.streak-summary-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.streak-summary-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Check-in button */
.streak-checkin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  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);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.user-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.user-panel {
  background: var(--bg-card, #1e1b2e);
  border-radius: 20px;
  width: 90%;
  max-width: 380px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 0.25s;
}

.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 rgba(255, 255, 255, 0.06);
}

.user-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #f4f4f5);
  margin: 0;
}

.user-close {
  background: none;
  border: none;
  color: var(--text-muted, #a1a1aa);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  transition: all 0.2s;
}

.user-close:hover {
  color: var(--text-primary, #f4f4f5);
  background: rgba(255, 255, 255, 0.08);
}

.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, #a1a1aa);
}

.user-empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.user-empty p {
  font-size: 14px;
  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), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.member-card.expired {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.member-card.free {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.member-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.member-badge.active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
}

.member-badge.expired {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.member-badge.free {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #a1a1aa);
}

.member-plan-name {
  font-size: 22px;
  font-weight: 700;
  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 rgba(255, 255, 255, 0.06);
}

.member-expire-label {
  font-size: 13px;
  color: var(--text-muted, #a1a1aa);
}

.member-expire-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #d4d4d8);
}

.member-remaining {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  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: 13px;
  color: var(--text-muted, #a1a1aa);
  margin: 0 0 10px;
}

.member-activate-input {
  display: flex;
  gap: 8px;
}

.member-activate-input input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #f4f4f5);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.member-activate-input input:focus {
  border-color: var(--primary, #7c3aed);
}

.member-activate-input input::placeholder {
  color: var(--text-muted, #71717a);
}

.member-activate-input button {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--primary, #7c3aed), var(--primary-dark, #5b21b6));
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  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: 12px;
  color: #ef4444;
  margin-top: 8px;
  min-height: 16px;
}

/* 购买入口 */
.member-buy-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.member-buy-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #f4f4f5);
  margin: 0 0 12px;
}

.member-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.member-plan {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.member-plan:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
}

.member-plan-name-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #f4f4f5);
  margin-bottom: 4px;
}

.member-plan-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary, #8b5cf6);
}

.member-plan-unit {
  font-size: 12px;
  color: var(--text-muted, #a1a1aa);
}

.member-buy-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary, #7c3aed), var(--primary-dark, #5b21b6));
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  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: 12px;
  color: var(--text-muted, #71717a);
  text-align: center;
  margin: 10px 0 0;
}
