/* Shared styles for practice / review / vocabulary / mistakes pages. */

.page-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 28px 60px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}
.page-sub { font-size: 13.5px; color: #6b7280; line-height: 1.7; max-width: 640px; }
.page-head-stats { display: flex; align-items: center; gap: 12px; }

.stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}
.sp-num { font-size: 18px; font-weight: 700; color: #2c6cf6; }
.sp-label { font-size: 12px; color: #6b7280; }

.empty-state {
  text-align: center;
  padding: 64px 24px;
  background: #ffffff;
  border-radius: 16px;
  color: #6b7280;
}
.es-icon { font-size: 48px; margin-bottom: 12px; }
.es-title { font-size: 18px; font-weight: 700; color: #111827; margin-bottom: 6px; }
.es-sub { font-size: 13.5px; line-height: 1.7; }
.es-sub a { color: #2c6cf6; font-weight: 600; }

/* ---------- Mistakes list ---------- */
.mistakes-list { display: flex; flex-direction: column; gap: 12px; }

.mistake-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mc-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.mc-badge.src-warmup { background: #fff7ed; color: #c2410c; }
.mc-badge.src-translation { background: #eff6ff; color: #1d4ed8; }
.mc-badge.src-translate { background: #f0fdf4; color: #15803d; }
.mc-badge.src-listen { background: #fef3c7; color: #92400e; }
.mc-count {
  font-size: 12px;
  color: #6b7280;
}
.mc-count strong { color: #b91c1c; font-weight: 700; }
.mc-date { font-size: 12px; color: #94a3b8; margin-left: auto; }

.mc-prompt {
  font-size: 15px;
  color: #1f2937;
  font-weight: 600;
  line-height: 1.5;
}

.mc-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
}
.mc-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  flex-shrink: 0;
  width: 64px;
}
.mc-wrong { color: #b91c1c; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.mc-right { color: #047857; font-weight: 600; }

.mc-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ---------- Practice page ---------- */
.practice-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .practice-layout { grid-template-columns: 1fr; }
}

.practice-stage {
  background: linear-gradient(135deg, #f0f6ff 0%, #fef5ee 100%);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid #e5edf7;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 480px;
}

.ps-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
}
.ps-meta b { color: #2c6cf6; font-size: 16px; }

.ps-prompt {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px 22px;
  font-size: 17px;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  border-left: 4px solid #2c6cf6;
}
.ps-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  margin-bottom: 8px;
}

.ps-answer, .ps-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
}
.ps-answer {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  align-items: center;
}
.ps-answer .wa-placeholder { color: #9ca3af; font-size: 13px; font-style: italic; }

.ps-result {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}
.ps-result.is-correct {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.ps-result.is-wrong {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.ps-footer { display: flex; gap: 8px; align-items: center; }
.ps-footer .btn-primary { margin-left: auto; }

.practice-side {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.side-title { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 4px; }
.side-stat {
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
}
.side-stat-num { font-size: 28px; font-weight: 700; color: #2c6cf6; font-variant-numeric: tabular-nums; }
.side-stat-label { font-size: 12px; color: #6b7280; margin-top: 2px; }

/* ---------- Review page ---------- */
.review-section { margin-bottom: 32px; }
.review-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.review-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.review-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.rc-num { font-size: 12px; color: #94a3b8; font-weight: 600; }
.rc-topic { font-size: 15px; font-weight: 700; color: #111827; line-height: 1.4; }
.rc-meta { font-size: 12px; color: #6b7280; }
.rc-meta .rc-due { color: #b45309; font-weight: 600; }
.rc-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2c6cf6;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.rc-cta:hover { color: #1e54d6; }

/* ---------- Vocabulary page ---------- */
.vocab-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.vocab-tab {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.vocab-tab:hover { background: #f9fafb; color: #111827; }
.vocab-tab.active { background: #2c6cf6; color: #ffffff; border-color: #2c6cf6; }

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.vocab-card {
  position: relative;
  aspect-ratio: 4 / 3;
  perspective: 1000px;
  cursor: pointer;
}
.vc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}
.vocab-card.is-flipped .vc-inner { transform: rotateY(180deg); }
.vc-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.vc-face-front {
  background: #ffffff;
  color: #1f2937;
}
.vc-face-back {
  background: linear-gradient(135deg, #eff6ff 0%, #fdf4ff 100%);
  color: #1f2937;
  transform: rotateY(180deg);
}
.vc-word { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.vc-pos { font-size: 11px; color: #94a3b8; font-style: italic; }
.vc-zh { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.vc-ex {
  font-size: 11.5px;
  color: #6b7280;
  font-style: italic;
  line-height: 1.5;
}
.vc-master {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  cursor: pointer;
  z-index: 5;
  transition: all 0.15s ease;
}
.vc-master:hover { border-color: #2c6cf6; color: #2c6cf6; }
.vocab-card.is-mastered .vc-master {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}
.vocab-card.is-mastered .vc-face { opacity: 0.65; }
