/* ===== 专注训练统一主题 ===== */
:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --primary-glow: rgba(124, 58, 237, 0.25);
  --primary-dim: rgba(124, 58, 237, 0.12);
  
  --accent: #f59e0b;
  --success: #22c55e;
  --danger: #ef4444;
  --info: #3b82f6;
  
  --bg: #0f1123;
  --bg-card: #1a1d35;
  --bg-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.07);
  --border-light: rgba(255,255,255,0.04);
  
  --text: #f0f2f5;
  --text-dim: rgba(255,255,255,0.55);
  --text-faint: rgba(255,255,255,0.25);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px var(--primary-glow);
}

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

body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 16px;
  color: var(--text);
}

.container { max-width: 480px; width: 100%; }

/* ===== 导航栏 ===== */
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.nav-title { font-size: 14px; font-weight: 600; }
.nav-back {
  font-size: 12px; color: var(--text-dim); text-decoration: none;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); transition: all 0.2s;
}
.nav-back:hover { background: var(--bg-hover); color: var(--text); }

/* ===== 主卡片 ===== */
.main-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  position: relative; overflow: hidden;
}
.main-card::before {
  content: ""; position: absolute;
  top: -80%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 20%, var(--primary-dim), transparent 60%);
  pointer-events: none;
}
.main-card > * { position: relative; z-index: 1; }

/* ===== 通用按钮 ===== */
.btn-primary {
  background: var(--primary); color: #fff; border: none;
  padding: 10px 24px; border-radius: 20px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all 0.25s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-primary:active { transform: scale(0.97); }
.btn-ghost {
  background: var(--bg-hover); color: var(--text-dim);
  border: 1px solid var(--border); padding: 10px 24px;
  border-radius: 20px; font-size: 14px; cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.btn-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; font-size: 18px;
  transition: all 0.25s; flex-shrink: 0;
}
.btn-icon:hover { transform: scale(1.08); }
.btn-icon:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

/* ===== 广告位 ===== */
.ad-slot {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px; margin: 16px 0; text-align: center;
  min-height: 90px; display: flex; align-items: center;
  justify-content: center; flex-direction: column;
}
.ad-slot .ad-lbl {
  font-size: 10px; color: var(--text-faint);
  margin-bottom: 8px; letter-spacing: 1px; text-transform: uppercase;
}

/* ===== 相关工具 ===== */
.related-tools { margin: 20px 0 0; text-align: left; }
.related-tools .rel-title {
  font-size: 13px; color: var(--text-dim);
  margin-bottom: 12px; letter-spacing: 1px;
  display: flex; align-items: center; gap: 6px;
}
.related-tools .rel-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.related-tools .rel-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); text-decoration: none;
  transition: all 0.2s; color: var(--text-dim);
}
.related-tools .rel-item:hover {
  background: var(--bg-hover); color: #fff;
  border-color: var(--primary-dim); transform: translateY(-1px);
}
.related-tools .rel-icon { font-size: 20px; }
.related-tools .rel-name { font-size: 11px; text-align: center; line-height: 1.2; }

/* ===== 标签 ===== */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 12px;
  font-size: 12px; font-weight: 500;
}
.tag-primary { background: var(--primary-dim); color: var(--primary-light); }
.tag-success { background: rgba(34,197,94,0.12); color: #4ade80; }
.tag-warning { background: rgba(245,158,11,0.12); color: #fbbf24; }
.tag-danger { background: rgba(239,68,68,0.12); color: #f87171; }

/* ===== 响应式 ===== */
@media (max-width: 400px) {
  .related-tools .rel-grid { grid-template-columns: repeat(4, 1fr); }
  .main-card { padding: 20px 14px; border-radius: var(--radius-md); }
}
@media (max-width: 360px) {
  .related-tools .rel-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== 淡入动画 ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.pulse { animation: pulse 2s ease-in-out infinite; }

/* ===== 统计卡片 ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.stat-item {
  background: rgba(255,255,255,0.02); border-radius: var(--radius-sm);
  padding: 10px; text-align: center;
}
.stat-num { font-size: 20px; font-weight: 700; }
.stat-lbl { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* ===== Toast 提示 ===== */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 24px;
  font-size: 14px; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 999; opacity: 0; transition: all 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; bottom: 100px; }
