/* ============================================
   学生进度页面 — 暗色星空风格
   ============================================ */

/* ---------- Reset & Global ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #0a0a1a;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100vh;
  position: relative;
}

/* ---------- Landing Page ---------- */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.student-header {
  text-align: center;
  margin-bottom: 48px;
}

.student-header h1 {
  font-size: 2.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #a29bfe, #74b9ff, #00d4aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.student-header p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 2px;
}

.action-cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 720px;
  width: 100%;
}

.action-card {
  width: 200px;
  height: 220px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 1.5px solid transparent;
  text-align: center;
  padding: 24px 16px;
  user-select: none;
  -webkit-user-select: none;
}

.action-card:active {
  transform: scale(0.97) !important;
}

/* 进步按钮 — 紫色调 */
.card-progress {
  background: rgba(108,92,231,0.10);
  border-color: rgba(108,92,231,0.25);
}
.card-progress:hover {
  transform: translateY(-8px);
  border-color: rgba(108,92,231,0.6);
  box-shadow: 0 8px 32px rgba(108,92,231,0.25);
}

/* 上传按钮 — 蓝色调 */
.card-upload {
  background: rgba(56,139,253,0.10);
  border-color: rgba(56,139,253,0.25);
}
.card-upload:hover {
  transform: translateY(-8px);
  border-color: rgba(56,139,253,0.6);
  box-shadow: 0 8px 32px rgba(56,139,253,0.25);
}

/* 复习按钮 — 绿色调 */
.card-review {
  background: rgba(0,212,170,0.10);
  border-color: rgba(0,212,170,0.25);
}
.card-review:hover {
  transform: translateY(-8px);
  border-color: rgba(0,212,170,0.6);
  box-shadow: 0 8px 32px rgba(0,212,170,0.25);
}

/* 考试分析按钮 — 金色调 */
.card-exam {
  background: rgba(251,191,36,0.10);
  border-color: rgba(251,191,36,0.25);
}
.card-exam:hover {
  transform: translateY(-8px);
  border-color: rgba(251,191,36,0.6);
  box-shadow: 0 8px 32px rgba(251,191,36,0.22);
}

.card-icon {
  font-size: 3.2rem;
  margin-bottom: 14px;
  line-height: 1;
}

.action-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #f0f0f0;
  margin-bottom: 6px;
}

.action-card p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

/* ---------- Back Button ---------- */
.back-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  background: rgba(108,92,231,0.25);
  border: 1.5px solid rgba(108,92,231,0.5);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(108,92,231,0.3);
  min-height: 48px;
  display: flex;
  align-items: center;
}

.back-btn:hover {
  background: rgba(108,92,231,0.4);
  color: #fff;
  transform: translateX(-2px);
  box-shadow: 0 4px 20px rgba(108,92,231,0.4);
}

.back-btn:active {
  transform: scale(0.96);
}

/* ---------- Progress View ---------- */
.progress-view {
  padding: 72px 20px 40px;
  max-width: 720px;
  margin: 0 auto;
}

.progress-view > h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: #f0f0f0;
}

/* ---------- Hero Score ---------- */
.hero-score {
  text-align: center;
  padding: 32px 20px 28px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(108,92,231,0.12), rgba(56,139,253,0.08));
  border: 1px solid rgba(162,155,254,0.18);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.hero-score::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(162,155,254,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-score-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hero-score-number {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a29bfe, #74b9ff, #00d4aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 4px;
}

.hero-score-max {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.3);
  margin-bottom: 14px;
}

.hero-stars {
  font-size: 1.6rem;
  letter-spacing: 4px;
  margin-bottom: 12px;
}

.hero-stars .star-on { color: #ffc048; }
.hero-stars .star-off { color: rgba(255,255,255,0.12); }

.hero-verdict {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.verdict-excellent {
  background: rgba(0,212,170,0.15);
  color: #00d4aa;
  border: 1px solid rgba(0,212,170,0.25);
}

.verdict-good {
  background: rgba(56,139,253,0.15);
  color: #74b9ff;
  border: 1px solid rgba(56,139,253,0.25);
}

.verdict-fair {
  background: rgba(255,192,72,0.15);
  color: #ffc048;
  border: 1px solid rgba(255,192,72,0.25);
}

.verdict-growing {
  background: rgba(162,155,254,0.15);
  color: #a29bfe;
  border: 1px solid rgba(162,155,254,0.25);
}

/* ---------- Dimension Bars (horizontal) ---------- */
.dim-bars {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dim-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dim-bar-label {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  min-width: 68px;
  white-space: nowrap;
  font-weight: 500;
}

.dim-bar-track {
  flex: 1;
  height: 22px;
  border-radius: 11px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.dim-bar-fill {
  height: 100%;
  border-radius: 11px;
  transition: width 0.8s ease;
}

.dim-bar-fill.bar-high { background: linear-gradient(90deg, #00b894, #00d4aa); }
.dim-bar-fill.bar-mid { background: linear-gradient(90deg, #388bfd, #74b9ff); }
.dim-bar-fill.bar-low { background: linear-gradient(90deg, #e17055, #ffc048); }

.dim-bar-value {
  font-size: 1.2rem;
  font-weight: 800;
  min-width: 32px;
  text-align: right;
}

.dim-bar-value.score-high { color: #00d4aa; }
.dim-bar-value.score-mid { color: #74b9ff; }
.dim-bar-value.score-low { color: #ffc048; }

.dim-bar-trend {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 16px;
}

.dim-bar-trend.trend-up { color: #00d4aa; }
.dim-bar-trend.trend-down { color: #ff6b6b; }
.dim-bar-trend.trend-flat { color: rgba(255,255,255,0.35); }

.dim-bar-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  padding-left: 80px;
  margin-top: -8px;
}

/* ---------- Section Title ---------- */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1), transparent);
}

/* ---------- Chart Container ---------- */
.chart-container {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px 16px;
  margin-bottom: 28px;
}

.chart-container canvas {
  width: 100% !important;
  max-height: 300px;
}

.chart-container h3 {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
  font-weight: 500;
}

/* ---------- Trend Summary ---------- */
.trend-summary {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 28px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  display: none;
}

.trend-summary .trend-up { color: #00d4aa; }
.trend-summary .trend-down { color: #ff6b6b; }
.trend-summary .trend-flat { color: #ffc048; }

/* ---------- Timeline Comments ---------- */
.comments-section {
  margin-top: 8px;
}

.comments-section .section-title {
  margin-bottom: 20px;
}

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(162,155,254,0.4), rgba(162,155,254,0.05));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
  animation: fadeSlideIn 0.4s ease both;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #a29bfe;
  background: #0a0a1a;
  z-index: 1;
}

.timeline-item:first-child .timeline-dot {
  background: #a29bfe;
  box-shadow: 0 0 8px rgba(162,155,254,0.5);
}

.timeline-week {
  font-size: 0.78rem;
  color: rgba(162,155,254,0.8);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.timeline-content {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 18px;
  transition: border-color 0.2s;
}

.timeline-content:hover {
  border-color: rgba(162,155,254,0.25);
}

.timeline-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.75);
}

.timeline-text .highlight-tip {
  display: block;
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(56,139,253,0.08);
  border-left: 3px solid rgba(56,139,253,0.5);
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}

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

/* ---------- Weekly Cards ---------- */
.weekly-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.week-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  animation: fadeSlideIn 0.4s ease both;
  transition: border-color 0.2s;
}

.week-card:first-child {
  border-color: rgba(162,155,254,0.25);
}

.week-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
}

.week-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(162,155,254,0.9);
  letter-spacing: 1px;
}

.week-card-scores {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
}

.week-card-section {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.week-card-toggle {
  padding: 10px 18px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color 0.2s, background 0.2s;
}

.week-card-toggle:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.03);
}

.week-card-toggle:active {
  background: rgba(255,255,255,0.06);
}

.week-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 18px;
}

.week-card-body.open {
  max-height: 800px;
  padding: 0 18px 16px;
}

.analysis-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
}

/* ---------- Question Stats (simple bars) ---------- */
.question-stats {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.question-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  min-width: 52px;
}

.question-bar-wrap {
  flex: 1;
}

.question-bar-bg {
  height: 26px;
  border-radius: 13px;
  background: rgba(255,107,107,0.2);
  overflow: hidden;
}

.question-bar-fill {
  height: 100%;
  border-radius: 13px;
  background: linear-gradient(90deg, #00b894, #00d4aa);
  transition: width 0.8s ease;
  min-width: 2px;
}

.question-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 72px;
}

.question-score {
  font-size: 1.05rem;
  font-weight: 700;
}

.question-pct {
  font-size: 0.78rem;
  opacity: 0.5;
}

.question-info.pct-high .question-score { color: #00d4aa; }
.question-info.pct-mid .question-score { color: #ffc048; }
.question-info.pct-low .question-score { color: #ff6b6b; }

/* ---------- No Data ---------- */
.no-data {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255,255,255,0.35);
  font-size: 1.05rem;
}

.no-data .no-data-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Legacy compat */
.comment-card { display: none; }
.comment-week { display: none; }
.comment-text { display: none; }

/* ---------- Upload View ---------- */
.upload-view {
  padding: 72px 20px 120px;
  max-width: 720px;
  margin: 0 auto;
}

.upload-header {
  margin-bottom: 24px;
}

.upload-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #f0f0f0;
}

.upload-header p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

/* 照片网格 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.photo-item {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-item .photo-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  border: none;
  color: #ff6b6b;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}

.photo-item .photo-delete:hover {
  background: rgba(255,60,60,0.4);
}

.photo-item .photo-replace {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(0,0,0,0.65);
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s;
}

.photo-item .photo-replace:hover {
  background: rgba(56,139,253,0.5);
}

/* Full-screen photo preview */
.photo-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
  padding: 16px;
}

.photo-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* 添加照片按钮 */
.add-photo-btn {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px dashed rgba(255,255,255,0.15);
  background: transparent;
  color: rgba(255,255,255,0.3);
  font-size: 2.4rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}

.add-photo-btn:hover {
  border-color: rgba(56,139,253,0.5);
  color: rgba(56,139,253,0.7);
}

.add-photo-btn span {
  font-size: 0.72rem;
  margin-top: 6px;
}

/* 照片编号角标 */
.photo-num {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(56,139,253,0.85);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* 空状态提示 */
.photo-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 0.95rem;
  padding: 60px 20px;
}

/* 底部操作栏 */
.upload-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: rgba(10,10,26,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 12px;
  justify-content: center;
  max-width: 100%;
  z-index: 90;
}

.btn-reset {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex: 0 0 auto;
}

.btn-reset:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* 选择照片按钮（固定位置，最醒目） */
.btn-capture {
  padding: 14px 32px;
  border-radius: 28px;
  border: none;
  background: linear-gradient(135deg, #388bfd, #6c5ce7);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  flex: 2;
  max-width: 200px;
  box-shadow: 0 4px 20px rgba(56,139,253,0.35);
  letter-spacing: 0.02em;
}

.btn-capture:active {
  transform: scale(0.94);
}

.btn-submit {
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #00b894, #00d4aa);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  flex: 1;
  max-width: 120px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,212,170,0.3);
}

.btn-submit:active {
  transform: scale(0.97);
}

.btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Loading ---------- */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: #a29bfe;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading p {
  margin-top: 14px;
  color: rgba(255,255,255,0.35);
  font-size: 0.88rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  bottom: 100px;
}

.toast-success {
  background: rgba(0,212,170,0.92);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,212,170,0.3);
}

.toast-error {
  background: rgba(255,107,107,0.92);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,107,107,0.3);
}

.toast-info {
  background: rgba(56,139,253,0.92);
  color: #fff;
  box-shadow: 0 4px 20px rgba(56,139,253,0.3);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 28px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
}

.modal-box h3 {
  font-size: 1.1rem;
  color: #f0f0f0;
  margin-bottom: 10px;
}

.modal-box p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions button {
  flex: 1;
  padding: 12px 0;
  border-radius: 10px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-cancel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
}

.modal-cancel:hover {
  background: rgba(255,255,255,0.12);
}

.modal-confirm {
  background: linear-gradient(135deg, #00b894, #00d4aa);
  border: none;
  color: #fff;
  font-weight: 600;
}

.modal-confirm:hover {
  box-shadow: 0 4px 16px rgba(0,212,170,0.3);
}

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

/* ---------- Uploading overlay on photo ---------- */
.photo-item .uploading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.photo-item .uploading-overlay .loading-spinner {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

.photo-item .uploading-overlay .overlay-text {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
}

/* ---------- Responsive (mobile) ---------- */
@media (max-width: 640px) {
  .student-header h1 {
    font-size: 2rem;
  }

  .student-header p {
    font-size: 0.95rem;
  }

  .action-cards {
    flex-direction: column;
    gap: 16px;
    padding: 0 8px;
  }

  .action-card {
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 20px 24px;
    justify-content: flex-start;
    gap: 16px;
  }

  .card-icon {
    font-size: 2.4rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .action-card h3 {
    font-size: 1.05rem;
  }

  .action-card p {
    font-size: 0.78rem;
  }

  .action-card .card-text {
    text-align: left;
  }

  .progress-view {
    padding: 64px 14px 32px;
  }

  .progress-view > h2 {
    font-size: 1.2rem;
  }

  /* Hero Score mobile */
  .hero-score {
    padding: 24px 16px 22px;
    margin-bottom: 20px;
  }

  .hero-score-number {
    font-size: 3.2rem;
  }

  .hero-stars {
    font-size: 1.3rem;
  }

  .hero-verdict {
    font-size: 0.85rem;
  }

  /* Dimension bars mobile */
  .dim-bars {
    padding: 16px 14px;
    gap: 12px;
  }

  .dim-bar-label {
    font-size: 0.88rem;
    min-width: 58px;
  }

  .dim-bar-track {
    height: 18px;
  }

  .dim-bar-value {
    font-size: 1.05rem;
  }

  .dim-bar-desc {
    padding-left: 70px;
  }

  /* Charts mobile */
  .chart-container {
    padding: 14px 10px;
  }

  .chart-container canvas {
    max-height: 220px;
  }

  /* Question stats mobile */
  .question-stats {
    padding: 16px 14px;
    gap: 14px;
  }

  .question-bar-bg {
    height: 22px;
  }

  .question-score {
    font-size: 1rem;
  }

  /* Timeline mobile */
  .timeline {
    padding-left: 24px;
  }

  .timeline-content {
    padding: 12px 14px;
  }

  .timeline-text {
    font-size: 1rem;
  }

  /* Weekly cards mobile */
  .week-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
  }

  .week-card-toggle {
    padding: 10px 14px;
    font-size: 0.95rem;
  }

  .week-card-body.open {
    padding: 0 14px 14px;
  }

  .analysis-text {
    font-size: 1rem;
  }

  .upload-view {
    padding: 64px 14px 110px;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .upload-actions {
    padding: 12px 14px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .btn-reset {
    padding: 12px 16px;
    font-size: 0.88rem;
  }

  .btn-submit {
    padding: 12px 16px;
    font-size: 0.92rem;
  }

  .section-title {
    font-size: 1rem;
  }

  .toast.show {
    bottom: 80px;
  }
}

/* ---------- Scrollbar (webkit) ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
