/* ============================================================
   2026 SUMMER BOOTCAMP E - 赛博朋克/游戏 HUD 风格
   配色：深空黑底 + 霓虹绿 + 电光紫 + 岩浆橙
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  --bg-deep: #05070f;
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #151c2e;
  --bg-card-hover: #1c2540;

  --neon-green: #00ff88;
  --neon-green-dim: #00cc6a;
  --electric-purple: #a855f7;
  --electric-purple-dim: #7c3aed;
  --lava-orange: #ff6b35;
  --lava-orange-dim: #e85d2a;
  --cyber-blue: #00d4ff;
  --warning-yellow: #ffd60a;

  --text-primary: #f0f4ff;
  --text-secondary: #8892b0;
  --text-muted: #5a6480;

  --border-neon: rgba(0, 255, 136, 0.3);
  --border-card: rgba(168, 85, 247, 0.2);
  --glow-green: 0 0 10px rgba(0, 255, 136, 0.5), 0 0 20px rgba(0, 255, 136, 0.3);
  --glow-purple: 0 0 10px rgba(168, 85, 247, 0.5), 0 0 20px rgba(168, 85, 247, 0.3);
  --glow-orange: 0 0 10px rgba(255, 107, 53, 0.5), 0 0 20px rgba(255, 107, 53, 0.3);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --hud-header-height: 64px;
  --bottom-nav-height: 72px;

  --font-display: 'Orbitron', 'Rajdhani', -apple-system, sans-serif;
  --font-body: 'Rajdhani', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-pixel: 'Press Start 2P', monospace;
}

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background:
    radial-gradient(ellipse at top, #0d1328 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, #1a0a2e 0%, transparent 40%),
    var(--bg-deep);
  position: relative;
}

/* 背景扫描线效果 */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 136, 0.015) 2px,
    rgba(0, 255, 136, 0.015) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ---------- 启动画面 ---------- */
.splash {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s;
}

.splash-content {
  text-align: center;
  padding: 40px;
}

.splash-logo {
  font-size: 80px;
  animation: pulse-neon 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--neon-green));
}

.splash-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 6px;
  background: linear-gradient(135deg, var(--neon-green), var(--cyber-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 16px;
  text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.splash-sub {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 8px;
  color: var(--electric-purple);
  margin-top: 8px;
}

.splash-bar {
  width: 200px;
  height: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: 2px;
  margin: 32px auto 12px;
  overflow: hidden;
}

.splash-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-green), var(--cyber-blue));
  box-shadow: var(--glow-green);
  animation: loading-fill 1.5s ease-out forwards;
}

.splash-text {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 2px;
}

@keyframes pulse-neon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes loading-fill {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ---------- App 布局 ---------- */
.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 12px calc(var(--bottom-nav-height) + 20px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.page-container::-webkit-scrollbar { display: none; }

/* ---------- HUD 顶部状态栏 ---------- */
.hud-header {
  position: relative;
  height: var(--hud-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(10, 14, 26, 0.98), rgba(10, 14, 26, 0.85));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-neon);
  z-index: 100;
}

.hud-header::before, .hud-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  width: 30px;
  height: 1px;
  background: var(--neon-green);
  box-shadow: var(--glow-green);
}
.hud-header::before { left: 0; }
.hud-header::after { right: 0; }

.hud-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.hud-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.hud-rank {
  font-size: 28px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: 50%;
  filter: drop-shadow(0 0 6px rgba(0, 255, 136, 0.4));
  cursor: pointer;
  transition: all 0.2s;
}

.hud-rank:active {
  transform: scale(0.9);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.7);
}


.hud-nickname {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.hud-level {
  font-size: 11px;
  color: var(--neon-green);
  font-weight: 600;
  letter-spacing: 1px;
}

.hud-xp {
  width: 100px;
}

.xp-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-align: right;
  letter-spacing: 1px;
}

.xp-bar {
  height: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 3px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--electric-purple), var(--neon-green));
  border-radius: 2px;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

/* ---------- 底部游戏导航 ---------- */
.game-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 8px 10px;
  background: linear-gradient(0deg, rgba(10, 14, 26, 0.98), rgba(10, 14, 26, 0.9));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-purple, var(--border-card));
  z-index: 100;
}

.nav-btn {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
}

.nav-btn.active .nav-icon {
  transform: translateY(-2px) scale(1.1);
  filter: drop-shadow(0 0 8px var(--neon-green));
}

.nav-btn.active .nav-label {
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

.nav-icon {
  font-size: 22px;
  transition: all 0.2s;
}

.nav-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  transition: color 0.2s;
}

/* 原来的中心按钮已取消，所有按钮均分宽度 */

@keyframes button-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.5), inset 0 -3px 10px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 30px rgba(168, 85, 247, 0.8), 0 0 40px rgba(255, 107, 53, 0.4), inset 0 -3px 10px rgba(0, 0, 0, 0.3); }
}

/* ---------- 通用卡片 ---------- */
.cyber-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.cyber-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border-top: 2px solid var(--neon-green);
  border-left: 2px solid var(--neon-green);
  border-top-left-radius: var(--radius-md);
  opacity: 0.6;
}

.cyber-card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 20px; height: 20px;
  border-bottom: 2px solid var(--electric-purple);
  border-right: 2px solid var(--electric-purple);
  border-bottom-right-radius: var(--radius-md);
  opacity: 0.6;
}

.cyber-card.green { border-color: rgba(0, 255, 136, 0.3); }
.cyber-card.purple { border-color: rgba(168, 85, 247, 0.3); }
.cyber-card.orange { border-color: rgba(255, 107, 53, 0.3); }
.cyber-card.blue { border-color: rgba(0, 212, 255, 0.3); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(0.96); }

.btn-primary {
  background: linear-gradient(135deg, var(--neon-green-dim), var(--neon-green));
  color: #001a0d;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.btn-primary:hover { box-shadow: 0 0 25px rgba(0, 255, 136, 0.6); }

.btn-purple {
  background: linear-gradient(135deg, var(--electric-purple-dim), var(--electric-purple));
  color: #fff;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.btn-orange {
  background: linear-gradient(135deg, var(--lava-orange-dim), var(--lava-orange));
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-neon);
  color: var(--neon-green);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-block { width: 100%; padding: 14px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---------- 输入框 ---------- */
.input-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}

.input-field:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.15);
}

.input-group {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---------- 页面标题 ---------- */
.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title .title-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 8px var(--neon-green));
}

.section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--neon-green);
  letter-spacing: 2px;
  margin: 20px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--neon-green), transparent);
  border-radius: 2px;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tag-green { background: rgba(0, 255, 136, 0.15); color: var(--neon-green); border: 1px solid rgba(0, 255, 136, 0.3); }
.tag-purple { background: rgba(168, 85, 247, 0.15); color: var(--electric-purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.tag-orange { background: rgba(255, 107, 53, 0.15); color: var(--lava-orange); border: 1px solid rgba(255, 107, 53, 0.3); }
.tag-blue { background: rgba(0, 212, 255, 0.15); color: var(--cyber-blue); border: 1px solid rgba(0, 212, 255, 0.3); }
.tag-yellow { background: rgba(255, 214, 10, 0.15); color: var(--warning-yellow); border: 1px solid rgba(255, 214, 10, 0.3); }
.tag-gray { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.1); }

.tag-done {
  background: rgba(0, 255, 136, 0.2);
  color: var(--neon-green);
  animation: tag-glow 2s ease-in-out infinite;
}

@keyframes tag-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 136, 0.3); }
  50% { box-shadow: 0 0 15px rgba(0, 255, 136, 0.6); }
}

/* ---------- 时间轴 (Timeline) ---------- */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--neon-green), var(--electric-purple), var(--lava-orange));
  opacity: 0.5;
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  z-index: 1;
}

.timeline-item.done .timeline-dot {
  background: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green);
}

.timeline-item.pending .timeline-dot {
  border-color: var(--text-muted);
  box-shadow: none;
}

.timeline-time {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
}

.timeline-card.green { border-left: 3px solid var(--neon-green); }
.timeline-card.purple { border-left: 3px solid var(--electric-purple); }
.timeline-card.orange { border-left: 3px solid var(--lava-orange); }
.timeline-card.blue { border-left: 3px solid var(--cyber-blue); }
.timeline-card.yellow { border-left: 3px solid var(--warning-yellow); }

.timeline-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-title .emoji { font-size: 20px; }

.timeline-detail {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 双轨：Plan vs Actual */
.dual-track {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.track {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.track-plan {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.track-plan .track-label {
  color: var(--electric-purple);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.track-actual {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.track-actual .track-label {
  color: var(--neon-green);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.track-empty {
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- 图片瀑布流 ---------- */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.image-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-grid.single { grid-template-columns: 1fr; }
.image-grid.single img { aspect-ratio: 16/10; }

.image-grid.double { grid-template-columns: repeat(2, 1fr); }

/* ---------- 进度条 ---------- */
.progress-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-card);
}

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

.progress-fill.green { background: linear-gradient(90deg, var(--neon-green-dim), var(--neon-green)); box-shadow: var(--glow-green); }
.progress-fill.purple { background: linear-gradient(90deg, var(--electric-purple-dim), var(--electric-purple)); box-shadow: var(--glow-purple); }
.progress-fill.orange { background: linear-gradient(90deg, var(--lava-orange-dim), var(--lava-orange)); box-shadow: var(--glow-orange); }

/* ---------- 徽章 / 成就 ---------- */
.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.badge-icon { font-size: 20px; }

/* ---------- 勾选框 (游戏风) ---------- */
.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: all 0.2s;
}

.check-item.done {
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.05);
}

.check-item.done .check-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

.check-box {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-card);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  font-size: 16px;
}

.check-item.done .check-box {
  background: linear-gradient(135deg, var(--neon-green-dim), var(--neon-green));
  border-color: var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  color: #001a0d;
}

.check-text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
}

.check-xp {
  font-size: 12px;
  color: var(--warning-yellow);
  font-weight: 700;
}

/* ---------- 记分牌 (羽毛球) ---------- */
.scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  margin-bottom: 12px;
}

.score-player {
  text-align: center;
  flex: 1;
}

.score-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.score-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: var(--lava-orange);
  text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.score-vs {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 900;
}

/* ---------- 学生头像组 ---------- */
.student-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.student-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.student-avatar.active {
  border-color: var(--neon-green);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

/* ---------- 评论区 ---------- */
.comment-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-card);
}

.comment-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.comment-input-row .input-field {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
}

.comment-list { display: flex; flex-direction: column; gap: 10px; }

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
  background: var(--bg-secondary);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
}

.comment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.comment-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-green);
}

.comment-role-tag {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.2);
  color: var(--electric-purple);
  font-weight: 700;
}

.comment-role-tag.parent { background: rgba(255, 107, 53, 0.2); color: var(--lava-orange); }
.comment-role-tag.teacher { background: rgba(0, 255, 136, 0.2); color: var(--neon-green); }
.comment-role-tag.student { background: rgba(0, 212, 255, 0.2); color: var(--cyber-blue); }

.comment-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.comment-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- 点赞按钮 ---------- */
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.like-btn.liked {
  background: rgba(255, 107, 53, 0.15);
  border-color: rgba(255, 107, 53, 0.4);
  color: var(--lava-orange);
  animation: like-pop 0.3s ease;
}

@keyframes like-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ---------- 交互行 ---------- */
.action-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s;
  font-weight: 600;
}

.action-btn:active { background: rgba(255, 255, 255, 0.1); }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-bg-grid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

.login-logo {
  font-size: 60px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px var(--neon-green));
  animation: float 3s ease-in-out infinite;
}

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

.login-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--neon-green), var(--cyber-blue), var(--electric-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 4px;
  margin-bottom: 32px;
  text-align: center;
}

.login-card {
  width: 100%;
  max-width: 360px;
  position: relative;
  z-index: 1;
}

.role-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.role-option {
  padding: 14px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.role-option.active {
  border-color: var(--neon-green);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.2), inset 0 0 15px rgba(0, 255, 136, 0.05);
  transform: translateY(-2px);
}

.role-option .role-emoji { font-size: 28px; margin-bottom: 6px; }
.role-option .role-name { font-size: 13px; font-weight: 700; }
.role-option .role-desc { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.login-accounts {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-card);
}

.login-accounts-title {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.quick-login-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  text-align: left;
  transition: all 0.2s;
}

.quick-login-btn:active {
  background: rgba(0, 255, 136, 0.1);
  border-color: var(--neon-green);
}

.quick-login-btn .ql-role {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 8px;
  font-weight: 700;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--neon-green);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
  z-index: 9999;
  animation: toast-in 0.3s ease;
  max-width: 80%;
}

.toast.error {
  border-color: var(--lava-orange);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

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

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 500;
  animation: fade-in 0.2s;
}

@media (min-width: 600px) {
  .modal-overlay { align-items: center; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  background: var(--bg-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow-y: auto;
  animation: slide-up 0.3s ease;
}

@media (min-width: 600px) {
  .modal { border-radius: var(--radius-lg); }
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 1;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-card);
  display: flex;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: var(--bg-primary);
}

/* ---------- 切换 Tab ---------- */
.tab-bar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s;
  letter-spacing: 1px;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--neon-green-dim), var(--neon-green));
  color: #001a0d;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

/* ---------- 动态瀑布流 ---------- */
.feed-item {
  margin-bottom: 16px;
}

.feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.feed-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 2px solid var(--border-card);
}

.feed-meta { flex: 1; }

.feed-name {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-time {
  font-size: 11px;
  color: var(--text-muted);
}

.feed-content {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 10px;
}

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

.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-text { font-size: 14px; }

/* ---------- 分割线 ---------- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-card), transparent);
  margin: 16px 0;
}

/* ---------- 浮动按钮 ---------- */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--bottom-nav-height) + 16px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lava-orange-dim), var(--lava-orange));
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5);
  z-index: 90;
  transition: all 0.2s;
}

.fab:active { transform: scale(0.9); }

/* ---------- 日期选择器 ---------- */
.date-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.date-arrow {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 50%;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.date-arrow:hover {
  background: var(--bg-card-hover);
  color: var(--neon-green);
  border-color: var(--neon-green);
  box-shadow: var(--glow-green);
}

.date-arrow:active {
  transform: scale(0.9);
}

.date-display {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
}

.date-display .date-weekday {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 400;
}

/* 全局日期栏 - 顶部公共部分 */
.global-date-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.global-date-bar .date-display {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.global-date-bar .date-display:hover {
  background: var(--bg-card);
}

/* ---------- 数据行 ---------- */
.data-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-row:last-child { border-bottom: none; }

.data-label {
  color: var(--text-secondary);
  font-size: 13px;
}

.data-value {
  font-weight: 700;
  font-size: 14px;
  color: var(--neon-green);
}

/* ---------- 运动类型卡片 ---------- */
.exercise-type-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.exercise-type-card:active { transform: scale(0.96); }

.exercise-type-card .et-icon { font-size: 40px; margin-bottom: 10px; }
.exercise-type-card .et-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
}
.exercise-type-card .et-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.exercise-type-card.selected {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

/* ---------- 下拉选择 ---------- */
select.input-field {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238892b0' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ---------- 图片上传区 ---------- */
.upload-zone {
  padding: 30px;
  text-align: center;
  border: 2px dashed var(--border-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-secondary);
}

.upload-zone:active {
  border-color: var(--neon-green);
  background: rgba(0, 255, 136, 0.05);
}

.upload-icon { font-size: 36px; margin-bottom: 8px; }
.upload-text { color: var(--text-muted); font-size: 13px; }

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.upload-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.upload-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ---------- 学生选择器 ---------- */
.student-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.student-chip {
  flex: 1;
  padding: 10px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.student-chip.selected {
  border-color: var(--neon-green);
  background: rgba(0, 255, 136, 0.1);
  color: var(--neon-green);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.student-chip .chip-avatar {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}

/* ---------- 14岁男孩专属：彩蛋 & 动效 ---------- */

/* 连击效果 (Combo) */
.combo-popup {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: var(--lava-orange);
  text-shadow: 0 0 20px var(--lava-orange), 0 0 40px var(--lava-orange);
  pointer-events: none;
  z-index: 9999;
  animation: combo-pop 0.8s ease-out forwards;
}

@keyframes combo-pop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  30% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  60% { transform: translate(-50%, -60%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -100%) scale(0.8); opacity: 0; }
}

/* 粒子爆炸 */
.particle-container {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: particle-fly 1s ease-out forwards;
}

@keyframes particle-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* 按钮 hover 发光脉动 */
.btn-primary:hover, .btn-purple:hover, .btn-orange:hover {
  animation: glow-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.2); }
}

/* 摇晃动画（错误提示） */
.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* 闪烁文字（重要提示） */
.blink-text {
  animation: blink 1s ease-in-out infinite;
}

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

/* 扫描线效果 */
.scanline {
  position: relative;
  overflow: hidden;
}

.scanline::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
  animation: scan 3s linear infinite;
}

@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}

/* 打字机效果 */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--neon-green);
  white-space: nowrap;
  animation: typing 2s steps(30, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--neon-green); }
}

/* 等级徽章 */
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a1a2e;
  font-weight: 900;
  font-size: 10px;
  border-radius: 4px;
  font-family: var(--font-display);
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* 生命值/血条（用于显示剩余任务数） */
.hp-bar {
  height: 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--lava-orange);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.hp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff0000, var(--lava-orange));
  transition: width 0.5s ease;
  box-shadow: 0 0 10px var(--lava-orange);
}

.hp-bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
  letter-spacing: 1px;
}

/* 战斗按钮（大按钮特效） */
.fight-btn {
  position: relative;
  background: linear-gradient(135deg, var(--lava-orange), #ff006e);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 2px;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5),
              inset 0 1px 0 rgba(255,255,255,0.3);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  overflow: hidden;
}

.fight-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: fight-shine 2s ease-in-out infinite;
}

@keyframes fight-shine {
  0% { left: -100%; }
  50%, 100% { left: 150%; }
}

.fight-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(255, 107, 53, 0.5);
}

/* 像素风边框 */
.pixel-border {
  border-image: linear-gradient(45deg, var(--neon-green), var(--electric-purple)) 1;
  border-style: solid;
  border-width: 2px;
}

/* 成就解锁弹窗 */
.achievement-popup {
  position: fixed;
  top: 80px;
  right: -100%;
  width: 280px;
  padding: 14px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid var(--warning-yellow);
  border-radius: var(--radius-md);
  box-shadow: 0 0 30px rgba(255, 214, 10, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-popup.show {
  right: 16px;
}

.achievement-icon {
  font-size: 36px;
  filter: drop-shadow(0 0 10px var(--warning-yellow));
}

.achievement-text {
  flex: 1;
}

.achievement-title {
  font-size: 10px;
  color: var(--warning-yellow);
  font-weight: 700;
  letter-spacing: 2px;
  font-family: var(--font-display);
}

.achievement-name {
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

/* 响应式补充 */
@media (min-width: 768px) {
  .page-container {
    padding-left: 24px;
    padding-right: 24px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
  }

  .game-nav {
    max-width: 600px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-left: 1px solid var(--border-card);
    border-right: 1px solid var(--border-card);
  }
}

/* 手机端 HUD 布局适配 */
@media (max-width: 600px) {
  .hud-header {
    padding: 0 8px;
    height: 52px;
  }
  .hud-rank {
    width: 32px;
    height: 32px;
    font-size: 20px;
    filter: drop-shadow(0 0 4px rgba(0, 255, 136, 0.3));
  }
  .hud-nickname {
    font-size: 13px;
    max-width: 70px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hud-level {
    display: none; /* 手机端隐藏二级身份文本以节省空间 */
  }
  .hud-left {
    gap: 6px;
  }
  .global-date-bar {
    gap: 6px;
  }
  .global-date-bar .date-display {
    padding: 2px 6px;
  }
  .global-date-bar .date-arrow {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .date-display {
    font-size: 13px;
  }
  .date-display .date-weekday {
    font-size: 9px;
    margin-top: 0px;
  }
  .hud-xp {
    width: 60px;
  }
  .xp-label {
    display: none; /* 手机端隐藏"今日进度"标签文字 */
  }
  .xp-bar {
    height: 6px;
  }
}
