/* ============================================================
   页面级样式
   ============================================================ */

/* 页头横幅 */
.page-hero {
  text-align: center;
  padding: 26px 0 10px;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 30px;
  background: linear-gradient(90deg, #e8c38a, #f5dfb8 50%, #d4a574);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.page-hero p { color: var(--text-dim); font-size: 14px; }

/* 养狗中心 */
.dog-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 0;
}
.dog-canvas {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dog-canvas svg { max-height: 100%; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.5)); }
.dog-ground {
  position: absolute;
  bottom: 4px;
  width: 78%;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(212,165,116,0.28), transparent 70%);
}
.dog-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin-top: 8px;
  cursor: pointer;
}
.dog-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.stage-badge, .breed-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.stage-badge { background: linear-gradient(135deg, rgba(124,58,237,0.4), rgba(224,68,91,0.3)); color: #f0d9ff; border: 1px solid rgba(167,139,250,0.4); }
.breed-badge { background: rgba(212,165,116,0.15); color: var(--gold-bright); border: 1px solid rgba(212,165,116,0.4); }

/* 经验条 */
.exp-wrap { width: 100%; max-width: 340px; margin: 0 auto 6px; }
.exp-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-bottom: 5px; }
.exp-bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,0.08); overflow: hidden; }
.exp-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #7c3aed, #e0445b, #e8c38a);
  transition: width 0.5s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
.exp-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shine 2s infinite;
}
@keyframes shine { 0% { transform: translateX(-100%);} 100% { transform: translateX(100%);} }

/* 属性条 */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; width: 100%; max-width: 360px; margin: 0 auto 16px; }
.stat-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.stat-row .ico { font-size: 16px; width: 20px; }
.stat-row .lbl { color: var(--text-dim); width: 34px; }
.stat-bar { flex: 1; height: 8px; border-radius: 5px; background: rgba(255,255,255,0.08); overflow: hidden; }
.stat-fill { height: 100%; border-radius: 5px; transition: width 0.6s; }
.stat-val { font-size: 12px; color: var(--text-dim); width: 26px; text-align: right; }
.fill-mood { background: linear-gradient(90deg, #ff7a8a, #ffb3bd); }
.fill-energy { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.fill-hunger { background: linear-gradient(90deg, #e8a452, #f5c87a); }
.fill-clean { background: linear-gradient(90deg, #4aa8e0, #8ad0f5); }

/* 照护操作按钮 */
.care-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 400px;
  margin: 0 auto 20px;
}
.care-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: all 0.2s;
}
.care-btn:hover { background: var(--card-hover); transform: translateY(-2px); }
.care-btn:active { transform: scale(0.95); }
.care-btn .ico { font-size: 26px; }
.care-btn .t { font-size: 12.5px; color: var(--text-dim); font-weight: 500; }
.care-btn.disabled { opacity: 0.4; pointer-events: none; }

/* 进化预览 */
.evolve-timeline { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 14px; flex-wrap: wrap; }
.evolve-node {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-border);
  font-size: 12px; color: var(--text-faint);
  transition: all 0.3s;
}
.evolve-node .e { font-size: 24px; }
.evolve-node.done { color: var(--gold-bright); border-color: rgba(212,165,116,0.5); background: rgba(212,165,116,0.1); }
.evolve-node.now { color: #fff; border-color: var(--purple-light); box-shadow: var(--glow-purple); background: rgba(124,58,237,0.25); }
.evolve-arrow { color: var(--text-faint); }

/* 网格 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

/* 任务 */
.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--card-border);
  margin-bottom: 10px; transition: all 0.2s;
}
.task-item:hover { background: var(--card-hover); }
.task-ico { font-size: 28px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border-radius: 12px; flex-shrink: 0; }
.task-info { flex: 1; }
.task-info .n { font-weight: 600; font-size: 14.5px; }
.task-info .d { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.task-reward { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--gold-bright); margin-top: 4px; }
.task-progress { height: 5px; border-radius: 3px; background: rgba(255,255,255,0.1); overflow: hidden; margin-top: 6px; max-width: 200px; }
.task-progress .p { height: 100%; background: linear-gradient(90deg, #7c3aed, #e8c38a); transition: width 0.3s; }

/* 商店 */
.shop-group-title { font-family: var(--font-serif); font-size: 16px; margin: 18px 0 12px; display: flex; align-items: center; gap: 8px; }
.item-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 12px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--card-border);
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.item-card:hover { background: var(--card-hover); transform: translateY(-3px); box-shadow: var(--shadow); }
.item-ico { font-size: 40px; margin-bottom: 8px; }
.item-name { font-weight: 600; font-size: 14px; }
.item-desc { font-size: 11.5px; color: var(--text-faint); margin: 6px 0 10px; min-height: 30px; }
.item-price { display: flex; align-items: center; gap: 4px; color: var(--gold-bright); font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.rarity-common { color: #b9a8d0; }
.rarity-rare { color: #6fb7ff; }
.rarity-epic { color: #c48aff; }
.rarity-legend { color: #ffd76e; }
.item-rarity { font-size: 11px; position: absolute; }

/* 盲盒 */
.gacha-pool {
  position: relative;
  padding: 24px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(124,58,237,0.18), rgba(224,68,91,0.12));
  border: 1px solid rgba(212,165,116,0.35);
  text-align: center;
  overflow: hidden;
}
.gacha-pool::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(232,195,138,0.2), transparent 60%);
  pointer-events: none;
}
.gacha-box { font-size: 64px; animation: bob 2.5s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-10px);} }
.gacha-pool h3 { font-family: var(--font-serif); font-size: 19px; margin: 10px 0 6px; }
.gacha-cost { color: var(--gold-bright); font-weight: 700; margin: 8px 0 16px; }

/* 抽奖结果 */
.gacha-result { text-align: center; padding: 20px 0; }
.gacha-result .big { font-size: 72px; margin: 10px 0; animation: popIn 0.5s; }
.gacha-result .rn { font-family: var(--font-serif); font-size: 24px; font-weight: 700; margin: 6px 0; }

/* 排行榜 */
.lb-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.lb-tab { padding: 8px 18px; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--text-dim); background: var(--card); border: 1px solid var(--card-border); transition: all 0.2s; }
.lb-tab.active { color: #fff; background: linear-gradient(135deg, rgba(124,58,237,0.4), rgba(224,68,91,0.3)); border-color: var(--purple-light); }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--card-border); margin-bottom: 8px; }
.lb-rank { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.lb-rank.r1 { background: linear-gradient(135deg, #ffd76e, #e8a452); color: #3a2508; box-shadow: 0 0 14px rgba(232,195,138,0.5); }
.lb-rank.r2 { background: linear-gradient(135deg, #d8d8e0, #aab0bc); color: #2a2a2a; }
.lb-rank.r3 { background: linear-gradient(135deg, #e8a452, #b8712f); color: #3a2508; }
.lb-info { flex: 1; }
.lb-info .n { font-weight: 600; }
.lb-info .s { font-size: 12px; color: var(--text-faint); }
.lb-val { font-weight: 700; color: var(--gold-bright); }

/* 我的页面 */
.me-head { display: flex; align-items: center; gap: 16px; padding: 20px; }
.me-avatar { font-size: 56px; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 18px; }
.me-stat { text-align: center; padding: 14px 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-border); }
.me-stat .v { font-size: 20px; font-weight: 800; color: var(--gold-bright); }
.me-stat .l { font-size: 12px; color: var(--text-dim); margin-top: 3px; }

/* 背包 */
.bag-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-border);
  margin-bottom: 8px;
}
.bag-ico { font-size: 28px; }
.bag-info { flex: 1; }
.bag-info .n { font-weight: 600; font-size: 14px; }
.bag-info .d { font-size: 11.5px; color: var(--text-faint); }
.bag-qty { color: var(--text-dim); font-size: 13px; margin-right: 6px; }

/* 皮肤 */
.skin-card {
  position: relative; text-align: center; padding: 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--card-border); cursor: pointer; transition: all 0.2s;
}
.skin-card:hover { transform: translateY(-3px); }
.skin-card.equipped { border-color: var(--gold-bright); box-shadow: var(--glow-gold); }
.skin-aura { font-size: 48px; }
.skin-name { font-weight: 600; margin-top: 8px; }
.skin-desc { font-size: 11.5px; color: var(--text-faint); margin: 4px 0 10px; }
.skin-locked { opacity: 0.5; filter: grayscale(0.6); }

/* 好友 */
.friend-card { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-border); margin-bottom: 8px; }

/* 成就 */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach-card { text-align: center; padding: 14px 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-border); }
.ach-card.locked { opacity: 0.45; filter: grayscale(0.5); }
.ach-card.claimable { border-color: var(--gold-bright); box-shadow: var(--glow-gold); }
.ach-ico { font-size: 32px; }
.ach-name { font-size: 13px; font-weight: 600; margin-top: 6px; }

/* 流水 */
.log-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-radius: 11px; background: var(--card); border: 1px solid var(--card-border); margin-bottom: 7px; font-size: 13.5px; }
.log-remark { flex: 1; color: var(--text-dim); }
.log-change.pos { color: #7adc9a; font-weight: 700; }
.log-change.neg { color: #ff8a95; font-weight: 700; }
.log-time { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* 空状态 */
.empty { text-align: center; padding: 50px 20px; color: var(--text-faint); }
.empty .ico { font-size: 56px; display: block; margin-bottom: 14px; }

/* 领养选择 */
.breed-select { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.breed-card { text-align: center; padding: 16px 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-border); cursor: pointer; transition: all 0.2s; }
.breed-card:hover { transform: translateY(-3px); border-color: var(--purple-light); }
.breed-card.selected { border-color: var(--gold-bright); box-shadow: var(--glow-gold); }
.breed-card.locked { opacity: 0.5; pointer-events: none; filter: grayscale(0.5); }
.breed-dog { font-size: 44px; }
.breed-name { font-weight: 600; margin: 6px 0 2px; }
.breed-rarity { font-size: 11px; margin-bottom: 4px; }

/* 页脚 */
.footer { text-align: center; padding: 30px 16px 40px; color: var(--text-faint); font-size: 12.5px; }
.footer-inner p { margin-bottom: 4px; }
.footer-notice { color: var(--text-dim); }

/* 全屏狗狗动画(喂食/升级特效) */
.fx-float { position: fixed; z-index: 500; pointer-events: none; font-size: 32px; animation: fxFloat 1.2s ease-out forwards; }
@keyframes fxFloat {
  0% { transform: translateY(0) scale(0.5); opacity: 1; }
  100% { transform: translateY(-120px) scale(1.4); opacity: 0; }
}
.confetti { position: fixed; z-index: 500; pointer-events: none; width: 10px; height: 10px; border-radius: 2px; animation: confettiFall linear forwards; }
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ============================================================
   二期：小游戏 / 打工 / 邀请 / 声音
   ============================================================ */
.sound-btn {
  width: 38px; height: 38px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--card-border);
  cursor: pointer; font-size: 18px; transition: all 0.2s; flex-shrink: 0;
}
.sound-btn:hover { background: var(--card-hover); }

/* 摇骨头 */
.shake-reels { display: flex; gap: 12px; justify-content: center; margin: 16px 0; }
.shake-reels .reel {
  width: 72px; height: 88px; border-radius: 14px;
  background: linear-gradient(160deg, #2a1745, #1a0f2e);
  border: 2px solid rgba(212, 165, 116, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.4);
}

/* 接飞盘 */
.catch-field {
  position: relative; height: 220px; margin: 12px 0;
  border-radius: 16px; border: 1px solid var(--card-border);
  background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.15), rgba(11, 6, 24, 0.4));
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.frisbee {
  position: absolute; font-size: 34px; cursor: pointer;
  animation: frisbeeIn 0.2s ease-out; user-select: none;
}
@keyframes frisbeeIn { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 赛跑 */
.race-track {
  position: relative; margin: 14px 0; border-radius: 14px;
  border: 1px solid var(--card-border); overflow: hidden;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), rgba(11, 6, 24, 0.3));
  padding: 8px 0;
}
.race-lane {
  position: relative; height: 48px; display: flex; align-items: center;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.race-lane:last-of-type { border-bottom: none; }
.lane-tag {
  position: absolute; left: 8px; z-index: 1; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255, 255, 255, 0.1); font-size: 12px; color: var(--text-dim);
}
.race-dog {
  position: absolute; left: 0; top: 6px; font-size: 30px;
  transition: left 1.5s cubic-bezier(0.2, 0.8, 0.2, 1); z-index: 2;
}
.race-finish {
  position: absolute; right: 14px; top: 0; bottom: 0; width: 3px;
  background: repeating-linear-gradient(180deg, var(--gold-bright) 0 8px, transparent 8px 16px);
}

/* 打工 */
.work-card.locked { opacity: 0.5; filter: grayscale(0.5); }
.work-active { border-color: rgba(212, 165, 116, 0.5); box-shadow: var(--glow-gold); }

/* 邀请码 */
.invite-code {
  display: inline-block; padding: 10px 22px; border-radius: 12px;
  font-size: 22px; font-weight: 800; letter-spacing: 4px;
  background: rgba(212, 165, 116, 0.12); border: 1px dashed rgba(212, 165, 116, 0.6);
  color: var(--gold-bright); font-family: monospace;
}

/* ============================================================
   三期：公告 / 活动 / 每日挑战
   ============================================================ */
.notice-marquee {
  overflow: hidden; white-space: nowrap;
  border-radius: 12px; margin-bottom: 12px;
  background: rgba(212, 165, 116, 0.08); border: 1px solid var(--card-border);
  padding: 8px 0;
}
.notice-track { display: inline-block; animation: marquee 24s linear infinite; }
.notice-item { padding: 0 28px; font-size: 13px; color: var(--gold-bright); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.events-banner { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
.event-chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, rgba(224, 68, 91, 0.25), rgba(124, 58, 237, 0.25));
  border: 1px solid rgba(255, 122, 138, 0.4); color: #ffd9de;
  animation: pulseGlow 2.5s ease-in-out infinite;
}

/* ============================================================
   四期：签到日历 / 图鉴
   ============================================================ */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 14px 0; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--card-border);
  font-size: 12px; color: var(--text-faint);
}
.cal-day.checked { background: rgba(212, 165, 116, 0.12); border-color: rgba(212, 165, 116, 0.5); color: var(--gold-bright); }
.cal-day.today { border-color: var(--purple-light); box-shadow: var(--glow-purple); }
.cal-dow { font-size: 11px; }
.cal-ico { font-size: 18px; }

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 8px; }
.album-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 6px; border-radius: 12px; text-align: center;
  background: var(--card); border: 1px solid var(--card-border);
}
.album-item.locked { opacity: 0.45; filter: grayscale(0.6); }
.album-item.owned { border-color: rgba(212, 165, 116, 0.5); }
.album-ico { font-size: 30px; }
.album-name { font-size: 12px; font-weight: 600; }
.album-r { font-size: 10.5px; color: var(--text-faint); }

/* 成长故事 */
.story-locked { opacity: 0.55; filter: grayscale(0.4); }
