/* ============================================
   FitForge 健身小程序原型 - 统一样式
   极简白 + 专业蓝 #1E6FFF
   ============================================ */

:root {
  --primary: #1E6FFF;
  --primary-light: rgba(30, 111, 255, 0.14);
  --bg: rgba(255, 255, 255, 0.05);
  --card: rgba(255, 255, 255, 0.04);
  --text: #EDEFF3;
  --muted: #9AA2AE;
  --border: rgba(255, 255, 255, 0.09);
  --success: #4ADE80;
  --warning: #FBBF24;
  --danger: #F87171;
  --radius: 16px;
  --shadow: none;
  /* 能量裂纹分割线：细碎断裂发光线段（亮核+羽化=柔和发光，不抢主体） */
  --crack-line: repeating-linear-gradient(90deg,
    rgba(160, 210, 255, 0) 0 4px,
    rgba(190, 230, 255, 0.45) 4px 6px,
    rgba(215, 242, 255, 0.85) 6px 8px,
    rgba(190, 230, 255, 0.45) 8px 10px,
    rgba(160, 210, 255, 0) 10px 16px,
    rgba(190, 230, 255, 0.35) 16px 18px,
    rgba(210, 240, 255, 0.7) 18px 20px,
    rgba(160, 210, 255, 0) 20px 28px,
    rgba(200, 235, 255, 0.6) 28px 31px,
    rgba(160, 210, 255, 0) 31px 40px);
}

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

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: #050507;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* ========== 人物插画层（独立半透明，辉光严格沿人物轮廓） ========== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2;
  background-image: url("../img/bg.png");
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
  opacity: 0.28;
  /* 静态辉光一次成型：浏览器可缓存整层渲染结果，不做动画/过渡切换
     （drop-shadow 在整屏层上逐帧重算是卡顿主因，故 hover/idle 只用合成属性） */
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
  transform: scale(1);
  transform-origin: center bottom;
  pointer-events: none;
  animation: bgFadeIn 1.1s ease-out 0.2s backwards;
  /* hover/idle 仅走 transform/opacity（合成器处理，不掉帧） */
  transition: transform 0.8s ease, opacity 0.6s ease;
}

/* ========== 暗角遮罩层（独立于人物层，避免辉光误作用到屏幕边缘） ========== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image: radial-gradient(ellipse at center 60%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.55) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  /* 流动暗角：缓慢漂移+呼吸，幅度克制 */
  animation: vignetteFlow 18s ease-in-out infinite alternate;
}

/* 漫画人物交互：鼠标进入人物区域 → 辉光增强 + 极轻微放大
   （等效 .fit-character:hover：0 0 22px / 0.32 / scale 1.02 / all 0.6s） */
body.char-hover::before {
  /* hover：只提亮（opacity）+ 轻微放大，不动 filter，避免整屏高斯逐帧重算 */
  opacity: 0.34;
  transform: scale(1.02);
}

/* ========== 无操作待机（30s）：人物辉光缓缓增强，操作后快速恢复 ========== */
body.idle::before {
  opacity: 0.38;
  transform: scale(1.015);
}

/* ========== 拳头循环微光：柔和呼吸光晕，无圆环边框（微光而非光环） ========== */
#punch-glow {
  position: fixed;
  left: 68%;
  top: 70%;
  width: 0;
  height: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

#punch-glow::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(195, 228, 255, 0.5) 0%,
    rgba(195, 228, 255, 0.16) 45%,
    rgba(195, 228, 255, 0) 70%);
  filter: blur(2px);
  opacity: 0.55;
}

/* 长按触发：微光显示并进入循环呼吸 */
#punch-glow.on {
  opacity: 1;
}

#punch-glow.on::before {
  animation: glowBreath 3.2s ease-in-out infinite;
}

/* 松手爆发：冲击光晕快速扩散淡出，模拟出拳 */
#punch-glow.burst {
  opacity: 1;
}

#punch-glow.burst::before {
  animation: glowBurst 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes glowBurst {
  0%   { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(3.4); }
}

@keyframes glowBreath {
  0%, 100% { opacity: 0.32; transform: translate(-50%, -50%) scale(0.85); }
  50%      { opacity: 0.66; transform: translate(-50%, -50%) scale(1.18); }
}

/* ========== 页面容器（右侧内容区） ========== */
.container {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  min-height: 100vh;
  background: transparent;
  position: relative;
  z-index: 10;
  padding: 0 36px 72px;
}

.page {
  padding: 36px 0 64px;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.page-title h2 {
  font-size: 20px;
  font-weight: 700;
}

.page-title .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  flex-shrink: 0;
}

/* ========== 卡片（极简克制） ========== */
.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: none;
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.25s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .bar {
  width: 3px;
  height: 14px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

/* ========== 首页 Hero（首屏：slogan + 大按钮） ========== */
.home-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 72px 0 48px;
}

.hero-slogan {
  margin: 0;
  font-size: clamp(36px, 5.2vw, 60px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.06em;
  color: #FFFFFF;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.32),
    0 0 30px rgba(255, 255, 255, 0.14),
    0 2px 14px rgba(0, 0, 0, 0.60);
  animation: fadeInUp 0.7s ease-out 0.1s backwards;
}

.hero-line {
  display: block;
}

.hero-sub {
  display: inline-block;
  margin-top: 28px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.60);
  opacity: 0.38;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px));
  gap: 22px;
  margin-top: 60px;
  animation: fadeInUp 0.7s ease-out 0.3s backwards;
}

.hero-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.40);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.08);
}

/* ========== 首页底部说明 ========== */
.home-footer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  opacity: 0.6;
  padding: 24px 24px 12px;
}

/* ========== Tab 切换 ========== */
.tabs {
  display: flex;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab {
  flex: 1;
  min-width: 60px;
  padding: 9px 6px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tab.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

/* ========== 表单 ========== */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input[type="number"],
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.form-group input[type="number"]:focus,
.form-group select:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.radio-group.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.radio-item {
  position: relative;
}

.radio-item input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.radio-item span {
  display: block;
  text-align: center;
  padding: 10px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text);
  transition: all 0.15s;
}

.radio-item input:checked + span {
  border-color: var(--primary);
  background: transparent;
  color: var(--primary);
  font-weight: 600;
}

/* ========== 按钮 ========== */
.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s;
}

.btn:active {
  opacity: 0.8;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-ghost {
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

/* ========== 徽章 ========== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.badge.gray {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.badge.green {
  background: rgba(16, 185, 129, 0.16);
  color: var(--success);
}

.badge.orange {
  background: rgba(245, 158, 11, 0.16);
  color: var(--warning);
}

.badge.red {
  background: rgba(239, 68, 68, 0.16);
  color: var(--danger);
}

/* ========== 画像摘要（左右两栏，数值强调色高亮，无分割线） ========== */
.profile-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 16px;
}

.summary-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-item .k {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.summary-item .v {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--primary);
}

/* ========== 本周训练安排（列表式布局，无表格边框与虚线，靠行间距区分） ========== */
.plan-list {
  display: flex;
  flex-direction: column;
}

.plan-head,
.plan-row {
  display: grid;
  grid-template-columns: 86px 1fr auto auto;
  align-items: center;
  column-gap: 14px;
}

.plan-head {
  padding-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}

.plan-row {
  padding: 15px 0;
  font-size: 14px;
  color: var(--text);
}

.plan-row .day {
  font-weight: 700;
}

.plan-row .focus {
  font-weight: 500;
}

.plan-row .meta {
  font-size: 13px;
  color: var(--muted);
  opacity: 0.75;
}

.plan-row.rest {
  opacity: 0.4;
}

.plan-row.rest .day {
  font-weight: 400;
}

/* ========== 每日计划详情 ========== */
.day-card {
  margin-bottom: 4px;
}

.day-card .day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  cursor: pointer;
  gap: 14px;
}

.day-card .day-header .left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.day-card .day-name {
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.day-card .day-focus {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-card .day-arrow {
  color: var(--muted);
  transition: transform 0.2s;
  font-size: 12px;
}

.day-card.open .day-arrow {
  transform: rotate(180deg);
}

.day-card .day-body {
  display: none;
  padding: 2px 0 8px 26px;
}

.day-card.open .day-body {
  display: block;
}

.exercise-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}

.exercise-row:last-child {
  padding-bottom: 4px;
}

.exercise-row .idx {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exercise-row .name {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
}

.exercise-row .sets {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* ========== 动作教学 ========== */
.search-box {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 3px 10px rgba(0, 0, 0, 0.30);
  font-size: 14px;
  color: var(--text);
  outline: none;
  margin-bottom: 18px;
  transition: box-shadow 0.2s ease;
}

.search-box:focus {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), inset 0 3px 12px rgba(0, 0, 0, 0.35);
}

/* 动作条目：无外框、无三角图标，靠上下间距分隔，无彩色难度徽章 */
body[data-page="workout"] .exercise-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 14px 2px;
}

body[data-page="workout"] .exercise-card .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

body[data-page="workout"] .exercise-card .name {
  font-size: 15px;
  font-weight: 700;
}

body[data-page="workout"] .exercise-card .divider {
  color: var(--muted);
  opacity: 0.45;
  margin: 0 8px;
  font-weight: 400;
}

body[data-page="workout"] .exercise-card .meta {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.exercise-card .body {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: none;
  background-image: var(--crack-line);
  background-size: auto 2px;
  background-repeat: repeat-x;
  background-position: left top;
}

.exercise-card.open .body {
  display: block;
}

.detail-block {
  margin-bottom: 12px;
}

.detail-block h4 {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.detail-block ul {
  padding-left: 16px;
  font-size: 13px;
  color: var(--text);
}

.detail-block li {
  margin-bottom: 2px;
}

.empty-tip {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 13px;
}

/* ========== 饮食方案 ========== */
/* 顶部标签：细下划线 + 文字高亮，禁大块蓝色背景（饮食/补剂/动作页共用） */
body[data-page="diet"] .tabs,
body[data-page="supplement"] .tabs,
body[data-page="workout"] .tabs {
  display: flex;
  gap: 26px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 2px 0 0;
  margin-bottom: 22px;
  overflow-x: auto;
}

body[data-page="workout"] .tabs {
  gap: 20px;
}

body[data-page="diet"] .tab,
body[data-page="supplement"] .tab,
body[data-page="workout"] .tab {
  flex: 0 0 auto;
  min-width: auto;
  padding: 8px 2px 12px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.15s ease;
}

body[data-page="diet"] .tab.active,
body[data-page="supplement"] .tab.active,
body[data-page="workout"] .tab.active {
  background: transparent;
  color: var(--primary);
  font-weight: 700;
}

body[data-page="diet"] .tab.active::after,
body[data-page="supplement"] .tab.active::after,
body[data-page="workout"] .tab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -1px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

/* 概览头部：大数字 + 细进度条 + 右侧垂直营养数据 */
body[data-page="diet"] .nutri-overview {
  display: flex;
  align-items: center;
  gap: 18px;
}

body[data-page="diet"] .calories-hero {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

body[data-page="diet"] .macro-bar-wrap {
  flex: 1;
  min-width: 0;
}

.macro-bar {
  display: flex;
  gap: 3px;
  height: 7px;
  border-radius: 999px;
  margin: 0;
}

.macro-bar .seg {
  height: 100%;
  border-radius: 999px;
}

.macro-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.5;
  flex-wrap: wrap;
  margin-top: 10px;
}

.macro-legend .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}

/* 右侧垂直营养数据：次级小字 */
body[data-page="diet"] .macro-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

body[data-page="diet"] .macro-stats .macro-stat b {
  color: var(--text);
  font-weight: 600;
  margin: 0 2px;
}

body[data-page="diet"] .meal-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  background: transparent;
}

body[data-page="diet"] .meal-card .meal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

body[data-page="diet"] .meal-card .meal-name {
  font-weight: 700;
  font-size: 15px;
}

body[data-page="diet"] .meal-card .meal-cal {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  opacity: 0.7;
}

/* 食材列表：去圆点、无列表标记、逐行靠行距区分 */
body[data-page="diet"] .meal-card ul {
  list-style: none;
  padding-left: 0;
  font-size: 14px;
  color: var(--text);
}

body[data-page="diet"] .meal-card ul li {
  padding: 4px 0;
  line-height: 1.6;
}

body[data-page="diet"] .meal-card ul li:last-child {
  padding-bottom: 0;
}

/* 同类可替换（食物替代项） */
body[data-page="diet"] .meal-alts {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.35);
}
body[data-page="diet"] .meal-alts-title {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.8;
  margin-bottom: 6px;
}
body[data-page="diet"] .meal-alts ul {
  list-style: none;
  padding-left: 0;
  font-size: 13px;
  margin: 0;
}
body[data-page="diet"] .meal-alts ul li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  padding: 3px 0;
  line-height: 1.55;
}
body[data-page="diet"] .meal-alts .alt-from {
  color: var(--muted);
  opacity: 0.75;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}
body[data-page="diet"] .meal-alts .alt-arrow {
  color: var(--muted);
  opacity: 0.6;
}
body[data-page="diet"] .meal-alts .alt-to {
  color: #4FC3F7;
}

.nutri-note {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 16px;
}

/* ========== 补剂 ========== */
.supp-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.supp-card .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.supp-card .name {
  font-size: 15px;
  font-weight: 700;
}

.supp-card .effect {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.supp-card .rows {
  font-size: 13px;
}

.supp-card .rows .row {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.supp-card .rows .row .k {
  color: var(--muted);
  flex-shrink: 0;
  min-width: 60px;
}

.supp-card .rows .row .v {
  color: var(--text);
}

.supp-essential {
  border-left: 3px solid var(--primary);
}

/* 顶部提示：辅助小字，降透明度，去除底色容器 */
body[data-page="supplement"] .nutri-note {
  background: transparent;
  border-radius: 0;
  padding: 2px 0 16px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.72;
  margin-bottom: 2px;
}

/* 标题右侧必需标记：纯文字，无小标签方块 */
body[data-page="supplement"] .supp-card .flag {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

body[data-page="supplement"] .supp-card .effect {
  margin-bottom: 14px;
}

body[data-page="supplement"] .supp-card .rows .row {
  margin-bottom: 8px;
  align-items: baseline;
}

/* ========== 工具类 ========== */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-center { text-align: center; }

/* ========== 响应式适配 ========== */
@media (max-width: 900px) {
  .container {
    padding: 0 24px 56px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 14px 48px;
  }

  .page {
    padding: 20px 0 40px;
  }

  .home-hero {
    min-height: calc(100vh - 40px);
    padding: 72px 0 64px;
  }

  .hero-slogan {
    font-size: clamp(28px, 8.6vw, 42px);
  }

  .hero-sub {
    margin-top: 20px;
    font-size: 12px;
    letter-spacing: 0.3em;
  }

  .hero-actions {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 44px;
  }

  .hero-btn {
    padding: 14px 16px;
    font-size: 13px;
  }
}
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ========== 深色主题补充 ========== */
.search-box::placeholder,
.form-group input[type="number"]::placeholder,
.form-group select::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.form-group select option {
  background: #161A22;
  color: var(--text);
}

.search-box::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
}

/* 直接铺在背景图上的文字增加描边，保证黑白漫画背景下可读 */
body {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.page-title h2,
.home-footer,
.empty-tip {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.page-title h2 {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.22), 0 1px 4px rgba(0, 0, 0, 0.85);
}

/* ========== 滚动进入动画 ========== */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ========== 流动暗角光晕 ==========
   仅做 opacity 呼吸（合成层属性），不再逐帧改 background-position，
   避免每帧重绘全屏渐变导致卡顿 */
@keyframes vignetteFlow {
  0%   { opacity: 0.8; }
  50%  { opacity: 0.92; }
  100% { opacity: 0.82; }
}

/* ========== 入场动画 ========== */
@keyframes bgFadeIn {
  from { opacity: 0; }
  to { opacity: 0.5; }
}

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

/* ============================================
   会员商业化 & 「我的」个人中心（v1.1 增量）
   ============================================ */

/* ---------- 首页：人物热区命中层（点人物进「我的」）
   .char-hitbox 为全屏透明占位；实际点击命中与 hover 辉光统一在 app.js
   按 bg.png 人物轮廓 alpha 逐像素判定，透明区与交互元素自动放行 ---------- */
.char-hitbox {
  position: fixed;
  inset: 0;                /* 全屏覆盖：整张人物插画轮廓任意位置可命中 */
  z-index: 3;              /* 人物层(z2)之上、内容容器(z10)之下，不遮挡按钮 */
  display: block;
  cursor: pointer;
  pointer-events: auto;
}
.char-hitbox::after {
  content: '进入我的';
  position: absolute;
  right: 26px;
  bottom: 22px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.05);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.char-hitbox:hover::after {
  opacity: 1;
}

/* 轮廓命中态（body.char-hover 由 app.js 逐像素判定）时显示“进入我的”提示 */
body.char-hover .char-hitbox::after {
  opacity: 1;
}

/* 首页底部「我的」兜底入口 */
.home-profile-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.home-profile-link:hover {
  border-bottom-color: var(--primary);
  opacity: 0.9;
}

/* ---------- 通用「会员专属」角标（全站，仅标识不锁定） ---------- */
.member-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: #9AA2AE;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  white-space: nowrap;
}
.member-badge .lock-ic {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}
/* 有效会员：全站角标态联动 → 会员专属角标点亮为专业蓝 */
body.member .member-badge {
  color: var(--primary);
  border-color: rgba(30, 111, 255, 0.42);
  background: rgba(30, 111, 255, 0.10);
}

/* ---------- 「我的」页：会员卡（蓝色渐变贵宾卡） ---------- */
body[data-page="profile"] .member-card {
  position: relative;
  overflow: hidden;
  padding: 26px 26px 22px;
  background: linear-gradient(135deg, #1E6FFF 0%, #0B3FA3 100%);
  border: 1px solid rgba(120, 180, 255, 0.35);
  box-shadow: 0 14px 40px rgba(11, 63, 163, 0.35);
}
.member-card .member-glow {
  position: absolute;
  right: -60px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}
.member-card .member-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.member-card .member-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.member-card .member-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.member-card .member-badge {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  padding: 3px 12px;
}
body[data-page="profile"] .member-level {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
}
.member-card .member-desc {
  position: relative;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}
.member-card .member-meta {
  position: relative;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.6;
}
.member-card .btn {
  position: relative;
  background: #FFFFFF;
  color: #0B3FA3;
}
.member-card .btn:active {
  opacity: 0.85;
}

/* ---------- 权益对比 ---------- */
.plan-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pcol {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.pcol-plus {
  border-color: rgba(30, 111, 255, 0.45);
  background: rgba(30, 111, 255, 0.06);
}
.pcol-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.pcol-plus-tag {
  color: var(--primary);
}
.pcol-list {
  list-style: none;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}
.pcol-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.pcol-list .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}
.pcol-list .member-badge.mini {
  margin-left: auto;
  padding: 0 6px;
  font-size: 10px;
}
.benefit-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
  color: var(--muted);
  opacity: 0.75;
}

/* ---------- 个人档案 ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 14px;
}
.pcell .k {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
}
.pcell .v {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.empty-tip-sm {
  font-size: 13px;
  color: var(--muted);
  opacity: 0.8;
}

/* ---------- 训练统计 ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat {
  text-align: center;
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.stat .num {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.stat .label {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}
.stat-note {
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.75;
}

/* ---------- 设置 / 退出登录 ---------- */
.settings-list .setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.settings-list .setting-row:last-child {
  border-bottom: none;
}
.settings-list .setting-row .muted {
  color: var(--muted);
  font-size: 12px;
}
.btn.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ---------- 开通弹层（确认卡片 / 支付成功） ---------- */
body.pay-open {
  overflow: hidden;
}
.pay-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 6, 14, 0.66);
  backdrop-filter: blur(5px);
  animation: payFadeIn 0.25s ease;
}
.pay-modal {
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 26px 24px 20px;
  background: rgba(18, 24, 34, 0.88);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: payUp 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.pay-title {
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  color: #FFFFFF;
}
.pay-sub {
  margin-top: 6px;
  margin-bottom: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.pay-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.pay-plan {
  position: relative;
  text-align: left;
  padding: 16px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.pay-plan:hover {
  border-color: rgba(255, 255, 255, 0.3);
}
.pay-plan.selected {
  border-color: var(--primary);
  background: rgba(30, 111, 255, 0.10);
}
.pay-plan.recommended {
  border-color: rgba(30, 111, 255, 0.5);
}
.pay-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--primary);
}
.pay-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.pay-price {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
}
.pay-unit {
  font-size: 12px;
  color: var(--muted);
}
.pay-name {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.pay-tip {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}
.pay-modal .btn {
  margin-top: 0;
}
.pay-modal .btn + .btn {
  margin-top: 10px;
}

/* 支付成功态 */
.pay-success-step {
  text-align: center;
  padding: 10px 0 6px;
}
.pay-check {
  width: 76px;
  height: 76px;
  margin: 6px auto 14px;
}
.pay-check svg {
  width: 100%;
  height: 100%;
}
.pay-check circle {
  stroke: var(--primary);
  stroke-width: 2;
  fill: rgba(30, 111, 255, 0.08);
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: payCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.pay-check .tick-path {
  stroke: #4ADE80;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: payTick 0.42s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}
.pay-success-heading {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
}
.pay-success-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

@keyframes payFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes payUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes payCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes payTick {
  to { stroke-dashoffset: 0; }
}

/* ---------- 响应式补充 ---------- */
@media (max-width: 600px) {
  .plan-compare {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }
  .stat .num {
    font-size: 22px;
  }
}
