/* ========================================
   RE:START 回血计划 - 主样式
   游戏任务系统 × 温柔治愈系
   ======================================== */

/* ========================================
   浅色主题（默认）
   ======================================== */
:root, [data-theme="light"] {
  --bg-primary: #F8F6FC;
  --bg-secondary: #F0EDF8;
  --bg-card: rgba(255,255,255,0.85);
  --bg-card-hover: rgba(255,255,255,0.95);
  --text-primary: #2D1B4E;
  --text-secondary: #5C4A7A;
  --text-muted: #8B7FA3;
  --border-subtle: rgba(45,27,78,0.08);
  --shadow-card: 0 4px 24px rgba(45,27,78,0.06);
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: rgba(45,27,78,0.1);
  --glass-shadow: 0 4px 24px rgba(45,27,78,0.08);
  --cream: #FFF8F0;
  --pink: #E8879A;
  --pink-light: #F5C8D2;
  --pink-deep: #D4686E;
  --purple: #9B7EC4;
  --purple-light: #CFC0E5;
  --purple-deep: #6B4D9A;
  --blue: #7BA8C8;
  --blue-light: #D0ECF5;
  --orange: #E8A050;
  --orange-warm: #E08840;
  --gold: #D4A030;
  --success: #6BAF7B;
  --danger: #D4686E;
  --nav-hover: rgba(45,27,78,0.04);
  --input-bg: rgba(45,27,78,0.04);
  --toast-bg: rgba(45,27,78,0.92);
  --text: #2D1B4E;
  --text-light: #8B7FA3;
}

/* ========================================
   深色主题
   ======================================== */
[data-theme="dark"] {
  --bg-primary: #1A1035;
  --bg-secondary: #2A1545;
  --bg-card: rgba(30,18,60,0.85);
  --bg-card-hover: rgba(30,18,60,0.95);
  --text-primary: #F0E8FF;
  --text-secondary: #C8BED8;
  --text-muted: #8B7FA3;
  --border-subtle: rgba(255,255,255,0.08);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --glass-bg: rgba(30,18,60,0.7);
  --glass-border: rgba(255,181,194,0.15);
  --glass-shadow: 0 8px 32px rgba(155,114,207,0.12);
  --cream: #2D1B4E;
  --pink: #FFB5C2;
  --pink-light: #FFD6DE;
  --pink-deep: #FF8FA3;
  --purple: #C8A8E9;
  --purple-light: #E0D0F5;
  --purple-deep: #A78BFA;
  --blue: #A8D8EA;
  --blue-light: #D4EEFF;
  --orange: #FFB86C;
  --orange-warm: #FF9A56;
  --gold: #FFD700;
  --success: #7DCEA0;
  --danger: #FF8FA3;
  --nav-hover: rgba(255,255,255,0.06);
  --input-bg: rgba(255,255,255,0.06);
  --toast-bg: rgba(42,21,69,0.95);
  --text: #F0E8FF;
  --text-light: #A99BBF;
}

/* ========================================
   全局工具变量（不随主题变化）
   ======================================== */
:root {
  --card-radius: 20px;
  --mini-radius: 14px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   主题切换按钮
   ======================================== */
.theme-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 1000;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  cursor: pointer; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
}
.theme-toggle:hover { transform: scale(1.1); }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

/* emoji 全局渲染修复（防方块） */
.emoji, [class*="icon"], .event-icon, .reward-icon,
.nav-icon, .shop-item-emoji, .task-icon, .daily-msg-icon {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', sans-serif;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 30%, var(--bg-primary) 60%, var(--bg-secondary) 100%);
  background-attachment: fixed;
}

/* ---- 背景光晕 ---- */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; animation: orbFloat 20s ease-in-out infinite; }
.orb-1 { width: 400px; height: 400px; background: radial-gradient(circle, var(--purple) 0%, transparent 70%); top: -100px; left: -100px; }
.orb-2 { width: 350px; height: 350px; background: radial-gradient(circle, var(--pink) 0%, transparent 70%); top: 40%; right: -80px; animation-delay: -7s; animation-duration: 25s; }
.orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, var(--blue) 0%, transparent 70%); bottom: 10%; left: 20%; animation-delay: -14s; animation-duration: 22s; }
@keyframes orbFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(30px, -40px) scale(1.05); } 50% { transform: translate(-20px, 20px) scale(0.95); } 75% { transform: translate(40px, 30px) scale(1.02); } }

/* ---- 粒子 ---- */
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.particle { position: absolute; border-radius: 50%; pointer-events: none; animation: particleFloat linear infinite; }
@keyframes particleFloat { 0% { transform: translateY(100vh) rotate(0deg); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; } }

/* ---- 主容器 ---- */
.app-container { position: relative; z-index: 2; max-width: 480px; margin: 0 auto; padding: 20px 16px 40px; }

/* ---- 标题 ---- */
.app-header { text-align: center; padding: 30px 0 20px; }
.title-row { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-bottom: 8px; }
.app-title { font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 50%, var(--blue) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: 2px; animation: titleGlow 3s ease-in-out infinite; }
@keyframes titleGlow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15); } }
.app-subtitle { font-size: 1rem; color: var(--text-light); font-weight: 500; }
.app-tagline { font-size: 0.85rem; color: var(--text-muted); font-style: italic; margin-top: 4px; }

/* ---- 运行时间 ---- */
.uptime-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 14px; background: var(--nav-hover); border: 1px solid var(--border-subtle); border-radius: 20px; font-size: 0.7rem; color: var(--text-secondary); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.uptime-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; animation: statusBlink 2s ease-in-out infinite; box-shadow: 0 0 6px rgba(74, 222, 128, 0.5); }

/* ---- 用户卡片 ---- */
.user-card { padding: 24px; margin-bottom: 20px; background: var(--bg-card); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-subtle); border-radius: var(--card-radius); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); transition: var(--transition); }
.user-card:hover { box-shadow: 0 12px 40px rgba(155, 114, 207, 0.2); transform: translateY(-2px); }
.user-card-top { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }

.avatar-wrapper { position: relative; flex-shrink: 0; }
.avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, var(--pink-light), var(--purple-light)); position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ring { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--pink); animation: ringPulse 2s ease-in-out infinite; }
@keyframes ringPulse { 0%, 100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }

.level-badge { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--orange), var(--gold)); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 10px; border-radius: 10px; white-space: nowrap; box-shadow: 0 2px 12px rgba(255, 184, 108, 0.5); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }

.user-info { flex: 1; min-width: 0; }
.nickname { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); cursor: pointer; transition: var(--transition); display: inline-block; }
.nickname:hover { color: var(--pink); }
.nickname::after { content: ' ✏️'; font-size: 0.7rem; opacity: 0; transition: var(--transition); }
.nickname:hover::after { opacity: 0.8; }
.status-text { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.status-text::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); animation: statusBlink 2s ease-in-out infinite; }
@keyframes statusBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.hp-section, .exp-section { margin-bottom: 12px; }
.hp-label, .exp-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.hp-bar-outer, .exp-bar-outer { height: 12px; background: var(--input-bg); border-radius: 6px; overflow: hidden; position: relative; border: 1px solid var(--border-subtle); }
.hp-bar-inner { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #FF6B8A, #FF8FA3, #FFB5C2); transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; }
.hp-bar-shine { position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); animation: barShine 3s ease-in-out infinite; }
@keyframes barShine { 0% { left: -100%; } 50% { left: 100%; } 100% { left: 100%; } }
.exp-bar-inner { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--purple), var(--purple-light)); transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.exp-bar-outer { height: 8px; }

.quick-icons { display: flex; justify-content: space-around; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.quick-icon { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; transition: var(--transition); position: relative; }
.quick-icon span:first-child { font-size: 1.5rem; display: block; transition: var(--transition); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.quick-icon:hover span:first-child { transform: scale(1.2) translateY(-2px); }
.quick-icon::after { content: attr(data-tip); position: absolute; top: -28px; left: 50%; transform: translateX(-50%) translateY(5px); background: rgba(74, 63, 85, 0.9); color: #fff; font-size: 0.65rem; padding: 3px 8px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: var(--transition); }
.quick-icon:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Section ---- */
.section { margin-bottom: 20px; }
.tasks-section, .rewards-section, .night-section { margin-bottom: 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.section-icon { font-size: 1.2rem; }
.task-progress { font-size: 0.8rem; color: var(--pink-light); background: rgba(255, 181, 194, 0.15); padding: 4px 12px; border-radius: 20px; border: 1px solid rgba(255, 181, 194, 0.2); }

/* ---- 任务卡片 ---- */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-card { background: var(--bg-card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border-subtle); border-radius: var(--mini-radius); padding: 14px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; animation: taskSlideIn 0.4s ease-out both; }
.task-card:hover { background: var(--bg-card-hover); border-color: rgba(255, 255, 255, 0.25); transform: translateX(4px); }
@keyframes taskSlideIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.task-card:nth-child(1) { animation-delay: 0.05s; }
.task-card:nth-child(2) { animation-delay: 0.1s; }
.task-card:nth-child(3) { animation-delay: 0.15s; }
.task-card:nth-child(4) { animation-delay: 0.2s; }
.task-card:nth-child(5) { animation-delay: 0.25s; }
.task-card:nth-child(6) { animation-delay: 0.3s; }

.task-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.task-check svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; fill: none; opacity: 0; transform: scale(0.5); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.task-card.completed .task-check { background: linear-gradient(135deg, var(--pink), var(--purple)); border-color: var(--pink); box-shadow: 0 0 20px rgba(255, 181, 194, 0.6), 0 0 40px rgba(200, 168, 233, 0.3); animation: checkPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.task-card.completed .task-check svg { opacity: 1; transform: scale(1); }
@keyframes checkPop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.task-card.completed::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 181, 194, 0.08), rgba(200, 168, 233, 0.08)); pointer-events: none; }
.task-card.completed { opacity: 0.85; }
.task-card.completed .task-title { text-decoration: line-through; text-decoration-color: var(--pink); opacity: 0.75; color: var(--text-secondary); }

.task-content { flex: 1; min-width: 0; }
.task-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.task-meta { display: flex; align-items: center; gap: 8px; }
.task-tag { font-size: 0.65rem; padding: 2px 8px; border-radius: 8px; font-weight: 500; }
.task-tag.game { background: rgba(168, 216, 234, 0.2); color: var(--blue); border: 1px solid rgba(168, 216, 234, 0.3); }
.task-tag.life { background: rgba(255, 184, 108, 0.2); color: var(--orange); border: 1px solid rgba(255, 184, 108, 0.3); }
.task-tag.heal { background: rgba(255, 181, 194, 0.2); color: var(--pink); border: 1px solid rgba(255, 181, 194, 0.3); }
.task-tag.night { background: rgba(200, 168, 233, 0.2); color: var(--purple); border: 1px solid rgba(200, 168, 233, 0.3); }
.task-reward { font-size: 0.65rem; color: var(--text-muted); }
.task-icon { font-size: 1.3rem; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }

/* ---- 奖励网格 ---- */
.rewards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reward-card { background: var(--bg-card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border-subtle); border-radius: var(--mini-radius); padding: 16px 12px; text-align: center; cursor: pointer; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; animation: rewardFadeIn 0.5s ease-out both; }
.reward-card:nth-child(1) { animation-delay: 0.1s; }
.reward-card:nth-child(2) { animation-delay: 0.15s; }
.reward-card:nth-child(3) { animation-delay: 0.2s; }
.reward-card:nth-child(4) { animation-delay: 0.25s; }
.reward-card:nth-child(5) { animation-delay: 0.3s; }
.reward-card:nth-child(6) { animation-delay: 0.35s; }
.reward-card:nth-child(7) { animation-delay: 0.4s; }
.reward-card:nth-child(8) { animation-delay: 0.45s; }
@keyframes rewardFadeIn { from { opacity: 0; transform: scale(0.9) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.reward-card:hover { background: var(--bg-card-hover); border-color: rgba(255, 255, 255, 0.3); transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 28px rgba(155, 114, 207, 0.15); }
.reward-card.claimed { opacity: 0.75; pointer-events: none; }
.reward-card.claimed::after { content: '✓ 已领取'; position: absolute; top: 8px; right: 8px; font-size: 0.6rem; color: var(--pink); background: rgba(255, 181, 194, 0.15); padding: 2px 6px; border-radius: 6px; }
.reward-card.locked { background: var(--input-bg) !important; border-color: var(--border-subtle) !important; opacity: 0.75; }
.reward-card.unlocked { background: var(--bg-card) !important; border-color: rgba(125, 206, 160, 0.4) !important; box-shadow: inset 0 0 15px rgba(125, 206, 160, 0.08), 0 0 12px rgba(125, 206, 160, 0.15); }
.reward-icon { font-size: 2rem; display: block; margin-bottom: 8px; transition: var(--transition); filter: drop-shadow(0 3px 6px rgba(0,0,0,0.1)); }
.reward-card:hover .reward-icon { transform: scale(1.15) translateY(-2px); animation: rewardBounce 0.5s ease; }
@keyframes rewardBounce { 0%, 100% { transform: scale(1.15) translateY(-2px); } 30% { transform: scale(1.3) translateY(-8px); } 50% { transform: scale(1.1) translateY(-4px); } 70% { transform: scale(1.2) translateY(-6px); } }
.reward-title { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.reward-rarity { font-size: 0.6rem; padding: 2px 8px; border-radius: 6px; display: inline-block; font-weight: 500; }
.rarity-common { background: rgba(168, 216, 234, 0.2); color: var(--blue); }
.rarity-rare { background: rgba(200, 168, 233, 0.2); color: var(--purple); }
.rarity-epic { background: rgba(255, 184, 108, 0.2); color: var(--orange); }
.rarity-legendary { background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 181, 194, 0.2)); color: var(--gold); animation: legendaryGlow 2s ease-in-out infinite; }
@keyframes legendaryGlow { 0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.2); } 50% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); } }

/* ---- 系统提示 ---- */
.system-message { padding: 28px 24px; text-align: center; margin-bottom: 20px; position: relative; overflow: hidden; background: var(--bg-card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border-subtle); border-radius: var(--card-radius); }
.system-message::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 181, 194, 0.05), rgba(200, 168, 233, 0.05), rgba(168, 216, 234, 0.05)); animation: messageShimmer 6s ease-in-out infinite; }
@keyframes messageShimmer { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.system-icon { font-size: 2rem; margin-bottom: 12px; animation: iconFloat 3s ease-in-out infinite; }
@keyframes iconFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.system-text { position: relative; z-index: 1; }
.system-main { font-size: 1.05rem; color: var(--text-primary); line-height: 1.8; font-weight: 500; }
.system-main strong { color: var(--pink-deep); font-weight: 700; text-shadow: 0 0 12px rgba(255, 143, 163, 0.3); }
.system-sub { font-size: 0.8rem; color: var(--text-secondary); margin-top: 8px; }

/* ---- 夜间 ---- */
.night-section { padding: 20px 16px; background: rgba(200, 168, 233, 0.06); border-radius: var(--card-radius); border: 1px solid rgba(200, 168, 233, 0.1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.night-tasks .task-card { background: var(--bg-card); border-color: var(--border-subtle); }
.night-tasks .task-card:hover { background: var(--bg-card-hover); }
.night-wish { text-align: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.night-wish p { font-size: 0.85rem; color: rgba(200, 168, 233, 0.8); font-style: italic; text-shadow: 0 0 8px rgba(200, 168, 233, 0.2); }

/* ---- 底部 ---- */
.app-footer { text-align: center; padding: 30px 0 10px; color: var(--text-muted); font-size: 0.75rem; }
.footer-sub { margin-top: 4px; font-style: italic; opacity: 0.7; }

/* ---- 反馈悬浮按钮 ---- */
.feedback-fab { position: fixed; bottom: 24px; right: 24px; z-index: 100; width: 56px; height: 56px; border-radius: 50%; border: none; background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff; font-size: 1.5rem; cursor: pointer; box-shadow: 0 6px 24px rgba(200, 168, 233, 0.4); transition: var(--transition); display: flex; align-items: center; justify-content: center; }
.feedback-fab:hover { transform: scale(1.1) translateY(-2px); box-shadow: 0 10px 32px rgba(200, 168, 233, 0.5); }
.feedback-fab:active { transform: scale(0.95); }

/* ---- Toast ---- */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 400px; width: calc(100% - 32px); }
.toast { background: var(--toast-bg); backdrop-filter: blur(20px); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 12px 18px; color: var(--text-primary); font-size: 0.85rem; text-align: center; animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); pointer-events: auto; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
.toast.success { border-color: rgba(255, 181, 194, 0.3); }
.toast.fade-out { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-10px) scale(0.95); } }

/* ---- 弹窗 ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-card { width: 100%; max-width: 360px; padding: 28px 24px; text-align: center; transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); background: var(--bg-card); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-subtle); border-radius: var(--card-radius); color: var(--text-primary); }
.modal-overlay.active .modal-card { transform: scale(1); }
.modal-card h3 { font-size: 1.1rem; margin-bottom: 16px; }
.modal-input { width: 100%; padding: 12px 16px; border: 2px solid rgba(200, 168, 233, 0.3); border-radius: 12px; font-size: 0.95rem; background: var(--input-bg); color: var(--text-primary); outline: none; transition: var(--transition); margin-bottom: 16px; font-family: inherit; }
.modal-input:focus { border-color: var(--purple); box-shadow: 0 0 16px rgba(200, 168, 233, 0.2); }
.modal-input::placeholder { color: var(--text-muted); }
.modal-actions { display: flex; gap: 10px; }
.modal-btn { flex: 1; padding: 10px 16px; border: none; border-radius: 12px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-cancel { background: rgba(200, 168, 233, 0.15); color: var(--text-secondary); }
.btn-cancel:hover { background: rgba(200, 168, 233, 0.25); }
.btn-confirm { background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff; box-shadow: 0 4px 16px rgba(255, 181, 194, 0.3); }
.btn-confirm:hover { box-shadow: 0 6px 24px rgba(255, 181, 194, 0.4); transform: translateY(-1px); }

/* 奖励弹窗 */
.reward-modal-card { max-width: 300px; padding: 32px 24px; text-align: center; transform: scale(0.9); }
.reward-modal-card h3 { margin-bottom: 8px; }
.reward-modal-icon { font-size: 3.5rem; margin-bottom: 12px; animation: rewardModalBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes rewardModalBounce { 0% { transform: scale(0) rotate(-15deg); } 50% { transform: scale(1.2) rotate(5deg); } 100% { transform: scale(1) rotate(0); } }
.reward-modal-desc { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 16px; }
.reward-modal-stats { font-size: 0.8rem; color: var(--pink); margin-bottom: 20px; }

/* 反馈弹窗 */
.feedback-modal { text-align: left; }
.feedback-modal h3 { text-align: center; }
.feedback-type-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.feedback-type-chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; cursor: pointer; background: var(--input-bg); border: 1px solid var(--border-subtle); color: var(--text-secondary); transition: var(--transition); }
.feedback-type-chip input { display: none; }
.feedback-type-chip.active { background: rgba(200, 168, 233, 0.2); border-color: var(--purple); color: var(--text-primary); }
.feedback-type-chip:hover { background: var(--nav-hover); }

/* ---- Loading ---- */
.loading-placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px; color: var(--text-muted); font-size: 0.85rem; }
.loading-spinner { width: 32px; height: 32px; border: 3px solid var(--border-subtle); border-top-color: var(--pink); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 撒花 ---- */
.sparkle-container { position: fixed; inset: 0; pointer-events: none; z-index: 9998; }
.sparkle { position: absolute; width: 8px; height: 8px; border-radius: 50%; animation: sparkleAnim 0.8s ease-out forwards; }
@keyframes sparkleAnim { 0% { transform: scale(0) rotate(0deg); opacity: 1; } 50% { opacity: 1; } 100% { transform: scale(1) rotate(180deg) translateY(-60px); opacity: 0; } }

/* ---- 呼吸 ---- */
.app-container { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.97; } }

/* ---- 滚动条（暗色主题，默认极隐，hover 才可见） ---- */
html {
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; transition: background 0.3s; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }
::-webkit-scrollbar-thumb:active { background: rgba(200,168,233,0.35); }

/* ---- 移动端 ---- */
@media (max-width: 480px) { .app-container { padding: 16px 12px 32px; } .user-card { padding: 20px 16px; } .app-title { font-size: 1.7rem; } .feedback-fab { bottom: 16px; right: 16px; width: 48px; height: 48px; font-size: 1.3rem; } }
@media (min-width: 768px) { .app-container { padding: 30px 24px 50px; } .app-title { font-size: 2.5rem; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }

/* ==================== 新增组件样式 ==================== */

/* 积分徽章 */
.user-points-badge {
  background: linear-gradient(135deg, #FFD700, #FFB86C);
  color: #4A3F55;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* 功能导航 - 滑动分页 4列×2行 */
.nav-slider {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.nav-slider-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.nav-page {
  flex: 0 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nav-icon-item {
  flex: 0 0 calc(25% - 6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 12px 4px;
  border-radius: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.nav-icon-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(200,168,233,0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.nav-icon-item:hover::before,
.nav-icon-item:active::before { opacity: 1; }
.nav-icon-item:hover {
  background: var(--nav-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200,168,233,0.12);
}
.nav-icon-item:active { transform: scale(0.95); }
.nav-icon {
  font-size: 22px;
  pointer-events: none;
  position: relative;
  z-index: 1;
  transition: transform 0.25s;
}
.nav-icon-item:hover .nav-icon { transform: scale(1.12); }
.nav-icon-label {
  font-size: 11px;
  color: var(--text-secondary);
  pointer-events: none;
  position: relative;
  z-index: 1;
  font-weight: 500;
}
/* 页码指示器 */
.nav-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-subtle);
  transition: all 0.3s;
  cursor: pointer;
}
.nav-dot.active {
  width: 18px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

/* 主页签到快捷栏 */
.checkin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,181,194,0.08), rgba(200,168,233,0.06));
  border: 1px solid rgba(255,181,194,0.12);
  gap: 10px;
}
.checkin-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.checkin-bar-icon { font-size: 24px; flex-shrink: 0; }
.checkin-bar-info { display: flex; flex-direction: column; min-width: 0; }
.checkin-bar-streak {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.checkin-bar-total {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.checkin-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.checkin-bar-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.checkin-bar-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(255,181,194,0.35); }
.checkin-bar-btn:active { transform: scale(0.95); }
.checkin-bar-btn.done {
  background: var(--bg-card);
  color: #7DCEA0;
  border: 1px solid rgba(125,206,160,0.3);
}
.checkin-bar-cal {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all 0.25s;
  flex-shrink: 0;
}
.checkin-bar-cal:hover { transform: scale(1.08); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* 奖励信息区（在原始 .reward-card 内使用） */
.reward-info { flex: 1; min-width: 0; text-align: left; }

/* 任务标签颜色增强 */
.task-tag.game { background: rgba(255,150,180,0.25); color: #FFB86C; }
.task-tag.self-care { background: rgba(168,216,234,0.25); color: #A8D8EA; }
.task-tag.life { background: rgba(125,206,160,0.25); color: #7DCEA0; }
.task-tag.happy { background: rgba(200,168,233,0.25); color: #C8A8E9; }
.task-tag.night { background: var(--input-bg); color: var(--text-primary); }

/* 任务完成图片证明 */
.task-proof { margin-top: 8px; }
.task-proof img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}
.task-note-text {
  font-size: 12px;
  color: var(--text-primary);
  margin-top: 4px;
  font-style: italic;
}

/* 上传区域 */
.upload-area {
  border: 2px dashed rgba(200,168,233,0.4);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}
.upload-area:hover { border-color: var(--purple); background: rgba(200,168,233,0.08); }
.upload-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.upload-preview img { max-width: 100%; max-height: 200px; border-radius: 8px; object-fit: cover; }
.upload-icon { font-size: 36px; }

/* ========== 商城页 ========== */
.page-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.back-btn {
  color: var(--pink);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}
.back-btn:hover { background: rgba(255,181,194,0.1); }
.page-points {
  background: linear-gradient(135deg, #FFD700, #FFB86C);
  color: #4A3F55;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
}
.shop-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 16px;
  justify-content: center;
}
.shop-cat {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--input-bg);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.shop-cat:hover { background: var(--nav-hover); }
.shop-cat.active {
  background: linear-gradient(135deg, rgba(255,181,194,0.3), rgba(200,168,233,0.3));
  color: #fff;
  border-color: rgba(255,181,194,0.4);
}
.shop-item-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--input-bg);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-subtle);
}
.shop-item-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,181,194,0.3);
  transform: translateX(3px);
}
.shop-item-icon { font-size: 36px; flex-shrink: 0; }
.shop-item-info { flex: 1; min-width: 0; }
.shop-item-name { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.shop-item-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-item-bottom { display: flex; align-items: center; gap: 8px; }
.shop-item-price { color: var(--gold); font-weight: 700; font-size: 14px; }
.shop-item-original { color: var(--text-muted); font-size: 12px; text-decoration: line-through; }
.shop-item-stock { color: var(--text-muted); font-size: 11px; margin-left: auto; }
.buy-price-row { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 8px; }
.buy-price { color: var(--gold); font-size: 20px; font-weight: 700; }
.buy-stock { color: var(--text-secondary); font-size: 13px; }
.buy-balance { color: var(--text-muted); font-size: 13px; }

/* ========== 资料页 ========== */
.profile-card { text-align: center; padding: 24px 20px !important; }
.profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 12px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--pink); }
.profile-level {
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 700;
}
.profile-name { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.profile-title { color: var(--pink); font-size: 14px; margin-bottom: 4px; }
.profile-status { color: var(--text-muted); font-size: 12px; }
.stats-card { padding: 20px 16px !important; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; }
.stat-item { padding: 8px 0; }
.stat-icon { font-size: 20px; margin-bottom: 2px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.profile-bars { padding: 0; }

/* ========== 兼容旧 HTML 类名（user-header / user-name 等） ========== */
.user-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.user-name { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); cursor: pointer; transition: var(--transition); }
.user-name:hover { color: var(--pink); }
.user-status { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.uptime-bar { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 14px; background: var(--nav-hover); border: 1px solid var(--border-subtle); border-radius: 20px; font-size: 0.7rem; color: var(--text-secondary); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.progress-section { margin-top: 4px; }
.progress-item { margin-bottom: 10px; }
.progress-item:last-child { margin-bottom: 0; }
.progress-label { font-size: 0.75rem; color: var(--text-secondary); display: inline-block; margin-bottom: 4px; }
.progress-value { float: right; font-size: 0.7rem; color: var(--text-secondary); }
.progress-bar { width: 100%; height: 6px; background: var(--input-bg); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.hp-bar { background: linear-gradient(90deg, #FF6B8A, #FF4D6D); box-shadow: 0 0 8px rgba(255,77,109,0.4); }
.exp-bar { background: linear-gradient(90deg, #C8A8E9, #9B72CF); box-shadow: 0 0 8px rgba(155,114,207,0.4); }

/* 历史记录 */
.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}
.history-item:last-child { border-bottom: none; }
.history-icon { font-size: 20px; flex-shrink: 0; }
.history-desc { flex: 1; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-amount { font-weight: 700; white-space: nowrap; }
.history-amount.positive { color: #7DCEA0; }
.history-amount.negative { color: #FF8FA3; }
.history-time { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.empty-text { color: var(--text-muted); font-size: 13px; text-align: center; padding: 20px 0; }

/* ========== 模态弹窗（修复白框问题） ========== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 5, 30, 0.75);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: all 0.35s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-card {
  background: var(--bg-card);
  border: 1px solid rgba(200,168,233,0.25);
  border-radius: 20px; width: 90%; max-width: 360px; max-height: 85vh;
  overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(155,114,207,0.15);
  transform: translateY(20px) scale(0.96);
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.active .modal-card { transform: translateY(0) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 12px;
  color: var(--text-primary); font-size: 16px; font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-close {
  background: rgba(255,255,255,0.08); border: none; color: var(--text-muted);
  width: 28px; height: 28px; border-radius: 50%; font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,100,120,0.3); color: #FFB5C2; }
.modal-body { padding: 16px 20px 8px; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 12px 20px 18px; border-top: 1px solid var(--border-subtle);
}

/* ========== 按钮 ========== */
.btn {
  padding: 9px 22px; border-radius: 20px; font-size: 14px; font-weight: 500;
  border: none; cursor: pointer; transition: all 0.25s;
}
.btn-primary {
  background: linear-gradient(135deg, #C8A8E9, #9B72CF);
  color: #fff; box-shadow: 0 4px 16px rgba(155,114,207,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(155,114,207,0.5); }
.btn-primary:active { transform: scale(0.96); }
.btn-ghost {
  background: rgba(255,255,255,0.06); color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-ghost:hover { background: var(--nav-hover); color: var(--text-secondary); }

/* ========== 上传区域重做 ========== */
.upload-area {
  border: 2px dashed rgba(200,168,233,0.35);
  border-radius: 14px; padding: 28px 16px; text-align: center;
  cursor: pointer; transition: all 0.3s; margin-bottom: 14px;
  background: rgba(200,168,233,0.04);
}
.upload-area:hover { border-color: var(--purple); background: rgba(200,168,233,0.1); }
.upload-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; }
.upload-preview img {
  max-width: 100%; max-height: 180px; border-radius: 12px;
  object-fit: cover; border: 2px solid rgba(200,168,233,0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.upload-icon { font-size: 40px; opacity: 0.7; }

/* ========== 文本域 ========== */
.modal-textarea {
  width: 100%; background: var(--input-bg);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 12px 14px; color: var(--text-primary); font-size: 14px;
  resize: none; outline: none; font-family: inherit;
  transition: border-color 0.3s;
}
.modal-textarea:focus { border-color: rgba(200,168,233,0.5); }
.modal-textarea::placeholder { color: var(--text-muted); }

/* ========== Toast 提示 ========== */
.toast-container {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  z-index: 2000; display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.toast {
  background: var(--toast-bg); border: 1px solid rgba(200,168,233,0.3);
  color: var(--text-primary); padding: 10px 24px; border-radius: 20px; font-size: 13px;
  white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.3s;
}
.toast.success {
  border-color: rgba(125,206,160,0.5);
  box-shadow: 0 0 20px rgba(125,206,160,0.2);
}

/* ========== 输入框（昵称等） ========== */
.modal-input {
  width: 100%; background: var(--input-bg);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 12px 14px; color: #fff; font-size: 15px;
  outline: none; font-family: inherit;
  transition: border-color 0.3s;
}
.modal-input:focus { border-color: rgba(200,168,233,0.5); }
.modal-input::placeholder { color: var(--text-muted); }

/* ========== 奖励弹窗 ========== */
.reward-modal-icon { font-size: 56px; text-align: center; margin-bottom: 8px; }
.reward-modal-rarity {
  display: inline-block; padding: 3px 12px; border-radius: 10px;
  font-size: 11px; font-weight: 600; margin-bottom: 8px;
}
.reward-modal-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; text-align: center; }
.reward-modal-desc { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 12px; }
.reward-modal-gains { display: flex; justify-content: center; gap: 16px; }
.reward-gain-item { text-align: center; }
.reward-gain-value { font-size: 20px; font-weight: 700; }
.reward-gain-value.exp-gain { color: #C8A8E9; }
.reward-gain-value.hp-gain { color: #FF8FA3; }
.reward-gain-label { font-size: 11px; color: var(--text-muted); }

/* ========== 反馈弹窗 ========== */
.feedback-types { display: flex; gap: 8px; margin-bottom: 14px; justify-content: center; }
.feedback-type-btn {
  padding: 6px 14px; border-radius: 14px; font-size: 13px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.feedback-type-btn:hover { background: var(--nav-hover); }
.feedback-type-btn.active {
  background: rgba(200,168,233,0.25); border-color: var(--purple); color: var(--text-primary);
}

/* ========== 购买弹窗 ========== */
.buy-price-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.buy-price { color: var(--gold); font-size: 22px; font-weight: 700; }
.buy-stock { color: var(--text-muted); font-size: 12px; }
.buy-balance { color: var(--text-muted); font-size: 12px; margin-top: 6px; }

/* ========== footer ========== */
.app-footer {
  text-align: center; padding: 24px 0 12px;
  color: var(--text-muted); font-size: 11px;
}
.app-footer p { margin: 2px 0; }

/* ========== 加载占位 ========== */
.loading-placeholder { text-align: center; padding: 24px 0; color: var(--text-muted); font-size: 14px; }

/* ========== 每日一言 ========== */
.daily-message-card { text-align: center; padding: 20px 16px; }
.daily-msg-icon { font-size: 28px; margin-bottom: 8px; }
.daily-msg-text { color: var(--text-primary); font-size: 15px; line-height: 1.6; font-style: italic; }

/* ========== 夜间任务 ========== */
.night-tasks-card {
  position: relative;
  background: var(--bg-card) !important;
  border: 1px solid rgba(140,160,220,0.18) !important;
  border-radius: 28px !important;
  overflow: hidden;
  padding: 28px 20px 24px !important;
}
/* 星空背景 */
.night-stars {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.night-stars::before,
.night-stars::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  animation: starTwinkle 3s ease-in-out infinite;
}
.night-stars::before {
  width: 2px; height: 2px; top: 12%; left: 15%;
  box-shadow:
    30px 20px 0 rgba(255,255,255,0.5),
    80px 60px 0 rgba(255,255,255,0.3),
    140px 10px 0 rgba(255,255,255,0.7),
    200px 30px 0 rgba(255,255,255,0.4),
    260px 10px 0 rgba(255,255,255,0.3),
    50px 100px 0 rgba(255,255,255,0.5),
    160px 90px 0 rgba(255,255,255,0.25),
    250px 120px 0 rgba(255,255,255,0.35),
    10px 140px 0 rgba(255,255,255,0.45),
    120px 150px 0 rgba(255,255,255,0.3),
    200px 160px 0 rgba(255,255,255,0.5),
    80px 200px 0 rgba(255,255,255,0.25);
}
.night-stars::after {
  width: 1px; height: 1px; top: 25%; left: 25%;
  animation-delay: 1.5s;
  box-shadow:
    60px 30px 0 rgba(255,255,255,0.4),
    180px 40px 0 rgba(255,255,255,0.3),
    100px 100px 0 rgba(255,255,255,0.5),
    240px 80px 0 rgba(255,255,255,0.35),
    20px 170px 0 rgba(255,255,255,0.3),
    170px 140px 0 rgba(255,255,255,0.4),
    260px 170px 0 rgba(255,255,255,0.3);
}
@keyframes starTwinkle {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* 月亮 */
.night-moon {
  position: relative; z-index: 1;
  text-align: center; font-size: 40px;
  margin-bottom: 2px;
  animation: moonFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 16px rgba(200,180,255,0.5)) drop-shadow(0 0 32px rgba(180,200,255,0.3));
}
@keyframes moonFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.night-title {
  position: relative; z-index: 1;
  text-align: center; color: #C8D4F8; font-size: 18px; font-weight: 700;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #B8C8F0, #D4E0FF);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.night-subtitle {
  position: relative; z-index: 1;
  text-align: center; color: rgba(180,190,220,0.5); font-size: 12px;
  margin-bottom: 16px;
}

/* 夜间任务卡片内的任务样式微调 */
.night-tasks-card .task-card {
  position: relative; z-index: 1;
  background: rgba(140,160,220,0.06);
  border-color: rgba(140,160,220,0.12);
}
.night-tasks-card .task-card:hover {
  background: rgba(140,160,220,0.12);
  border-color: rgba(160,180,240,0.25);
}
.night-tasks-card .task-card .task-title { color: #C8D4F8; }
.night-tasks-card .task-card.completed {
  background: rgba(140,160,220,0.03);
  border-color: rgba(140,160,220,0.08);
}
.night-tasks-card .task-check {
  border-color: rgba(140,160,220,0.3);
}
.night-tasks-card .task-card.completed .task-check {
  background: linear-gradient(135deg, #7B8FC0, #9BABD4);
  border-color: #8FA0D0;
  box-shadow: 0 0 16px rgba(140,160,220,0.3);
}

/* 分割线 */
.night-divider {
  position: relative; z-index: 1;
  height: 1px; margin: 18px 0 16px;
  background: linear-gradient(90deg, transparent, rgba(140,160,220,0.2), rgba(180,200,255,0.3), rgba(140,160,220,0.2), transparent);
}

/* 夜间页脚 */
.night-footer {
  position: relative; z-index: 1;
  text-align: center; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.night-footer-icon {
  font-size: 20px;
  animation: candleFlicker 2s ease-in-out infinite;
}
@keyframes candleFlicker {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  25% { opacity: 1; transform: scale(1.05); }
  50% { opacity: 0.7; transform: scale(0.98); }
  75% { opacity: 0.9; transform: scale(1.02); }
}
.night-footer p {
  color: rgba(200,210,240,0.55); font-size: 13px; font-style: italic;
  margin: 0;
}
.night-footer-sub {
  color: rgba(170,185,220,0.4); font-size: 11px;
}

/* 夜间任务锁定态（白天） */
.night-tasks-card.night-locked { opacity: 0.7; }
.night-tasks-card.night-locked .task-card:not(.completed) {
  opacity: 0.55; pointer-events: auto; filter: grayscale(0.4);
}
.task-locked .task-check {
  background: var(--input-bg) !important;
  border-color: rgba(255,255,255,0.06) !important;
  cursor: not-allowed;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.task-locked { cursor: default; }

/* ========== 奖励稀有度标签 ========== */
.reward-rarity-tag {
  display: inline-block; padding: 1px 6px; border-radius: 8px;
  font-size: 9px; font-weight: 600;
}
.reward-rarity-tag.common { background: var(--nav-hover); color: var(--text-secondary); }
.reward-rarity-tag.rare { background: rgba(168,216,234,0.2); color: #A8D8EA; }
.reward-rarity-tag.epic { background: rgba(200,168,233,0.25); color: #C8A8E9; }
.reward-rarity-tag.legendary { background: rgba(255,184,108,0.3); color: #FFB86C; }

/* ========== 进度文字 ========== */
.progress-text { color: var(--text-muted); font-size: 13px; }

/* ========================================
   100件小事打卡页 - 新增样式
   ======================================== */

/* ---- 页面顶部 ---- */
.page-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 0 0 12px;
  margin-bottom: 12px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 72px;
  color: var(--purple);
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(200,168,233,0.12);
  transition: var(--transition);
}
.back-btn:hover { background: rgba(200,168,233,0.25); color: var(--text-primary); }
.page-points {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 72px;
  margin-left: auto;
  background: linear-gradient(135deg, #FFD700, #FFB86C);
  color: #4A3F55;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255,184,108,0.18);
}
@media (max-width: 360px) {
  .page-top-bar { gap: 12px; }
  .back-btn, .page-points { min-width: 64px; padding-left: 12px; padding-right: 12px; }
}
.section-title {
  color: var(--text-primary); font-size: 18px; font-weight: 700;
  text-align: center; margin: 0;
}

/* ---- 进度卡片 ---- */
.things-progress-card {
  text-align: center; padding: 24px 16px 20px !important;
}
.things-progress-ring {
  position: relative; width: 110px; height: 110px; margin: 0 auto 10px;
}
.things-progress-ring svg { display: block; }
.things-progress-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.things-progress-num {
  font-size: 32px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #FFB5C2, #C8A8E9);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1.1;
}
.things-progress-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.things-progress-sub { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

/* 进度条 */
.things-progress-bar-wrap { padding: 0 20px; margin-top: 12px; }
.things-progress-bar {
  height: 6px; background: rgba(255,255,255,0.08); border-radius: 6px;
  overflow: hidden;
}
.things-progress-bar-fill {
  height: 100%; border-radius: 6px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, #FFB5C2, #C8A8E9, #A8D8EA);
  position: relative;
}
.things-progress-bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---- 筛选标签 ---- */
.things-filter {
  display: flex; gap: 8px; padding: 16px 0 12px; justify-content: center;
}
.things-filter-btn {
  padding: 6px 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: var(--text-secondary); font-size: 13px;
  cursor: pointer; transition: var(--transition);
}
.things-filter-btn:hover { background: var(--nav-hover); color: var(--text-primary); }
.things-filter-btn.active {
  background: linear-gradient(135deg, rgba(255,181,194,0.25), rgba(200,168,233,0.3));
  border-color: rgba(200,168,233,0.4); color: var(--text-primary);
  box-shadow: 0 0 12px rgba(200,168,233,0.15);
}

/* ---- 任务列表 ---- */
.things-list {
  display: flex; flex-direction: column; gap: 8px;
  padding-bottom: 60px; min-height: 200px;
}

/* ---- 任务卡片 ---- */
.thing-card {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; border-radius: var(--card-radius);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-subtle);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: thingsFadeInUp 0.4s ease both;
  position: relative; overflow: hidden;
}
.thing-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(200,168,233,0.05), rgba(168,216,234,0.03));
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.thing-card:not(.done):hover::before { opacity: 1; }
.thing-card:not(.done):hover {
  border-color: rgba(200,168,233,0.3);
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(200,168,233,0.1);
}
.thing-card.done {
  background: rgba(125,206,160,0.06); border-color: rgba(125,206,160,0.2);
  opacity: 0.75;
}
.thing-card.done:hover { opacity: 1; }

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

.thing-index {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--input-bg); display: flex;
  align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted); flex-shrink: 0;
  transition: all 0.3s;
}
.thing-card.done .thing-index {
  background: rgba(125,206,160,0.2); color: #7DCEA0;
}

.thing-checkbox {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border-subtle); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.35s;
}
.thing-card.done .thing-checkbox {
  background: linear-gradient(135deg, #7DCEA0, #5FAF8F);
  border-color: #7DCEA0;
  animation: checkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes checkPop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.thing-content { flex: 1; min-width: 0; }
.thing-title {
  font-size: 14px; color: var(--text-primary); line-height: 1.4;
  transition: all 0.4s;
}
.thing-card.done .thing-title {
  color: var(--text-secondary);
  text-decoration: line-through;
  text-decoration-color: rgba(125,206,160,0.5);
}
.thing-meta {
  font-size: 11px; color: var(--text-muted); margin-top: 4px;
  display: flex; gap: 8px; align-items: center;
}
.thing-proof-thumb {
  width: 44px; height: 44px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.3s;
}
.thing-proof-thumb:hover { transform: scale(1.1); }
.thing-done-btn {
  font-size: 12px; padding: 5px 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(200,168,233,0.2), rgba(255,181,194,0.2));
  color: #C8A8E9; border: 1px solid rgba(200,168,233,0.2);
  cursor: pointer; flex-shrink: 0; transition: all 0.3s; font-weight: 600;
  position: relative; z-index: 2;
}
.thing-done-btn:hover {
  background: linear-gradient(135deg, rgba(200,168,233,0.4), rgba(255,181,194,0.35));
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(200,168,233,0.2);
}
.thing-done-btn:active { transform: scale(0.97); }

/* ---- 空状态 ---- */
.things-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 40px 20px; text-align: center;
}
.things-empty-icon { font-size: 40px; margin-bottom: 12px; }
.things-empty p { color: var(--text-muted); font-size: 14px; }
.things-empty-btn {
  margin-top: 16px; padding: 10px 24px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(200,168,233,0.25), rgba(168,216,234,0.2));
  color: var(--text-primary); border: 1px solid rgba(200,168,233,0.3);
  font-size: 14px; cursor: pointer; transition: var(--transition);
}
.things-empty-btn:hover {
  background: linear-gradient(135deg, rgba(200,168,233,0.4), rgba(168,216,234,0.3));
  box-shadow: 0 0 20px rgba(200,168,233,0.2);
  transform: translateY(-2px);
}

/* ========================================
   打卡弹窗（模态框）
   ======================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-overlay.active .modal-card {
  transform: scale(1); opacity: 1;
}

.modal-card {
  width: 100%; max-width: 480px; max-height: 85vh;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid rgba(200,168,233,0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(155,114,207,0.15);
  transform: scale(0.96); opacity: 0;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  overflow-y: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px 10px; color: var(--text-primary); font-size: 16px; font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modal-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.08); color: var(--text-secondary); font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,80,80,0.2); color: #FF6B6B; }
.modal-body { padding: 16px 20px 8px; }
.modal-footer {
  display: flex; gap: 10px; padding: 12px 20px 20px; justify-content: flex-end;
}

/* ---- 弹窗内：事项标题 ---- */
.things-modal-title {
  font-size: 18px; font-weight: 700; color: var(--text-primary);
  padding: 4px 0 8px;
  background: linear-gradient(135deg, #FFB5C2, #C8A8E9);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- 弹窗内：引导提示 ---- */
.things-modal-hint {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12px; color: var(--text-secondary);
  background: rgba(200,168,233,0.08); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid rgba(200,168,233,0.12);
  line-height: 1.5;
}
.things-modal-hint span { flex-shrink: 0; }

/* ---- 上传区域 ---- */
.things-upload-area {
  border: 2px dashed rgba(200,168,233,0.3);
  border-radius: 16px; padding: 20px;
  text-align: center; cursor: pointer;
  transition: all 0.3s; margin-bottom: 14px;
  background: rgba(200,168,233,0.04);
}
.things-upload-area:hover {
  border-color: rgba(200,168,233,0.5);
  background: rgba(200,168,233,0.08);
}
.things-upload-area:active { transform: scale(0.98); }

.things-upload-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.things-upload-icon-wrap {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(200,168,233,0.12); margin-bottom: 4px;
}
.things-upload-icon { font-size: 24px; }
.things-upload-plus {
  position: absolute; top: -2px; right: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, #C8A8E9, #FFB5C2);
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(200,168,233,0.4);
}
.things-upload-text { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.things-upload-hint { font-size: 11px; color: var(--text-muted); }

/* 图片预览 */
.things-preview-wrap {
  position: relative; display: inline-block; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.things-preview-wrap img {
  display: block; width: 100%; max-height: 220px; object-fit: contain;
  border-radius: 14px;
}
.things-preview-remove {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  color: #fff; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.things-preview-remove:hover { background: rgba(255,80,80,0.7); }

/* ---- 心情笔记 ---- */
.things-note-section { margin-bottom: 10px; }
.things-note-label {
  display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px;
  font-weight: 500;
}
.things-note-optional { color: var(--text-muted); font-weight: 400; }
.things-note-input {
  width: 100%; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary); font-size: 14px; line-height: 1.5;
  resize: vertical; min-height: 72px; max-height: 150px;
  transition: border-color 0.3s; outline: none;
  font-family: inherit;
}
.things-note-input::placeholder { color: rgba(176,160,200,0.5); }
.things-note-input:focus {
  border-color: rgba(200,168,233,0.4);
  box-shadow: 0 0 12px rgba(200,168,233,0.1);
}

/* ---- 提交按钮 ---- */
.things-submit-btn {
  display: inline-flex; align-items: center; gap: 4px;
}

/* ---- Toast 通知 ---- */
.toast-container {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; width: 90%; max-width: 360px;
}
.things-toast {
  padding: 12px 20px; border-radius: 14px; text-align: center;
  background: var(--toast-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary); font-size: 14px; font-weight: 500;
  border: 1px solid rgba(200,168,233,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 20px rgba(200,168,233,0.1);
  transform: translateY(-20px); opacity: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}
.things-toast.show { transform: translateY(0); opacity: 1; }
.things-toast.hide { transform: translateY(-20px); opacity: 0; }
.things-toast.success {
  background: rgba(20,60,40,0.9);
  border-color: rgba(125,206,160,0.4);
  color: #7DCEA0;
}
.things-toast.warn {
  background: rgba(60,45,20,0.92);
  border-color: rgba(255,184,108,0.4);
  color: #FFB86C;
}

/* ========================================
   撒花 / 星光庆祝动画
   ======================================== */
#celebrationContainer {
  position: fixed; inset: 0; z-index: 9998;
  pointer-events: none; overflow: hidden;
}

.things-celebration-star {
  position: absolute; border-radius: 50%;
  animation: celebrationBurst 0.8s ease-out forwards;
  pointer-events: none;
}
@keyframes celebrationBurst {
  0% { transform: scale(0); opacity: 1; }
  50% { transform: scale(1.5) translate(var(--x-drift), -40px); opacity: 0.9; }
  100% { transform: scale(0.3) translate(calc(var(--x-drift) * 1.5), 60px); opacity: 0; }
}

.things-celebration-emoji {
  position: absolute; font-size: 28px; top: -30px;
  animation: emojiFloat 2s ease-out forwards;
  pointer-events: none;
}
@keyframes emojiFloat {
  0% { transform: translateY(0) rotate(0deg) scale(0); opacity: 0; }
  15% { opacity: 1; transform: translateY(30px) rotate(15deg) scale(1.2); }
  50% { transform: translateY(180px) rotate(-10deg) scale(1); opacity: 0.8; }
  100% { transform: translateY(350px) rotate(25deg) scale(0.6); opacity: 0; }
}

/* ========================================
   升级狂欢特效
   ======================================== */
.levelup-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(5,2,25,0.88);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.levelup-overlay.show { opacity: 1; pointer-events: all; }
.levelup-overlay.show .levelup-badge { animation: lvlBadgeIn 0.7s cubic-bezier(0.34,1.56,0.64,1) forwards; }
.levelup-overlay.show .levelup-title { animation: lvlTitleIn 0.5s 0.4s ease-out forwards; }
.levelup-overlay.show .levelup-sub { animation: lvlSubIn 0.5s 0.6s ease-out forwards; }

.levelup-particles {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.levelup-particle {
  position: absolute;
  width: 8px; height: 8px; border-radius: 50%;
  animation: lvlParticleBurst 1.5s ease-out forwards;
}
@keyframes lvlParticleBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

.levelup-content {
  position: relative; z-index: 1; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.levelup-badge {
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(135deg, #FFD700, #FFB86C, #FF9A56);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 900; color: #3D1C00;
  box-shadow: 0 0 60px rgba(255,215,0,0.6), 0 0 120px rgba(255,184,108,0.4), 0 0 200px rgba(255,154,86,0.2);
  opacity: 0; transform: scale(0.3);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
@keyframes lvlBadgeIn {
  0% { opacity: 0; transform: scale(0.3) rotate(-20deg); }
  60% { opacity: 1; transform: scale(1.15) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.levelup-title {
  font-size: 28px; font-weight: 900; letter-spacing: 4px;
  background: linear-gradient(135deg, #FFD700, #FFB5C2, #FFD700);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0; transform: translateY(20px);
  text-shadow: none;
}
@keyframes lvlTitleIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.levelup-sub {
  font-size: 16px; color: rgba(255,220,240,0.7);
  opacity: 0; transform: translateY(10px);
}
@keyframes lvlSubIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ========================================
   签到视觉反馈
   ======================================== */
.nav-icon-item.checkin-done {
  background: rgba(255,215,0,0.12) !important;
  animation: checkinPulse 0.6s ease;
}
@keyframes checkinPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.nav-icon-item.checkin-done .nav-icon {
  animation: checkinGlow 0.8s ease;
}
@keyframes checkinGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255,215,0,0.3)); }
  50% { filter: drop-shadow(0 0 20px rgba(255,215,0,0.8)) drop-shadow(0 0 8px rgba(255,184,108,0.6)); }
}

/* 连续签到火焰提示 */
.streak-fire {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%) translateY(-80px);
  z-index: 2001; display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,140,30,0.2), rgba(255,80,20,0.15));
  border: 1px solid rgba(255,184,108,0.3);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none;
  transition: all 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.streak-fire.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.streak-icon {
  font-size: 22px;
  animation: fireJump 0.4s ease infinite alternate;
}
@keyframes fireJump {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-4px) scale(1.15); }
}
.streak-text {
  color: #FFB86C; font-size: 14px; font-weight: 700;
  text-shadow: 0 0 8px rgba(255,184,108,0.3);
}

/* ========================================
   浮动宠物（可拖拽）— 猫咪造型
   ======================================== */
.float-pet {
  position: fixed;
  bottom: 100px; right: 20px;
  z-index: 500;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: filter 0.5s;
  filter: drop-shadow(0 6px 20px rgba(255,180,200,0.35));
  width: 70px; height: 80px;
  will-change: transform;
  -webkit-transform: translateZ(0);
}
.float-pet:active { cursor: grabbing; }
.float-pet.dragging { cursor: grabbing; transition: none; }
.float-pet.mood-low { filter: drop-shadow(0 4px 10px rgba(150,120,140,0.25)) saturate(0.55); }
.float-pet.mood-high { filter: drop-shadow(0 6px 24px rgba(255,180,200,0.55)) drop-shadow(0 0 20px rgba(255,181,194,0.35)); }

/* 耳朵 */
.fp-ears {
  position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 22px; z-index: -1;
}
.fp-ear {
  position: absolute; top: 0;
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 18px solid #FFD0DA;
  filter: drop-shadow(0 -1px 2px rgba(0,0,0,0.05));
  transition: all 0.5s;
}
.fp-ear-left { left: 0; transform: rotate(-8deg); }
.fp-ear-right { right: 0; transform: rotate(8deg); }
.fp-ear-inner {
  position: absolute; top: 4px; left: -6px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 12px solid #FFB5C2;
}

/* 身体 */
.float-pet-body {
  position: absolute;
  bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(160deg, #FFF0F4 0%, #FFE0E8 30%, #FFD0DA 60%, #F8C8D4 100%);
  box-shadow:
    0 6px 18px rgba(255,150,170,0.3),
    0 0 30px rgba(255,181,194,0.15),
    inset 0 -8px 14px rgba(255,150,170,0.15),
    inset 0 5px 10px rgba(255,255,255,0.5);
  animation: fpIdle 3s ease-in-out infinite;
  transition: background 0.5s, box-shadow 0.5s;
  display: flex; align-items: center; justify-content: center;
}
@keyframes fpIdle {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

/* 脸 */
.fp-face { position: relative; width: 38px; height: 32px; }

/* 眼睛 — 大圆眼 */
.fp-eye {
  position: absolute; top: 2px;
  width: 13px; height: 14px;
  background: #2D1B4E;
  border-radius: 50%;
  overflow: visible;
  transition: transform 0.08s ease;
}
.fp-eye-left { left: 2px; }
.fp-eye-right { right: 2px; }
.fp-shine {
  position: absolute; top: 2px; left: 4px;
  width: 5px; height: 5px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(255,255,255,0.8);
}
.fp-shine::after {
  content: '';
  position: absolute; top: 1px; left: -3px;
  width: 3px; height: 3px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
}

/* 鼻子 */
.fp-nose {
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 5px;
  background: #FF8FA3;
  border-radius: 50%;
}

/* W形猫嘴 */
.fp-mouth-w {
  position: absolute; top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 10px;
  overflow: visible;
  transition: all 0.4s;
}
.fp-mouth-w::before,
.fp-mouth-w::after {
  content: '';
  position: absolute; top: 0;
  width: 8px; height: 8px;
  border-bottom: 2px solid #D4687C;
  border-radius: 0 0 6px 0;
}
.fp-mouth-w::before { left: 0; transform: rotate(20deg); }
.fp-mouth-w::after { right: 0; transform: rotate(-20deg); border-radius: 0 0 0 6px; }
.fp-mouth-w.sad::before,
.fp-mouth-w.sad::after {
  border-bottom: none;
  border-top: 2px solid #D4687C;
  border-radius: 6px 0 0 0;
  top: 4px;
}
.fp-mouth-w.sad::after { border-radius: 0 6px 0 0; }

/* 腮红 */
.fp-blush {
  position: absolute; top: 14px;
  width: 10px; height: 5px;
  background: rgba(255,150,170,0.5);
  border-radius: 50%;
}
.fp-blush-l { left: -4px; }
.fp-blush-r { right: -4px; }

/* 尾巴 */
.fp-tail-wrap {
  position: absolute; bottom: 28px; right: -2px;
  transform-origin: right center;
  animation: fpTailWag 1.2s ease-in-out infinite;
}
@keyframes fpTailWag {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(20deg); }
}
.fp-tail {
  width: 22px; height: 16px;
  background: linear-gradient(180deg, #FFE0E8, #FFD0DA);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 2px 4px rgba(255,150,170,0.15);
}

/* 装饰品 */
.fp-accessory {
  position: absolute; top: -6px; left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  transition: all 0.4s;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
  pointer-events: none;
  z-index: 2;
}

/* 火花 */
.fp-sparkles {
  position: absolute; inset: -25px; pointer-events: none; z-index: 3;
}
.fp-spark {
  position: absolute;
  font-size: 13px;
  animation: fpSparkFloat 0.8s ease-out forwards;
  pointer-events: none;
}
@keyframes fpSparkFloat {
  0% { opacity: 1; transform: translate(0,0) scale(0); }
  30% { opacity: 1; transform: translate(var(--sx), var(--sy)) scale(1.1); }
  100% { opacity: 0; transform: translate(var(--ex), var(--ey)) scale(0.4); }
}

/* 点击反弹（作用于容器，耳朵一起动） */
.float-pet.bouncing {
  animation: fpBounce 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes fpBounce {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-18px) scale(1.1); }
  60% { transform: translateY(-4px) scale(0.94); }
  100% { transform: translateY(0) scale(1); }
}

/* 转圈（作用于容器，耳朵一起动） */
.float-pet.spinning {
  animation: fpSpin 0.6s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes fpSpin {
  0% { transform: rotate(0deg) scale(1); }
  40% { transform: rotate(360deg) scale(1.12); }
  100% { transform: rotate(360deg) scale(1); }
}

/* 宠物震动（作用于容器，耳朵一起动） */
.float-pet.shaking {
  animation: petShake 0.5s ease-in-out;
}
@keyframes petShake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-4px) rotate(-2deg); }
  30% { transform: translateX(4px) rotate(2deg); }
  50% { transform: translateX(-3px) rotate(-1deg); }
  70% { transform: translateX(3px) rotate(1deg); }
  90% { transform: translateX(-2px); }
}

/* 耳朵抖动（气泡打开时触发） */
.float-pet.ear-wiggle .fp-ear-left {
  animation: earWiggleL 0.5s ease-in-out;
}
.float-pet.ear-wiggle .fp-ear-right {
  animation: earWiggleR 0.5s ease-in-out;
}
@keyframes earWiggleL {
  0%, 100% { transform: rotate(-8deg); }
  20% { transform: rotate(-20deg); }
  40% { transform: rotate(-2deg); }
  60% { transform: rotate(-15deg); }
  80% { transform: rotate(-5deg); }
}
@keyframes earWiggleR {
  0%, 100% { transform: rotate(8deg); }
  20% { transform: rotate(20deg); }
  40% { transform: rotate(2deg); }
  60% { transform: rotate(15deg); }
  80% { transform: rotate(5deg); }
}

/* 眨眼（idle 时随机触发） */
.float-pet.blinking .fp-eye {
  animation: petBlink 0.15s ease-in-out;
}
@keyframes petBlink {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.05); }
}

/* 开心摇晃（心情好时偶尔触发） */
.float-pet.happy-wiggle {
  animation: happyWiggle 0.8s ease-in-out;
}
@keyframes happyWiggle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  15% { transform: translateY(-3px) rotate(-5deg); }
  30% { transform: translateY(-8px) rotate(2deg); }
  45% { transform: translateY(-3px) rotate(-3deg); }
  60% { transform: translateY(-10px) rotate(1deg); }
  80% { transform: translateY(-4px) rotate(-1deg); }
}

/* 情绪颜色 */
.float-pet.mood-low .float-pet-body {
  background: linear-gradient(160deg, #E8E0E4, #E0D8DD, #D8CFD6);
  box-shadow: 0 4px 10px rgba(150,120,140,0.2), inset 0 -8px 14px rgba(150,120,140,0.1), inset 0 5px 10px rgba(255,255,255,0.3);
  animation-duration: 4s;
}
.float-pet.mood-low .fp-ear { border-bottom-color: #D8CFD6; }
.float-pet.mood-low .fp-ear-inner { border-bottom-color: #C8B8C4; }
.float-pet.mood-low .fp-tail { background: linear-gradient(180deg, #E0D8DD, #D8CFD6); }
.float-pet.mood-low .fp-tail-wrap { animation-duration: 2s; }

.float-pet.mood-high .float-pet-body {
  background: linear-gradient(160deg, #FFF4F6, #FFECF0, #FFE0E8, #FFD8E4);
  box-shadow:
    0 6px 22px rgba(255,160,190,0.45),
    0 0 30px rgba(255,181,194,0.25),
    inset 0 -8px 14px rgba(255,150,170,0.2),
    inset 0 5px 10px rgba(255,255,255,0.6);
  animation-duration: 2s;
}
.float-pet.mood-high .fp-ear { border-bottom-color: #FFE0E8; }
.float-pet.mood-high .fp-ear-inner { border-bottom-color: #FFC8D8; }
.float-pet.mood-high .fp-tail { background: linear-gradient(180deg, #FFE8F0, #FFD8E4); }
.float-pet.mood-high .fp-tail-wrap { animation-duration: 0.7s; }

/* ========================================
   宠物对话气泡
   ======================================== */
.pet-bubble {
  position: fixed;
  z-index: 510;
  width: 200px;
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.pet-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.pet-bubble-arrow {
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--bg-card);
  margin: 0 auto;
}
.pet-bubble-inner {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,181,194,0.2);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(255,181,194,0.1);
}
.pet-bubble-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.pet-bubble-name {
  font-size: 15px; font-weight: 700; color: #FFE0E8;
}
.pet-bubble-lv {
  font-size: 11px; font-weight: 600;
  color: #C8A8E9; background: rgba(200,168,233,0.15);
  padding: 2px 8px; border-radius: 8px;
}
.pet-bubble-msg {
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 10px; line-height: 1.4;
  min-height: 18px;
}
.pet-bubble-stats {
  display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 12px;
}
.pet-stat-row {
  display: flex; align-items: center; gap: 6px;
}
.pet-stat-icon { font-size: 13px; width: 18px; text-align: center; }
.pet-stat-bar-wrap {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--input-bg);
  overflow: hidden;
}
.pet-stat-bar {
  height: 100%; border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.pet-stat-hp { background: linear-gradient(90deg, #FF8FA3, #FF6B84); }
.pet-stat-hunger { background: linear-gradient(90deg, #FFB347, #FF8F1F); }

/* 饥饿危急闪烁 */
.pet-stat-bar-wrap.critical .pet-stat-bar.pet-stat-hunger {
  background: linear-gradient(90deg, #FF4444, #FF6666);
  animation: hungerPulse 0.8s ease-in-out infinite;
}
@keyframes hungerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pet-stat-happy { background: linear-gradient(90deg, #FF8FAB, #FF6B8A); }
.pet-stat-val {
  font-size: 10px; color: var(--text-light); width: 22px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.pet-bubble-actions {
  display: flex; gap: 6px;
}
.pet-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; border-radius: 10px; border: none;
  cursor: pointer; transition: all 0.2s;
  font-size: 11px; color: #fff; font-weight: 600;
}
.pet-btn:active { transform: scale(0.93); }
.pet-btn:disabled {
  opacity: 0.35; cursor: not-allowed; transform: none;
}
.pet-btn-play.play-locked {
  opacity: 0.3;
  cursor: not-allowed;
  position: relative;
}
.pet-btn-play.play-locked::after {
  content: '太饿了...';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: #FF6666;
  white-space: nowrap;
}
.pet-btn-icon { font-size: 18px; pointer-events: none; }
.pet-btn-text { pointer-events: none; }
.pet-btn-feed { background: rgba(255,179,71,0.25); }
.pet-btn-feed:hover:not(:disabled) { background: rgba(255,179,71,0.4); }
.pet-btn-pet { background: rgba(255,143,171,0.25); }
.pet-btn-pet:hover:not(:disabled) { background: rgba(255,143,171,0.4); }
.pet-btn-play { background: rgba(200,168,233,0.25); }
.pet-btn-play:hover:not(:disabled) { background: rgba(200,168,233,0.4); }
.pet-btn.cooldown .pet-btn-text {
  font-size: 10px;
  opacity: 0.7;
}
.pet-btn.cooldown {
  opacity: 0.5;
}

.pet-bubble-cooldown {
  text-align: center; font-size: 10px; color: #A99BBF;
  margin-top: 8px; padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* 情绪状态文字 */
.pet-bubble-mood {
  text-align: center;
  font-size: 12px;
  color: #C8BED8;
  padding: 6px 0;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-style: italic;
}

/* ========================================
   每日打卡提醒开关
   ======================================== */
.notify-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--input-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.notify-toggle:hover {
  background: var(--nav-hover);
  border-color: rgba(255, 181, 194, 0.3);
}
.notify-toggle:active {
  transform: scale(0.96);
}
.notify-icon {
  font-size: 15px;
  pointer-events: none;
}
.notify-text {
  font-size: 12px;
  color: var(--text-secondary);
  pointer-events: none;
}
