/* ============================================================
   数学智能助教 V3 - 统一样式表
   主色调: #38B2AC
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #38B2AC;
  --primary-light: #4FD1C5;
  --primary-dark: #2C9E98;
  --bg: #F5F7FA;
  --white: #ffffff;
  --text: #333333;
  --text-secondary: #718096;
  --border: #E2E8F0;
  --success: #48BB78;
  --warning: #ED8936;
  --danger: #F56565;
  --blue: #4A90E2;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --radius: 16px;
  --radius-sm: 10px;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ===== SPA页面导航 ===== */
.page {
  display: none;
  padding: 20px;
  min-height: 100vh;
  padding-bottom: 90px;
}
.page.show {
  display: block;
}

/* ===== 通用卡片 ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== 按钮 ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.2s;
}
.btn-primary:active { opacity: 0.85; }

.btn-outline {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  margin-top: 10px;
}

/* ===== 页面头部 ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 20px;
  border-radius: 0 0 24px 24px;
  margin: -20px -20px 20px -20px;
  position: relative;
}
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header p { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.back-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.25);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 底部导航 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: white;
  display: flex;
  border-top: 1px solid var(--border);
  padding: 8px 0;
  padding-bottom: env(safe-area-inset-bottom, 8px);
  z-index: 100;
}
.nav-item {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: color 0.2s;
}
.nav-icon { font-size: 22px; line-height: 1; }
.nav-text { font-size: 10px; color: var(--text-secondary); }
.nav-item.active .nav-icon,
.nav-item.active .nav-text { color: var(--primary); }

/* ===== 加载动画 ===== */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 15px; color: var(--text-secondary); }
.loading-sub { font-size: 12px; color: #A0AEC0; margin-top: 4px; }

/* ===== Toast提示 ===== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 9999;
  transition: transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== 标签 ===== */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.tag-green { background: #F0FFF4; color: #48BB78; }
.tag-orange { background: #FFFAF0; color: #ED8936; }
.tag-blue { background: #EBF8FF; color: #4A90E2; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
.empty-icon { font-size: 56px; margin-bottom: 12px; }
.empty-text { font-size: 14px; }

/* ===== 分割线 ===== */
.divider { height: 1px; background: var(--border); margin: 12px 0; }

/* ============================================================
   首页样式
   ============================================================ */
.hero-section {
  background: linear-gradient(160deg, #38B2AC 0%, #4FD1C5 60%, #6B8AFF 100%);
  padding: 32px 20px 28px;
  border-radius: 0 0 28px 28px;
  margin: -20px -20px 0 -20px;
  position: relative;
  overflow: hidden;
}
.hero-title { font-size: 26px; font-weight: 700; color: white; margin-bottom: 6px; }
.hero-sub { font-size: 14px; color: rgba(255,255,255,0.85); }

.user-info-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.user-avatar {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.user-name { font-size: 17px; font-weight: 600; color: white; }
.user-grade { font-size: 13px; color: rgba(255,255,255,0.8); cursor: pointer; }

.settings-btn {
  margin-left: auto;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-hero-card {
  background: white;
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(56,178,172,0.15);
  margin: -14px 16px 0;
  position: relative;
  z-index: 2;
}
.upload-icon-wrap {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #E6FFFA, #B2F5EA);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 36px;
}
.upload-title { font-size: 18px; font-weight: 700; color: #2D3748; margin-bottom: 6px; }
.upload-desc { font-size: 13px; color: #718096; margin-bottom: 20px; line-height: 1.6; }

.preview-wrap { display: none; margin-bottom: 16px; }
.preview-wrap.show { display: block; }
.preview-img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; }

.upload-btn-row { display: flex; gap: 12px; }
.upload-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  touch-action: manipulation;
}
.upload-btn-camera { background: linear-gradient(135deg, #38B2AC, #4FD1C5); color: white; }
.upload-btn-camera:active { opacity: 0.85; transform: scale(0.98); }
.upload-btn-album { background: #F7FAFC; color: #38B2AC; border: 2px solid #E2E8F0; }
.upload-btn-album:active { background: #EDF2F7; }

.step-flow { display: flex; align-items: center; justify-content: space-between; padding: 16px 8px; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.step-circle { width: 44px; height: 44px; border-radius: 50%; background: #E6FFFA; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.step-item.active .step-circle { background: linear-gradient(135deg, #38B2AC, #4FD1C5); box-shadow: 0 4px 12px rgba(56,178,172,0.3); }
.step-label { font-size: 12px; color: #718096; }
.step-item.active .step-label { color: #38B2AC; font-weight: 600; }
.step-arrow { font-size: 18px; color: #CBD5E0; }

.quick-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-btn { background: white; border-radius: 14px; padding: 16px 8px; text-align: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: all 0.2s; }
.quick-btn:active { transform: scale(0.97); }
.quick-icon { font-size: 26px; margin-bottom: 6px; }
.quick-text { font-size: 12px; color: #4A5568; font-weight: 500; }

.stats-row { display: flex; justify-content: space-around; text-align: center; }
.stat-item { padding: 4px 8px; }
.stat-num { font-size: 26px; font-weight: 700; }
.stat-num.c1 { color: var(--primary); }
.stat-num.c2 { color: var(--blue); }
.stat-num.c3 { color: var(--success); }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ============================================================
   诊断报告页样式
   ============================================================ */
.diag-header {
  background: linear-gradient(135deg, #38B2AC, #4FD1C5);
  padding: 20px;
  border-radius: 0 0 24px 24px;
  margin: -20px -20px 20px -20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.diag-header .back-btn { position: static; transform: none; background: rgba(255,255,255,0.25); }
.diag-header-title { font-size: 20px; font-weight: 700; color: white; flex: 1; }

.diag-core-card { background: white; border-radius: 16px; padding: 20px; margin-bottom: 12px; box-shadow: var(--shadow-sm); border-left: 4px solid #F56565; }
.diag-core-label { font-size: 13px; color: #F56565; font-weight: 600; margin-bottom: 8px; }
.diag-core-text { font-size: 15px; color: #2D3748; line-height: 1.6; font-weight: 500; }

.diag-tonight-card {
  background: linear-gradient(135deg, #38B2AC, #4FD1C5);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.diag-tonight-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.diag-tonight-label { font-size: 13px; color: rgba(255,255,255,0.85); margin-bottom: 8px; }
.diag-tonight-topic { font-size: 22px; font-weight: 700; color: white; margin-bottom: 6px; line-height: 1.3; }
.diag-tonight-meta { font-size: 14px; color: rgba(255,255,255,0.85); margin-bottom: 16px; }
.diag-dot { margin: 0 4px; }
.diag-tonight-btn {
  background: white;
  color: #38B2AC;
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  text-align: center;
  touch-action: manipulation;
}
.diag-tonight-btn:active { opacity: 0.85; transform: scale(0.98); }

.diag-summary-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: white;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.diag-accuracy-mini, .diag-weak-count { display: flex; align-items: center; gap: 4px; }

.three-sentence { padding: 10px 12px; background: #F7FAFC; border-radius: 10px; line-height: 1.7; font-size: 15px; color: #2D3748; }

/* ============================================================
   学习计划页样式
   ============================================================ */
.plan-tonight-card { background: white; border-radius: 16px; padding: 0; overflow: hidden; margin-bottom: 16px; border: 2px solid var(--primary); }
.plan-tonight-header { background: linear-gradient(135deg, #38B2AC, #4FD1C5); padding: 16px 20px; }
.plan-tonight-label { font-size: 13px; color: rgba(255,255,255,0.9); margin-bottom: 2px; }
.plan-tonight-title { font-size: 18px; font-weight: 700; color: white; }
.plan-tonight-body { padding: 16px 20px; }
.plan-stats { display: flex; justify-content: space-around; text-align: center; margin-bottom: 16px; }
.plan-stat-num { font-size: 24px; font-weight: 700; color: #38B2AC; }
.plan-stat-label { font-size: 12px; color: #718096; }
.plan-tip { background: #FFF9F0; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.plan-tip-label { font-size: 12px; color: #D69E2E; margin-bottom: 2px; }
.plan-tip-text { font-size: 14px; color: #2D3748; }

.day-card { background: white; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; border: 2px solid var(--border); }
.day-card.today { border-color: #38B2AC; background: linear-gradient(135deg, #F0FFFE, #E6FFFA); }
.day-card.done { border-color: #48BB78; background: #F0FFF4; }
.day-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.day-badge { background: #E2E8F0; color: #718096; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.day-badge.today { background: linear-gradient(135deg, #38B2AC, #4FD1C5); color: white; }
.day-badge.done { background: #48BB78; color: white; }
.day-title { font-size: 14px; font-weight: 600; color: #2D3748; }
.day-meta { font-size: 12px; color: #718096; margin-bottom: 10px; }
.day-btn { background: #38B2AC; color: white; border: none; padding: 9px; border-radius: 8px; font-size: 14px; width: 100%; cursor: pointer; font-weight: 600; }
.day-btn.done-btn { background: #48BB78; cursor: default; }
.day-btn.locked { background: #E2E8F0; color: #718096; cursor: not-allowed; }

/* ============================================================
   练习答题页样式
   ============================================================ */
.practice-progress {
  background: white;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.practice-progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #718096;
  margin-bottom: 8px;
}
.practice-progress-bar {
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
}
.practice-progress-fill {
  height: 6px;
  background: linear-gradient(90deg, #38B2AC, #4FD1C5);
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s ease;
}

.q-card { background: white; border-radius: 14px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.q-num { font-size: 13px; color: #4A90E2; font-weight: 600; margin-bottom: 8px; }
.q-text { font-size: 15px; color: #2D3748; line-height: 1.7; margin-bottom: 12px; }
.q-option {
  background: #F7FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #4A5568;
  transition: all 0.2s;
}
.q-option:hover { border-color: #4A90E2; }
.q-option.selected { background: #4A90E2; border-color: #4A90E2; color: white; }
.q-option.correct { background: #F0FFF4; border-color: #48BB78; color: #276749; }
.q-option.wrong { background: #FFF5F5; border-color: #F56565; color: #C53030; }

/* ============================================================
   练习结果页样式
   ============================================================ */
.result-emoji { font-size: 64px; text-align: center; margin-bottom: 8px; }
.result-detail-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #F0F0F0; font-size: 14px; }
.result-detail-row:last-child { border-bottom: none; }
.result-explanation {
  background: #FFF9F0;
  border-left: 3px solid #F6AD55;
  padding: 8px 12px;
  margin-top: 8px;
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  color: #744210;
  line-height: 1.6;
}
.achievement-card {
  background: linear-gradient(135deg, #FFF9F0, #FFFAF5);
  border: 1px solid #F6AD55;
  margin-bottom: 12px;
}
.achievement-inner { display: flex; align-items: center; gap: 12px; padding: 16px; }
.achievement-icon { font-size: 32px; }

/* ============================================================
   个人中心页样式
   ============================================================ */
.profile-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #F0F0F0; font-size: 14px; cursor: pointer; }
.profile-row:last-child { border-bottom: none; }
.profile-label { color: #718096; }
.profile-value { color: #2D3748; font-weight: 500; }
.setting-row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #F0F0F0; cursor: pointer; font-size: 14px; }
.setting-row:last-child { border-bottom: none; }
.setting-icon { font-size: 18px; margin-right: 10px; }
.setting-text { flex: 1; color: #2D3748; }

/* ============================================================
   标签样式（诊断报告内）
   ============================================================ */
.topic-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-tag { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.topic-tag.weak { background: #FFF5F5; color: #E53E3E; font-weight: 600; font-size: 13px; padding: 5px 12px; border-left: 3px solid #F56565; }
.topic-tag.good { background: #F7FAFC; color: #A0AEC0; font-size: 11px; }
.wrong-item { padding: 12px; background: #FFF5F5; border-radius: 10px; margin-bottom: 10px; border-left: 3px solid #F56565; }
.wrong-q { font-size: 14px; color: #2D3748; margin-bottom: 6px; line-height: 1.5; }
.wrong-answers { font-size: 13px; color: #718096; margin-bottom: 4px; }
.wrong-reason { font-size: 12px; color: #E53E3E; margin-top: 4px; }

/* ============================================================
   通用弹窗组件
   ============================================================ */
.picker-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-end;
  z-index: 200;
  justify-content: center;
  max-width: 430px;
  margin: 0 auto;
}
.picker-sheet {
  background: white;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 430px;
  padding: 0 0 env(safe-area-inset-bottom, 16px);
}
.picker-title { text-align: center; font-size: 16px; font-weight: 600; color: #2D3748; padding: 18px 0 10px; border-bottom: 1px solid #E2E8F0; }
.picker-options { padding: 8px 0; max-height: 300px; overflow-y: auto; }
.picker-option { display: flex; align-items: center; padding: 14px 20px; font-size: 16px; color: #2D3748; cursor: pointer; transition: background 0.15s; }
.picker-option:hover { background: #F7FAFC; }
.picker-option.selected { color: #38B2AC; font-weight: 600; }
.picker-cancel { text-align: center; padding: 14px; color: #718096; font-size: 15px; border-top: 1px solid #E2E8F0; margin-top: 8px; cursor: pointer; }

/* ===== 引导层 ===== */
#guide-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#guide-overlay.show { display: flex; }
.guide-card { background: white; border-radius: 20px; padding: 32px 24px; max-width: 320px; width: 90%; text-align: center; }
.guide-icon { font-size: 56px; margin-bottom: 16px; }
.guide-title { font-size: 20px; font-weight: 700; color: #2D3748; margin-bottom: 12px; }
.guide-desc { font-size: 14px; color: #718096; line-height: 1.7; margin-bottom: 24px; }
.guide-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.guide-dot { width: 8px; height: 8px; border-radius: 50%; background: #CBD5E0; }
.guide-dot.active { background: #38B2AC; width: 20px; border-radius: 4px; }
.guide-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, #38B2AC, #4FD1C5); color: white; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; }

/* ===== 注册层 ===== */
#reg-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#reg-overlay.show { display: flex; }

/* ===== 登录浮层 ===== */
#login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
}
#login-overlay.show { display: flex; }
#login-modal { background: white; border-radius: 20px; padding: 28px 24px; max-width: 340px; width: 90%; text-align: center; position: relative; }
.login-title { font-size: 20px; font-weight: 700; color: #2D3748; margin-bottom: 4px; }
.login-subtitle { font-size: 13px; color: #718096; margin-bottom: 20px; }
.login-input { display: block; width: 100%; padding: 12px 14px; border: 1.5px solid #E2E8F0; border-radius: 10px; font-size: 14px; margin-bottom: 12px; outline: none; box-sizing: border-box; }
.login-input:focus { border-color: #38B2AC; }
.login-row { display: flex; gap: 8px; margin-bottom: 12px; }
.login-row .login-input { flex: 1; margin-bottom: 0; }
.login-code-btn { padding: 12px 14px; background: #EDF2F7; color: #4A5568; border: 1.5px solid #E2E8F0; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; min-width: 100px; }
.login-code-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, #38B2AC, #4FD1C5); color: white; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 8px; }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.login-msg { font-size: 12px; margin-top: 10px; min-height: 18px; }
.login-close { position: absolute; top: 12px; right: 16px; font-size: 20px; color: #A0AEC0; cursor: pointer; }
.login-grade-wrap { text-align: left; margin-bottom: 12px; }
.login-grade-label { font-size: 12px; color: #718096; margin-bottom: 4px; }
.login-grade-select { width: 100%; padding: 10px 12px; border: 1.5px solid #E2E8F0; border-radius: 10px; font-size: 14px; background: white; }
.login-loader { color: #38B2AC; font-size: 13px; margin-top: 8px; display: none; }
.login-protocol { font-size: 11px; color: #A0AEC0; margin-top: 12px; }
.login-protocol a { color: #38B2AC; }

/* ===== 年级确认弹窗 ===== */
#grade-confirm-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#grade-confirm-overlay.show { display: flex; }
.gcc-card { background: white; border-radius: 20px; padding: 28px 24px; max-width: 340px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.gcc-icon { font-size: 48px; margin-bottom: 16px; }
.gcc-title { font-size: 18px; font-weight: 700; color: #2D3748; margin-bottom: 8px; }
.gcc-desc { font-size: 14px; color: #718096; line-height: 1.6; margin-bottom: 20px; }
.gcc-grade-box { background: #FFF5F5; border: 2px solid #FEB2B2; border-radius: 12px; padding: 12px; margin-bottom: 8px; font-size: 15px; color: #E53E3E; }
.gcc-grade-box span { font-weight: 700; }
.gcc-vs { font-size: 12px; color: #A0AEC0; margin: 4px 0; }
.gcc-same-grade { background: #F0FFF4; border-color: #9AE6B4; color: #276749; }
.gcc-btns { display: flex; gap: 10px; margin-top: 20px; }
.gcc-btn { flex: 1; padding: 13px; border-radius: 12px; font-size: 15px; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; }
.gcc-btn-cancel { background: #F7FAFC; color: #718096; border: 2px solid #E2E8F0; }
.gcc-btn-cancel:active { background: #EDF2F7; }
.gcc-btn-confirm { background: linear-gradient(135deg, #38B2AC, #4FD1C5); color: white; }
.gcc-btn-confirm:active { opacity: 0.85; }
.gcc-note { font-size: 12px; color: #A0AEC0; margin-top: 12px; }

/* ===== 体验期banner ===== */
#trial-banner { display: none; background: linear-gradient(135deg, rgba(56,178,172,0.13), rgba(79,209,197,0.13)); color: #38B2AC; font-size: 13px; padding: 8px 16px; text-align: center; border-radius: 8px; margin: 8px 12px; }
#trial-banner a { color: #38B2AC; font-weight: 600; }

/* ===== 统计卡片 ===== */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; margin-top: 10px; }
.stat-grid-item { padding: 12px; background: rgba(56,178,172,0.1); border-radius: 10px; }
.stat-grid-num { font-size: 24px; font-weight: 700; color: #38B2AC; }
.stat-grid-label { font-size: 11px; color: #718096; margin-top: 3px; }

/* ===== 登录按钮状态 ===== */
#user-status { display: none; color: #718096; font-size: 13px; padding: 6px 12px; }
#logout-btn { display: none; background: rgba(255,255,255,0.2); border: none; color: white; width: 32px; height: 32px; border-radius: 50%; font-size: 14px; cursor: pointer; margin-left: 4px; line-height: 32px; }
