/* ================================================================
   quiz-pages.css — 各独立页面专属样式
   路径：/static/css/quiz-pages.css
   ================================================================ */

/* ===== 登录页 ===== */
body.page-login {
  background: linear-gradient(160deg, #0d47a1 0%, #1677ff 55%, #42a5f5 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}
.login-logo {
  width: 80px; height: 80px;
  background: rgba(255,255,255,.15);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 42px;
}
.login-title {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.login-sub {
  color: rgba(255,255,255,.72);
  font-size: 14px;
  margin-bottom: 48px;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
}
.login-card p {
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.7;
}
.btn-wx-login {
  width: 100%;
  padding: 14px 0;
  background: #07c160;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .25s ease;
}
.btn-wx-login:active { background: #06a851; }
.btn-wx-login .wx-icon {
  width: 24px; height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9.5 3C5.36 3 2 5.91 2 9.5c0 2.02 1.02 3.83 2.63 5.03L4 17l2.66-1.33A8.17 8.17 0 0 0 9.5 16c.24 0 .48-.01.72-.03A6.47 6.47 0 0 1 10 14.5C10 11.46 12.91 9 16.5 9c.29 0 .57.02.85.05C16.5 5.62 13.36 3 9.5 3zM7 8a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm5 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm9.5 1C18.02 9 15 11.24 15 14c0 1.5.77 2.83 1.97 3.74L16.5 20l2.22-1.11c.55.14 1.12.11 1.78.11C23.98 19 27 16.76 27 14s-3.02-5-6.5-5zm-2 3.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5zm4 0a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.login-tip {
  color: var(--text-tip);
  font-size: 12px;
  margin-top: 16px;
  line-height: 1.6;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: var(--text-tip);
  font-size: 12px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #eee;
}
.btn-mock-login {
  width: 100%;
  padding: 12px 0;
  background: #fff7e6;
  color: #d48806;
  border: 1.5px dashed #ffc53d;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .2s;
}
.btn-mock-login:active {
  background: #fff1cc;
}

/* ===== 首页 ===== */
body.page-home {
  background: var(--bg);
  min-height: 100vh;
}
.home-header {
  background: linear-gradient(135deg, #1677ff 0%, #0950c5 100%);
  padding: 24px 20px 60px;
  position: relative;
  overflow: hidden;
}
.home-header::after {
  content: '';
  position: absolute;
  bottom: -30px; left: -10%;
  width: 120%;
  height: 60px;
  background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.user-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name  { color: #fff; font-size: 16px; font-weight: 600; }
.user-level { color: rgba(255,255,255,.7); font-size: 12px; margin-top: 2px; }
.btn-share-top {
  margin-left: auto;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 13px;
  cursor: pointer;
}
.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 20px;
  position: relative;
  z-index: 1;
  margin-top: -20px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-card .num   { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.home-section { padding: 20px 20px 24px; }
.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 16px;
  background: var(--primary);
  border-radius: 2px;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.mode-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease;
  text-decoration: none;
  display: block;
}
.mode-card:active { transform: scale(.97); }
.mode-card .mode-icon { font-size: 32px; margin-bottom: 8px; }
.mode-card .mode-name { font-size: 15px; font-weight: 600; color: var(--text); }
.mode-card .mode-desc { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.mode-card.wrong-book .badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px; height: 20px;
  border-radius: 10px;
  display: none;
  align-items: center; justify-content: center;
  padding: 0 5px;
}
.mode-card.wrong-book .badge.show { display: flex; }
.mode-card.wrong-book { border: 1.5px solid var(--danger-light); }

/* ===== 结果页 ===== */
body.page-result {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom, 0));
  text-align: center;
  gap: 24px;
}
.result-circle {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 6px solid var(--primary);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  box-shadow: 0 0 0 12px rgba(22,119,255,.08);
}
.result-score {
  font-size: 42px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.result-score-label { font-size: 13px; color: var(--text-sub); }
.result-title { font-size: 22px; font-weight: 700; }
.result-sub   { font-size: 14px; color: var(--text-sub); }
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 400px;
}
.rs-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 8px;
  box-shadow: var(--shadow);
  text-align: center;
}
.rs-card .num { font-size: 22px; font-weight: 700; }
.rs-card .num.correct { color: var(--success); }
.rs-card .num.wrong   { color: var(--danger); }
.rs-card .num.total   { color: var(--primary); }
.rs-card .label { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

/* ===== 错题本清空祝贺 ===== */
body.page-result.wrong-clear {
  background: linear-gradient(160deg, #f6ffed 0%, #d9f7be 100%);
}
.wrong-clear-wrap {
  text-align: center;
}
.clear-icon  { font-size: 72px; margin-bottom: 16px; }
.clear-title { font-size: 22px; font-weight: 700; color: var(--success); margin-bottom: 8px; }
.clear-sub   { font-size: 14px; color: var(--text-sub); margin-bottom: 32px; }
