/* ==================== 全局重置与设计变量 ==================== */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-bg: #eef2ff;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
  --shadow-2xl: 0 24px 64px rgba(0,0,0,0.16);
  --shadow-primary: 0 8px 32px rgba(99,102,241,0.25);
  --shadow-success: 0 8px 32px rgba(16,185,129,0.25);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-vibrant: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --gradient-cool: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  --gradient-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --gradient-sunset: linear-gradient(135deg, #ff6e7f 0%, #bfe9ff 100%);
  --gradient-purple: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::selection {
  background: rgba(99,102,241,0.2);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f5f3ff;
  color: var(--gray-800);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==================== 动态背景 ==================== */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 30%, #fff7ed 60%, #f0fdf4 100%);
}

.bg-decoration .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: floatOrb 15s ease-in-out infinite;
}

.bg-decoration .orb-1 {
  width: 600px;
  height: 600px;
  background: #818cf8;
  top: -150px;
  right: -100px;
  animation-delay: 0s;
}

.bg-decoration .orb-2 {
  width: 500px;
  height: 500px;
  background: #f0abfc;
  bottom: -100px;
  left: -80px;
  animation-delay: -3s;
  animation-duration: 18s;
}

.bg-decoration .orb-3 {
  width: 400px;
  height: 400px;
  background: #fbbf24;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -6s;
  animation-duration: 20s;
  opacity: 0.15;
}

.bg-decoration .orb-4 {
  width: 350px;
  height: 350px;
  background: #34d399;
  top: 20%;
  left: -50px;
  animation-delay: -9s;
  animation-duration: 16s;
  opacity: 0.2;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -40px) scale(1.05); }
  66% { transform: translate(-30px, 30px) scale(0.95); }
}

/* 网格纹理叠加 */
.bg-decoration::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

/* ==================== 玻璃卡片基础 ==================== */
.glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,0.9);
}

.card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,0.9);
  padding: 44px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-vibrant);
  opacity: 0.9;
}

/* ==================== 通用容器 ==================== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* ==================== 首页 ==================== */
.landing-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.landing-card {
  width: 100%;
  max-width: 540px;
  text-align: center;
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.school-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  background: var(--gradient-vibrant);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: white;
  font-weight: 800;
  box-shadow: var(--shadow-primary), 0 0 0 6px rgba(255,255,255,0.5);
  position: relative;
  animation: logoFloat 3s ease-in-out infinite;
}

.school-logo::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  background: var(--gradient-vibrant);
  z-index: -1;
  filter: blur(12px);
  opacity: 0.5;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.landing-card h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-card .subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 36px;
  letter-spacing: 0.5px;
}

/* 信息标签 */
.info-pills {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.info-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.info-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.info-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.info-pill .dot.purple { background: #8b5cf6; box-shadow: 0 0 8px #8b5cf6; }
.info-pill .dot.blue { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.info-pill .dot.green { background: #10b981; box-shadow: 0 0 8px #10b981; }

/* 表单 */
.form-group {
  margin-bottom: 18px;
  text-align: left;
  position: relative;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.form-group label .label-icon {
  font-size: 14px;
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.input-wrap {
  position: relative;
}

.input-wrap .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.4;
  transition: var(--transition);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 15px 18px 15px 48px;
  font-size: 15px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  outline: none;
  font-family: inherit;
  font-weight: 500;
}

.form-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), var(--shadow-sm);
}

.form-input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.form-input::placeholder {
  color: var(--gray-400);
  font-weight: 400;
}

/* 无图标的输入框 */
.form-input.no-icon {
  padding-left: 18px;
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 36px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-vibrant);
  background-size: 200% 200%;
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(99,102,241,0.4);
  background-position: 100% 100%;
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,0.8);
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: var(--shadow-success);
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(16,185,129,0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(239,68,68,0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(239,68,68,0.4);
}

.btn-block { width: 100%; }

.btn-sm {
  padding: 9px 18px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ==================== 答题页 ==================== */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.quiz-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.8);
  padding: 8px 18px 8px 8px;
  border-radius: 40px;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.student-badge .avatar {
  width: 36px;
  height: 36px;
  background: var(--gradient-vibrant);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

/* 进度条 */
.progress-wrapper {
  margin-bottom: 20px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-vibrant);
  background-size: 200% 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  position: relative;
  animation: shimmer 2s linear infinite;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmerMove 2s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes shimmerMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-text {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 600;
}

.progress-text .answered-count {
  color: var(--primary);
}

/* 计时器 */
.timer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.8);
  padding: 10px 20px;
  border-radius: 40px;
  box-shadow: var(--shadow-sm);
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-700);
  font-variant-numeric: tabular-nums;
  transition: var(--transition);
}

.timer .timer-icon {
  font-size: 18px;
}

.timer.warning {
  color: var(--warning);
  border-color: rgba(245,158,11,0.3);
  background: rgba(254,243,199,0.7);
}

.timer.danger {
  color: white;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: rgba(239,68,68,0.5);
  box-shadow: 0 4px 20px rgba(239,68,68,0.4);
  animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.03); }
}

/* 题目卡片 */
.question-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.9);
  padding: 40px;
  margin-bottom: 20px;
  animation: cardSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.question-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-vibrant);
  opacity: 0.8;
}

@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.tag-type-single {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: 1px solid rgba(59,130,246,0.2);
}
.tag-type-multiple {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid rgba(245,158,11,0.2);
}
.tag-type-judge {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid rgba(16,185,129,0.2);
}
.tag-category {
  background: rgba(255,255,255,0.8);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
}

.question-num {
  font-size: 14px;
  font-weight: 800;
  background: var(--gradient-vibrant);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.question-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.75;
  margin-bottom: 28px;
  letter-spacing: -0.2px;
}

/* 选项 */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255,255,255,0.6);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.option-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  transform: scaleY(0);
  transition: var(--transition);
  border-radius: 2px;
}

.option-item:hover {
  border-color: var(--primary-light);
  background: rgba(238, 242, 255, 0.8);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.option-item:hover::before {
  transform: scaleY(1);
}

.option-item.selected {
  border-color: var(--primary);
  background: rgba(238, 242, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12), var(--shadow-sm);
}

.option-item.selected::before {
  transform: scaleY(1);
}

.option-item.correct {
  border-color: var(--success);
  background: rgba(209, 250, 229, 0.8);
}

.option-item.correct::before {
  background: var(--success);
  transform: scaleY(1);
}

.option-item.wrong {
  border-color: var(--danger);
  background: rgba(254, 226, 226, 0.8);
}

.option-item.wrong::before {
  background: var(--danger);
  transform: scaleY(1);
}

.option-label {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-500);
  transition: var(--transition);
}

.option-item:hover .option-label {
  border-color: var(--primary-light);
  color: var(--primary);
}

.option-item.selected .option-label {
  background: var(--gradient-vibrant);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-sm);
}

.option-item.correct .option-label {
  background: var(--gradient-success);
  border-color: transparent;
  color: white;
}

.option-item.wrong .option-label {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: transparent;
  color: white;
}

.option-text {
  font-size: 15px;
  color: var(--gray-700);
  flex: 1;
  font-weight: 500;
}

.option-item.selected .option-text {
  color: var(--gray-900);
  font-weight: 600;
}

/* 判断题 */
.judge-options {
  display: flex;
  gap: 16px;
}

.judge-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 20px;
  background: rgba(255,255,255,0.6);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.judge-option::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-vibrant);
  opacity: 0;
  transition: var(--transition);
}

.judge-option:hover {
  border-color: var(--primary-light);
  background: rgba(238,242,255,0.8);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.judge-option.selected {
  border-color: var(--primary);
  background: rgba(238,242,255,0.95);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12), var(--shadow-md);
}

.judge-option.correct {
  border-color: var(--success);
  background: rgba(209,250,229,0.8);
}

.judge-option.wrong {
  border-color: var(--danger);
  background: rgba(254,226,226,0.8);
}

.judge-icon {
  font-size: 36px;
  position: relative;
  z-index: 1;
}

.judge-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-700);
  position: relative;
  z-index: 1;
}

.judge-option.selected .judge-label {
  color: var(--primary);
}

/* 答题导航 */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}

/* 题号网格 */
.question-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  justify-content: center;
  padding: 16px;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-md);
}

.grid-item {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid var(--gray-200);
  background: rgba(255,255,255,0.8);
  color: var(--gray-400);
  position: relative;
}

.grid-item.answered {
  background: var(--gradient-vibrant);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-xs);
}

.grid-item.current {
  border-color: var(--primary);
  border-width: 3px;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.15), var(--shadow-sm);
  transform: scale(1.08);
}

.grid-item:hover {
  transform: scale(1.12);
  z-index: 5;
}

.grid-item.current:hover {
  transform: scale(1.15);
}

/* ==================== 结果页 ==================== */
.result-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.result-card {
  width: 100%;
  max-width: 620px;
  text-align: center;
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-circle {
  width: 180px;
  height: 180px;
  margin: 0 auto 28px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.score-circle .bg-ring {
  fill: none;
  stroke: rgba(229,231,235,0.6);
  stroke-width: 10;
}

.score-circle .progress-ring {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-circle .glow-ring {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  opacity: 0.3;
  filter: blur(8px);
  transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-value {
  position: absolute;
  font-size: 46px;
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -1px;
}

.score-value .unit {
  font-size: 20px;
  color: var(--gray-400);
  font-weight: 700;
}

.result-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.result-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.stat-box {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-md);
  padding: 20px 12px;
  transition: var(--transition);
}

.stat-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.stat-box .stat-num {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.stat-box .stat-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.stat-box.correct .stat-num {
  background: var(--gradient-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-box.wrong .stat-num {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-box.total .stat-num {
  background: var(--gradient-vibrant);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* 答题回顾 */
.review-section {
  margin-top: 32px;
  text-align: left;
}

.review-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(229,231,235,0.8);
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-item {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 10px;
  border-left: 4px solid var(--gray-300);
  transition: var(--transition);
}

.review-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.review-item.correct { border-left-color: var(--success); }
.review-item.wrong { border-left-color: var(--danger); }

.review-q {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 10px;
  line-height: 1.6;
}

.review-answer {
  font-size: 14px;
  margin-bottom: 4px;
}

.review-answer .label {
  font-weight: 700;
  color: var(--gray-500);
}

.review-answer.correct-text { color: var(--success); font-weight: 600; }
.review-answer.wrong-text { color: var(--danger); font-weight: 600; }

/* ==================== 后台管理 ==================== */
.admin-page {
  min-height: 100vh;
  padding: 0;
}

.admin-header {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.9);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
  border-radius: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.admin-header .admin-badge {
  background: var(--gradient-vibrant);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-xs);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  padding: 12px 18px 12px 44px;
  font-size: 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
  background: rgba(255,255,255,0.8);
  font-weight: 500;
}

.search-box input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}

.search-box::before {
  content: '\1F50D';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

/* 统计卡片 */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stats-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.8;
}

.stats-card.blue::before { background: var(--gradient-blue); }
.stats-card.green::before { background: var(--gradient-success); }
.stats-card.orange::before { background: var(--gradient-warm); }
.stats-card.purple::before { background: var(--gradient-purple); }

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stats-card .icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  transition: var(--transition);
}

.stats-card:hover .icon {
  transform: scale(1.1) rotate(-5deg);
}

.stats-card .icon.blue { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.stats-card .icon.green { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.stats-card .icon.orange { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }
.stats-card .icon.purple { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); }

.stats-card .info .num {
  font-size: 30px;
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.stats-card .info .label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 600;
  margin-top: 2px;
}

/* 表格 */
.table-wrapper {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.9);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: linear-gradient(135deg, rgba(99,102,241,0.05) 0%, rgba(139,92,246,0.05) 100%);
}

th {
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

tbody tr {
  transition: var(--transition-fast);
}

tbody tr:hover {
  background: rgba(99,102,241,0.04);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* 成绩标签 */
.score-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.score-tag.excellent {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: 1px solid rgba(16,185,129,0.2);
}
.score-tag.good {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: 1px solid rgba(59,130,246,0.2);
}
.score-tag.pass {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid rgba(245,158,11,0.2);
}
.score-tag.fail {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid rgba(239,68,68,0.2);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
}

.empty-state .icon {
  font-size: 72px;
  margin-bottom: 16px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-state p {
  font-size: 16px;
  font-weight: 500;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 30, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.25s ease;
}

.modal {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 90%;
  max-width: 420px;
  box-shadow: var(--shadow-2xl);
  animation: modalSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-vibrant);
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: -0.3px;
}

.modal p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
  text-align: center;
}

/* ==================== 提示消息 ==================== */
.toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(16px);
  color: white;
  padding: 14px 28px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  z-index: 9999;
  box-shadow: var(--shadow-xl);
  animation: toastSlide 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 12px 40px rgba(16,185,129,0.4);
}
.toast.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 12px 40px rgba(239,68,68,0.4);
}
.toast.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 12px 40px rgba(245,158,11,0.4);
}

@keyframes toastSlide {
  from { opacity: 0; transform: translate(-50%, -30px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

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

/* ==================== 装饰元素 ==================== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
  margin: 24px 0;
}

.link-subtle {
  font-size: 13px;
  color: var(--gray-400);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 600;
}

.link-subtle:hover {
  color: var(--primary);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .card { padding: 28px; }
  .question-card { padding: 24px; }
  .landing-card h1 { font-size: 24px; }
  .question-text { font-size: 16px; }
  .result-stats { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .stat-box .stat-num { font-size: 24px; }
  .quiz-header { flex-direction: column; align-items: stretch; }
  .table-wrapper { overflow-x: auto; }
  th, td { padding: 10px 12px; font-size: 13px; }
  .admin-header { padding: 14px 20px; }
  .admin-header h1 { font-size: 18px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .modal { padding: 28px; }
  .score-circle { width: 150px; height: 150px; }
  .score-value { font-size: 38px; }
  .info-pills { gap: 10px; }
}

@media (max-width: 480px) {
  .container { padding: 12px; }
  .card { padding: 22px; }
  .question-card { padding: 20px; }
  .judge-options { flex-direction: row; gap: 10px; }
  .judge-option { padding: 20px 12px; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .stats-row { grid-template-columns: 1fr; }
  .option-item { padding: 14px 16px; gap: 12px; }
  .option-label { width: 34px; height: 34px; min-width: 34px; font-size: 14px; }
  .grid-item { width: 36px; height: 36px; font-size: 13px; }
  .quiz-nav { flex-direction: column; }
  .quiz-nav .btn { width: 100%; }
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-12 { gap: 12px; }
