/* 小游戏相关样式（独立文件：避免主样式表更新不及时导致游戏页裸奔） */

/* ============ 小游戏中心 ============ */
.game-hero {
  border-radius: var(--r-lg); padding: 20px 18px; margin-bottom: 14px;
  background: linear-gradient(135deg, #6366f1 0%, #0891b2 60%, #22d3ee 100%);
  box-shadow: var(--shadow); color: #fff; text-align: center;
}
.game-hero-emo { font-size: 34px; }
.game-hero-title { font-size: 19px; font-weight: 800; margin-top: 6px; }
.game-hero-desc { font-size: 13px; opacity: .92; margin-top: 6px; line-height: 1.7; }
.game-hero-meta {
  display: inline-flex; gap: 6px; align-items: center; margin-top: 12px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.18);
}

.game-card {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-sm); margin-bottom: 10px; text-decoration: none; color: inherit;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.game-card:active { transform: scale(.985); }
.game-card-emo {
  width: 50px; height: 50px; border-radius: 15px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 25px;
  box-shadow: 0 4px 12px rgba(8,145,178,.22);
}
.game-card-main { flex: 1; min-width: 0; }
.game-card-title {
  font-size: 15px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.game-card-tag {
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: #ecfeff; color: var(--accent); border: 1px solid #a5f3fc;
}
.game-card-tag.is-hot { background: #fff1f2; color: var(--danger); border-color: #fecdd3; }
.game-card-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.game-card-best { font-size: 11.5px; color: var(--dim); margin-top: 4px; }
.game-card-go { font-size: 20px; color: var(--dim); flex: none; }

.game-tabs { display: flex; gap: 6px; padding: 12px 12px 0; flex-wrap: wrap; }
.game-tab {
  border: 1px solid var(--border); background: var(--card-2); color: var(--muted);
  font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.game-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.game-pane { display: none; padding-top: 4px; }
.game-pane.is-active { display: block; }

/* ============ 游戏舞台 ============ */
.game-stage { position: relative; }
.game-hud { display: flex; gap: 10px; margin-bottom: 10px; }
.game-hud-item {
  flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 8px 10px; text-align: center; box-shadow: var(--shadow-sm);
}
.game-hud-item span { display: block; font-size: 11px; color: var(--dim); }
.game-hud-item b { display: block; font-size: 19px; font-weight: 800; color: var(--text); margin-top: 1px; }
.game-bar { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; margin-bottom: 12px; }
.game-bar i { display: block; height: 100%; background: var(--grad); transition: width .12s linear; }

.game-canvas-wrap { position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.game-canvas-wrap canvas { display: block; touch-action: none; }

.game-overlay {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(248,250,252,.86); backdrop-filter: blur(6px); padding: 18px; z-index: 3;
}
.game-overlay.is-show { display: flex; animation: rise .28s var(--ease) both; }
.game-overlay-box {
  background: var(--card); border-radius: var(--r-lg); padding: 20px 18px; text-align: center;
  box-shadow: var(--shadow); max-width: 340px; width: 100%;
}
.game-overlay-emo { font-size: 38px; }
.game-overlay-title { font-size: 18px; font-weight: 800; margin-top: 4px; }
.game-overlay-desc { font-size: 13px; color: var(--muted); line-height: 1.75; margin: 8px 0 14px; }

/* ============ Stroop 认知挑战 ============ */
.stroop-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 26px 16px 22px; text-align: center; margin-bottom: 14px;
}
.stroop-word { font-size: 76px; font-weight: 900; line-height: 1.1; letter-spacing: .04em; }
.stroop-tip { font-size: 12.5px; color: var(--dim); margin-top: 8px; min-height: 18px; }
.stroop-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stroop-btn {
  height: 62px; border: none; border-radius: var(--r-sm); cursor: pointer;
  box-shadow: 0 4px 12px rgba(23,37,66,.14); transition: transform .12s var(--ease);
}
.stroop-btn:active { transform: scale(.94); }

/* ============ 每日刮刮卡 ============ */
.scratch-card {
  position: relative; min-height: 230px; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 100%);
  border: 1px solid #fed7aa; box-shadow: var(--shadow);
}
.scratch-inner { padding: 26px 22px; text-align: center; min-height: 230px; }
.scratch-emo { font-size: 46px; }
.scratch-kicker { font-size: 12px; color: var(--dim); margin-top: 6px; }
.scratch-title { font-size: 20px; font-weight: 800; color: var(--text); margin-top: 6px; }
.scratch-text {
  font-size: 14px; color: var(--muted); line-height: 1.8; margin-top: 10px;
}
.scratch-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; cursor: crosshair; z-index: 2;
}

/* ============ 首页小游戏入口 ============ */
.game-entry {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
  transition: transform .18s var(--ease);
}
.game-entry:active { transform: scale(.99); }
.game-entry-emo {
  width: 40px; height: 40px; border-radius: 13px; flex: none; font-size: 21px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6366f1, #22d3ee); color: #fff;
}
.game-entry-main { flex: 1; min-width: 0; }
.game-entry-title { font-size: 14px; font-weight: 800; color: var(--text); }
.game-entry-sub {
  font-size: 11.5px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-entry-go { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
