/* ========== 基础重置与变量 ========== */

:root {
  --primary-1: #1A5FBD;
  --primary-2: #2B7DE9;
  --primary-3: #4A9BF7;
  --bg-dark: #0F3A7A;
  --bg-light: #F0F4FA;
  --bg-white: #FFFFFF;
  --text-main: #1A1A1A;
  --text-white: #FFFFFF;
  --text-gray: #666666;
  --success: #52C41A;
  --error: #FF4D4F;
  --warning: #FAAD14;
  --gold: #D4AF37;
  --gold-light: #F5E6A3;
  --shadow: 0 8px 32px rgba(26, 95, 189, 0.15);
  --radius: 16px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  background: var(--bg-light);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ========== 页面容器 ========== */
.page {
  display: none;
  width: 100%;
  min-height: 100vh;
  padding: 0 16px 24px;
  animation: fadeIn 0.4s ease;
}

.page.active {
  display: flex;
  flex-direction: column;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 按钮 ========== */
.btn-primary {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
  color: var(--text-white);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(26, 95, 189, 0.35);
  letter-spacing: 2px;
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(26, 95, 189, 0.25);
}

.btn-primary:disabled {
  background: #B0C4DE;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  width: 100%;
  height: 48px;
  border: 1px solid var(--primary-1);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--primary-1);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.25s ease;
}

.btn-secondary:active {
  background: var(--bg-light);
}

/* ========== 首页 ========== */
#page-home {
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  z-index: 0;
}

.home-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #0F3A7A 0%, #1A5FBD 40%, #2B7DE9 70%, #4A9BF7 100%);
  z-index: 0;
  pointer-events: none;
}

.home-bg::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.home-bg::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -15%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.home-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 40px 24px;
  text-align: center;
}

/* ========== 关注引导首页（page-splash） ========== */
.splash-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #0A2A6E 0%, #1A5FBD 55%, #0F3A7A 100%);
  z-index: 0;
}

.splash-content {
  position: relative;
  z-index: 1;
  padding: 7vh 20px 12px 20px;
  text-align: center;
}

/* 顶部大图（40%） */
.splash-top-img {
  text-align: center;
  margin: 0 0 4px;
  animation: splashImgFloat 3s ease-in-out infinite;
}

@keyframes splashImgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.splash-top-img img {
  width: 40%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* 标题文字 */
.splash-hero-text {
  text-align: center;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: rgba(255,215,0,0.08);
  border-radius: 12px;
  border: 1px solid rgba(255,215,0,0.2);
}

.splash-hero-year {
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFD700;
  letter-spacing: 10px;
  margin-bottom: 6px;
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.splash-hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 20px rgba(255,215,0,0.3);
  line-height: 1.4;
}

.splash-hero-sub {
  font-size: 1.1rem;
  font-weight: 600;
  color: #FFD700;
  letter-spacing: 4px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* 口号横幅 */
.splash-slogan {
  background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, rgba(255,215,0,0.1) 100%);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 12px;
  padding: 14px 20px;
  margin: 0 4px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  line-height: 1.8;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* 底部图 */
.splash-bottom-img {
  margin: 24px 4px 0;
  text-align: center;
}

.splash-bottom-img img {
  width: 50%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* 关注账号卡片 */
.splash-follow-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.97);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  text-align: left;
  animation: splashCardIn 0.5s ease-out 0.2s both;
}

@keyframes splashCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.splash-follow-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.splash-follow-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A5FBD, #2B7DE9);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(26, 95, 189, 0.3);
}

.splash-follow-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.splash-follow-info {
  min-width: 0;
}

.splash-follow-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.splash-follow-sub {
  font-size: 0.75rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.splash-follow-btn {
  flex-shrink: 0;
  padding: 7px 24px;
  background: linear-gradient(135deg, #00C078, #00A566);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 22px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 192, 120, 0.4);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.splash-follow-btn.followed {
  background: #E8E8E8;
  color: #999;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.splash-follow-btn:active {
  transform: scale(0.93);
  box-shadow: 0 1px 6px rgba(0, 192, 120, 0.2);
  background: linear-gradient(135deg, #00A566, #008F56);
}

.splash-follow-btn.followed:active {
  transform: none;
  box-shadow: none;
  background: #E8E8E8;
}

/* 开始答题按钮 */
.splash-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  background: transparent;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 28px;
  cursor: pointer;
  transition: all 0.25s ease;
  animation: splashBtnIn 0.5s ease-out 0.4s both;
  letter-spacing: 2px;
}

@keyframes splashBtnIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.splash-start-btn:active {
  transform: scale(0.96);
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

/* 底部主办单位 */
.splash-footer {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

.home-badge {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.home-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.home-subtitle {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-top: 8px;
  letter-spacing: 3px;
}

.home-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin-top: 12px;
  margin-bottom: 32px;
  letter-spacing: 1px;
}

.form-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: left;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #E0E6F0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-main);
  background: #FAFBFD;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-2);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(43, 125, 233, 0.1);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.home-footer {
  margin-top: 24px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
}

/* ========== 答题页 ========== */
#page-quiz {
  background: var(--bg-light);
  padding-top: 16px;
}

.quiz-header {
  margin-bottom: 16px;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #E0E6F0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-1), var(--primary-3));
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-1);
  min-width: 48px;
  text-align: right;
}

.quiz-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.quiz-type {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
  color: var(--text-white);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 14px;
  align-self: flex-start;
}

.quiz-type-multi {
  background: linear-gradient(135deg, #FF4D4F, #FF7875);
  animation: pulseMulti 1.5s ease-in-out infinite;
}

@keyframes pulseMulti {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(255, 77, 79, 0); }
}

.quiz-question {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 20px;
}

.quiz-options {
  flex: 1;
  overflow-y: auto;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #F5F7FB;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-item:active {
  transform: scale(0.98);
}

.option-item.selected {
  background: rgba(26, 95, 189, 0.08);
  border-color: var(--primary-1);
}

.option-item.correct {
  background: rgba(82, 196, 26, 0.1);
  border-color: var(--success);
}

.option-item.wrong {
  background: rgba(255, 77, 79, 0.08);
  border-color: var(--error);
}

.option-key {
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border: 1px solid #D0D8E8;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-gray);
  flex-shrink: 0;
}

.option-item.selected .option-key {
  background: var(--primary-1);
  color: var(--text-white);
  border-color: var(--primary-1);
}

.option-item.correct .option-key {
  background: var(--success);
  color: var(--text-white);
  border-color: var(--success);
}

.option-item.wrong .option-key {
  background: var(--error);
  color: var(--text-white);
  border-color: var(--error);
}

.option-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
  padding-top: 2px;
}

.btn-submit {
  margin-top: 16px;
}

/* ========== 解析页 ========== */
#page-analysis {
  background: var(--bg-light);
  align-items: center;
  justify-content: center;
  padding-top: 40px;
}

.analysis-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.analysis-result {
  font-size: 3rem;
  margin-bottom: 8px;
}

.analysis-score {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.analysis-score.correct {
  color: var(--success);
}

.analysis-score.wrong {
  color: var(--error);
}

.analysis-detail {
  text-align: left;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #F8FAFF;
  border-radius: var(--radius-sm);
}

.analysis-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-gray);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.analysis-answer {
  font-size: 1rem;
  font-weight: 600;
  color: var(--success);
}

.analysis-user {
  font-size: 1rem;
  font-weight: 500;
}

.analysis-user.correct {
  color: var(--success);
}

.analysis-user.wrong {
  color: var(--error);
}

.analysis-text {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.7;
}

/* ========== 成绩结果页 ========== */
#page-result {
  background: linear-gradient(160deg, #0F3A7A 0%, #1A5FBD 50%, #2B7DE9 100%);
  align-items: center;
  justify-content: center;
  padding-top: 40px;
}

.result-content {
  text-align: center;
  width: 100%;
  max-width: 380px;
  padding: 0 8px;
}

.result-icon {
  font-size: 4.5rem;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

.result-score-wrap {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}

.result-score-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.result-score-num {
  font-size: 4rem;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
  text-shadow: 0 2px 12px rgba(212,175,55,0.4);
}

.result-score-total {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  margin-top: 6px;
}

.result-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  margin-bottom: 20px;
  gap: 0;
}

.result-stat-item {
  flex: 1;
  text-align: center;
}

.result-stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}

.result-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
}

.result-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.25);
  margin: 0 8px;
}

.result-encourage {
  font-size: 1rem;
  color: var(--gold-light);
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.6;
  padding: 0 8px;
}

.result-tip {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
}

.result-retry-btn {
  background: linear-gradient(135deg, var(--gold), #B8960C);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
  letter-spacing: 3px;
}

/* ========== 关注引导页 ========== */
#page-follow {
  background: linear-gradient(160deg, #0F3A7A 0%, #1A5FBD 50%, #2B7DE9 100%);
  align-items: center;
  justify-content: center;
  padding-top: 40px;
}

.follow-content {
  text-align: center;
  width: 100%;
  max-width: 380px;
}

.follow-trophy {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
  margin-bottom: 16px;
}

.follow-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.follow-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 28px;
}

/* 抖音风格关注账号卡片 */
.follow-account-card {
  background: var(--bg-white);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  text-align: left;
}

.follow-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.follow-card-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A5FBD, #2B7DE9);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.follow-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.follow-card-info {
  flex: 1;
  min-width: 0;
}

.follow-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.follow-card-label {
  font-size: 0.72rem;
  color: #999;
  margin-bottom: 1px;
}

.follow-card-douyinid {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: 'Courier New', Consolas, monospace;
  letter-spacing: 1.5px;
}

.follow-copy-btn,
.follow-go-btn {
  flex-shrink: 0;
  padding: 8px 22px;
  background: linear-gradient(135deg, #00C078, #00A566);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 22px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(0, 192, 120, 0.35);
}

.follow-copy-btn:active,
.follow-go-btn:active {
  transform: scale(0.93);
  background: linear-gradient(135deg, #00A566, #008F56);
}

.follow-go-btn.followed {
  background: #E8E8E8;
  color: #999;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

/* 操作步骤 */
.follow-steps {
  text-align: left;
  margin-bottom: 28px;
}

.follow-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  border-left: 3px solid var(--gold);
  backdrop-filter: blur(4px);
}

.follow-step:last-child {
  margin-bottom: 0;
}

.follow-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: #0F3A7A;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.follow-step-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

.follow-step-text strong {
  color: var(--gold-light);
  font-weight: 600;
}

/* 倒计时按钮 */
.btn-confirm {
  background: linear-gradient(135deg, var(--gold), #B8960C);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
  transition: all 0.3s ease;
}

.btn-confirm:disabled {
  background: #5A6A80;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-confirm.countdown-active {
  background: linear-gradient(135deg, var(--gold), #B8960C);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
  animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35); }
  50% { box-shadow: 0 4px 24px rgba(212, 175, 55, 0.55); }
}

.follow-tip {
  margin-top: 12px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

/* Toast 提示 */
.follow-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(82, 196, 26, 0.92);
  color: #fff;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 99998;
  opacity: 0;
  transition: all 0.35s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(82, 196, 26, 0.3);
}

.follow-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.follow-toast.hidden {
  display: none;
}

/* ========== 证书页 ========== */
#page-certificate {
  background: linear-gradient(160deg, #0F3A7A 0%, #1A5FBD 50%, #2B7DE9 100%);
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
}

.certificate-wrapper {
  width: 100%;
  max-width: 400px;
  margin-bottom: 20px;
}

.certificate {
  background: linear-gradient(145deg, #FFFDF5 0%, #FFF8E1 50%, #FFFDF5 100%);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.cert-border {
  border: 2px solid var(--gold);
  border-radius: calc(var(--radius) - 4px);
  padding: 4px;
}

.cert-inner {
  border: 1px dashed var(--gold);
  border-radius: calc(var(--radius) - 6px);
  padding: 28px 20px;
  text-align: center;
  position: relative;
}

.cert-badge {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.cert-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 6px;
  margin-bottom: 4px;
}

.cert-subtitle {
  font-size: 0.9rem;
  color: var(--text-gray);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.cert-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 20px;
}

.cert-body {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 2;
  margin-bottom: 20px;
}

.cert-body p {
  margin-bottom: 4px;
}

.cert-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-1);
  margin: 8px 0;
  letter-spacing: 4px;
}

.cert-highlight {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 8px;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
  padding: 0 8px;
}

.cert-date {
  font-size: 0.8rem;
  color: var(--text-gray);
}

.cert-qrcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cert-qrcode img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #D4AF37;
}

.cert-qrcode-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  background: #F0F0F0;
  border: 1px solid #DDD;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #999;
  letter-spacing: 1px;
}

.cert-qrcode span {
  font-size: 0.7rem;
  color: var(--text-gray);
}

.cert-actions {
  width: 100%;
  max-width: 400px;
}

.cert-save-tip {
  font-size: 0.85rem;
  color: #fff;
  text-align: center;
  margin: 8px 0 4px;
}

/* ========== 加载动画 ========== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 58, 122, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: var(--text-white);
}

.loading.hidden {
  display: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== 响应式 ========== */
@media (max-width: 360px) {
  .home-title { font-size: 1.5rem; }
  .home-subtitle { font-size: 1.1rem; }
  .quiz-question { font-size: 1rem; }
  .cert-title { font-size: 1.4rem; }
}

@media (min-width: 480px) {
  .page { padding: 0 24px 32px; }
}

/* ========== 综合解析页 ========== */
#page-all-analysis {
  background: var(--bg-light);
  padding-top: 24px;
}

.all-analysis-wrap {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.all-analysis-header {
  text-align: center;
  margin-bottom: 20px;
}

.all-analysis-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.all-analysis-summary {
  font-size: 0.9rem;
  color: var(--text-gray);
}

.all-analysis-correct {
  color: var(--success);
  font-weight: 700;
}

.all-analysis-wrong {
  color: var(--error);
  font-weight: 700;
}

.all-analysis-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.analysis-item {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 16px;
  border-left: 4px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.analysis-correct {
  border-left-color: var(--success);
}

.analysis-wrong {
  border-left-color: var(--error);
}

.analysis-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.analysis-item-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-1);
  color: var(--text-white);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.analysis-item-status {
  font-size: 0.8rem;
  font-weight: 600;
}

.analysis-item-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 10px;
}

.analysis-item-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.analysis-item-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-gray);
  white-space: nowrap;
  letter-spacing: 1px;
}

.analysis-item-value {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.5;
}

.wrong-text {
  color: var(--error);
  text-decoration: line-through;
}

.analysis-item-explain {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #E8ECF0;
}

.analysis-item-text {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.7;
  display: block;
  margin-top: 4px;
}
