/* ========== 地理战记 - 全局样式 ========== */

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #60a5fa;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --bg: #f0f4f8;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-blue: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --gradient-green: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-orange: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

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

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ========== 通用组件 ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: white;
}

.btn-primary {
  background: var(--gradient-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-success {
  background: var(--gradient-green);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-warning {
  background: var(--gradient-orange);
}

.btn-secondary {
  background: var(--text-light);
}

.btn-secondary:hover {
  background: #475569;
}

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

.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 14px;
}

.input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  transition: border-color 0.3s;
  outline: none;
}

.input:focus {
  border-color: var(--primary);
}

.label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ========== 登录页面 ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: drift 60s linear infinite;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(30px, 30px); }
}

.login-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 40px;
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 1;
}

.login-card.wide {
  max-width: 600px;
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo .icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.login-logo h1 {
  font-size: 28px;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-logo p {
  color: var(--text-light);
  font-size: 14px;
  margin-top: 4px;
}

.login-tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.login-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-light);
  transition: all 0.3s;
}

.login-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow);
}

.admin-link {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.admin-link a {
  color: var(--text-light);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s;
}

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

/* ========== 人脸识别 ========== */
.face-capture {
  text-align: center;
}

.face-video-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 4/3;
}

.face-video-container video,
.face-video-container canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.face-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: 3px dashed rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
}

.face-status {
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 12px;
}

.face-status.detecting {
  background: #fef3c7;
  color: #92400e;
}

.face-status.success {
  background: #d1fae5;
  color: #065f46;
}

.face-status.error {
  background: #fee2e2;
  color: #991b1b;
}

/* ========== 管理员页面 ========== */
.admin-header {
  background: white;
  box-shadow: var(--shadow);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header h1 {
  font-size: 22px;
  color: var(--primary);
}

.admin-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.nav-item {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  background: white;
  color: var(--text-light);
  border: 2px solid var(--border);
  transition: all 0.3s;
}

.nav-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.nav-item:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

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

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-card .stat-info h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.stat-card .stat-info p {
  font-size: 13px;
  color: var(--text-light);
}

/* 学生状态表 */
.student-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.student-table th {
  background: #f8fafc;
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}

.student-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.student-table tr:hover {
  background: #f8fafc;
}

.pet-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.energy-bar {
  width: 100px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.energy-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ========== 题目管理 ========== */
.question-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--primary);
  transition: background 0.15s ease;
}

.question-card.batch-selected {
  background: #f0f7ff !important;
  box-shadow: 0 0 0 2px var(--primary), var(--shadow);
}

.batch-toolbar {
  transition: box-shadow 0.2s ease;
}

.batch-checkbox {
  cursor: pointer;
  flex-shrink: 0;
}

.question-card .q-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.question-card .q-text {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.question-card .q-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-light);
}

.q-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.q-tag.points {
  background: #dbeafe;
  color: #1e40af;
}

.q-tag.date {
  background: #f3f4f6;
  color: #374151;
}

.q-tag.answer {
  background: #d1fae5;
  color: #065f46;
}

.question-image {
  max-width: 200px;
  max-height: 150px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* ========== 学生页面 ========== */
.student-page {
  min-height: 100vh;
  background: var(--bg);
}

.student-header {
  background: white;
  box-shadow: var(--shadow);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.student-header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-header .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
}

/* 宠物展示区 */
.pet-display {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.pet-scene {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
}

.pet-scene svg {
  width: 100%;
  height: 100%;
}

.pet-scene video,
.pet-video,
.pet-video-canvas-wrapper,
.pet-video-canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: transparent;
  transform-origin: center;
  display: block;
}

.pet-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pet-state-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.pet-energy-display {
  max-width: 300px;
  margin: 0 auto 16px;
}

.pet-energy-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-light);
}

.pet-energy-track {
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.pet-energy-progress {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s ease, background 0.5s ease;
}

/* 宠物选择 */
.pet-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.pet-option {
  background: white;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.pet-option:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pet-option.selected {
  border-color: var(--primary);
  background: #eff6ff;
}

.pet-option svg {
  width: 80px;
  height: 80px;
  margin-bottom: 8px;
}

.pet-option h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.pet-option p {
  font-size: 12px;
  color: var(--text-light);
}

/* ========== 答题界面 ========== */
.quiz-container {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  max-width: 700px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-green);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* 答题倒计时 */
.timer-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 16px;
}
.timer-bar-track {
  flex: 1;
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}
.timer-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--success);
  border-radius: 5px;
  transition: width 1s linear, background 0.3s;
}
.timer-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  min-width: 56px;
  text-align: right;
}
.timer-wrap.timer-urgent .timer-text {
  color: var(--danger);
  animation: timerBlink 0.5s infinite;
}
@keyframes timerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ========== 宠物进化动画 ========== */
.evolve-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(245,158,11,0.3) 0%, rgba(0,0,0,0.92) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: evolveOverlayIn 0.5s ease;
}
@keyframes evolveOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.evolve-content {
  text-align: center;
  max-width: 500px;
  padding: 20px;
}

.evolve-title {
  font-size: 28px;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251,191,36,0.8), 0 0 40px rgba(251,191,36,0.4);
  margin-bottom: 20px;
  animation: evolveTitleGlow 1.5s ease-in-out infinite;
}
@keyframes evolveTitleGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(251,191,36,0.8), 0 0 40px rgba(251,191,36,0.4); }
  50% { text-shadow: 0 0 30px rgba(251,191,36,1), 0 0 60px rgba(251,191,36,0.6); }
}

.evolve-video-container {
  width: 360px;
  height: 360px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(251,191,36,0.6);
  box-shadow: 0 0 60px rgba(251,191,36,0.5), inset 0 0 30px rgba(251,191,36,0.2);
  animation: evolveRingPulse 2s ease-in-out infinite;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}
@keyframes evolveRingPulse {
  0%, 100% { box-shadow: 0 0 60px rgba(251,191,36,0.5), inset 0 0 30px rgba(251,191,36,0.2); border-color: rgba(251,191,36,0.6); }
  50% { box-shadow: 0 0 100px rgba(251,191,36,0.8), inset 0 0 50px rgba(251,191,36,0.3); border-color: rgba(251,191,36,1); }
}

.evolve-hint {
  color: white;
  font-size: 15px;
  margin-top: 20px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 进化等级徽章 */
.pet-evo-badge {
  box-shadow: 0 2px 8px rgba(245,158,11,0.4);
}

.quiz-question {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.quiz-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

/* 答题输入区 - 语音卡片 */
.answer-card {
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.voice-answer-card {
  background: #eff6ff;
  border: 2px solid #bfdbfe;
}

.text-answer-card {
  background: #fefce8;
  border: 2px solid #fde047;
}

.answer-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.answer-card-icon {
  font-size: 22px;
}

.answer-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.voice-input-area {
  text-align: center;
}

.voice-input-area .mic-button {
  margin-bottom: 12px;
}

/* 分隔线 */
.answer-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.answer-divider::before,
.answer-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.answer-divider span {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  background: white;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* 文字输入框 - 完全独立样式，不继承 .input */
.text-answer-box {
  display: block;
  width: 100%;
  padding: 16px;
  border: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: white;
  resize: vertical;
  min-height: 80px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.text-answer-box::placeholder {
  color: #94a3b8;
  font-size: 16px;
}

.text-answer-box:focus {
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.text-answer-box:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.text-submit-btn {
  margin-top: 12px;
  width: 100%;
  font-size: 16px;
}

.mic-button {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-blue);
  color: white;
  font-size: 32px;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.mic-button:hover {
  transform: scale(1.1);
}

.mic-button.recording {
  background: var(--danger);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
}

.voice-result {
  min-height: 60px;
  padding: 16px;
  background: white;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-size: 18px;
  margin-bottom: 16px;
}

.voice-result.listening {
  border-color: var(--primary);
  background: #eff6ff;
}

.voice-result.correct {
  border-color: var(--success);
  background: #d1fae5;
}

.voice-result.wrong {
  border-color: var(--danger);
  background: #fee2e2;
}

/* 摄像头验证 */
.camera-verify {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 180px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 200;
}

.camera-verify video {
  width: 100%;
  border-radius: var(--radius-sm);
}

.camera-verify .cam-label {
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
  padding: 4px;
}

.camera-verify .cam-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 4px;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ========== 结果页 ========== */
.result-card {
  text-align: center;
  padding: 40px;
}

.result-score {
  font-size: 64px;
  font-weight: 800;
  background: var(--gradient-green);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 16px 0;
}

.result-energy-gain {
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 24px;
}

/* ========== 宠物动画 ========== */
.pet-container {
  position: relative;
  display: inline-block;
}

.pet-bounce {
  animation: bounce 2s infinite ease-in-out;
}

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

.pet-shake {
  animation: shake 0.5s infinite;
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

.pet-float {
  animation: float 3s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

.pet-dead {
  animation: none;
  filter: grayscale(100%);
  opacity: 0.5;
}

/* ========== 土团子专属动画与互动 ========== */
.pet-aardvark-breathe {
  animation: aardvark-breathe 3s infinite ease-in-out;
}

@keyframes aardvark-breathe {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.025) translateY(-2px); }
}

.pet-aardvark-shake {
  animation: aardvark-shake 1s infinite;
}

@keyframes aardvark-shake {
  0%, 100% { transform: translateX(0) translateY(5px); }
  25% { transform: translateX(-2px) translateY(5px); }
  75% { transform: translateX(2px) translateY(5px); }
}

.pet-aardvark-sad {
  animation: aardvark-sad 4s infinite ease-in-out;
}

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

.pet-aardvark-bounce {
  animation: aardvark-bounce 2s infinite ease-in-out;
}

@keyframes aardvark-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-8px) scale(1.02); }
  60% { transform: translateY(-4px) scale(1.01); }
}

.pet-aardvark-float {
  animation: aardvark-float 2.5s infinite ease-in-out;
}

@keyframes aardvark-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-12px) rotate(-2deg); }
  75% { transform: translateY(-12px) rotate(2deg); }
}

/* Z 字打盹气泡 */
.pet-z {
  font-family: 'Comic Sans MS', '微软雅黑', sans-serif;
  font-weight: 700;
  fill: #8B9A7F;
  opacity: 0;
}

.pet-head {
  transition: transform 0.3s ease;
}

.pet-head-hungry { transform: translateY(5px); }
.pet-head-sad { transform: translateY(8px); }
.pet-head-excited { transform: translateY(-10px); }
.pet-head-dead { transform: translateY(10px); }

.pet-z-1 { font-size: 22px; animation: z-rise 3s infinite 0s; }
.pet-z-2 { font-size: 18px; animation: z-rise 3s infinite 1s; }
.pet-z-3 { font-size: 14px; animation: z-rise 3s infinite 2s; }

@keyframes z-rise {
  0% { opacity: 0; transform: translateY(0) translateX(0); }
  20% { opacity: 1; }
  80% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-30px) translateX(10px); }
}

/* 点击互动反馈动画 */
.pet-hit-area {
  pointer-events: all;
  transition: opacity 0.2s;
}

.pet-hit-area:hover {
  opacity: 0.15;
  fill: #374151;
}

.pet-interact-pop {
  animation: interact-pop 0.4s ease-out;
}

@keyframes interact-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.pet-interact-shake {
  animation: interact-shake 0.5s ease-in-out;
}

@keyframes interact-shake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(8deg); }
  60% { transform: rotate(-5deg); }
  80% { transform: rotate(5deg); }
}

.pet-interact-enjoy {
  animation: interact-enjoy 0.6s ease-in-out;
}

@keyframes interact-enjoy {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-5px) rotate(-5deg); }
  60% { transform: translateY(-3px) rotate(5deg); }
}

/* 点击反馈气泡（div 版本，兼容 SVG 和视频宠物） */
.pet-click-bubble {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(55, 65, 81, 0.92);
  color: white;
  padding: 6px 16px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.pet-click-bubble.pet-bubble-show {
  animation: pet-bubble-show 1.5s ease forwards;
}

@keyframes pet-bubble-show {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.8); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  80% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.95); }
}

/* 状态特效 */
.pet-shiver, .pet-cloud, .pet-hearts, .pet-sparkles {
  pointer-events: none;
}

.pet-quiz-correct {
  animation: quiz-correct 0.6s ease-out;
}

@keyframes quiz-correct {
  0% { transform: scale(1); }
  30% { transform: scale(1.12) translateY(-10px); }
  60% { transform: scale(1.06) translateY(-5px); }
  100% { transform: scale(1); }
}

.pet-cloud {
  animation: cloud-drift 3s infinite ease-in-out;
}

@keyframes cloud-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

.pet-hearts {
  animation: hearts-float 2.5s infinite ease-in-out;
}

@keyframes hearts-float {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-8px); opacity: 1; }
}

.pet-sparkles {
  animation: sparkles-twinkle 2s infinite ease-in-out;
}

@keyframes sparkles-twinkle {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ========== 模态框 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 22px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px 8px;
}

.modal-close:hover {
  color: var(--text);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .login-card {
    padding: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .student-table {
    font-size: 12px;
  }

  .student-table th,
  .student-table td {
    padding: 8px;
  }

  .camera-verify {
    width: 120px;
  }
}

/* ========== 捕猎系统 ========== */
.hunt-card {
  margin-bottom: 20px;
}

.hunt-idle-area {
  text-align: center;
  padding: 16px;
  background: #f0f9ff;
  border-radius: var(--radius);
}

.hunt-active-area {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
  border-radius: var(--radius);
}

.hunt-complete-area {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
  border-radius: var(--radius);
}

.hunt-pet-away {
  font-size: 48px;
  animation: huntWalk 1.5s ease-in-out infinite;
}

.hunt-pet-return {
  font-size: 48px;
  animation: huntBounce 0.8s ease-in-out infinite;
}

.hunt-countdown {
  font-size: 20px;
  font-weight: 700;
  color: #185FA5;
  margin-top: 10px;
  letter-spacing: 1px;
}

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

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

/* ========== 商城系统 ========== */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.shop-item-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: all 0.2s;
}

.shop-item-card.affordable {
  border-color: #97C459;
  background: #fafffe;
}

.shop-item-card.affordable:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.shop-item-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.shop-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.shop-item-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
  min-height: 32px;
}

.shop-item-price {
  font-size: 15px;
  font-weight: 700;
  color: #185FA5;
  margin-bottom: 4px;
}

.shop-item-stock {
  font-size: 11px;
  color: var(--text-light);
}

/* ========== 小鱼货币图标 ========== */
.fish-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-right: 4px;
  object-fit: contain;
}

.fish-icon-sm {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 2px;
  object-fit: contain;
}

.fish-icon-lg {
  display: inline-block;
  width: 36px;
  height: 36px;
  vertical-align: middle;
  margin-right: 6px;
  object-fit: contain;
}

/* ========== 学生端顶部导航栏（Tab切换） ========== */
.student-nav {
  background: white;
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.student-nav .nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  user-select: none;
}

.student-nav .nav-tab:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.04);
}

.student-nav .nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

.student-nav .nav-tab .nav-icon {
  font-size: 18px;
}

.student-nav .nav-tab .nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}

.student-nav .nav-tab .nav-badge img {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

/* 顶部栏小鱼徽章 */
.fish-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #FFF6D6, #FFE9A8);
  color: #8B5A00;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid #F5D77A;
  margin-left: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fish-badge:hover {
  background: linear-gradient(135deg, #FFE9A8, #FFD86B);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(245, 215, 122, 0.3);
}

.fish-badge img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* 商城页面（独立Tab） */
.shop-page {
  display: none;
}

.shop-page.active {
  display: block;
}

.shop-page-header {
  background: linear-gradient(135deg, #FFF6D6 0%, #FFE9A8 100%);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
  border: 2px solid #F5D77A;
}

.shop-page-header h2 {
  color: #8B5A00;
  font-size: 24px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.shop-page-header p {
  color: #B07510;
  font-size: 14px;
  margin: 0;
}

.shop-page-balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 8px 18px;
  border-radius: 20px;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #185FA5;
  border: 2px solid #185FA5;
  box-shadow: 0 4px 8px rgba(24, 95, 165, 0.15);
}

.shop-page-balance img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* 主页内容容器 */
.home-content {
  display: block;
}

.home-content.hidden {
  display: none;
}

/* ========== 捕猎启动动画 ========== */
.hunt-launch-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #E8F4FD 0%, #D6EAF8 60%, #C5D8E8 100%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: huntLaunchFadeIn 0.4s ease;
}

.hunt-launch-overlay.hiding {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

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

.hunt-launch-scene {
  width: 100%;
  max-width: 520px;
  background: white;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.2);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hunt-launch-scene::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8) 0%, transparent 50%);
  pointer-events: none;
}

.hunt-launch-image {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  animation: huntImagePulse 2.5s ease-in-out infinite;
}

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

.hunt-launch-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hunt-launch-status {
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hunt-launch-status .typing-dot::after {
  content: '...';
  animation: typingDots 1.5s steps(4, end) infinite;
  display: inline-block;
  width: 24px;
  text-align: left;
}

@keyframes typingDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

.hunt-launch-progress {
  width: 100%;
  height: 12px;
  background: #E5E7EB;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.hunt-launch-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #378ADD, #185FA5);
  border-radius: 6px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(55, 138, 221, 0.3);
}

.hunt-launch-steps {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.hunt-launch-step {
  flex: 1;
  text-align: center;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.3s;
}

.hunt-launch-step.active {
  color: var(--primary);
  font-weight: 700;
  background: rgba(37, 99, 235, 0.08);
}

.hunt-launch-emoji {
  position: absolute;
  font-size: 24px;
  animation: huntFloatEmoji 3s ease-in-out infinite;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

@keyframes huntFloatEmoji {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

.hunt-launch-footer {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-light);
  position: relative;
  z-index: 1;
}

/* ========== 濒死状态 & 复活券（v1.8） ========== */
.dying-pet-banner {
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  border: 2px solid #EF4444;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  color: #7F1D1D;
  animation: dying-banner-flash 2s ease-in-out infinite;
}

@keyframes dying-banner-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 18px 4px rgba(239, 68, 68, 0.25); }
}

.dying-countdown {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  color: #DC2626;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

@keyframes pet-dying-pulse {
  0%, 100% { transform: scale(1); filter: grayscale(60%) brightness(0.75); }
  50% { transform: scale(1.04); filter: grayscale(50%) brightness(0.85); }
}

.revive-ticket-card {
  transition: all 0.3s ease;
}

.revive-ticket-card.revive-highlight {
  animation: revive-card-breathe 2.4s ease-in-out infinite;
}

@keyframes revive-card-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
  50% { box-shadow: 0 0 16px 4px rgba(239, 68, 68, 0.25); }
}

/* ======================================================
   登录页 v18 — 与 Ardot 设计稿 Card Content (2:24) 逐像素对齐
   字号/字色/字距/边距/位置全部按 2:24 子节点参数还原
   ====================================================== */

.page-login {
  --gold:        #d9ad40;   /* 设计稿渐变中段 */
  --gold-light:  #ffd966;   /* 设计稿渐变亮段 */
  --gold-dark:   #a68026;   /* 设计稿渐变暗段 */
  --gold-text:   #ffd66b;   /* 标题/链接字色（更亮金） */
  --gold-stroke: rgba(166, 128, 38, 0.8);  /* 输入框描边 */
  --ink-title:   #071530;   /* 金按钮上的字色 */
  --ink-sub:     #b8c2d8;   /* 副标字色（设计稿 rgb 0.72,0.76,0.85） */
  --ink-ph:      #6b7891;   /* 输入占位字色（设计稿 rgb 0.42,0.47,0.57） */
  --ink-tab-off: #7a85a0;   /* 未激活 tab（设计稿 rgb 0.48,0.52,0.63） */
  --card-1:      #1a2548;
  --card-2:      #0d182f;
  --field-bg:    #0a1229;   /* 输入框底色（设计稿 rgb 0.04,0.07,0.16） */
  --serif-cn:    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STZhongsong", "STSong", "SimSun", "宋体", serif;
  --serif-en:    "Cinzel", "Cinzel Decorative", Georgia, "Times New Roman", serif;

  margin: 0;
  overflow: hidden;
  background-color: #0a1428;
  font-family: var(--serif-cn);
  color: #fff;
}

/* ========== 1440x900 舞台 ========== */
.page-login .login-page {
  position: fixed; inset: 0; z-index: 1;
  display: grid; place-items: center;
  overflow: hidden; background: transparent;
}
.page-login .login-stage {
  position: relative;
  width: 1440px; height: 900px;
  flex: 0 0 auto;
  background: url('../assets/cover/cover.png') 0 0 / 100% 100% no-repeat;
  transform: scale(var(--stage-scale, 1));
  transform-origin: center center;
}

/* ========== 实心登录卡（精确对齐设计稿卡框 472,102,496,696） ========== */
.page-login .login-card {
  position: absolute;
  left: 472px; top: 102px;
  width: 496px; height: 696px;
  max-width: none; min-width: 0; padding: 0;
  background: linear-gradient(160deg, var(--card-1) 0%, var(--card-2) 100%);
  border-radius: 3px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(212, 175, 55, 0.1);
  overflow: hidden;
}

/* ========== 区块：全部按设计稿 y 坐标绝对定位 ========== */

/* Logo 区（设计稿 y=0 起，相对卡顶 +28 = 28） */
.page-login .login-logo {
  position: absolute;
  top: 28px; left: 28px; width: 440px;
  text-align: center;
}
.page-login .earth-icon {
  width: 127px; height: 127px;       /* 设计稿 127×127 */
  margin: 0 auto; display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}
.page-login .earth-icon.small { width: 90px; height: 90px; margin-bottom: 6px; }

.page-login .login-logo h1 {
  margin: 14px 0 0;
  font-family: var(--serif-cn);
  font-size: 30px;                    /* 设计稿 fontSize:30 */
  font-weight: 900;                   /* 设计稿 Cinzel Decorative Bold → 用 Noto Serif SC Black 替代 */
  color: var(--gold-text);            /* 设计稿 rgb(1, 0.84, 0.42) */
  letter-spacing: 0;                  /* 设计稿无字距 */
  line-height: 1;
  background: none !important;        /* 覆盖全局 .login-logo h1 的渐变背景 */
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: var(--gold-text) !important;  /* 覆盖 transparent */
  text-shadow: 0 0 14px rgba(255, 214, 107, 0.3);  /* 设计稿 drop shadow */
}

.page-login .login-logo .tagline {
  margin: 12px 0 0;
  font-family: var(--serif-cn);
  font-size: 11px;                    /* 设计稿 11 */
  color: var(--ink-sub);              /* 设计稿 rgb(0.72,0.76,0.85) */
  letter-spacing: 0; line-height: 1.4;
  font-weight: 400; font-style: normal;  /* 去掉斜体 */
}

/* 分隔条：左线 + 菱形 + 右线（设计稿 280 宽，菱形 8×8 旋转 45°） */
.page-login .divider-gold {
  position: relative;
  width: 280px; height: 14px;
  margin: 12px auto 0;
  display: flex; align-items: center; justify-content: center; gap: 0;
}
.page-login .divider-gold::before,
.page-login .divider-gold::after {
  content: ''; flex: 1; height: 1px;
  background: var(--gold-light);      /* 设计稿 rgb(1, 0.84, 0.42) */
}
.page-login .divider-gold .diamond {
  width: 8px; height: 8px; margin: 0 4px;
  background: var(--gold);            /* 设计稿 rgb(0.85, 0.68, 0.25) */
  transform: rotate(45deg);
  flex: 0 0 auto;
}

/* Tabs（设计稿 y=252，卡内 y=280，宽 300 居中，每 tab 150 宽） */
.page-login .login-tabs {
  position: absolute;
  top: 280px; left: 28px; width: 440px;
  display: flex; justify-content: center; gap: 0;
  background: transparent; border: none; padding: 0;
  font-family: var(--serif-cn);
}
.page-login .login-tab {
  width: 150px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  cursor: pointer;
  font-size: 20px;                    /* 设计稿 20 */
  letter-spacing: 0;                  /* 设计稿无字距 */
  background: transparent; border: none;
  user-select: none;
  transition: color 0.3s;
  color: var(--ink-tab-off);          /* 设计稿未激活 rgb(0.48,0.52,0.63) */
  font-weight: 400;                   /* 设计稿注 册 Regular */
}
.page-login .login-tab.active {
  color: var(--gold-text);            /* 设计稿激活 rgb(1, 0.84, 0.42) */
  font-weight: 700;                   /* 设计稿登 录 Bold */
}
.page-login .login-tab.active::after {
  content: ''; position: absolute;
  left: 50%; bottom: -2px;
  transform: translateX(-50%);
  width: 60px; height: 2px;           /* 设计稿 60×2 */
  background: var(--gold-text);
}
.page-login .login-tab:hover { color: var(--gold-text); }

/* Tab 内容容器（设计稿 y=310 起；bottom 留 128 给管理员通道） */
.page-login .tab-content {
  position: absolute;
  top: 338px; left: 28px; width: 440px; bottom: 128px;
  overflow-y: auto; overflow-x: hidden;
  animation: fade-in 0.35s ease;
  padding-right: 2px;
}
.page-login .tab-content::-webkit-scrollbar { width: 4px; }
.page-login .tab-content::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.3); border-radius: 2px; }
.page-login .tab-content::-webkit-scrollbar-track { background: transparent; }

@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* 输入框（设计稿 400×50，bg #0A1229，border rgba(166,128,38,0.8)） */
.page-login .input-row {
  position: relative;
  width: 100%; height: 50px;          /* 设计稿 50 */
  padding: 14px;                      /* 设计稿 padding 14 */
  display: flex; align-items: center; gap: 12px;
  background: var(--field-bg);        /* 设计稿 rgb(0.04,0.07,0.16) */
  border: 1px solid var(--gold-stroke);
  border-radius: 4px;
  margin-bottom: 14px;                /* 设计稿 gap 14 */
  box-sizing: border-box;
  transition: all 0.3s ease;
}
.page-login .input-row:hover { border-color: var(--gold); }
.page-login .input-row:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 14px rgba(212, 175, 55, 0.25);
}
.page-login .input-icon {
  width: 22px; height: 22px;          /* 设计稿图标框 22×22 */
  flex: 0 0 22px;
  color: var(--gold-text);
  filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.4));
  display: inline-flex; align-items: center; justify-content: center;
}
.page-login .icon-svg { width: 22px; height: 22px; }   /* 之前 18px 偏小 */
.page-login .input-dark {
  flex: 1; min-width: 0;
  padding: 0; background: transparent; border: none; outline: none;
  color: #fff; font-size: 14px;       /* 设计稿 14 */
  font-family: var(--serif-cn);
  letter-spacing: 0; line-height: 1;
}
.page-login .input-dark::placeholder {
  color: var(--ink-ph);               /* 设计稿 rgb(0.42,0.47,0.57) */
  letter-spacing: 0; opacity: 1;
}

/* 忘记密码（设计稿 12px 金色 右对齐） */
.page-login .forgot-row {
  height: 20px; line-height: 20px;
  text-align: right; margin: 0 0 14px;
}
.page-login .forgot-row a {
  color: var(--gold-text);            /* 设计稿金色 */
  font-size: 12px; font-style: normal;
  text-decoration: none; letter-spacing: 0;
  transition: color 0.2s;
}
.page-login .forgot-row a:hover { color: #fff; }

/* 金色登录按钮（设计稿 400×54，三段渐变 + 描边 + 多重阴影 + 内阴影斜面） */
.page-login .btn-gold {
  position: relative;
  width: 100%; height: 54px;          /* 设计稿 54 */
  padding: 0;
  font-family: var(--serif-cn);
  font-size: 20px;                    /* 设计稿 20 */
  font-weight: 700;                   /* 设计稿 Bold */
  letter-spacing: 0;                  /* 设计稿无字距 */
  color: var(--ink-title);            /* 设计稿深蓝字 rgb(0.04,0.08,0.19) */
  background: linear-gradient(180deg,
    var(--gold-light) 0%,
    var(--gold)       50%,
    var(--gold-dark)  100%);
  border: 1px solid #ffebb3;          /* 设计稿描边 rgb(1, 0.92, 0.65) */
  border-radius: 4px;
  box-shadow:
    0 0 28px rgba(255, 217, 102, 0.7),    /* 设计稿主光 */
    0 4px 16px rgba(255, 179, 51, 0.4),   /* 设计稿投影 */
    inset 0 1px 0 rgba(255, 255, 255, 0.6),  /* 设计稿顶高光 */
    inset 0 -2px 0 rgba(80, 50, 0, 0.5);     /* 设计稿底暗 */
  cursor: pointer;
  transition: all 0.25s ease;
  text-indent: 0;
}
.page-login .btn-gold:hover {
  filter: brightness(1.06);
  box-shadow:
    0 0 36px rgba(255, 217, 102, 0.85),
    0 4px 18px rgba(255, 179, 51, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 0 rgba(80, 50, 0, 0.5);
}
.page-login .btn-gold:active { filter: brightness(0.97); transform: translateY(1px); }

/* 管理员通道（设计稿 y=540，12px 金色 + 14×14 盾形） */
.page-login .admin-link {
  position: absolute;
  top: 568px; left: 28px; width: 440px;
  height: 22px;
  text-align: center;
  display: flex; align-items: center; justify-content: center;
}
.page-login .admin-link a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold-text);            /* 设计稿金色（之前是灰） */
  text-decoration: none;
  font-size: 12px; letter-spacing: 0;
  cursor: pointer;
  transition: color 0.2s;
}
.page-login .admin-link a:hover { color: #fff; }
.page-login .shield-svg {
  width: 14px; height: 14px; color: var(--gold-text);
  filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.5));
}

/* ========== 表单 / 人脸 / 提示 ========== */
.page-login .form-group { margin-bottom: 14px; }
.page-login .label-light {
  display: block; color: rgba(255, 255, 255, 0.7);
  font-size: 12px; letter-spacing: 0; margin-bottom: 6px;
}
.page-login .face-group { margin-top: 6px; }
.page-login .face-capture { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.page-login .face-btn {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.4);
  width: 100%; padding: 7px 14px; font-size: 12px;
  border-radius: 4px; cursor: pointer; transition: all 0.2s;
}
.page-login .face-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--gold); color: #fff;
}
.page-login .face-video-container {
  width: 100%; max-width: 260px; aspect-ratio: 4/3;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 4px; overflow: hidden;
  position: relative; background: #000;
}
.page-login .face-video-container video { width: 100%; height: 100%; object-fit: cover; }
.page-login .face-status { color: var(--gold-light); font-size: 12px; text-align: center; }
.page-login .face-status.error { color: #ff7474; }

.page-login #alertBox, .page-login #adminAlertBox { margin: 0 0 12px; }
.page-login .alert {
  padding: 9px 14px; border-radius: 4px; font-size: 13px;
  border: 1px solid; background: rgba(10, 20, 40, 0.6); letter-spacing: 0;
}
.page-login .alert-error { color: #ff8888; border-color: rgba(255, 100, 100, 0.4); }
.page-login .alert-success { color: #88ff99; border-color: rgba(100, 255, 130, 0.4); }
.page-login .alert-warning { color: var(--gold-light); border-color: rgba(212, 175, 55, 0.4); }

/* ======================================================
   学生页 v2.0 — 应用 Ardot 9:3 金色学院风
   深蓝径向渐变 + 星空 + 顶/底金条 + 金边深蓝卡片
   字号/字色/按钮/标题剑形装饰按 9:3 子节点参数还原
   实际功能与现有 student.js 完全兼容
   ====================================================== */

.page-student {
  --gold:        #d9ad40;
  --gold-light:  #ffd966;
  --gold-dark:   #a68026;
  --gold-text:   #ffd66b;
  --gold-soft:   rgba(217, 173, 64, 0.5);
  --ink:         #0a1530;          /* 金按钮上的字色 */
  --ink-sub:     #b8c2d8;          /* 副标字色 */
  --ink-tab-off: #7a85a0;          /* 未激活 tab */
  --ink-muted:   #6b7891;          /* 提示文字 */
  --card-1:      #0f1c38;
  --card-2:      #1a2e57;
  --card-3:      #0a1429;
  --field-bg:    #0a1229;
  --header-1:    #0f1a33;
  --header-2:    #1a294c;
  --serif-cn:    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STZhongsong", "STSong", "SimSun", "宋体", serif;

  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 120% 80% at 50% 30%, #1F4073 0%, #050F26 70%, #020510 100%);
  color: #e5e9f3;
  font-family: var(--serif-cn);
  position: relative;
  overflow-x: hidden;
}

/* 顶/底金条 */
.page-student::before,
.page-student::after {
  content: '';
  position: fixed;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #BA7A0D 0%, #FFD966 50%, #BA7A0D 100%);
  z-index: 100;
  pointer-events: none;
}
.page-student::before { top: 0; }
.page-student::after { bottom: 0; }

/* 星空层 + A 字母水印 + 左右金柱 */
.page-student .student-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.page-student .star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
}
.page-student .star.gold { background: #FFD66B; box-shadow: 0 0 6px rgba(255, 214, 107, 0.8); }
.page-student .star.dim  { background: #fff; opacity: 0.6; }
.page-student .watermark-a {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Cinzel Decorative', 'Noto Serif SC', serif;
  font-size: 340px;
  font-weight: 900;
  color: #FFD66B;
  opacity: 0.08;
  line-height: 1;
  user-select: none;
}
.page-student .watermark-a.left  { left: 4%; }
.page-student .watermark-a.right { right: 4%; }

/* 底部 Tagline */
.page-student .bottom-tagline {
  position: fixed;
  bottom: 16px; left: 0; right: 0;
  text-align: center;
  font-family: 'Cinzel', 'Noto Serif SC', serif;
  font-size: 11px;
  color: #a8b5d0;
  letter-spacing: 3px;
  z-index: 50;
  pointer-events: none;
}

/* 所有正文容器提到背景之上 */
.page-student .container,
.page-student .student-header,
.page-student .student-nav,
.page-student .student-page,
.page-student .home-content,
.page-student .shop-page {
  position: relative;
  z-index: 1;
}

/* ========== 顶部栏（深蓝渐变 + 盾形 logo + 金字标题 + 徽章） ========== */
.page-student .student-header {
  background: linear-gradient(90deg, var(--header-1) 0%, var(--header-2) 100%);
  border-bottom: 1px solid rgba(217, 173, 64, 0.25);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  padding: 12px 32px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.page-student .student-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-text);
  margin: 0;
  display: flex; align-items: center; gap: 12px;
  text-shadow: 0 0 14px rgba(255, 214, 107, 0.3);
}
.page-student .header-crest {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, #1F4073 0%, #0A1530 100%);
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(217, 173, 64, 0.35);
}
.page-student .student-header .user-info {
  display: flex; align-items: center; gap: 10px;
  color: #fff;
}
.page-student .student-header .user-info > div {
  font-size: 13px;
}
.page-student .badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #0a1229;
  border: 1px solid var(--gold-soft);
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 12px;
  color: #fff;
  line-height: 1;
}
.page-student .badge-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(255, 214, 107, 0.7);
}
.page-student .badge-pill .fish {
  width: 16px; height: 16px; object-fit: contain;
}
.page-student .badge-pill.logout {
  cursor: pointer;
  transition: all 0.2s;
}
.page-student .badge-pill.logout:hover {
  background: rgba(217, 173, 64, 0.15);
  border-color: var(--gold);
}
.page-student .student-header .avatar {
  background: radial-gradient(circle, #1F4073 0%, #0a1530 100%);
  border: 1.5px solid var(--gold-text);
  color: var(--gold-text);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(255, 214, 107, 0.25);
}

/* 顶部栏小鱼徽章（JS 动态渲染的 .fish-badge） */
.page-student .fish-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  color: var(--gold-light);
  font-weight: 700;
  transition: color 0.2s;
}
.page-student .fish-badge:hover {
  color: var(--gold-text);
  text-shadow: 0 0 6px rgba(255, 214, 107, 0.6);
}

/* ========== Tab Bar（深蓝 80% + 金色下划线激活态） ========== */
.page-student .student-nav {
  background: rgba(13, 20, 41, 0.8);
  border-bottom: 1px solid rgba(217, 173, 64, 0.2);
  box-shadow: none;
  padding: 0 32px;
  gap: 0;
}
.page-student .student-nav::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 214, 107, 0.6), transparent);
}
.page-student .student-nav .nav-tab {
  color: var(--ink-tab-off);
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 400;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.page-student .student-nav .nav-tab:hover {
  color: var(--gold-light);
  background: rgba(255, 214, 107, 0.05);
}
.page-student .student-nav .nav-tab.active {
  color: var(--gold-text);
  font-weight: 700;
  border-bottom-color: var(--gold-text);
  background: transparent;
}
.page-student .student-nav .nav-tab .nav-icon {
  font-size: 16px;
  filter: saturate(0.7);
}
.page-student .student-nav .nav-tab.active .nav-icon {
  filter: none;
}
.page-student .student-nav .nav-tab .nav-badge {
  background: linear-gradient(135deg, #d9ad40, #a68026);
  color: #0a1530;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(217, 173, 64, 0.4);
}

/* ========== 通用卡片（金边深蓝 + 双层投影） ========== */
.page-student .card {
  background: linear-gradient(180deg, var(--card-1) 0%, var(--card-2) 50%, var(--card-3) 100%);
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  box-shadow:
    0 12px 30px -4px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(255, 179, 51, 0.3);
  color: #e5e9f3;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.page-student .card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(166, 128, 38, 0.5);
  border-radius: 2px;
  pointer-events: none;
}
.page-student .card > * { position: relative; z-index: 1; }

/* ========== 区块标题：剑 + 文字 + 剑（仿 9:3 "选择你的电子宠物"） ========== */
.page-student .section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--serif-cn);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-text);
  text-shadow: 0 0 14px rgba(255, 214, 107, 0.3);
  margin: 8px 0 6px;
  letter-spacing: 2px;
}
.page-student .section-title .sword {
  width: 28px; height: 16px;
  flex-shrink: 0;
}
.page-student .section-subtitle {
  text-align: center;
  font-size: 12px;
  color: var(--ink-sub);
  margin: 0 0 20px;
  letter-spacing: 1px;
}

/* ========== 分隔条：左线 + 菱形 + 右线 ========== */
.page-student .gold-divider {
  display: flex; align-items: center; justify-content: center;
  width: 200px; height: 14px;
  margin: 14px auto 18px;
  gap: 0;
}
.page-student .gold-divider::before,
.page-student .gold-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--gold-light);
}
.page-student .gold-divider .diamond {
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  margin: 0 4px;
  flex-shrink: 0;
}

/* ========== 按钮：金色渐变（仿 9:3 选择按钮） ========== */
.page-student .btn {
  border-radius: 4px;
  font-weight: 700;
  font-family: var(--serif-cn);
  letter-spacing: 1px;
  transition: all 0.2s;
}
.page-student .btn-primary {
  background: linear-gradient(180deg, #FFD666 0%, #D9AE40 50%, #A68026 100%);
  color: var(--ink);
  border: 1px solid #FFEB66;
  box-shadow: 0 0 18px rgba(255, 214, 107, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.page-student .btn-primary:hover {
  background: linear-gradient(180deg, #FFE082 0%, #E5B84A 50%, #B5892E 100%);
  box-shadow: 0 0 24px rgba(255, 214, 107, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}
.page-student .btn-success {
  background: linear-gradient(180deg, #4ADE80 0%, #16A34A 100%);
  color: #fff;
  border: 1px solid #86EFAC;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.4);
}
.page-student .btn-success:hover {
  background: linear-gradient(180deg, #6EE7A0 0%, #22C55E 100%);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.6);
}
.page-student .btn-danger {
  background: linear-gradient(180deg, #F87171 0%, #DC2626 100%);
  color: #fff;
  border: 1px solid #FCA5A5;
}
.page-student .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold-light);
  border: 1px solid var(--gold-soft);
}
.page-student .btn-secondary:hover {
  background: rgba(217, 173, 64, 0.15);
  border-color: var(--gold);
}
.page-student .btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  min-width: 200px;
}

/* ========== 表单输入（深底金边） ========== */
.page-student .input,
.page-student .text-answer-box {
  background: var(--field-bg);
  border: 1px solid var(--gold-soft);
  color: #fff;
  border-radius: 4px;
  font-family: var(--serif-cn);
  padding: 10px 14px;
}
.page-student .input::placeholder,
.page-student .text-answer-box::placeholder {
  color: var(--ink-muted);
}
.page-student .input:focus,
.page-student .text-answer-box:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 2px rgba(217, 173, 64, 0.25);
}
.page-student .form-group .label,
.page-student .label {
  color: var(--ink-sub);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

/* ========== 宠物展示区 ========== */
.page-student .pet-display {
  background: linear-gradient(180deg, var(--card-1) 0%, var(--card-2) 50%, var(--card-3) 100%);
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 179, 51, 0.3);
  color: #e5e9f3;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.page-student .pet-display::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(166, 128, 38, 0.5);
  border-radius: 2px;
  pointer-events: none;
}
.page-student .pet-display > * { position: relative; z-index: 1; }
.page-student .pet-name {
  font-family: var(--serif-cn);
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-text);
  text-shadow: 0 0 12px rgba(255, 214, 107, 0.3);
}
.page-student .pet-state-badge {
  background: rgba(217, 173, 64, 0.15);
  color: var(--gold-light);
  border: 1px solid var(--gold-soft);
  font-family: var(--serif-cn);
}
.page-student .pet-energy-label {
  color: var(--ink-sub);
  font-size: 13px;
}
.page-student .pet-energy-track {
  height: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(217, 173, 64, 0.3);
  border-radius: 6px;
  overflow: hidden;
}
.page-student .pet-energy-progress {
  background: linear-gradient(90deg, #FFD666 0%, #D9AE40 100%);
  box-shadow: 0 0 10px rgba(255, 214, 107, 0.6);
}
.page-student .pet-scene {
  width: 280px;
  height: 280px;
  background: radial-gradient(ellipse, rgba(31, 64, 115, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  padding: 20px;
}
@media (max-width: 768px) {
  .page-student .pet-scene {
    width: 240px;
    height: 240px;
  }
}

/* 宠物选择网格 */
.page-student .pet-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.page-student .pet-option {
  background: linear-gradient(180deg, var(--card-1) 0%, var(--card-2) 50%, var(--card-3) 100%);
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(255, 179, 51, 0.2);
  padding: 24px 20px;
  color: #e5e9f3;
  position: relative;
  overflow: hidden;
}
.page-student .pet-option::before {
  content: '';
  position: absolute; inset: 6px;
  border: 1px solid rgba(166, 128, 38, 0.4);
  border-radius: 2px;
  pointer-events: none;
}
.page-student .pet-option > * { position: relative; z-index: 1; }
.page-student .pet-option:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 179, 51, 0.45);
  border-color: var(--gold-light);
}
.page-student .pet-option.selected {
  border-color: var(--gold-light);
  background: linear-gradient(180deg, #1a2e57 0%, #243d6b 50%, #0a1530 100%);
  box-shadow: 0 0 30px rgba(255, 214, 107, 0.6);
}
.page-student .pet-option h4 {
  color: var(--gold-text);
  font-size: 18px;
  margin: 8px 0 4px;
  font-family: var(--serif-cn);
}
.page-student .pet-option p {
  color: var(--ink-sub);
  font-size: 12px;
}

/* 宠物选择卡内的视频 canvas 必须定尺寸，否则会撑满整个卡片 */
.page-student .pet-option .pet-video-canvas-wrapper {
  width: 160px !important;
  height: 160px !important;
  margin: 0 auto 12px;
  background: radial-gradient(ellipse, rgba(31, 64, 115, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  overflow: hidden;
}
.page-student .pet-option .pet-video-canvas-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ========== 答题区 ========== */
.page-student .quiz-container {
  background: linear-gradient(180deg, var(--card-1) 0%, var(--card-2) 50%, var(--card-3) 100%);
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 179, 51, 0.3);
  color: #e5e9f3;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.page-student .quiz-container::before {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid rgba(166, 128, 38, 0.5);
  border-radius: 2px;
  pointer-events: none;
}
.page-student .quiz-container > * { position: relative; z-index: 1; }

.page-student .quiz-question {
  background: var(--field-bg);
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  padding: 18px 20px;
  font-size: 18px;
  color: #fff;
  font-family: var(--serif-cn);
  line-height: 1.6;
}
.page-student .quiz-progress {
  color: var(--gold-text);
  font-family: var(--serif-cn);
}
.page-student .progress-bar {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(217, 173, 64, 0.3);
  height: 8px;
}
.page-student .progress-fill {
  background: linear-gradient(90deg, #FFD666 0%, #D9AE40 100%);
  box-shadow: 0 0 8px rgba(255, 214, 107, 0.5);
}
.page-student .quiz-total {
  color: var(--ink-sub);
}

/* 倒计时 */
.page-student .timer-bar-track {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(217, 173, 64, 0.3);
  height: 6px;
}
.page-student .timer-bar-fill {
  background: linear-gradient(90deg, #FFD666 0%, #D9AE40 100%);
}
.page-student .timer-text {
  color: var(--gold-text);
  font-family: var(--serif-cn);
}

/* 答题输入卡（语音/文字） */
.page-student .answer-card {
  background: var(--field-bg);
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  color: #fff;
}
.page-student .answer-card-header {
  color: var(--gold-text);
  font-family: var(--serif-cn);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
}
.page-student .answer-card-icon {
  font-size: 18px;
  filter: saturate(0.7);
}
.page-student .voice-result {
  color: var(--ink-sub);
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(217, 173, 64, 0.3);
  border-radius: 4px;
}
.page-student .voice-result.listening {
  color: var(--gold-text);
  border-style: solid;
  border-color: var(--gold);
  background: rgba(217, 173, 64, 0.1);
}
.page-student .voice-result.correct {
  color: #86efac;
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.4);
}
.page-student .voice-result.wrong {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.4);
}
.page-student .mic-button {
  background: linear-gradient(180deg, #FFD666 0%, #D9AE40 50%, #A68026 100%);
  color: var(--ink);
  border: 1px solid #FFEB66;
  box-shadow: 0 0 16px rgba(255, 214, 107, 0.5);
}
.page-student .mic-button:hover {
  background: linear-gradient(180deg, #FFE082 0%, #E5B84A 50%, #B5892E 100%);
  box-shadow: 0 0 24px rgba(255, 214, 107, 0.8);
}
.page-student .mic-button.recording {
  background: linear-gradient(180deg, #F87171 0%, #DC2626 100%);
  color: #fff;
  border-color: #FCA5A5;
  box-shadow: 0 0 24px rgba(248, 113, 113, 0.7);
  animation: pageStudentMicPulse 1.2s ease-in-out infinite;
}
@keyframes pageStudentMicPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(248, 113, 113, 0.5); }
  50% { box-shadow: 0 0 28px rgba(248, 113, 113, 0.9); }
}

.page-student .answer-divider {
  color: var(--gold);
}
.page-student .answer-divider::before,
.page-student .answer-divider::after {
  background: var(--gold-soft) !important;
}

/* 摄像头验证小窗 */
.page-student .camera-verify {
  border: 1.5px solid var(--gold);
  background: var(--field-bg);
  box-shadow: 0 0 16px rgba(255, 214, 107, 0.3);
}
.page-student .cam-label {
  color: var(--gold-text);
  background: rgba(10, 18, 41, 0.85);
  font-family: var(--serif-cn);
}

/* ========== 结果卡 ========== */
.page-student .result-card {
  text-align: center;
}
.page-student .result-score {
  color: var(--gold-text);
  font-family: var(--serif-cn);
}
.page-student .result-energy-gain {
  color: var(--gold-light);
  background: rgba(217, 173, 64, 0.12);
  border: 1px solid var(--gold-soft);
  font-family: var(--serif-cn);
}

/* ========== 捕猎区 ========== */
.page-student .hunt-idle-area {
  background: var(--field-bg);
  border: 1px solid var(--gold-soft);
  color: var(--ink-sub);
  border-radius: 4px;
}
.page-student .hunt-active-area {
  background: linear-gradient(180deg, rgba(31, 64, 115, 0.3) 0%, rgba(10, 20, 40, 0.5) 100%);
  border: 1px solid var(--gold-soft);
  color: #e5e9f3;
  border-radius: 4px;
}
.page-student .hunt-complete-area {
  background: linear-gradient(180deg, rgba(217, 173, 64, 0.1) 0%, rgba(166, 128, 38, 0.05) 100%);
  border: 1px solid var(--gold);
  color: var(--gold-text);
  border-radius: 4px;
  box-shadow: 0 0 16px rgba(255, 214, 107, 0.3);
}
.page-student .hunt-countdown {
  color: var(--gold-text);
  font-family: var(--serif-cn);
}

/* 捕猎启动动画（保留原样，只调整配色更协调） */
.page-student .hunt-launch-overlay {
  background: radial-gradient(ellipse at 50% 30%, #1F4073 0%, #050F26 70%, #020510 100%);
}
.page-student .hunt-launch-scene {
  background: linear-gradient(180deg, var(--card-1) 0%, var(--card-2) 50%, var(--card-3) 100%);
  border: 1.5px solid var(--gold);
  color: #e5e9f3;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 179, 51, 0.3);
}
.page-student .hunt-launch-scene::before {
  background: radial-gradient(circle at 30% 30%, rgba(217, 173, 64, 0.15) 0%, transparent 50%);
}
.page-student .hunt-launch-title {
  color: var(--gold-text);
  font-family: var(--serif-cn);
  text-shadow: 0 0 14px rgba(255, 214, 107, 0.3);
}
.page-student .hunt-launch-status {
  color: var(--ink-sub);
}
.page-student .hunt-launch-progress {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(217, 173, 64, 0.3);
}
.page-student .hunt-launch-progress-bar {
  background: linear-gradient(90deg, #FFD666 0%, #D9AE40 100%);
  box-shadow: 0 0 10px rgba(255, 214, 107, 0.6);
}
.page-student .hunt-launch-step {
  color: var(--ink-muted);
}
.page-student .hunt-launch-step.active {
  color: var(--gold-text);
  background: rgba(217, 173, 64, 0.12);
}

/* ========== 商城页 ========== */
.page-student .shop-page-header {
  background: linear-gradient(180deg, var(--card-1) 0%, var(--card-2) 50%, var(--card-3) 100%) !important;
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 179, 51, 0.3);
  color: #e5e9f3;
  position: relative;
  overflow: hidden;
}

/* 商城页"宠物复活券"卡（内联样式设了浅红，加 !important 覆盖） */
.page-student .revive-ticket-card {
  background: linear-gradient(180deg, var(--card-1) 0%, var(--card-2) 50%, var(--card-3) 100%) !important;
  border: 1.5px solid var(--gold) !important;
  color: #e5e9f3;
}
.page-student .revive-ticket-card h3 { color: var(--gold-text) !important; }
.page-student .revive-ticket-card div,
.page-student .revive-ticket-card strong { color: var(--ink-sub) !important; }

/* 商城页底部"如何获得小鱼"卡（内联浅蓝） */
.page-student #shopSection > .card {
  background: linear-gradient(180deg, var(--card-1) 0%, var(--card-2) 50%, var(--card-3) 100%) !important;
  border: 1.5px solid var(--gold) !important;
  color: #e5e9f3;
}
.page-student #shopSection > .card h3,
.page-student #shopSection > .card h4 { color: var(--gold-text) !important; }
.page-student #shopSection > .card p,
.page-student #shopSection > .card div,
.page-student #shopSection > .card li,
.page-student #shopSection > .card strong { color: var(--ink-sub) !important; }
.page-student .shop-page-header::before {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid rgba(166, 128, 38, 0.5);
  border-radius: 2px;
  pointer-events: none;
}
.page-student .shop-page-header > * { position: relative; z-index: 1; }
.page-student .shop-page-header h2 {
  color: var(--gold-text);
  font-family: var(--serif-cn);
  font-size: 24px;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(255, 214, 107, 0.3);
}
.page-student .shop-page-header p {
  color: var(--ink-sub);
}
.page-student .shop-page-balance {
  background: var(--field-bg);
  border: 1px solid var(--gold);
  color: var(--gold-text);
  box-shadow: 0 0 12px rgba(255, 214, 107, 0.3);
  font-family: var(--serif-cn);
}

.page-student .shop-item-card {
  background: linear-gradient(180deg, var(--card-1) 0%, var(--card-3) 100%);
  border: 1.5px solid var(--gold-soft);
  color: #e5e9f3;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}
.page-student .shop-item-card::before {
  content: '';
  position: absolute; inset: 5px;
  border: 1px solid rgba(166, 128, 38, 0.3);
  border-radius: 2px;
  pointer-events: none;
}
.page-student .shop-item-card > * { position: relative; z-index: 1; }
.page-student .shop-item-card.affordable {
  border-color: var(--gold);
  background: linear-gradient(180deg, #1a2e57 0%, #0a1530 100%);
  box-shadow: 0 0 14px rgba(255, 214, 107, 0.25);
}
.page-student .shop-item-card.affordable:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 24px rgba(255, 214, 107, 0.5);
}
.page-student .shop-item-name {
  color: var(--gold-text);
  font-family: var(--serif-cn);
}
.page-student .shop-item-desc {
  color: var(--ink-sub);
}
.page-student .shop-item-price {
  color: var(--gold-light);
  font-family: var(--serif-cn);
}
.page-student .shop-item-stock {
  color: var(--ink-muted);
}

/* ========== 提示框（深底金边） ========== */
.page-student .alert {
  background: rgba(10, 18, 41, 0.85);
  border: 1px solid var(--gold-soft);
  color: #e5e9f3;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.page-student .alert-error {
  color: #ff8888;
  border-color: rgba(255, 100, 100, 0.4);
}
.page-student .alert-success {
  color: #88ff99;
  border-color: rgba(100, 255, 130, 0.4);
}
.page-student .alert-warning {
  color: var(--gold-light);
  border-color: var(--gold-soft);
}
.page-student .alert-info {
  color: #a8c5e5;
  border-color: rgba(120, 170, 220, 0.4);
}

/* ========== 列表/表格（管理员相关）穿透设置 ========== */
.page-student .student-table {
  background: var(--card-1);
  color: #e5e9f3;
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  overflow: hidden;
}
.page-student .student-table th {
  background: rgba(217, 173, 64, 0.15);
  color: var(--gold-text);
  font-family: var(--serif-cn);
}
.page-student .student-table td {
  border-bottom: 1px solid rgba(217, 173, 64, 0.15);
}
.page-student .student-table tr:hover {
  background: rgba(217, 173, 64, 0.05);
}

/* ========== 滚动条（金色） ========== */
.page-student ::-webkit-scrollbar {
  width: 8px; height: 8px;
}
.page-student ::-webkit-scrollbar-thumb {
  background: rgba(217, 173, 64, 0.4);
  border-radius: 4px;
}
.page-student ::-webkit-scrollbar-thumb:hover {
  background: rgba(217, 173, 64, 0.7);
}
.page-student ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

/* ========== 选择题选项（v2.1） ========== */
.page-student .choice-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 6px;
}
.page-student .choice-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(217, 173, 64, 0.55);
  background: linear-gradient(180deg, #0F1C38 0%, #1A2E57 55%, #0A1429 100%);
  color: #E5E9F3;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.page-student .choice-btn:hover:not(:disabled) {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 214, 107, 0.25), 0 6px 18px rgba(255, 179, 51, 0.15);
}
.page-student .choice-btn:active:not(:disabled) {
  transform: translateY(0);
}
.page-student .choice-btn:disabled {
  cursor: default;
  opacity: 0.55;
}
.page-student .choice-letter {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(217, 173, 64, 0.12);
  color: var(--gold-text);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--serif-cn);
}
.page-student .choice-btn.choice-correct {
  opacity: 1;
  border-color: #34D399;
  background: linear-gradient(180deg, #06281E 0%, #0B3A2A 55%, #041B14 100%);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.35), 0 6px 18px rgba(52, 211, 153, 0.15);
}
.page-student .choice-btn.choice-correct .choice-letter {
  border-color: #34D399;
  background: rgba(52, 211, 153, 0.15);
  color: #6EE7B7;
}
.page-student .choice-btn.choice-wrong {
  opacity: 1;
  border-color: #F87171;
  background: linear-gradient(180deg, #2A0F12 0%, #3B1519 55%, #1F0B0D 100%);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35), 0 6px 18px rgba(248, 113, 113, 0.12);
}
.page-student .choice-btn.choice-wrong .choice-letter {
  border-color: #F87171;
  background: rgba(248, 113, 113, 0.15);
  color: #FCA5A5;
}
/* ===== 多选题：勾选态 / 提示条 / 确认按钮 ===== */
.page-student .choice-btn.choice-selected {
  border-color: #FFD66B;
  background: linear-gradient(180deg, #2A2410 0%, #3A3016 55%, #1F1A0A 100%);
  box-shadow: 0 0 0 1px rgba(255, 214, 107, 0.4), 0 6px 18px rgba(255, 179, 51, 0.18);
}
.page-student .choice-btn.choice-selected .choice-letter {
  border-color: #FFD66B;
  background: rgba(255, 214, 107, 0.2);
  color: #FFD66B;
}
.page-student .choice-hint {
  grid-column: 1 / -1;
  font-size: 13px;
  color: #B8C2D8;
  text-align: center;
  padding: 2px 0;
}
.page-student .choice-submit {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: 240px;
  padding: 12px 28px;
  border-radius: 12px;
  border: 1.5px solid var(--gold);
  background: linear-gradient(135deg, #D9AE40 0%, #F2C94C 55%, #D9AE40 100%);
  color: #1A2E57;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(217, 173, 64, 0.35);
  transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
}
.page-student .choice-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(217, 173, 64, 0.5);
}
.page-student .choice-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.page-student .star-pill {
  border-color: rgba(217, 173, 64, 0.9);
  background: linear-gradient(135deg, rgba(255, 214, 107, 0.18), rgba(217, 173, 64, 0.08));
  color: var(--gold-text);
  font-weight: 700;
}
@media (max-width: 520px) {
  .page-student .choice-options {
    grid-template-columns: 1fr;
  }
}

/* ===== 混乱模式（教师惩罚：扣20活力值；答题照片贴宠物旁）===== */
.page-student .pet-chaos-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 16px;
  max-width: 420px;
}
.page-student .pet-chaos-layout .pet-scene {
  margin: 0;
  flex: none;
}
.page-student .pet-scene.pet-scene-chaos {
  animation: pet-chaos-shake 0.9s ease-in-out infinite;
}
.page-student .pet-scene-chaos .pet-video-canvas-wrapper {
  outline: 2px solid rgba(192, 38, 211, 0.55);
  outline-offset: 2px;
  border-radius: 14px;
  box-shadow: 0 0 18px rgba(147, 51, 234, 0.45);
  animation: pet-chaos-glow 1.6s ease-in-out infinite;
}
.page-student .pet-chaos-photo {
  width: 106px;
  flex: none;
  background: repeating-linear-gradient(45deg, #fdf4ff, #fdf4ff 6px, #f5f3ff 6px, #f5f3ff 12px);
  border: 2px dashed #c084fc;
  border-radius: 12px;
  padding: 6px;
  text-align: center;
  transform: rotate(2deg);
  box-shadow: 0 4px 10px rgba(147, 51, 234, 0.18);
}
.page-student .pet-chaos-photo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  border: 1px solid #e9d5ff;
}
.page-student .pet-chaos-photo-cap {
  font-size: 11px;
  color: #7e22ce;
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.35;
}
.page-student .pet-chaos-photo-empty {
  font-size: 11px;
  color: #a78bfa;
  padding: 12px 2px;
  line-height: 1.5;
}
.page-student .pet-chaos-banner {
  background: linear-gradient(135deg, #7e22ce, #9333ea);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 auto 14px;
  max-width: 360px;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.35);
}
@keyframes pet-chaos-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-3px) rotate(-1.5deg); }
  30% { transform: translateX(3px) rotate(1.5deg); }
  45% { transform: translateX(-2px) rotate(-1deg); }
  60% { transform: translateX(2px) rotate(1deg); }
  75% { transform: translateX(-1px); }
  90% { transform: translateX(1px); }
}
@keyframes pet-chaos-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(147, 51, 234, 0.35); }
  50% { box-shadow: 0 0 22px rgba(192, 38, 211, 0.65); }
}
