/* ==================== CSS 变量与全局 ====================
 * ⚠️ 永久规则：所有颜色必须为深蓝/海洋蓝系，禁止粉色/紫色！
 * 参考色板：#0c3d5c(深蓝) → #084c6e(海蓝) → #006994(蓝) → #0ea5e9(天蓝) → #38bdf8(浅蓝)
 */
:root {
  /* ===== 蓝色阶梯（从极浅到深）—— 严禁修改为粉色！===== */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;

  /* ===== 强调色（保留少量暖色用于特殊元素）===== */
  --rose-50: #fff1f2;
  --rose-100-blue: #dbeafe;
  --rose-200: #fecdd3;
  --rose-300-blue: #93c5fd;
  --rose-400: #ef4444;
  --rose-500: #ef4444;

  --gold: #f59e0b;
  --gold-light: #fde68a;

  /* ===== 全局基础色 ===== */
  --bg: #0c3d5c;
  --bg-card: rgba(255,255,255,0.10);
  --text: #f0f9ff;
  --text-light: #bae6fd;
  --text-lighter: #7dd3fc;
  --border: rgba(56,189,248,0.25);
  --shadow: 0 2px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* 四季动态皮肤变量（默认=夏季深蓝海洋） */
  --season-bg1: #0c3d5c;
  --season-bg2: #084c6e;
  --season-bg3: #006994;
  --season-accent: #38bdf8;
  --season-accent2: #0ea5e9;
  --season-particle: '🫧';
  --season-hero-grad: linear-gradient(135deg, #0c3d5c 0%, #084c6e 30%, #006994 60%, #0ea5e9 85%, #38bdf8 100%);
  --season-nav-grad: linear-gradient(135deg, rgba(12,61,92,0.97), rgba(0,105,148,0.98));
  --season-card-glow: rgba(56,189,248,0.15);
}

/* ==================== 夏季皮肤（深蓝海洋）==================== */
body.season-summer {
  --season-bg1: #0c3d5c;
  --season-bg2: #084c6e;
  --season-bg3: #006994;
  --season-accent: #38bdf8;
  --season-accent2: #0ea5e9;
  --season-hero-grad: linear-gradient(135deg, #0c3d5c 0%, #084c6e 25%, #006994 50%, #0ea5e9 75%, #38bdf8 100%);
  --season-nav-grad: linear-gradient(135deg, rgba(12,61,92,0.97), rgba(0,105,148,0.98));
  --season-card-glow: rgba(56,189,248,0.15);
  --bg: #084c6e;
  --bg-card: rgba(255,255,255,0.10);
  --text: #f0f9ff;
  --text-light: #bae6fd;
  --border: rgba(56,189,248,0.25);
  --shadow: 0 2px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.35);
}

/* 深蓝海洋渐变背景 */
body.season-summer {
  background: linear-gradient(135deg, #0c3d5c 0%, #084c6e 20%, #006994 50%, #0ea5e9 80%, #38bdf8 100%) !important;
  background-size: 200% 200% !important;
  animation: oceanGradient 15s ease infinite !important;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 海洋渐变动画 - 夏季保留 */
@keyframes oceanGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 海浪层 - 夏季保留 */
body.season-summer::before,
body.season-summer::after {
  display: block !important;
}

/* 海洋渐变动画 */
@keyframes oceanGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 海浪层1 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(79,172,254,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(0,242,254,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(79,172,254,0.2) 0%, transparent 50%);
  animation: waveMove 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes waveMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* 海浪层2 - 气泡效果 */
body::after {
  content: '';
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: 200%;
  background-image: 
    radial-gradient(2px 2px at 100px 200px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 300px 400px, rgba(255,255,255,0.2), transparent),
    radial-gradient(3px 3px at 500px 100px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 700px 300px, rgba(255,255,255,0.2), transparent),
    radial-gradient(2px 2px at 900px 500px, rgba(255,255,255,0.3), transparent);
  background-size: 200px 200px;
  animation: bubbleFloat 30s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes bubbleFloat {
  from { transform: translateY(0); }
  to { transform: translateY(50%); }
}

/* 确保内容在背景之上 */
#app, .navbar, .top-bar, #bottom-nav {
  position: relative;
  z-index: 1;
}

/* ==================== 春季皮肤（深蓝海洋 - 统一色系）==================== */
body.season-spring {
  --season-bg1: #0c3d5c;
  --season-bg2: #084c6e;
  --season-bg3: #006994;
  --season-accent: #38bdf8;
  --season-accent2: #0ea5e9;
  --season-hero-grad: linear-gradient(135deg, #0c3d5c 0%, #084c6e 40%, #006994 70%, #0ea5e9 100%);
  --season-nav-grad: linear-gradient(135deg, rgba(12,61,92,0.96), rgba(0,105,148,0.98));
  --season-card-glow: rgba(56,189,248,0.15);
  --bg: #084c6e;
  --bg-card: rgba(255,255,255,0.10);
  --text: #f0f9ff;
  --text-light: #bae6fd;
  --border: rgba(56,189,248,0.25);
  --shadow: 0 2px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.35);
}

/* ==================== 秋季皮肤 ==================== */
body.season-autumn {
  --season-bg1: #fff3e0;
  --season-bg2: #ffe0b2;
  --season-bg3: #ffccbc;
  --season-accent: #f97316;
  --season-accent2: #fb923c;
  --season-hero-grad: linear-gradient(135deg, #7c2d12 0%, #b45309 30%, #f97316 65%, #fbbf24 100%);
  --season-nav-grad: linear-gradient(135deg, rgba(255,243,224,0.97), rgba(255,204,188,0.98));
  --season-card-glow: rgba(249,115,22,0.12);
  --bg: #fff8f0;
  --border: #fed7aa;
  --shadow: 0 2px 12px rgba(249,115,22,0.10);
  --shadow-lg: 0 8px 30px rgba(249,115,22,0.15);
  --blue-400: #fb923c;
  --blue-500: #f97316;
  --blue-600: #ea580c;
}

/* ==================== 冬季皮肤 ==================== */
body.season-winter {
  --season-bg1: #e8f4fd;
  --season-bg2: #dbeafe;
  --season-bg3: #e0e7ff;
  --season-accent: #3b82f6;
  --season-accent2: #818cf8;
  --season-hero-grad: linear-gradient(135deg, #0f172a 0%, #1e3a5f 30%, #3730a3 65%, #818cf8 100%);
  --season-nav-grad: linear-gradient(135deg, rgba(232,244,253,0.97), rgba(224,231,255,0.98));
  --season-card-glow: rgba(99,102,241,0.12);
  --bg: #f5f7ff;
  --border: #c7d2fe;
  --shadow: 0 2px 12px rgba(99,102,241,0.10);
  --shadow-lg: 0 8px 30px rgba(99,102,241,0.15);
  --blue-400: #818cf8;
  --blue-500: #3b82f6;
  --blue-600: #4f46e5;
}

/* ==================== 季节感知覆盖 ==================== */
body.season-summer .hero-banner,
body.season-autumn .hero-banner,
body.season-winter .hero-banner {
  background: var(--season-hero-grad) !important;
}

/* 登录页背景 - 统一深蓝海洋 */
body.season-summer #login-page {
  background: linear-gradient(135deg, #0c3d5c 0%, #084c6e 30%, #006994 60%, #0ea5e9 85%, #38bdf8 100%) !important;
}
body.season-spring #login-page {
  background: linear-gradient(135deg, #0c3d5c 0%, #084c6e 30%, #006994 60%, #0ea5e9 85%, #38bdf8 100%) !important;
}
body.season-autumn #login-page {
  background: linear-gradient(135deg, #7c2d12 0%, #b45309 40%, #f97316 75%, #fbbf24 100%);
}
body.season-winter #login-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #3730a3 75%, #818cf8 100%);
}

/* 导航栏季节色 */
body.season-summer .bottom-nav { background: var(--season-nav-grad); border-top-color: #bae6fd; }
body.season-autumn .bottom-nav { background: var(--season-nav-grad); border-top-color: #fed7aa; }
body.season-winter .bottom-nav { background: var(--season-nav-grad); border-top-color: #c7d2fe; }

body.season-summer .nav-item.active { color: #0ea5e9; }
body.season-autumn .nav-item.active { color: #f97316; }
body.season-winter .nav-item.active { color: #3b82f6; }

/* 按钮季节色 */
body.season-summer .btn-primary { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
body.season-autumn .btn-primary { background: linear-gradient(135deg, #f97316, #fbbf24); }
body.season-winter .btn-primary { background: linear-gradient(135deg, #3b82f6, #818cf8); }

body.season-summer .counter-block { background: rgba(255,255,255,0.08); border-color: rgba(56,189,248,0.2); }
body.season-summer .counter-block span { color: #38bdf8; }
body.season-summer .counter-block small { color: #bae6fd; }

/* ========== 夏季全局暗色覆盖：将所有白色背景转为深蓝半透明 ========== */
body.season-summer [style*="background:#fff"],
body.season-summer [style*="background: #fff"],
body.season-summer [style*="background:white"],
body.season-summer [style*="background: white"] {
  background: rgba(255,255,255,0.08) !important;
}
body.season-summer [style*="background:rgba(255,255,255,0.9)"],
body.season-summer [style*="background:rgba(255,255,255,0.95)"],
body.season-summer [style*="background:rgba(255,255,255,0.85)"] {
  background: rgba(255,255,255,0.10) !important;
}

body.season-autumn .counter-block { background: #ffffff; border-color: rgba(251,191,36,0.15); }
body.season-autumn .counter-block span { color: #c2410c; }
body.season-autumn .counter-block small { color: #475569; }

body.season-winter .counter-block { background: #ffffff; border-color: rgba(129,140,248,0.15); }
body.season-winter .counter-block span { color: #4338ca; }
body.season-winter .counter-block small { color: #475569; }

body.season-spring .counter-block { background: rgba(255,255,255,0.08); border-color: rgba(56,189,248,0.2); }
body.season-spring .counter-block span { color: #38bdf8; }
body.season-spring .counter-block small { color: #bae6fd; }

/* ==================== 仪表盘：日历 + 天气 ==================== */
.dashboard-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 8px;
  margin: 0 auto 12px;
  max-width: 520px;
  padding: 0 8px;
  justify-content: center;
  align-items: stretch;
  box-sizing: border-box;
}

.season-calendar-card {
  flex: 1;
  min-width: 0;
  max-width: 260px;
  border-radius: 16px;
  position: relative;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  border: 0.5px solid rgba(255,255,255,0.6);
  box-shadow: 0 8px 32px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.calendar-header {
  padding: 6px 10px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 11px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.season-summer .calendar-header { background: rgba(14,165,233,0.5); color: #0369a1; }
.season-spring .calendar-header { background: rgba(59,130,246,0.5); color: #1d4ed8; }
.season-autumn .calendar-header { background: rgba(249,115,22,0.5); color: #c2410c; }
.season-winter .calendar-header { background: rgba(99,102,241,0.5); color: #4338ca; }

body.season-summer .calendar-header { background: rgba(14,165,233,0.5); color: #0369a1; }
body.season-autumn .calendar-header { background: rgba(249,115,22,0.5); color: #c2410c; }
body.season-winter .calendar-header { background: rgba(99,102,241,0.5); color: #4338ca; }
body.season-spring .calendar-header { background: rgba(59,130,246,0.5); color: #1d4ed8; }

.cal-month-label {
  font-size: 11px;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.cal-season-badge {
  font-size: 8px;
  background: rgba(255,255,255,0.4);
  padding: 1px 6px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
}
.calendar-body {
  background: transparent;
  padding: 5px 8px 8px;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 2px;
}
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.cal-day {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  position: relative;
}
.cal-day.other-month { color: var(--text-lighter); opacity: 0.5; }
.cal-day.today {
  color: white !important;
  font-weight: 700;
  transform: scale(1.08);
}
body.season-summer .cal-day.today { background: #0ea5e9; }
body.season-autumn .cal-day.today { background: #f97316; }
body.season-winter .cal-day.today { background: #3b82f6; }
body.season-spring .cal-day.today { background: #3b82f6; }

.cal-day.anniversary {
  background: rgba(253,224,71,0.4);
  color: #92400e !important;
  font-weight: 700;
}
.cal-day.anniversary::after {
  content: '';
  font-size: 6px;
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  background: #f59e0b;
  border-radius: 50%;
}

/* 日历动态动画 */
@keyframes pulseToday {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(14, 165, 233, 0); }
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.12); }
  30% { transform: scale(1); }
  45% { transform: scale(1.08); }
  60% { transform: scale(1); }
}
.cal-day.today { animation: pulseToday 2s ease-in-out infinite; }
.cal-day.anniversary { animation: heartbeat 1.8s ease-in-out infinite; }

.cal-day:hover {
  background: rgba(0,0,0,0.06);
  transform: scale(1.2) !important;
}

/* ==================== 天气卡片 ==================== */
.weather-card {
  flex: 1;
  min-width: 0;
  max-width: 260px;
  border-radius: 16px;
  position: relative;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  border: 0.5px solid rgba(255,255,255,0.6);
  box-shadow: 0 8px 32px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.6);
  display: flex;
  flex-direction: column;
}

.weather-header {
  position: relative;
  padding: 6px 10px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.weather-city { color: #374151; cursor: pointer; transition: color 0.2s; }
.weather-city:hover { color: var(--blue-500); }
.weather-update { font-size: 9px; color: var(--text-lighter); font-weight: 400; }

body.season-summer .weather-header { background: rgba(14,165,233,0.35); color: #0369a1; }
body.season-spring .weather-header { background: rgba(59,130,246,0.35); color: #1d4ed8; }
body.season-autumn .weather-header { background: rgba(249,115,22,0.35); color: #c2410c; }
body.season-winter .weather-header { background: rgba(99,102,241,0.35); color: #4338ca; }
body.season-summer .weather-city,
body.season-autumn .weather-city,
body.season-winter .weather-city,
body.season-spring .weather-city { color: inherit; }

.weather-body {
  padding: 8px 10px 10px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.weather-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.weather-icon { font-size: 24px; line-height: 1; }
.weather-temp { font-size: 24px; font-weight: 800; color: #374151; }

.weather-details {
  display: flex;
  justify-content: space-around;
  margin-bottom: 4px;
  gap: 0;
}
.weather-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.wd-label { font-size: 9px; color: var(--text-lighter); }
.wd-value { font-size: 11px; font-weight: 600; color: #374151; }

.weather-desc {
  font-size: 10px;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 涟漪效果 */
.cal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal-nav-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.3);
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.cal-nav-btn:hover { background: rgba(255,255,255,0.5); }
.cal-nav-btn:active { transform: scale(0.9); }

@keyframes rippleOut {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.5); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ==================== 城市选择器 ==================== */
/* ==================== 城市下拉选择 ==================== */
.city-dropdown {
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  z-index: 200;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 2px;
}
.city-dropdown.open {
  max-height: 260px;
}
.city-dropdown-list {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  max-height: 256px;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.city-dropdown-item {
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.city-dropdown-item:hover {
  background: rgba(59,130,246,0.1);
}
.city-dropdown-item.active {
  background: rgba(59,130,246,0.15);
  font-weight: 700;
  color: #1d4ed8;
}

/* ==================== 夏季粒子动画（已禁用）==================== */
.season-particles {
  display: none !important;
}
.season-particle {
  position: absolute;
  font-size: 18px;
  opacity: 0;
  animation: particleFall linear infinite;
  user-select: none;
}

/* 夏季：气泡/海浪 */
body.season-summer .season-particle { animation-name: particleFloat; }
@keyframes particleFloat {
  0%   { transform: translateY(105vh) translateX(0) scale(0.5); opacity: 0; }
  10%  { opacity: 0.9; }
  50%  { transform: translateY(50vh) translateX(20px) scale(1); opacity: 0.8; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(-10vh) translateX(-10px) scale(0.8); opacity: 0; }
}

/* 春季：花瓣飘落 */
body.season-spring .season-particle { animation-name: particleFall; }
@keyframes particleFall {
  0%   { transform: translateY(-5vh) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.8; }
  50%  { transform: translateY(50vh) translateX(30px) rotate(180deg); opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(108vh) translateX(-20px) rotate(360deg); opacity: 0; }
}

/* 秋季：枫叶飘落 */
body.season-autumn .season-particle { animation-name: particleLeaf; }
@keyframes particleLeaf {
  0%   { transform: translateY(-5vh) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.8; }
  30%  { transform: translateY(25vh) translateX(40px) rotate(120deg); }
  60%  { transform: translateY(55vh) translateX(-20px) rotate(250deg); opacity: 0.6; }
  100% { transform: translateY(108vh) translateX(30px) rotate(420deg); opacity: 0; }
}

/* 冬季：雪花飘落 */
body.season-winter .season-particle { animation-name: particleSnow; }
@keyframes particleSnow {
  0%   { transform: translateY(-5vh) translateX(0) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.9; }
  50%  { transform: translateY(50vh) translateX(15px) rotate(180deg) scale(1); opacity: 0.7; }
  100% { transform: translateY(108vh) translateX(-10px) rotate(360deg) scale(0.6); opacity: 0; }
}

/* ==================== 夏日大海英雄区特效 ==================== */
body.season-summer .hero-banner {
  position: relative;
  overflow: hidden;
}
body.season-summer .hero-banner::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80'%3E%3Cpath d='M0,40 C200,0 400,80 600,40 C800,0 1000,80 1200,40 L1200,80 L0,80 Z' fill='rgba(255,255,255,0.15)'/%3E%3C/svg%3E") repeat-x bottom;
  background-size: 600px 80px;
  animation: waveSurge 4s linear infinite;
  pointer-events: none;
}
body.season-summer .hero-banner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60'%3E%3Cpath d='M0,30 C150,10 350,50 600,30 C850,10 1050,50 1200,30 L1200,60 L0,60 Z' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E") repeat-x bottom;
  background-size: 400px 60px;
  animation: waveSurge 3s linear infinite reverse;
  pointer-events: none;
}
@keyframes waveSurge {
  from { background-position-x: 0; }
  to   { background-position-x: 600px; }
}

/* 冬季闪光点缀 */
body.season-winter .hero-banner {
  position: relative;
  overflow: hidden;
}
body.season-winter .hero-banner::before {
  content: '✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦';
  position: absolute;
  top: 15px; left: 0; right: 0;
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 8px;
  animation: sparkleGlow 2s ease-in-out infinite;
}
@keyframes sparkleGlow {
  0%,100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ==================== 登录页 ==================== */
#login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0c3d5c 0%, #084c6e 30%, #006994 60%, #0ea5e9 85%, #38bdf8 100%) !important;
  position: relative;
  overflow: hidden;
}
#login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(96,165,250,0.1) 0%, transparent 60%);
  animation: float 8s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 20px); }
}

.login-container {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.18);
  text-align: center;
  max-width: 420px;
  width: 90%;
  position: relative;
  z-index: 1;
  overflow: visible;
}
.login-heart { font-size: 48px; margin-bottom: 12px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.login-container h1 {
  font-size: 28px;
  background: linear-gradient(135deg, #38bdf8, #f0f9ff, #bae6fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.login-subtitle { color: #bae6fd; font-size: 14px; margin-bottom: 28px; opacity: 0.85; }

.login-avatars {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}
.login-avatar {
  cursor: pointer;
  padding: 16px 28px;
  border-radius: 16px;
  border: 2px solid rgba(56,189,248,0.35);
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.08);
}
.login-avatar:hover {
  border-color: #38bdf8;
  background: rgba(56,189,248,0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(56,189,248,0.25);
}
.login-avatar:active {
  transform: scale(0.95);
}
.login-avatar span { font-size: 36px; display: block; }
.login-avatar p { font-size: 14px; color: #f0f9ff; margin-top: 4px; font-weight: 600; }

/* 头像金边闪耀 */
.login-avatar.avatar-golden {
  border-color: #fbbf24 !important;
  background: #fff7ed !important;
  box-shadow: 0 0 20px rgba(251,191,36,0.6), 0 0 40px rgba(251,191,36,0.3), 0 0 80px rgba(245,158,11,0.2);
  animation: avatarGoldenPulse 0.6s ease-in-out 3;
  transform: scale(1.08);
  pointer-events: none;
}
@keyframes avatarGoldenPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(251,191,36,0.6), 0 0 40px rgba(251,191,36,0.3); }
  50%      { box-shadow: 0 0 40px rgba(251,191,36,0.9), 0 0 80px rgba(245,158,11,0.5), 0 0 120px rgba(245,158,11,0.2); }
}

/* 两个头像都禁用点击 */
.login-avatars.all-disabled .login-avatar {
  pointer-events: none;
  opacity: 0.5;
}

.login-click-hint {
  font-size: 15px;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 16px;
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* 微信风格气泡框：提示文字下方、头像上方，max-height 展开 */
.chat-bubble-wrapper {
  max-height: 0;
  opacity: 0;
  overflow: visible;
  margin-bottom: 0;
  transition: max-height 0.5s cubic-bezier(0.34,1.56,0.64,1),
              opacity 0.4s ease,
              margin-bottom 0.5s cubic-bezier(0.34,1.56,0.64,1);
  text-align: center;
}
.chat-bubble-wrapper.show {
  max-height: 120px;
  opacity: 1;
  margin-bottom: 18px;
}
.chat-bubble {
  display: inline-block;
  position: relative;
  min-width: 180px;
  max-width: 260px;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  word-break: break-word;
  animation: bubblePopIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
/* 鼠鼠消息气泡：绿色（微信对方） */
.chat-bubble.shushu {
  background: #95ec69;
  color: #262626;
  box-shadow: 0 4px 16px rgba(149,236,105,0.4);
}
/* 笔笔消息气泡：白色（微信自己） */
.chat-bubble.bibi {
  background: #ffffff;
  color: #262626;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border: 1.5px solid #f0f0f0;
}
/* 气泡三角箭头：指向下方头像 */
.bubble-arrow {
  position: absolute;
  bottom: -8px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  left: 50%;
  transform: translateX(-50%);
}
.chat-bubble.shushu .bubble-arrow {
  border-top: 10px solid #95ec69;
}
.chat-bubble.bibi .bubble-arrow {
  border-top: 10px solid #ffffff;
}
/* 打字中：显示三连点，隐藏消息 */
.bubble-typing-dots {
  display: none;
  letter-spacing: 3px;
  animation: typingDots 1.4s steps(4, end) infinite;
}
.chat-bubble.typing .bubble-msg { display: none; }
.chat-bubble.typing .bubble-typing-dots { display: inline; }
/* 显示消息 */
.chat-bubble.message .bubble-msg { display: inline; }
.chat-bubble.message .bubble-typing-dots { display: none; }
@keyframes bubblePopIn {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes typingDots {
  0%, 15% { content: ''; }
  30% { content: '.'; }
  50% { content: '..'; }
  70%, 100% { content: '...'; }
}#login-password {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  text-align: center;
  outline: none;
  transition: var(--transition);
  letter-spacing: 4px;
}
#login-password:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(96,165,250,0.15); }

#login-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-400), var(--rose-400));
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
#login-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(96,165,250,0.35); }
.login-hint { margin-top: 16px; font-size: 12px; color: var(--text-lighter); }

/* ==================== 顶部导航 ==================== */
#top-bar {
  position: sticky;
  top: 0;
  z-index: 100001;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
}
.top-left {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.love-counter {
  background: var(--blue-100);
  color: var(--blue-700);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}
.found-date {
  background: var(--gold-light);
  color: #92400e;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
}

/* 新手引导按钮（缩小版，在官网成立旁边） */
.btn-guide {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--blue-300);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  color: var(--blue-500);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  transition: all 0.25s;
  box-shadow: 0 1px 4px rgba(59,130,246,0.15);
  vertical-align: middle;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.btn-guide:hover {
  background: var(--blue-50);
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

/* 聊天室按钮专属 — 更大更显眼，手机友好 */
#btn-chatroom {
  width: 36px;
  height: 36px;
  font-size: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  color: white;
  box-shadow: 0 3px 12px rgba(102,126,234,0.5);
  position: relative;
  flex-shrink: 0;
  min-width: 36px;
  min-height: 36px;
}
#btn-chatroom:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(102,126,234,0.7);
}
#btn-chatroom:active {
  transform: scale(0.95);
}
.top-nicknames {
  grid-column: 2;
  justify-self: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.nick-shushu { color: var(--blue-600); }
.nick-bibi { color: var(--rose-500); }
.nick-and { color: var(--text-lighter); }

/* 节气动画小按钮 */
/* 聊天室小按钮（放在节气动画旁边） */
.btn-chat {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid #7dd3fc;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s;
  line-height: 1;
}
.btn-chat:hover {
  background: linear-gradient(135deg, #bae6fd, #7dd3fc);
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}

/* AI工具箱小按钮 */
.btn-toolbox {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s;
  line-height: 1;
}
.btn-toolbox:hover {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* ====== AI工具箱面板 ====== */
.toolbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 299;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.toolbox-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.toolbox-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  max-width: 440px;
  margin: 60px auto 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px 20px 0 0;
  z-index: 300;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.12);
}
.toolbox-panel.show {
  transform: translateY(0);
}
.toolbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  flex-shrink: 0;
}
.toolbox-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.toolbox-close:hover { background: var(--gray-200); }

.toolbox-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tb-tab {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tb-tab.active {
  color: var(--blue-600);
  border-bottom-color: var(--blue-400);
}
.tb-tab:hover { background: var(--blue-50); }

.toolbox-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.tb-content { display: none; }
.tb-content.active { display: block; }

/* 诊断页 */
.btn-diag-run {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 16px;
}
.btn-diag-run:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(99,102,241,0.4); }
.btn-diag-run:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.diag-result { font-size: 13px; }
.diag-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--gray-50);
  border-left: 3px solid var(--border);
}
.diag-item.pass { background: #f0fdf4; border-left-color: #22c55e; }
.diag-item.warn { background: #fffbeb; border-left-color: #f59e0b; }
.diag-item.fail { background: #fef2f2; border-left-color: #ef4444; }
.diag-icon { font-size: 18px; flex-shrink: 0; }
.diag-text { flex: 1; }
.diag-text strong { display: block; margin-bottom: 2px; }
.diag-text span { color: var(--text-light); font-size: 12px; }
.diag-fix {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 12px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.diag-fix:hover { background: var(--blue-200); }

/* 恢复出厂页 */
.reset-warning {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #991b1b;
}
.reset-warning p { margin: 0 0 8px; }
.reset-warning ul { margin: 0 0 8px; padding-left: 20px; }
.reset-warning li { margin-bottom: 3px; }
.btn-reset-run {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-reset-run:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(239,68,68,0.4); }

/* 快速导航页 */
.quicknav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
/* 防御性：隐藏空白格子，永远不显示空内容 */
.quicknav-grid > :empty,
.quick-nav-grid > :empty,
.quicknav-grid > button:empty,
.quick-nav-grid > button:empty,
.quicknav-grid > div:empty,
.quick-nav-grid > div:empty {
  display: none !important;
}
.qnav-btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--gray-50);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  color: var(--text);
}
.qnav-btn:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  transform: translateY(-1px);
}
.qnav-btn .qnav-emoji { margin-right: 5px; }

.top-right { grid-column: 3; justify-self: end; display: flex; gap: 8px; }
.btn-announcement {
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  color: var(--blue-600);
  font-weight: 600;
  transition: var(--transition);
}
.btn-announcement:hover { background: var(--blue-100); }
.btn-logout {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.btn-logout:hover { background: var(--rose-100-blue); }
.btn-settings {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: var(--transition);
}
.btn-settings:hover { background: var(--blue-50); }

/* ==================== 主内容区 ==================== */
#main-content { padding-bottom: 90px; max-width: 800px; margin: 0 auto; padding: 16px 16px 100px; }

.page-section {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  text-align: center;
  padding: 24px 0 16px;
  animation: fadeInDown 0.5s ease;
}

.section-header h2 { font-size: 24px; color: var(--blue-700); }
.section-header p { color: var(--text-light); font-size: 14px; margin-top: 4px; }

/* ==================== 首页横幅 ==================== */
.hero-banner {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(56,189,248,0.2);
}
.hero-banner::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: rgba(56,189,248,0.12);
  border-radius: 50%;
}
.hero-avatars { font-size: 48px; margin-bottom: 12px; display: flex; justify-content: center; align-items: center; gap: 12px; }
.hero-heart { font-size: 36px; animation: pulse 1.5s ease-in-out infinite; }
.hero-title {
  font-size: 38px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 8px;
  margin: 0 auto;
  display: block;
  width: 100%;
  background: linear-gradient(180deg,
    #fef3c7 0%,
    #fcd34d 15%,
    #f59e0b 30%,
    #d97706 45%,
    #92400e 60%,
    #b45309 75%,
    #fcd34d 90%,
    #fef3c7 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(245,158,11,0.6))
          drop-shadow(0 0 20px rgba(251,191,36,0.4))
          drop-shadow(0 0 40px rgba(245,158,11,0.25));
  animation: goldenShine 2.5s ease-in-out infinite alternate, pulsate 1.5s ease-in-out infinite;
}
@keyframes goldenShine {
  0% {
    filter: drop-shadow(0 2px 6px rgba(245,158,11,0.6))
            drop-shadow(0 0 20px rgba(251,191,36,0.4))
            drop-shadow(0 0 40px rgba(245,158,11,0.25));
  }
  100% {
    filter: drop-shadow(0 2px 8px rgba(245,158,11,0.8))
            drop-shadow(0 0 30px rgba(251,191,36,0.6))
            drop-shadow(0 0 60px rgba(245,158,11,0.4))
            drop-shadow(0 0 80px rgba(234,88,12,0.2));
  }
}
@keyframes pulsate { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.hero-date { color: rgba(255,255,255,0.85); font-size: 14px; margin-top: 4px; }

.hero-counter {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 20px 0 12px;
}
.counter-block {
  background: white;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 10px 16px;
  box-shadow: var(--shadow);
  min-width: 70px;
}
.counter-block span {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue-600);
  display: block;
}
.counter-block small { font-size: 11px; color: var(--text-lighter); }
.hero-caption { color: var(--text-light); font-size: 13px; font-style: italic; }

/* ==================== 早晚安问候卡 ==================== */
.greeting-card {
  margin: 12px auto 0;
  max-width: 520px;
  animation: greetingSlideIn 0.6s ease-out;
}
@keyframes greetingSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.greeting-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
.greeting-icon {
  font-size: 28px;
  animation: greetingPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes greetingPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.greeting-text-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.greeting-title {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0.5px;
}
.greeting-sub {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.greeting-user {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-500);
  background: rgba(59,130,246,0.1);
  padding: 4px 12px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* ==================== 恋爱里程碑 ==================== */
.milestone-banner {
  margin: 10px auto 0;
  max-width: 520px;
}
.milestone-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 13px;
  color: #374151;
}
.milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(96,165,250,0.12));
  color: var(--blue-600);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  animation: milestonePop 3s ease-in-out infinite;
}
@keyframes milestonePop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
.milestone-next {
  color: #6b7280;
  font-size: 12px;
}
.milestone-next strong {
  color: #f97316;
  font-size: 13px;
}

/* ==================== 今日情话装饰卡片 ==================== */
.love-quote-card {
  margin: 16px auto 0;
  max-width: 520px;
  position: relative;
  overflow: hidden;
}

.quote-card-inner {
  position: relative;
  background: linear-gradient(135deg,
    rgba(255,240,245,0.55) 0%,
    rgba(255,255,255,0.45) 40%,
    rgba(255,240,245,0.55) 100%
  );
  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  border: 1.5px solid rgba(255,182,193,0.35);
  border-radius: 20px;
  padding: 20px 24px 16px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(255,105,135,0.1), inset 0 1px 0 rgba(255,255,255,0.6);
  overflow: hidden;
}

/* 背景光晕 */
.quote-card-inner::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(255,105,135,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* 心跳容器 */
.quote-heart-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 6px;
}

.quote-heart {
  font-size: 36px;
  display: inline-block;
  animation: loveHeartBeat 1.2s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(255,105,135,0.4));
}

.quote-heart-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,105,135,0.25) 0%, transparent 70%);
  animation: heartPulseRing 1.2s ease-out infinite;
  pointer-events: none;
}

@keyframes loveHeartBeat {
  0%, 100% { transform: scale(1); }
  8% { transform: scale(1.25); }
  16% { transform: scale(1); }
  24% { transform: scale(1.18); }
  32% { transform: scale(1); }
}

@keyframes heartPulseRing {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* 分隔线 */
.quote-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 12px;
  max-width: 200px;
}

.quote-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #93c5fd, #3b82f6);
  flex-shrink: 0;
}

.quote-line {
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.35), transparent);
  border-radius: 1px;
}

/* 情话文字 */
.quote-text {
  font-size: 17px;
  font-weight: 600;
  color: #831843;
  line-height: 1.7;
  margin: 0 0 6px;
  padding: 0 4px;
  transition: opacity 0.5s ease, transform 0.5s ease;
  letter-spacing: 1px;
}

.quote-text.fade {
  opacity: 0;
  transform: translateY(8px);
}

.quote-author {
  font-size: 12px;
  color: #db2777;
  margin: 0 0 10px;
  font-style: italic;
  letter-spacing: 2px;
  transition: opacity 0.4s ease;
}

.quote-author.fade {
  opacity: 0;
}

/* 季节徽章 */
.quote-season-badge {
  display: inline-block;
  padding: 3px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #9d174d;
  background: linear-gradient(135deg, rgba(251,207,232,0.6), rgba(96,165,250,0.25));
  border: 1px solid rgba(59,130,246,0.2);
  margin-top: 2px;
  letter-spacing: 1px;
}

/* 浮动小心心 */
.quote-floating-hearts {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.quote-float-heart {
  position: absolute;
  bottom: -20px;
  font-size: 14px;
  animation: floatUpHeart 4s ease-in infinite;
  opacity: 0;
}

@keyframes floatUpHeart {
  0% { opacity: 0; transform: translateY(0) scale(0.5) rotate(0deg); }
  15% { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.2) rotate(var(--rotation)); }
}

/* 四季配色 */
body.season-spring .quote-card-inner {
  background: linear-gradient(135deg, rgba(255,240,245,0.6) 0%, rgba(255,255,255,0.5) 40%, rgba(255,228,240,0.55) 100%);
  border-color: rgba(251,113,133,0.35);
}

body.season-spring .quote-heart {
  filter: drop-shadow(0 2px 8px rgba(251,113,133,0.5));
}

body.season-summer .quote-card-inner {
  background: linear-gradient(135deg, rgba(240,249,255,0.6) 0%, rgba(255,255,255,0.5) 40%, rgba(224,242,254,0.55) 100%);
  border-color: rgba(56,189,248,0.35);
}

body.season-summer .quote-heart {
  filter: drop-shadow(0 2px 8px rgba(56,189,248,0.5));
}

body.season-summer .quote-season-badge {
  color: #0369a1;
  background: linear-gradient(135deg, rgba(224,242,254,0.7), rgba(56,189,248,0.25));
  border-color: rgba(56,189,248,0.3);
}

body.season-autumn .quote-card-inner {
  background: linear-gradient(135deg, rgba(255,247,237,0.6) 0%, rgba(255,255,255,0.5) 40%, rgba(255,237,213,0.55) 100%);
  border-color: rgba(251,146,60,0.35);
}

body.season-autumn .quote-heart {
  filter: drop-shadow(0 2px 8px rgba(251,146,60,0.5));
}

body.season-autumn .quote-season-badge {
  color: #9a3412;
  background: linear-gradient(135deg, rgba(255,237,213,0.7), rgba(251,146,60,0.25));
  border-color: rgba(251,146,60,0.3);
}

body.season-winter .quote-card-inner {
  background: linear-gradient(135deg, rgba(238,242,255,0.6) 0%, rgba(255,255,255,0.5) 40%, rgba(224,231,255,0.55) 100%);
  border-color: rgba(129,140,248,0.35);
}

body.season-winter .quote-heart {
  filter: drop-shadow(0 2px 8px rgba(129,140,248,0.5));
}

body.season-winter .quote-season-badge {
  color: #3730a3;
  background: linear-gradient(135deg, rgba(224,231,255,0.7), rgba(129,140,248,0.25));
  border-color: rgba(129,140,248,0.3);
}

/* ==================== 置顶公告 ==================== */

/* ==================== 置顶公告 ==================== */
.sticky-announcement {
  background: white;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--blue-400);
}
.announcement-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.announcement-icon { font-size: 18px; }
.announcement-header strong { font-size: 14px; color: var(--blue-700); }
.announcement-version {
  font-size: 11px;
  background: var(--blue-100);
  color: var(--blue-600);
  padding: 2px 8px;
  border-radius: 10px;
}
.btn-ann-detail {
  margin-left: auto;
  background: none;
  border: 1px solid var(--blue-300);
  color: var(--blue-500);
  padding: 4px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}
.btn-ann-detail:hover { background: var(--blue-50); }
.announcement-preview { font-size: 13px; color: var(--text-light); line-height: 1.5; }

/* ==================== 月度状态栏 ==================== */
.monthly-status {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.monthly-status h3 { font-size: 15px; margin-bottom: 12px; color: var(--text); }
.status-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.status-card {
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.shushu-card { background: #fff; border: 1px solid rgba(0,0,0,0.08); }
.bibi-card { background: #fff; border: 1px solid rgba(0,0,0,0.08); }
.status-card-header { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.shushu-card .status-card-header { color: var(--blue-600); }
.bibi-card .status-card-header { color: var(--rose-500); }
.status-card-body { font-size: 13px; color: var(--text); line-height: 1.5; }
.status-card-time { font-size: 11px; color: var(--text-lighter); margin-top: 6px; }
.btn-edit-monthly {
  margin-top: 12px;
  background: none;
  border: 1px dashed var(--blue-300);
  color: var(--blue-500);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  width: 100%;
  transition: var(--transition);
}
.btn-edit-monthly:hover { background: var(--blue-50); }

/* ==================== 快捷导航 ==================== */
.quick-nav { margin-bottom: 16px; }
.quick-nav h3 { font-size: 15px; margin-bottom: 12px; }
.quick-nav-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-nav-item {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.quick-nav-item:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.9);
}
.quick-nav-item .nav-item-icon { font-size: 28px; display: block; margin-bottom: 6px; }
.quick-nav-item .nav-item-label { font-size: 11px; color: var(--text-light); font-weight: 600; }
/* 永久防御：任何空内容的grid子元素都不显示 */
.quick-nav-grid > :empty,
.quick-nav-grid > button:empty,
.quicknav-grid > :empty,
.quicknav-grid > button:empty { display: none !important; }

/* ==================== 官宣文案 ==================== */
.official-statement {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-lighter);
  font-size: 12px;
  line-height: 2;
}
.official-statement .statement-heart { font-size: 24px; margin-top: 8px; }

/* ==================== 底部导航 ==================== */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(12,61,92,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(56,189,248,0.2);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px;
  z-index: 100;
}
.nav-item {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}
.nav-item.active { color: var(--blue-500); }
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  width: 20px;
  height: 3px;
  background: var(--blue-400);
  border-radius: 2px;
}
.nav-icon { font-size: 22px; }
.nav-label { font-size: 10px; color: #bae6fd; font-weight: 600; }
.nav-item.active .nav-label { color: var(--blue-500); }

/* 更多菜单 */
.more-menu {
  position: fixed;
  bottom: 80px;
  right: 16px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 101;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  max-width: 260px;
}
.more-menu.hidden {
  display: none !important;
}
.more-menu.show {
  display: grid !important;
}
.more-menu button {
  background: none;
  border: none;
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
  white-space: nowrap;
}
.more-menu button:hover { background: var(--blue-50); }

/* ==================== 通用标签栏 ==================== */
.tab-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
  color: var(--text-light);
}
.tab.active {
  background: var(--blue-500);
  color: white;
  border-color: var(--blue-500);
}
.tab:hover:not(.active) { border-color: var(--blue-300); }

/* ==================== 通用按钮 ==================== */
.btn-primary {
  background: linear-gradient(135deg, var(--blue-400), var(--rose-400));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(96,165,250,0.3); }
.btn-secondary {
  background: white;
  color: #3b82f6;
  border: 2px solid #bfdbfe;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.btn-secondary:hover { background: #eff6ff; border-color: #3b82f6; }
.btn-checkin {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  margin-top: 10px;
}
.btn-checkin:hover { background: var(--blue-600); }

/* ==================== 搜索栏 ==================== */
.search-bar { margin: 12px 0; }
.search-bar input {
  width: 100%;
  padding: 10px 16px;
  border: 2px solid #bfdbfe;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: rgba(255,255,255,0.95);
  color: #1a1a1a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.search-bar input:focus { border-color: #3b82f6; box-shadow: 0 2px 12px rgba(59,130,246,0.15); background: #ffffff; }

/* ==================== 留言墙 ==================== */
.message-composer {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.message-composer h3 { font-size: 15px; margin-bottom: 12px; }
.message-composer select,
.message-composer textarea,
.message-composer input {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 14px;
  border: 2px solid #bfdbfe;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
  background: rgba(255,255,255,0.95);
  color: #1a1a1a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.message-composer select:focus,
.message-composer textarea:focus,
.message-composer input:focus { border-color: #3b82f6; box-shadow: 0 2px 12px rgba(59,130,246,0.2); background: #ffffff; }
.message-composer textarea { resize: vertical; min-height: 80px; }

#future-options { background: var(--blue-50); padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 10px; }
#future-options label { font-size: 13px; color: var(--text); }

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.voice-recorder { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#voice-btn {
  background: var(--rose-50);
  border: 1px solid var(--rose-300);
  color: var(--rose-500);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  min-height: 36px;
}
#voice-btn:active { background: var(--rose-200); transform: scale(0.96); }
#voice-btn:hover { background: var(--rose-100-blue); }
#voice-status { color: var(--rose-500); font-weight: 600; font-size: 13px; }
#voice-preview { max-width: 200px; height: 32px; }
#voice-preview::-webkit-media-controls-panel { background: var(--rose-50); }
.composer-right { display: flex; gap: 8px; align-items: center; }
.composer-right select { width: auto; margin-bottom: 0; }

.message-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  position: relative;
  border-left: 4px solid var(--blue-300);
  transition: var(--transition);
}
.message-card.confession { border-left-color: var(--rose-400); }
.message-card.daily { border-left-color: var(--blue-300); }
.message-card.apology { border-left-color: var(--gold); }
.message-card.future { border-left-color: #a78bfa; }
.message-card.locked { opacity: 0.7; border-left-color: var(--text-lighter); background: #fafafa; }
.message-card.locked .msg-body { filter: blur(4px); user-select: none; }
.message-card .msg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.msg-author { font-weight: 700; font-size: 13px; }
.msg-time { font-size: 11px; color: var(--text-lighter); }
.msg-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-500);
}
.msg-body { font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.msg-voice audio { margin-top: 8px; width: 100%; max-width: 280px; height: 36px; }
.msg-voice audio::-webkit-media-controls-panel { background: #fafafa; }
.lock-badge {
  font-size: 12px;
  color: var(--text-lighter);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.unlock-btn {
  margin-top: 8px;
  background: var(--blue-400);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
}

/* ==================== 相册 ==================== */
.album-create {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* 存储空间指示条 */
.storage-bar {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--blue-50);
  border-radius: 8px;
}
.storage-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 4px;
}
.storage-track {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}
.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-300), var(--rose-400));
  border-radius: 3px;
  transition: width 0.5s;
}
.storage-fill.warn { background: linear-gradient(90deg, #f59e0b, #f97316); }
.storage-fill.danger { background: linear-gradient(90deg, #ef4444, #dc2626); }
.album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.album-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.album-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.album-cover {
  height: 140px;
  background: linear-gradient(135deg, var(--blue-200), var(--rose-200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}
.album-cover.daily { background: linear-gradient(135deg, #dbeafe, #fbcfe3); }
.album-cover.travel { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.album-cover.anniversary { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.album-cover.private { background: linear-gradient(135deg, #e9d5ff, #c4b5fd); }
.album-cover .lock-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
}
.album-info { padding: 12px; }
.album-info h4 { font-size: 14px; margin-bottom: 4px; }
.album-info p { font-size: 12px; color: var(--text-light); }
.album-photo-count { font-size: 11px; color: var(--text-lighter); }
.album-links { display: flex; gap: 8px; margin-top: 6px; }
.album-link {
  font-size: 11px;
  color: var(--blue-500);
  cursor: pointer;
  text-decoration: underline;
}
.album-modal-content { max-height: 70vh; overflow-y: auto; }
.album-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.album-photo {
  aspect-ratio: 1;
  background: var(--blue-50);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.album-photo.has-img { padding: 0; }
.album-photo.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.album-photo:hover { transform: scale(1.05); }
.album-photo .photo-del-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.55);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}
.album-photo:hover .photo-del-btn { opacity: 1; }
.album-add-photo { border: 2px dashed var(--blue-300); }

/* 上传按钮（大卡片） */
.album-upload-btn {
  border: 2px dashed var(--blue-400);
  background: var(--blue-50);
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.album-upload-btn:hover {
  background: var(--blue-100);
  border-color: var(--blue-500);
  transform: scale(1.03);
}
.upload-plus {
  font-size: 36px;
  color: var(--blue-500);
  font-weight: 300;
  line-height: 1;
}
.upload-label {
  font-size: 11px;
  color: var(--blue-600);
  font-weight: 600;
}

/* 快捷上传卡片 */
.album-add-card {
  border: 2px dashed var(--blue-300);
  cursor: pointer;
}
.album-add-card .album-cover { background: var(--blue-50); }
.add-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
}
.add-icon {
  font-size: 48px;
  color: var(--blue-400);
  font-weight: 200;
}

/* 相册封面显示真实照片 */
.album-cover.has-photo {
  padding: 0;
  position: relative;
}
.album-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

/* ==================== 约会打卡 ==================== */
.date-list { display: flex; flex-direction: column; gap: 12px; }
.date-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.date-card.checked { opacity: 0.8; background: #f0fdf4; border: 1px solid #bbf7d0; }
.date-card.checked .date-title { text-decoration: line-through; color: var(--text-lighter); }
.date-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.date-title { font-weight: 700; font-size: 15px; }
.date-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.date-tag.short { background: #dbeafe; color: #1d4ed8; }
.date-tag.long { background: #fef3c7; color: #92400e; }
.date-tag.special { background: #dbeafe; color: var(--blue-600); }
.date-info { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.date-votes { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.vote-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}
.vote-btn:hover { background: var(--blue-50); border-color: var(--blue-300); }
.vote-btn.voted { background: var(--blue-100); border-color: var(--blue-400); }
.checkin-date-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  transition: var(--transition);
}
.checkin-date-btn:hover { opacity: 0.9; }

/* ==================== 财务台账 ==================== */
.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.summary-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}
.summary-card .summary-amount { font-size: 20px; font-weight: 800; }
.summary-card .summary-label { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.summary-card.shared { color: var(--blue-600); }
.summary-card.personal { color: var(--rose-500); }
.summary-card.fund { color: #059669; }

.transaction-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.transport-summary {
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.transport-summary h4 { font-size: 14px; margin-bottom: 8px; color: var(--blue-600); }

.transaction-list { display: flex; flex-direction: column; gap: 8px; }
.transaction-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.transaction-card .trans-left { display: flex; flex-direction: column; gap: 2px; }
.transaction-card .trans-category { font-size: 11px; color: var(--text-lighter); }
.transaction-card .trans-amount { font-weight: 700; font-size: 15px; }
.transaction-card.shared .trans-amount { color: var(--blue-600); }
.transaction-card.personal .trans-amount { color: var(--rose-500); }
.transaction-card.fund .trans-amount { color: #059669; }

/* ==================== 约会计划表 ==================== */
.plan-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.plan-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.plan-card h4 { font-size: 15px; margin-bottom: 8px; }
.plan-details { font-size: 13px; color: var(--text-light); line-height: 1.8; }
.plan-details span { display: block; margin-bottom: 2px; }
.cancel-rules-box {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-top: 16px;
}
.cancel-rules-box h3 { font-size: 15px; margin-bottom: 12px; }
.rule-item { font-size: 13px; color: var(--text-light); padding: 6px 0; border-bottom: 1px solid var(--border); }
.rule-item:last-child { border-bottom: none; }

/* ==================== 纪念日倒计时 ==================== */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.countdown-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}
.countdown-card.urgent { border: 2px solid var(--rose-400); animation: urgentPulse 2s ease-in-out infinite; }
@keyframes urgentPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.2); } 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }
.countdown-card .cd-icon { font-size: 32px; margin-bottom: 8px; }
.countdown-card .cd-title { font-weight: 700; font-size: 14px; }
.countdown-card .cd-date { font-size: 12px; color: var(--text-light); margin: 4px 0; }
.countdown-card .cd-days { font-size: 28px; font-weight: 800; color: var(--blue-600); }
.countdown-card .cd-gift { font-size: 12px; color: var(--text-lighter); margin-top: 6px; }

/* ==================== 公约档案库 ==================== */
.convention-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.convention-item {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--blue-400);
  position: relative;
}
.convention-item .conv-version {
  font-size: 11px;
  background: var(--blue-100);
  color: var(--blue-600);
  padding: 2px 8px;
  border-radius: 8px;
  position: absolute;
  top: 12px;
  right: 12px;
}
.convention-item .conv-date { font-size: 12px; color: var(--text-lighter); margin-bottom: 4px; }
.convention-item .conv-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.convention-item .conv-content { font-size: 13px; color: var(--text); line-height: 1.6; }

/* ==================== 心愿兑换券 ==================== */
.voucher-create { margin-bottom: 16px; }
.voucher-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.voucher-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px dashed var(--blue-200);
  transition: var(--transition);
}
.voucher-card.used { opacity: 0.5; border-style: solid; border-color: #ddd; text-decoration: line-through; }
.voucher-card .voucher-icon { font-size: 32px; margin-bottom: 6px; }
.voucher-card .voucher-title { font-weight: 700; font-size: 14px; }
.voucher-card .voucher-from { font-size: 11px; color: var(--text-lighter); margin-top: 4px; }
.voucher-card .voucher-time { font-size: 11px; color: var(--text-lighter); }
.voucher-card .use-voucher-btn {
  margin-top: 8px;
  background: var(--blue-400);
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}
.voucher-card .use-voucher-btn:hover { background: var(--blue-500); }
.voucher-card.used .use-voucher-btn { background: var(--text-lighter); cursor: default; }

/* ==================== 双人成长打卡 ==================== */
.growth-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.growth-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.growth-card-header { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.growth-streak { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.growth-streak span { font-size: 20px; font-weight: 800; color: var(--blue-600); }
.growth-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 10px;
}
.growth-calendar .cal-day {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--blue-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.growth-calendar .cal-day.checked { background: var(--blue-400); color: white; }

/* ==================== 日常打卡 ==================== */
.daily-checkin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.daily-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.daily-card h3 { font-size: 15px; margin-bottom: 8px; }
.daily-status { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.daily-streak-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.streak-item {
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  box-shadow: var(--shadow);
}
.streak-item span { font-size: 18px; font-weight: 800; color: var(--blue-600); display: block; }
.unlock-rewards {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: var(--radius);
  padding: 16px;
}
.unlock-rewards h4 { font-size: 14px; margin-bottom: 8px; }
#reward-messages { font-size: 13px; color: var(--text); line-height: 1.8; }

/* ==================== 应急预案 ==================== */
.emergency-protocol {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.protocol-steps { margin-bottom: 20px; }
.protocol-step {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.protocol-step:last-child { border-bottom: none; }
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-500);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.step-content h4 { font-size: 14px; margin-bottom: 2px; }
.step-content p { font-size: 13px; color: var(--text-light); }

.emergency-timer {
  text-align: center;
  padding: 20px;
  background: var(--blue-50);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.emergency-timer h3 { font-size: 15px; margin-bottom: 10px; }
.timer-display {
  font-size: 48px;
  font-weight: 800;
  color: var(--blue-600);
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  margin-bottom: 12px;
}
.emergency-timer button { margin: 0 6px; }

.emergency-note { margin-bottom: 16px; }
.emergency-note textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #bfdbfe;
  border-radius: var(--radius-sm);
  font-family: inherit;
  resize: vertical;
  font-size: 13px;
  outline: none;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.95);
  color: #1a1a1a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.emergency-note textarea:focus { border-color: #3b82f6; box-shadow: 0 2px 12px rgba(59,130,246,0.2); background: #ffffff; }

.emergency-history-item {
  background: var(--blue-50);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

/* ==================== 年度总结 ==================== */
.yearly-content { text-align: center; padding: 24px; }
.yearly-summary {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-top: 16px;
  text-align: left;
}
.yearly-summary h3 { text-align: center; color: var(--blue-600); margin-bottom: 16px; }
.yearly-stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.yearly-stat .stat-value { font-weight: 700; color: var(--blue-600); }

/* ==================== 弹窗 ==================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-content {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-lighter);
  transition: var(--transition);
}
.modal-close:hover { color: var(--text); }

.announcement-modal { max-width: 700px; }
.announcement-modal h2 { color: var(--blue-700); margin-bottom: 16px; }
.announcement-modal h3 { margin: 16px 0 8px; color: var(--blue-600); }
.announcement-modal p, .announcement-modal li { font-size: 14px; line-height: 1.8; }
.announcement-modal ul { padding-left: 20px; }

/* 表单弹窗 */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: #1e40af; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #bfdbfe;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
  background: rgba(255,255,255,0.95);
  color: #1a1a1a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #3b82f6; box-shadow: 0 2px 12px rgba(59,130,246,0.2); background: #ffffff; }
.form-group textarea { resize: vertical; min-height: 60px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* 财务报告弹窗 */
.report-modal { max-width: 700px; }
.report-section { margin-bottom: 20px; }
.report-section h3 { font-size: 15px; color: var(--blue-600); margin-bottom: 8px; }
.report-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.report-row .report-val { font-weight: 700; }
.report-chart-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--blue-200);
  margin-top: 4px;
}
.report-chart-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--blue-400), var(--rose-400));
}

/* ==================== 响应式 ==================== */
@media (max-width: 640px) {
  .status-cards { grid-template-columns: 1fr; }
  .quick-nav-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-counter { gap: 8px; }
  .counter-block { padding: 8px 10px; min-width: 56px; }
  .counter-block span { font-size: 22px; }
  .finance-summary { grid-template-columns: repeat(3, 1fr); }
  .album-grid { grid-template-columns: repeat(2, 1fr); }
  .countdown-grid { grid-template-columns: 1fr; }
  .daily-streak-bar { grid-template-columns: repeat(2, 1fr); }
  .top-left { font-size: 11px; }
  .top-nicknames { font-size: 13px; }
  .voucher-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-row { max-width: 100%; padding: 0 6px; gap: 6px; }
  .season-calendar-card { flex: 1; max-width: none; }
  .calendar-header { padding: 6px 8px 3px; font-size: 10px; }
  .cal-month-label { font-size: 10px; }
  .cal-season-badge { font-size: 7px; }
  .calendar-body { padding: 4px 6px 6px; }
  .cal-weekdays { font-size: 9px; margin-bottom: 1px; }
  .cal-days { gap: 1px; }
  .cal-day { width: 20px; height: 20px; font-size: 10px; }
  .weather-card { flex: 1; max-width: none; }
  .weather-header { padding: 6px 8px 3px; font-size: 10px; }
  .weather-body { padding: 6px 8px 8px; }
  .weather-icon { font-size: 24px; }
  .weather-temp { font-size: 24px; }
  .weather-details { gap: 6px; }
  .wd-value { font-size: 10px; }
  .wd-label { font-size: 8px; }
}

@media (min-width: 768px) {
  #main-content { max-width: 900px; }
  .quick-nav-grid { grid-template-columns: repeat(6, 1fr); }
  .quicknav-grid { grid-template-columns: repeat(4, 1fr); }
  .album-grid { grid-template-columns: repeat(3, 1fr); }
  .countdown-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-600);
  color: white;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ==================== 登录成功动画 ==================== */
#love-animation {
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
#love-animation.show {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
  display: block;
}
#love-animation.fadeout {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.love-anim-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fde2ef 0%, #fbcfe3 25%, #93c5fd 50%, #60a5fa 75%, #fde68a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.love-anim-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.anim-heart {
  position: absolute;
  font-size: 28px;
  animation: heartFloat 4s ease-in-out infinite;
  opacity: 0;
}
@keyframes heartFloat {
  0%   { opacity: 0; transform: translateY(100vh) rotate(0deg) scale(0.5); }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10vh) rotate(360deg) scale(1.2); }
}
.anim-heart:nth-child(1)  { left: 5%;  animation-delay: 0s; animation-duration: 3.5s; }
.anim-heart:nth-child(2)  { left: 15%; animation-delay: 0.3s; animation-duration: 3.2s; }
.anim-heart:nth-child(3)  { left: 25%; animation-delay: 0.6s; animation-duration: 3.8s; }
.anim-heart:nth-child(4)  { left: 35%; animation-delay: 0.2s; animation-duration: 3.0s; }
.anim-heart:nth-child(5)  { left: 45%; animation-delay: 0.5s; animation-duration: 3.6s; }
.anim-heart:nth-child(6)  { left: 55%; animation-delay: 0.1s; animation-duration: 3.3s; }
.anim-heart:nth-child(7)  { left: 65%; animation-delay: 0.7s; animation-duration: 3.9s; }
.anim-heart:nth-child(8)  { left: 75%; animation-delay: 0.4s; animation-duration: 3.1s; }
.anim-heart:nth-child(9)  { left: 85%; animation-delay: 0.8s; animation-duration: 3.4s; }
.anim-heart:nth-child(10) { left: 92%; animation-delay: 0.35s; animation-duration: 3.7s; }

/* ---- 角色舞台（Flexbox 完美对齐） ---- */
.love-anim-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1100px;
  z-index: 10;
  padding: 0 40px;
}

.anim-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  opacity: 0;
  animation: slotSlideIn 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) 0.2s forwards;
}
.anim-slot svg { display: block; }

.anim-slot-left {
  animation-name: slotSlideFromLeft;
  transform: translateX(-300px);
}
.anim-slot-right {
  animation-name: slotSlideFromRight;
  transform: translateX(300px);
}

@keyframes slotSlideFromLeft {
  0%   { opacity: 0; transform: translateX(-300px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes slotSlideFromRight {
  0%   { opacity: 0; transform: translateX(300px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ---- 角色标签 ---- */
.anim-slot .anim-label {
  font-size: 14px;
  font-weight: 700;
  color: #1d4ed8;
  margin-top: 4px;
}

/* ---- 中央大爱心（CSS纯代码完美心形） ---- */
.center-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  animation: heartCenterIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.15s forwards;
}

.heart-shape {
  width: 110px;
  height: 110px;
  position: relative;
  background: linear-gradient(135deg, #ff1744, #ff4081, #d500f9, #448aff, #ff6d00);
  background-size: 400% 400%;
  transform: rotate(45deg);
  animation: heartPulse 1.5s ease-in-out 0.9s infinite,
             heartShift 4s ease 0.9s infinite;
}

/* 两个圆形拼成心形顶部 */
.heart-shape::before,
.heart-shape::after {
  content: '';
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff1744, #ff4081, #d500f9, #448aff, #ff6d00);
  background-size: 400% 400%;
  animation: heartShift 4s ease infinite;
}

.heart-shape::before {
  left: 0;
  top: -55px;
}

.heart-shape::after {
  left: -55px;
  top: 0;
}

/* 整体发光 */
.center-heart::after {
  content: '';
  position: absolute;
  top: -30px; left: -30px;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,64,129,0.3) 0%, transparent 70%);
  animation: heartGlowPulse 1.5s ease-in-out 0.9s infinite;
  pointer-events: none;
}

@keyframes heartShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes heartGlowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.2); }
}

@keyframes heartCenterIn {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
  50%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes heartPulse {
  0%, 100% { transform: rotate(45deg) scale(1); }
  50%      { transform: rotate(45deg) scale(1.06); }
}

/* ---- 心形灰飞烟灭粒子容器 ---- */
.heart-dust {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}

.heart-dust-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  opacity: 0;
}

/* ---- 奔跑动画 ---- */
.love-animation.show .anim-slot { opacity: 1; }

.love-animation.run .anim-slot-left {
  animation: runFromLeft 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
  transform: translateX(-300px);
}

.love-animation.run .anim-slot-right {
  animation: runFromRight 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
  transform: translateX(300px);
}

@keyframes runFromLeft {
  0%   { opacity: 1; transform: translateX(-300px) scale(1); }
  15%  { transform: translateX(-220px) scale(1) translateY(-8px); }
  30%  { transform: translateX(-140px) scale(1) translateY(0); }
  45%  { transform: translateX(-80px) scale(1.05) translateY(-4px); }
  60%  { transform: translateX(-30px) scale(1.1) translateY(0); }
  80%  { transform: translateX(-5px) scale(1.15) translateY(-2px); }
  100% { opacity: 1; transform: translateX(0px) scale(1.2); }
}

@keyframes runFromRight {
  0%   { opacity: 1; transform: translateX(300px) scale(1); }
  15%  { transform: translateX(220px) scale(1) translateY(-6px); }
  30%  { transform: translateX(140px) scale(1) translateY(0); }
  45%  { transform: translateX(80px) scale(1.05) translateY(-4px); }
  60%  { transform: translateX(30px) scale(1.1) translateY(0); }
  80%  { transform: translateX(5px) scale(1.15) translateY(-2px); }
  100% { opacity: 1; transform: translateX(0px) scale(1.2); }
}

/* ---- 拥抱状态 ---- */
.love-animation.hug .anim-slot-left {
  animation: none !important;
  transform: translateX(30px) scale(1.2);
  z-index: 3;
}

.love-animation.hug .anim-slot-right {
  animation: none !important;
  transform: translateX(-30px) scale(1.2);
  z-index: 2;
}

/* ---- 爱心消失状态 ---- */
.center-heart.dusting .heart-shape {
  animation: heartDustOut 0.8s ease-in forwards;
}

@keyframes heartDustOut {
  0%   { opacity: 1; transform: rotate(45deg) scale(1); filter: blur(0px); }
  50%  { opacity: 0.5; transform: rotate(45deg) scale(0.7); filter: blur(4px); }
  100% { opacity: 0; transform: rotate(45deg) scale(0.2); filter: blur(12px); }
}

/* ---- 爱心重新出现 ---- */
.center-heart.reborn .heart-shape {
  animation: heartReborn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s forwards;
}

@keyframes heartReborn {
  0%   { opacity: 0; transform: rotate(45deg) scale(0.01); filter: blur(12px); }
  50%  { opacity: 0.6; transform: rotate(45deg) scale(1.2); filter: blur(2px); }
  100% { opacity: 1; transform: rotate(45deg) scale(1); filter: blur(0px); }
}

/* ---- 最终定格：爱心明显 ---- */
.love-animation.freeze .center-heart.reborn .heart-shape {
  animation: heartFreeze 0.5s ease-out forwards;
}

@keyframes heartFreeze {
  0%   { transform: rotate(45deg) scale(1); }
  100% { transform: rotate(45deg) scale(1.05); }
}

/* ---- 全屏烟花容器 ---- */
.love-anim-fireworks {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  overflow: hidden;
}

.fw-full {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  opacity: 0;
  animation: fwFullBurst 1.2s ease-out forwards;
}

@keyframes fwFullBurst {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  30%  { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1.4); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.1); }
}

/* 条纹烟花粒子 */
.fw-streak {
  position: absolute;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: fwStreakBurst 1.0s ease-out forwards;
}

@keyframes fwStreakBurst {
  0%   { opacity: 1; transform: translate(0, 0) scaleY(1) rotate(var(--rot)); }
  40%  { opacity: 1; transform: translate(var(--dx), var(--dy)) scaleY(2) rotate(var(--rot)); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scaleY(0.5) rotate(var(--rot)); }
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 600px) {
  .love-anim-stage {
    padding: 0 12px;
    max-width: 100%;
  }

  .anim-slot-left svg {
    width: 100px !important;
    height: auto !important;
  }
  .anim-slot-right svg {
    width: 110px !important;
    height: auto !important;
  }

  .anim-slot .anim-label {
    font-size: 11px;
  }

  /* 移动端入场动画位移减小 */
  .anim-slot-left {
    transform: translateX(-120px);
  }
  .anim-slot-right {
    transform: translateX(120px);
  }

  @keyframes slotSlideFromLeft {
    0%   { opacity: 0; transform: translateX(-120px); }
    100% { opacity: 1; transform: translateX(0); }
  }
  @keyframes slotSlideFromRight {
    0%   { opacity: 0; transform: translateX(120px); }
    100% { opacity: 1; transform: translateX(0); }
  }

  .center-heart { transform: translate(-50%, -50%) scale(0.55); }
  @keyframes heartCenterIn {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.055); }
    50%  { opacity: 1; transform: translate(-50%, -50%) scale(0.63); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(0.55); }
  }
}

/* ==================== PWA 安装横幅 ==================== */
#pwa-install-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 9990;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
#pwa-install-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}
.pwa-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
  padding: 14px 20px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
  font-size: 14px;
  max-width: 90vw;
  white-space: nowrap;
}
.btn-pwa-install {
  background: white;
  color: #3b82f6;
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-pwa-install:active {
  transform: scale(0.95);
}
.btn-pwa-close {
  background: rgba(255,255,255,0.3);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==================== 全屏照片查看器 ==================== */
.photo-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-viewer img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.photo-viewer-close {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 36px;
  color: white;
  cursor: pointer;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.photo-viewer-close:hover { opacity: 1; }

.photo-viewer-prev,
.photo-viewer-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  color: white;
  cursor: pointer;
  z-index: 10;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity 0.2s;
  user-select: none;
}
.photo-viewer-prev:hover,
.photo-viewer-next:hover { opacity: 1; }
.photo-viewer-prev { left: 16px; }
.photo-viewer-next { right: 16px; }

.photo-viewer-actions {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}
.btn-photo-delete {
  background: rgba(239,68,68,0.85);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-photo-delete:hover { background: #ef4444; }

@media (max-width: 600px) {
  .photo-viewer-prev,
  .photo-viewer-next {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  .photo-viewer-prev { left: 8px; }
  .photo-viewer-next { right: 8px; }
  .photo-viewer img {
    max-width: 95vw;
    max-height: 75vh;
  }
}

/* ==================== 🍾 漂流瓶 ==================== */
/* ==================== 🍾 漂流瓶 v2 ==================== */

/* 统计卡片 */
.drift-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.drift-stat-card {
  flex: 1;
  min-width: 88px;
  max-width: 130px;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border-radius: 16px;
  padding: 14px 12px 10px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(14,165,233,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dst-icon  { font-size: 22px; }
.dst-num   { font-size: 24px; font-weight: 800; color: #0369a1; line-height: 1; }
.dst-label { font-size: 11px; color: #0284c7; margin-top: 2px; }

/* 海洋 Canvas 容器 */
.drift-ocean-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 30px rgba(14,165,233,0.2);
  cursor: pointer;
  background: linear-gradient(180deg, #93c5fd 0%, #38bdf8 40%, #0ea5e9 70%, #0369a1 100%);
  margin-bottom: 14px;
}
#drift-ocean {
  width: 100%;
  display: block;
  border-radius: 20px;
  min-height: 200px;
}

/* ＋ 悬浮写信按钮 */
.drift-fab {
  position: absolute;
  bottom: 14px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #ef4444);
  border: none;
  box-shadow: 0 4px 18px rgba(59,130,246,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  transition: transform 0.18s, box-shadow 0.18s;
  z-index: 10;
  line-height: 1;
}
.drift-fab:hover  { transform: scale(1.12); box-shadow: 0 6px 24px rgba(59,130,246,0.65); }
.drift-fab:active { transform: scale(0.94); }
.drift-fab span   { margin-top: -2px; }

/* 操作按钮 */
.drift-actions { display: flex; justify-content: center; margin-bottom: 18px; }
.btn-catch-bottle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 36px;
  border-radius: 50px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(168,85,247,0.35);
  transition: transform 0.18s, box-shadow 0.18s;
  letter-spacing: 0.03em;
}
.btn-catch-bottle:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(168,85,247,0.45); }
.btn-catch-bottle:active { transform: scale(0.96); }

/* ===== 漂流瓶动画效果 ===== */
@keyframes bottleFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes bottleFly {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(200vw, -100vh) scale(0.3) rotate(720deg); opacity: 0; }
}

@keyframes celebrationParticle {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes fadeInUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.floating-bottle {
  position: absolute;
  font-size: 28px;
  animation: bottleFloat 4s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.2s;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.floating-bottle:hover {
  transform: scale(1.2);
}

.bottle-fly-animation {
  position: fixed;
  font-size: 48px;
  z-index: 100000;
  pointer-events: none;
  animation: bottleFly 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.celebration-particle {
  position: fixed;
  font-size: 24px;
  pointer-events: none;
  z-index: 100001;
  animation: celebrationParticle 1.5s ease-out forwards;
}

/* 瓶子类型按钮悬停动画 */
.bottle-type-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottle-type-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
  border-color: #3b82f6 !important;
}

.bottle-type-btn:active {
  transform: translateY(0) scale(0.95);
}

/* 统计卡片动画 */
.drift-stat-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drift-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

/* 标签页 */
.drift-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0;
}
.drift-tab {
  padding: 8px 20px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 0;
  transition: color 0.15s, border-color 0.15s;
}
.drift-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

/* 列表 */
.drift-list { margin-bottom: 20px; min-height: 60px; }
.drift-empty {
  text-align: center;
  color: #9ca3af;
  padding: 28px 16px;
  font-size: 14px;
  background: #f9fafb;
  border-radius: 16px;
  line-height: 1.8;
}
.drift-list-item {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 14px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: driftFadeIn 0.35s ease;
  border-left: 4px solid #bae6fd;
}
.drift-list-item.caught { border-left-color: #93c5fd; }
.drift-list-item.drifting { border-left-color: #7dd3fc; }
@keyframes driftFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dli-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 44px;
}
.dli-avatar { font-size: 26px; line-height: 1; }
.dli-status { font-size: 10px; color: #6b7280; white-space: nowrap; }
.dli-body   { flex: 1; min-width: 0; }
.dli-title  { font-weight: 700; font-size: 13px; color: var(--blue-600); margin-bottom: 3px; }
.dli-msg    { font-size: 14px; color: var(--text); line-height: 1.6; word-break: break-word; }
.dli-time   { font-size: 11px; color: var(--text-lighter); margin-top: 5px; }
.dli-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #d1d5db;
  padding: 2px 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.dli-delete:hover { color: #ef4444; }

/* 爱心弹窗 */
.bottle-catch-reveal {
  text-align: center;
  position: relative;
  overflow: visible;
  padding-top: 10px;
}
.bottle-catch-hearts {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.bottle-heart-particle {
  position: absolute;
  top: 80%;
  animation: heartFloat 2.2s ease-out forwards;
  display: inline-block;
}
@keyframes heartFloat {
  0%   { transform: translateY(0) scale(0.8); opacity: 1; }
  80%  { opacity: 0.8; }
  100% { transform: translateY(-260px) scale(1.2) rotate(15deg); opacity: 0; }
}
.bottle-catch-icon    { font-size: 60px; margin-bottom: 8px; animation: bottlePop 0.6s cubic-bezier(0.175,0.885,0.32,1.275); }
.bottle-catch-heading { margin: 0 0 6px; font-size: 20px; color: #3b82f6; }
.bottle-catch-content {
  background: linear-gradient(135deg, #fdf4ff, #dbeafe);
  border-radius: 18px;
  padding: 20px 18px;
  margin-top: 10px;
  border: 1.5px solid #93c5fd;
}
.bottle-catch-avatar  { font-size: 36px; margin-bottom: 10px; }
.bottle-catch-msg     { font-size: 16px; line-height: 1.8; color: #831843; font-style: italic; }
.bottle-catch-from    { font-size: 13px; color: #9d174d; margin-top: 12px; font-weight: 600; }
.bottle-modal-title   { font-size: 15px; color: #1d4ed8; font-weight: 700; margin: -4px 0 8px; }

/* 投瓶飞翔动画 */
@keyframes bottleThrow {
  0%   { transform: translate(-50%,-50%) scale(1) rotate(0deg); opacity: 1; }
  60%  { transform: translate(-50%,-180%) scale(1.3) rotate(-30deg); opacity: 1; }
  100% { transform: translate(-50%,-320%) scale(0.4) rotate(-60deg); opacity: 0; }
}
@keyframes bottlePop {
  0%   { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* 旧有兼容 */
.drift-container { max-width: 900px; margin: 0 auto; }
.drift-stat { flex:1; min-width:100px; background:linear-gradient(135deg,#e0f2fe,#bae6fd); border-radius:14px; padding:12px 16px; text-align:center; }
.drift-stat span { display:block; font-size:12px; color:#0284c7; margin-bottom:4px; }
.drift-stat b    { font-size:22px; color:#0369a1; }
.btn-drift { font-size:15px; padding:12px 28px; border-radius:30px; font-weight:700; }
.drift-history { margin-top:20px; max-height:300px; overflow-y:auto; }
.drift-history-item { background:var(--bg-card); border-radius:14px; padding:14px 16px; margin-bottom:10px; box-shadow:var(--shadow); display:flex; align-items:center; gap:12px; }
.drift-history-avatar { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.drift-history-avatar.shushu { background:#fef3c7; }
.drift-history-avatar.bibi   { background:#dbeafe; }
.drift-history-body  { flex:1; }
.drift-history-author{ font-weight:700; font-size:13px; }
.drift-history-msg   { font-size:14px; color:var(--text); margin-top:2px; }
.drift-history-time  { font-size:11px; color:var(--text-lighter); }
.bottle-reveal { text-align:center; animation:bottlePop 0.6s cubic-bezier(0.175,0.885,0.32,1.275); }
.bottle-icon   { font-size:64px; margin-bottom:12px; }
.bottle-msg    { background:linear-gradient(135deg,#fef3c7,#fde68a); border-radius:16px; padding:20px; font-size:16px; line-height:1.8; color:#92400e; }

/* ==================== 🗺️ 恋爱大地图 ==================== */
.adventure-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 4px;
}
.adventure-header {
  background: linear-gradient(135deg, #1e1b4b, #312e81, #4338ca);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 16px;
  color: white;
  box-shadow: 0 6px 24px rgba(67,56,202,0.3);
}

#adventure-canvas {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 6px 30px rgba(67,56,202,0.2);
  cursor: pointer;
}
.adventure-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-light);
}
.adventure-quests {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.quest-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid #d1d5db;
  transition: all 0.3s;
  cursor: pointer;
}
.quest-card.unlocked {
  border-left-color: #fbbf24;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.quest-card.completed {
  border-left-color: #22c55e;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  opacity: 0.7;
}
.quest-card.current {
  border-left-color: #60a5fa;
  background: linear-gradient(135deg, #fef1f7, #dbeafe);
  animation: questPulse 2s ease-in-out infinite;
}
@keyframes questPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(96,165,250,0.2); }
  50% { box-shadow: 0 2px 20px rgba(96,165,250,0.5); }
}
.quest-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.quest-desc { font-size: 12px; color: var(--text-light); }
.quest-reward { margin-top: 8px; font-size: 11px; color: #f59e0b; font-weight: 600; }
.quest-btn {
  margin-top: 8px;
  padding: 6px 14px;
  border: none;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.quest-btn.claim { background: #fbbf24; color: #1e1b4b; }
.quest-btn.claim:hover { background: #f59e0b; transform: scale(1.05); }
.quest-btn.done { background: #d1d5db; color: #6b7280; cursor: default; }

/* ==================== 移动端适配补充 ==================== */
@media (max-width: 600px) {
  .drift-stats { gap: 8px; }
  .drift-stat { padding: 8px 10px; }
  .drift-stat b { font-size: 18px; }
  .adventure-quests { grid-template-columns: 1fr; }
}


/* ==================== 情绪天气台 ==================== */
.mood-container { max-width: 700px; margin: 0 auto; }
.mood-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.mood-card {
  background: var(--bg-card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); text-align: center;
}
.mood-card h3 { font-size: 15px; margin-bottom: 10px; }
.mood-avatar { font-size: 48px; margin-bottom: 8px; }
.mood-display { font-size: 24px; font-weight: 700; margin-bottom: 14px; padding: 10px; border-radius: 12px; }
.shushu-mood .mood-display { background: #fef3c7; color: #92400e; }
.bibi-mood .mood-display { background: #dbeafe; color: #9d174d; }
.mood-emoji-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.mood-btn {
  padding: 10px 6px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-size: 13px; transition: all 0.2s;
  font-weight: 600; line-height: 1.2;
}
.mood-btn:hover { border-color: #60a5fa; background: #fef1f7; transform: translateY(-2px); }
.mood-btn.active { border-color: #3b82f6; background: #fde2ef; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.mood-weather-display {
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
  border-radius: var(--radius); padding: 30px; text-align: center; margin-bottom: 20px;
}
.mood-sky { font-size: 64px; margin-bottom: 10px; }
.mood-weather-display p { font-size: 18px; font-weight: 600; color: #78350f; }
.mood-history { background: var(--bg-card); border-radius: var(--radius); padding: 16px; }
.mood-history h4 { margin-bottom: 10px; }
#mood-week-chart { display: flex; gap: 4px; min-height: 60px; align-items: flex-end; }
.mood-day-bar {
  flex: 1; background: #fbcfe3; border-radius: 4px 4px 0 0;
  min-height: 10px; transition: height 0.5s; position: relative;
}
.mood-day-bar span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; white-space: nowrap; }

/* ==================== 盲盒日历 ==================== */
.blindbox-container { max-width: 500px; margin: 0 auto; text-align: center; }
.blindbox-box { cursor: pointer; margin: 20px auto 30px; }
.blindbox-3d { perspective: 500px; margin-bottom: 10px; }
.blindbox-lid {
  font-size: 80px; animation: blindboxBounce 1.5s ease-in-out infinite;
  transition: transform 0.6s, opacity 0.4s;
}
@keyframes blindboxBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(-5deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-8px) rotate(5deg); }
}
.blindbox-lid.open { animation: none; transform: translateY(-60px) rotate(20deg); opacity: 0; }
.blindbox-body { font-size: 60px; }
.blindbox-box p { font-size: 14px; color: var(--text-light); }
.blindbox-result {
  background: var(--bg-card); border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow-lg); margin-bottom: 20px;
}
.blindbox-task-icon { font-size: 56px; margin-bottom: 10px; }
.blindbox-result h3 { font-size: 20px; margin-bottom: 8px; color: #3b82f6; }
.blindbox-result p { font-size: 15px; color: var(--text-light); margin-bottom: 12px; }
.blindbox-task-reward { font-size: 14px; font-weight: 700; color: #f59e0b; margin-bottom: 16px; }
.blindbox-history { text-align: left; }
.blindbox-history h4 { margin-bottom: 10px; }
.blindbox-task-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--bg-card); border-radius: var(--radius-sm); margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.blindbox-task-item .task-icon { font-size: 24px; }
.blindbox-task-item .task-info { flex: 1; }
.blindbox-task-item .task-info .task-name { font-weight: 600; font-size: 14px; }
.blindbox-task-item .task-info .task-date { font-size: 11px; color: var(--text-lighter); }
.blindbox-task-item .task-status {
  padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700;
}
.blindbox-task-item .task-status.done { background: #dcfce7; color: #166534; }
.blindbox-task-item .task-status.pending { background: #fef3c7; color: #92400e; }

/* ==================== 默契度大考验 ==================== */
.quiz-container { max-width: 550px; margin: 0 auto; text-align: center; }
.quiz-score-display { margin-bottom: 20px; }
.quiz-score-circle { position: relative; width: 140px; height: 140px; margin: 0 auto 8px; }
.quiz-score-circle svg { width: 100%; height: 100%; }
.quiz-score-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 28px; font-weight: 800; color: #3b82f6; }
.quiz-score-text small { font-size: 14px; }
#quiz-level-text { font-size: 14px; color: var(--text-light); }
.quiz-question-card {
  background: var(--bg-card); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.quiz-round { font-size: 13px; color: var(--text-lighter); margin-bottom: 8px; }
.quiz-question-card h3 { font-size: 18px; margin-bottom: 16px; color: #1e1b4b; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  padding: 14px 18px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-size: 15px; text-align: left;
  transition: all 0.2s; font-weight: 500;
}
.quiz-option:hover { border-color: #60a5fa; background: #fef1f7; }
.quiz-option.correct { border-color: #22c55e; background: #dcfce7; color: #166534; }
.quiz-option.wrong { border-color: #ef4444; background: #fef2f2; color: #991b1b; }
.quiz-select-user { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 16px; }
.quiz-select-user p { font-size: 14px; color: var(--text-light); }
.quiz-user-btn {
  padding: 8px 16px; border: 2px solid var(--border); border-radius: 20px;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all 0.2s;
}
.quiz-user-btn.active { border-color: #3b82f6; background: #fde2ef; }
#quiz-start-btn { margin-top: 10px; }

/* ==================== 年度愿望清单 ==================== */
.wishlist-container { max-width: 600px; margin: 0 auto; }
.wishlist-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.wishlist-progress-bar { flex: 1; height: 14px; background: #dbeafe; border-radius: 7px; overflow: hidden; }
.wishlist-progress-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #f97316); border-radius: 7px; transition: width 0.5s; width: 0%; }
.wishlist-progress span { font-size: 14px; font-weight: 600; white-space: nowrap; }
.wishlist-add { display: flex; gap: 10px; margin-bottom: 14px; }
.wishlist-add input { flex: 1; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.wishlist-filter { display: flex; gap: 8px; margin-bottom: 14px; }
.wishlist-filter .tab { padding: 6px 14px; border: none; background: #f3f4f6; border-radius: 16px; cursor: pointer; font-size: 13px; font-weight: 600; }
.wishlist-filter .tab.active { background: #3b82f6; color: #fff; }
.wishlist-grid { display: flex; flex-direction: column; gap: 8px; }
.wish-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--bg-card); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  cursor: pointer; transition: all 0.2s;
}
.wish-item:hover { transform: translateX(4px); }
.wish-item.done { opacity: 0.6; }
.wish-item .wish-checkbox {
  width: 24px; height: 24px; border: 2px solid #d1d5db; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.2s; flex-shrink: 0;
}
.wish-item.done .wish-checkbox { background: #22c55e; border-color: #22c55e; }
.wish-item .wish-text { flex: 1; font-size: 14px; }
.wish-item.done .wish-text { text-decoration: line-through; color: #9ca3af; }
.wish-item .wish-date { font-size: 11px; color: var(--text-lighter); white-space: nowrap; }
.wish-item .wish-delete { color: #ef4444; cursor: pointer; font-size: 16px; opacity: 0; transition: opacity 0.2s; }
.wish-item:hover .wish-delete { opacity: 1; }

/* ==================== 约会基金+种树 ==================== */
.fundtree-container { max-width: 600px; margin: 0 auto; }
.fundtree-goal { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.fundtree-goal h3 { font-size: 16px; white-space: nowrap; }
.fundtree-goal input { width: 140px; padding: 8px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 16px; }
.fund-goal-unit { font-weight: 700; color: var(--text-light); }
.fundtree-progress { margin-bottom: 20px; }
.fundtree-bar { height: 18px; background: #dbeafe; border-radius: 9px; overflow: hidden; margin-bottom: 8px; }
.fundtree-bar-fill {
  height: 100%; background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 9px; transition: width 0.6s; width: 0%;
}
.fundtree-stats { display: flex; justify-content: space-between; font-size: 13px; }
.fundtree-tree {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 50%, #f3e8ff 100%);
  border-radius: var(--radius); padding: 30px 20px 20px; text-align: center; margin-bottom: 20px;
  min-height: 200px;
}
.tree-stage { font-size: 48px; margin-bottom: 8px; }
.tree-stage-desc { font-size: 15px; font-weight: 600; color: #1e40af; }
.tree-soil { position: relative; height: 120px; margin-top: 10px; }
.tree-trunk {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 12px; background: #8b5e3c; border-radius: 3px; transition: height 0.6s;
  height: 0px;
}
.tree-leaves {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-radius: 50%; transition: all 0.6s;
  background: radial-gradient(circle, #22c55e, #16a34a);
}
.tree-fruits {
  position: absolute; display: flex; gap: 6px; justify-content: center; width: 100%;
  font-size: 20px; bottom: 10px;
}
.fundtree-add { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.fundtree-add input { flex: 1; min-width: 100px; padding: 10px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.fundtree-calc {
  background: #fffbeb; border: 2px solid #fde68a; border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}
.fundtree-calc h4 { margin-bottom: 10px; }
.fundtree-calc input { width: 150px; padding: 8px 12px; border: 2px solid #fde68a; border-radius: var(--radius-sm); margin-right: 8px; font-size: 14px; }
.calc-result { margin-top: 10px; font-size: 14px; font-weight: 600; color: #92400e; }
.fundtree-history h4 { margin-bottom: 10px; }
.fund-record {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--bg-card); border-radius: var(--radius-sm);
  margin-bottom: 6px; box-shadow: var(--shadow); font-size: 13px;
}

/* ==================== 成就勋章墙 ==================== */
.achievements-container { max-width: 650px; margin: 0 auto; }
.achievements-stats { display: flex; gap: 20px; justify-content: center; margin-bottom: 20px; font-size: 15px; }
.achievements-stats b { color: #3b82f6; }
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.ach-badge {
  background: var(--bg-card); border-radius: var(--radius-sm); padding: 16px 12px;
  box-shadow: var(--shadow); text-align: center; transition: all 0.3s;
}
.ach-badge.locked { opacity: 0.4; filter: grayscale(1); }
.ach-badge.unlocked { animation: achGlow 2s ease-in-out infinite; }
@keyframes achGlow {
  0%, 100% { box-shadow: 0 2px 8px rgba(59,130,246,0.1); }
  50% { box-shadow: 0 2px 20px rgba(59,130,246,0.3), 0 0 30px rgba(251,191,36,0.2); }
}
.ach-badge .ach-icon { font-size: 32px; margin-bottom: 6px; }
.ach-badge .ach-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.ach-badge .ach-desc { font-size: 11px; color: var(--text-lighter); }
.ach-badge.locked .ach-icon { opacity: 0.3; }

/* ==================== 丑照博物馆 ==================== */
.museum-container { max-width: 650px; margin: 0 auto; }
.museum-desc { font-size: 14px; color: var(--text-light); text-align: center; margin-bottom: 16px; font-style: italic; }
.museum-upload { text-align: center; margin-bottom: 20px; }
.museum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.museum-item {
  background: var(--bg-card); border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow); position: relative;
}
.museum-item img { width: 100%; height: 180px; object-fit: cover; display: block; }
.museum-item .museum-caption {
  padding: 8px 10px; font-size: 12px; color: var(--text-light); background: #fff;
}
.museum-item .museum-delete {
  position: absolute; top: 6px; right: 6px;
  background: rgba(239,68,68,0.9); color: #fff; border: none;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.museum-item:hover .museum-delete { opacity: 1; }

/* ==================== 梦境塔罗 ==================== */
.tarot-container { max-width: 500px; margin: 0 auto; text-align: center; }
.tarot-table { margin-bottom: 24px; }
.tarot-card-deck { perspective: 800px; }
.tarot-card-back {
  width: 160px; height: 240px; margin: 0 auto; cursor: pointer;
  background: linear-gradient(135deg, #1e1b4b, #312e81, #4c1d95);
  border-radius: 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 8px 30px rgba(79,70,229,0.4);
  transition: transform 0.3s; position: relative; overflow: hidden;
}
.tarot-card-back::before {
  content: ''; position: absolute; inset: 8px;
  border: 2px solid rgba(255,255,255,0.2); border-radius: 8px;
}
.tarot-card-back:hover { transform: translateY(-6px) rotate(2deg); }
.tarot-back-design { font-size: 48px; margin-bottom: 8px; }
.tarot-card-back p { font-size: 14px; opacity: 0.8; }
.tarot-result {
  background: linear-gradient(135deg, #faf5ff, #dbeafe);
  border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow-lg);
}
.tarot-card-display { font-size: 72px; margin-bottom: 12px; }
.tarot-result h3 { font-size: 22px; color: #4c1d95; margin-bottom: 6px; }
.tarot-position { font-size: 13px; color: #7c3aed; margin-bottom: 10px; font-weight: 600; }
.tarot-meaning { font-size: 15px; color: var(--text); line-height: 1.6; margin-bottom: 10px; }
.tarot-advice { font-size: 14px; color: #92400e; font-style: italic; background: #fffbeb; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.tarot-history h4 { margin-bottom: 10px; text-align: left; }
.tarot-history-item {
  display: flex; gap: 12px; padding: 10px 14px; background: var(--bg-card);
  border-radius: var(--radius-sm); margin-bottom: 6px; align-items: center;
  text-align: left; box-shadow: var(--shadow);
}
.tarot-history-item .th-icon { font-size: 28px; }
.tarot-history-item .th-info { flex: 1; }
.tarot-history-item .th-name { font-size: 13px; font-weight: 700; }
.tarot-history-item .th-date { font-size: 11px; color: var(--text-lighter); }

/* ==================== 八卦运势 ==================== */
.bagua-container { max-width: 500px; margin: 0 auto; text-align: center; }
.bagua-compass { position: relative; width: 220px; height: 220px; margin: 20px auto 30px; }
.bagua-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 4px solid #1e1b4b; background: #fffbeb;
}
.bagua-ring.outer span {
  position: absolute; top: 50%; left: 50%;
  transform-origin: 0 0; font-size: 18px; font-weight: 700;
  width: 30px; text-align: center; margin-left: -15px;
  margin-top: -95px; /* radius */
}
.bagua-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 70px; height: 70px; border-radius: 50%;
  background: #1e1b4b; color: #fde68a; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.3s; z-index: 2;
  box-shadow: 0 4px 16px rgba(30,27,75,0.4);
}
.bagua-center:hover { transform: translate(-50%,-50%) scale(1.1); }
.bagua-center.spinning { animation: baguaSpin 0.8s ease-out; }
@keyframes baguaSpin { 0% { transform: translate(-50%,-50%) rotate(0deg); } 100% { transform: translate(-50%,-50%) rotate(720deg); } }
.bagua-yinyang { font-size: 24px; }
.bagua-center p { font-size: 10px; margin-top: 2px; }
.bagua-result {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-lg);
}
.bagua-hexagram { font-size: 42px; margin-bottom: 8px; }
.bagua-result h3 { font-size: 20px; color: #92400e; margin-bottom: 8px; }
.bagua-details {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px;
}
.bagua-detail {
  display: flex; justify-content: space-between; padding: 8px 12px;
  background: rgba(255,255,255,0.7); border-radius: 8px; font-size: 14px;
}
.bagua-detail span:first-child { color: var(--text-light); }
.bagua-detail span:last-child { font-weight: 700; }

/* ==================== 摇骰子 ==================== */
.dice-container { max-width: 450px; margin: 0 auto; text-align: center; }
.dice-box { perspective: 600px; width: 120px; height: 120px; margin: 20px auto; }
.dice-cube {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d; transition: transform 0.1s;
}
.dice-cube.rolling { animation: diceRoll 0.8s ease-out; }
@keyframes diceRoll {
  0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
  25% { transform: rotateX(360deg) rotateY(180deg) rotateZ(90deg); }
  50% { transform: rotateX(720deg) rotateY(360deg) rotateZ(180deg); }
  75% { transform: rotateX(900deg) rotateY(540deg) rotateZ(270deg); }
  100% { transform: rotateX(1080deg) rotateY(720deg) rotateZ(360deg); }
}
.dice-face {
  position: absolute; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; border-radius: 16px;
  background: linear-gradient(135deg, #fff, #f3f4f6);
  box-shadow: inset 0 0 0 3px rgba(59,130,246,0.2);
  backface-visibility: hidden;
}
.dice-face.front { transform: translateZ(60px); }
.dice-face.back { transform: rotateY(180deg) translateZ(60px); }
.dice-face.right { transform: rotateY(90deg) translateZ(60px); }
.dice-face.left { transform: rotateY(-90deg) translateZ(60px); }
.dice-face.top { transform: rotateX(90deg) translateZ(60px); }
.dice-face.bottom { transform: rotateX(-90deg) translateZ(60px); }
.btn-dice { margin: 16px 0; font-size: 18px; padding: 14px 40px; }
.dice-result {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-lg);
}
.dice-number { font-size: 64px; font-weight: 900; color: #3b82f6; }
.dice-result h3 { font-size: 18px; margin: 8px 0; }
.dice-result p { font-size: 14px; color: var(--text-light); }
.dice-stars { font-size: 24px; margin-top: 8px; }
.dice-history { text-align: left; margin-top: 20px; }
.dice-history h4 { margin-bottom: 10px; }
.dice-history-item {
  display: flex; justify-content: space-between; padding: 8px 14px;
  background: var(--bg-card); border-radius: var(--radius-sm); margin-bottom: 6px;
  box-shadow: var(--shadow); font-size: 13px;
}

/* ==================== 年度颁奖 ==================== */
.awards-container { max-width: 650px; margin: 0 auto; text-align: center; }
#awards-result { margin-top: 20px; }
.awards-report {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #fff; border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow-lg); text-align: left;
}
.awards-report h2 { font-size: 24px; text-align: center; margin-bottom: 20px; color: #fbbf24; }
.awards-section { margin-bottom: 16px; padding: 12px 16px; background: rgba(255,255,255,0.85); border-radius: 10px; }
.awards-section h3 { font-size: 15px; margin-bottom: 6px; color: #fde68a; }
.awards-section p { font-size: 13px; opacity: 0.9; }

/* ==================== 移动端适配补充(新功能) ==================== */
@media (max-width: 600px) {
  .mood-dual { grid-template-columns: 1fr; }
  .mood-emoji-grid { grid-template-columns: repeat(3, 1fr); }

  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
  .fundtree-add { flex-direction: column; }
  .fundtree-stats { flex-wrap: wrap; gap: 6px; }
  .tarot-card-back { width: 130px; height: 195px; }
  .dice-box { width: 90px; height: 90px; }
  .dice-face { font-size: 36px; }
  .dice-face.front { transform: translateZ(45px); }
  .dice-face.back { transform: rotateY(180deg) translateZ(45px); }
  .dice-face.right { transform: rotateY(90deg) translateZ(45px); }
  .dice-face.left { transform: rotateY(-90deg) translateZ(45px); }
  .dice-face.top { transform: rotateX(90deg) translateZ(45px); }
  .dice-face.bottom { transform: rotateX(-90deg) translateZ(45px); }
  .quiz-select-user { flex-wrap: wrap; }
  /* 城市便利贴-移动端 */
  .sticky-grid { grid-template-columns: repeat(2, 1fr); }
  .sticky-picker-card { width: 95%; max-height: 90vh; }
}


/* ==================== 城市便利贴 ==================== */
.sticky-add-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.sticky-add-btn {
  font-size: 16px;
  padding: 12px 28px;
  border-radius: 30px;
}
.sticky-add-btn span { font-size: 20px; margin-right: 2px; }
.sticky-count {
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
}

.sticky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.sticky-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.sticky-empty-icon {
  font-size: 64px;
  margin-bottom: 12px;
  opacity: 0.6;
}
.sticky-empty p {
  font-size: 16px;
  color: #6b7280;
  margin: 4px 0;
}
.sticky-empty-hint {
  font-size: 13px;
  color: #9ca3af;
}

/* 便利贴卡片 */
.sticky-note {
  position: relative;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-radius: 4px 16px 4px 16px;
  padding: 16px;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  cursor: default;
  transition: all 0.3s;
  animation: stickyPin 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-height: 120px;
  display: flex;
  flex-direction: column;
}
.sticky-note::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #ef4444 40%, #dc2626 100%);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 2;
}
.sticky-note:hover {
  transform: rotate(-1deg) translateY(-4px);
  box-shadow: 3px 6px 20px rgba(0,0,0,0.12);
}
.sticky-note-emoji {
  font-size: 36px;
  text-align: center;
  margin-bottom: 8px;
  margin-top: 4px;
}
.sticky-note-name {
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
  text-align: center;
  line-height: 1.3;
}
.sticky-note-country {
  font-size: 12px;
  color: #92400e;
  text-align: center;
  margin-top: 4px;
  font-weight: 500;
}
.sticky-note-date {
  font-size: 11px;
  color: #a8a29e;
  text-align: center;
  margin-top: auto;
  padding-top: 10px;
}
.sticky-note-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.05);
  color: #9ca3af;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 3;
}
.sticky-note-delete:hover {
  background: #fee2e2;
  color: #ef4444;
}

@keyframes stickyPin {
  0% { opacity: 0; transform: scale(0.8) translateY(-20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 颜色变体 */
.sticky-note:nth-child(5n+1) { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.sticky-note:nth-child(5n+2) { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.sticky-note:nth-child(5n+3) { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.sticky-note:nth-child(5n+4) { background: linear-gradient(135deg, #eff6ff, #e0f2fe); }
.sticky-note:nth-child(5n+5) { background: linear-gradient(135deg, #fdf2f8, #fee2e2); }

/* 选择器弹窗 */
.sticky-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.sticky-picker-overlay.hidden { display: none; }

.sticky-picker-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  width: 420px;
  max-width: 92vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: stickyPickerIn 0.3s ease;
}
@keyframes stickyPickerIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.sticky-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.sticky-picker-header h3 {
  font-size: 18px;
  color: #1e293b;
  margin: 0;
}
.sticky-picker-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.sticky-picker-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.sticky-picker-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
  margin-top: 16px;
}
.sticky-picker-label:first-of-type { margin-top: 0; }

.sticky-picker-select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  color: #1e293b;
  background: #f9fafb;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.sticky-picker-select:focus {
  border-color: #3b82f6;
  background: #fff;
}

.sticky-preview {
  margin-top: 20px;
  padding: 16px;
  background: #fefce8;
  border-radius: 12px;
  border: 2px dashed #fde68a;
}
.sticky-preview.hidden { display: none; }
.sticky-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sticky-preview-emoji { font-size: 40px; }
.sticky-preview-name {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
}
.sticky-preview-country {
  font-size: 13px;
  color: #92400e;
}

.sticky-confirm-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  font-size: 16px;
  border-radius: 14px;
}
.sticky-confirm-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ====== MBTI人格墙 ====== */
.mbti-container { max-width: 800px; margin: 0 auto; }
.mbti-intro {
  text-align: center;
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 24px;
  font-style: italic;
  line-height: 1.6;
}
.mbti-dual { display: flex; gap: 16px; margin-bottom: 24px; }
.mbti-card {
  flex: 1;
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  text-align: center;
  min-height: 200px;
}
.mbti-card.shushu-card { border-top: 3px solid #f59e0b; }
.mbti-card.bibi-card { border-top: 3px solid #3b82f6; }
.mbti-card-header { margin-bottom: 10px; }
.mbti-card-avatar { font-size: 36px; }
.mbti-card-header h3 { font-size: 16px; color: #374151; margin: 4px 0; }
.mbti-type-display { }
.mbti-type-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  margin-bottom: 8px;
}
.mbti-type-badge.unset {
  background: #e5e7eb;
  color: #9ca3af;
  font-size: 14px;
  letter-spacing: 0;
}
.mbti-type-name { font-size: 14px; color: #6b7280; margin: 4px 0; }
.mbti-type-desc { font-size: 12px; color: #9ca3af; margin: 4px 0; line-height: 1.5; }
.mbti-traits { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 6px; }
.mbti-trait {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
}

/* 匹配度 */
.mbti-match {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
  color: #fff;
}
.mbti-match h3 { font-size: 18px; margin-bottom: 12px; }
.mbti-match-score {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
}
.mbti-match-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.mbti-match-text span { font-size: 32px; font-weight: 800; }
.mbti-match-text small { font-size: 14px; }
.mbti-match-desc { font-size: 14px; color: #cbd5e1; }
.mbti-match-detail {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.6;
}

/* 选择器 */
.mbti-selector {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.mbti-selector h3 { text-align: center; font-size: 17px; color: #374151; margin-bottom: 4px; }
#mbti-select-hint { text-align: center; font-size: 13px; color: #3b82f6; margin-bottom: 12px; }
.mbti-select-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.mbti-select-user {
  padding: 8px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.mbti-select-user.active { border-color: #3b82f6; background: #fef1f7; color: #3b82f6; }
.mbti-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.mbti-type-btn {
  padding: 12px 8px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
  text-align: center;
}
.mbti-type-btn:hover { border-color: #3b82f6; background: #eff6ff; }
.mbti-type-btn.selected { border-color: #3b82f6; background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }

/* ====== 音乐星球 ====== */
.music-planet-container { max-width: 700px; margin: 0 auto; }
.music-cosmos {
  position: relative;
  width: 100%;
  height: 280px;
  background: radial-gradient(ellipse at center, #1a1040 0%, #0a0520 70%, #000 100%);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
}
#music-orbit-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.music-planet-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #3b82f6, #1d4ed8);
  box-shadow: 0 0 40px rgba(59,130,246,0.5), 0 0 80px rgba(59,130,246,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  animation: planetPulse 3s ease-in-out infinite;
}
@keyframes planetPulse {
  0%,100% { box-shadow: 0 0 40px rgba(139,92,246,0.5), 0 0 80px rgba(139,92,246,0.2); }
  50% { box-shadow: 0 0 60px rgba(139,92,246,0.7), 0 0 100px rgba(139,92,246,0.35); }
}
.music-planet-core.playing { animation: planetPulse 1s ease-in-out infinite; }
.music-planet-eq {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 30px;
}
.eq-bar {
  width: 4px;
  border-radius: 2px;
  background: #c4b5fd;
  animation: eqBounce 0.5s ease-in-out infinite alternate;
}
.eq-bar:nth-child(1) { animation-delay: 0s; height: 14px; }
.eq-bar:nth-child(2) { animation-delay: 0.15s; height: 22px; }
.eq-bar:nth-child(3) { animation-delay: 0.3s; height: 18px; }
.eq-bar:nth-child(4) { animation-delay: 0.1s; height: 28px; }
.eq-bar:nth-child(5) { animation-delay: 0.25s; height: 12px; }
.playing .eq-bar { animation-play-state: running; }
.eq-bar { animation-play-state: paused; }
@keyframes eqBounce {
  0% { height: 10px; } 100% { height: 28px; }
}
.music-planet-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.3) 0%, transparent 70%);
  animation: glowPulse 4s ease-in-out infinite;
  z-index: 2;
}
@keyframes glowPulse {
  0%,100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.8; }
}
.music-planet-rings { position: absolute; inset: 0; z-index: 1; }
.music-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid;
  transform: translate(-50%, -50%) rotateX(75deg);
}
.music-ring.r1 {
  width: 160px;
  height: 160px;
  border-color: rgba(139,92,246,0.3);
  animation: ringSpin 12s linear infinite;
}
.music-ring.r2 {
  width: 200px;
  height: 200px;
  border-color: rgba(59,130,246,0.2);
  animation: ringSpin 18s linear infinite reverse;
}
.music-ring.r3 {
  width: 240px;
  height: 240px;
  border-color: rgba(139,92,246,0.12);
  animation: ringSpin 24s linear infinite;
}
@keyframes ringSpin {
  from { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(360deg); }
}

/* 播放器面板 */
.music-player-panel {
  background: #fff;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 16px;
}
.music-now-playing {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.music-track-icon { font-size: 40px; flex-shrink: 0; }
.music-track-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 2px;
}
.music-track-info p { font-size: 13px; color: #94a3b8; margin: 0; }
.music-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.music-time { font-size: 12px; color: #9ca3af; font-variant-numeric: tabular-nums; min-width: 40px; }
.music-time:first-child { text-align: right; }
.music-progress-bar {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}
.music-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}
.music-progress-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  left: 0%;
  box-shadow: 0 0 6px rgba(59,130,246,0.5);
  pointer-events: none;
}
.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}
.music-ctrl-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.15s;
  padding: 4px;
}
.music-ctrl-btn:hover { transform: scale(1.2); }
.music-ctrl-play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(59,130,246,0.4);
}
.music-ctrl-play:hover { transform: scale(1.1); }
.music-extra-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.music-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  flex: 1;
}
#music-volume-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
  outline: none;
  max-width: 120px;
}
#music-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
}
.music-options { display: flex; gap: 6px; }
.music-opt-btn {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.music-opt-btn.active { border-color: #3b82f6; background: #dbeafe; color: #1d4ed8; }

/* 歌单 */
.music-playlist { margin-bottom: 16px; }
.music-playlist h3 { font-size: 17px; color: #374151; margin-bottom: 10px; }
.music-genre-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.music-genre-tab {
  padding: 6px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  white-space: nowrap;
}
.music-genre-tab:hover { border-color: #3b82f6; }
.music-genre-tab.active { border-color: #3b82f6; background: #dbeafe; color: #1d4ed8; }
.music-track-list { display: flex; flex-direction: column; gap: 4px; }
.music-track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  background: #f9fafb;
}
.music-track-item:hover { background: #f3f4f6; }
.music-track-item.playing { background: linear-gradient(135deg, #ede9fe, #fef1f7); }
.music-track-item .track-genre-icon { font-size: 18px; flex-shrink: 0; }
.music-track-item .track-info { flex: 1; min-width: 0; }
.music-track-item .track-title { font-size: 14px; font-weight: 600; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-track-item .track-artist { font-size: 12px; color: #9ca3af; }
.music-track-item .track-duration { font-size: 12px; color: #9ca3af; flex-shrink: 0; }
.music-upload-area {
  text-align: center;
  padding: 16px;
  background: #f9fafb;
  border-radius: 14px;
  border: 2px dashed #e5e7eb;
}
.music-upload-area p { font-size: 13px; color: #9ca3af; margin-bottom: 8px; }

/* ==================== 数据仪表盘 ==================== */
.dashboard-grid { display: flex; flex-direction: column; gap: 16px; }
.dash-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
}
.dash-card h3 { font-size: 15px; color: var(--text); margin: 0 0 12px; }
.dash-card canvas { display: block; margin: 0 auto; }
.dash-legend { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.dash-legend-item { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.dash-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.dash-heatmap { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.heatmap-day {
  width: 28px; height: 28px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  transition: transform 0.15s;
}
.heatmap-day:hover { transform: scale(1.2); }

.dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dash-stat {
  background: var(--gray-50);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.dash-stat-val { font-size: 22px; font-weight: 800; color: var(--blue-600); }
.dash-stat-label { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ==================== 恋爱日记本 ==================== */
.diary-toolbar {
  display: flex; gap: 10px; margin-bottom: 16px;
  align-items: center;
}
.diary-toolbar .btn-primary {
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--blue-500), var(--rose-500));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s;
}
.diary-toolbar .btn-primary:hover { transform: scale(1.03); }
.diary-search {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.diary-search:focus { border-color: var(--blue-400); }

.diary-list { display: flex; flex-direction: column; gap: 12px; }
.diary-entry {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  position: relative;
  transition: box-shadow 0.2s;
}
.diary-entry:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.diary-entry-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.diary-entry-date { font-size: 12px; color: var(--text-light); }
.diary-entry-mood { font-size: 18px; }
.diary-entry-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.diary-entry-body { font-size: 14px; color: var(--text-light); line-height: 1.7; white-space: pre-wrap; }
.diary-entry-weather { font-size: 12px; color: var(--text-light); margin-top: 8px; }
.diary-entry-actions {
  display: flex; gap: 6px; margin-top: 10px; justify-content: flex-end;
}
.diary-entry-actions button {
  padding: 4px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--gray-50); font-size: 12px; cursor: pointer;
  transition: background 0.2s;
}
.diary-entry-actions button:hover { background: var(--gray-100); }
.diary-empty { text-align: center; color: var(--text-light); padding: 40px 0; }

.diary-editor { background: #fff; border-radius: 16px; padding: 20px; border: 1px solid #bfdbfe; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.diary-editor label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; color: #1e40af; }
.diary-editor input[type="text"],
.diary-editor input[type="date"],
.diary-editor textarea,
.diary-editor select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 2px solid #bfdbfe; font-size: 14px;
  outline: none; font-family: inherit; box-sizing: border-box;
  background: rgba(255,255,255,0.95);
  color: #1a1a1a;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.diary-editor textarea { min-height: 120px; resize: vertical; }
.diary-editor input:focus, .diary-editor textarea:focus, .diary-editor select:focus { border-color: #3b82f6; box-shadow: 0 2px 10px rgba(59,130,246,0.15); background: #ffffff; }
.diary-editor-btns { display: flex; gap: 8px; margin-top: 14px; justify-content: flex-end; }
.diary-editor-btns button { padding: 8px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.diary-editor-btns .btn-save {
  background: linear-gradient(135deg, var(--blue-500), var(--rose-500));
  color: #fff; border: none;
}
.diary-editor-btns .btn-cancel {
  background: var(--gray-100); border: 1px solid var(--border); color: var(--text);
}

/* 响应式 */
@media (max-width: 600px) {
  .mbti-dual { flex-direction: column; }
  .mbti-type-grid { grid-template-columns: repeat(2, 1fr); }
  .music-extra-controls { flex-direction: column; align-items: stretch; }
  .music-options { justify-content: center; }
  .music-cosmos { height: 220px; }
}

/* ====== v2.0 新增模块样式 ====== */

/* 🎡 幸运转盘 */
.wheel-container { padding: 20px; text-align: center; }
.wheel-canvas-wrap { position: relative; width: 320px; height: 320px; margin: 0 auto 20px; }
.wheel-canvas-wrap canvas { border-radius: 50%; box-shadow: 0 0 30px rgba(59,130,246,0.3); }
.wheel-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 32px; z-index: 2; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.wheel-controls { max-width: 400px; margin: 0 auto; }
.wheel-presets { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.wheel-presets .btn-secondary { font-size: 13px; padding: 6px 12px; }
.wheel-custom { display: flex; gap: 8px; margin-bottom: 16px; }
.wheel-custom input { flex: 1; padding: 8px 12px; border: 2px solid #bfdbfe; border-radius: 8px; background: rgba(255,255,255,0.95); color: #1a1a1a; box-shadow: 0 1px 4px rgba(0,0,0,0.06); outline: none; }
.btn-spin { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; border: none; border-radius: 50px; padding: 14px 40px; font-size: 18px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 20px rgba(59,130,246,0.4); transition: all 0.3s; }
.btn-spin:hover { transform: scale(1.05); }
.btn-spin:disabled { opacity: 0.5; cursor: not-allowed; }
.wheel-result { margin-top: 16px; padding: 16px; background: rgba(59,130,246,0.1); border-radius: 12px; font-size: 20px; font-weight: bold; color: #3b82f6; animation: wheelPop 0.5s ease-out; }
@keyframes wheelPop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.wheel-history { margin-top: 20px; text-align: left; }
.wheel-history h4 { color: rgba(255,255,255,0.6); margin-bottom: 8px; }
.wheel-history-list { display: flex; flex-direction: column; gap: 4px; max-height: 150px; overflow-y: auto; }
.wheel-history-item { padding: 6px 10px; background: rgba(255,255,255,0.85); border-radius: 6px; font-size: 13px; color: rgba(255,255,255,0.7); }

/* 🧩 照片拼图 */
.puzzle-container { padding: 20px; text-align: center; }
.puzzle-toolbar { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.puzzle-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin: 12px 0; }
.puzzle-photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; }
.puzzle-photo-grid img:hover { border-color: #3b82f6; transform: scale(1.05); }
.puzzle-board-wrap { margin: 20px auto; }
#puzzle-canvas { border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); max-width: 100%; }
.puzzle-info { display: flex; gap: 20px; align-items: center; justify-content: center; margin-top: 12px; color: rgba(255,255,255,0.7); }
.puzzle-complete { padding: 40px; }
.puzzle-fireworks { font-size: 48px; animation: fireworks 1s ease-out infinite alternate; }
@keyframes fireworks { from { transform: scale(1); } to { transform: scale(1.2); } }

/* 📍 足迹地图 */
.footprint-container { padding: 20px; }
.footprint-stats { display: flex; gap: 20px; justify-content: center; margin-bottom: 24px; }
.fp-stat { text-align: center; padding: 16px 24px; background: rgba(59,130,246,0.08); border-radius: 12px; }
.fp-stat-num { display: block; font-size: 32px; font-weight: bold; color: #3b82f6; }
.fp-stat span:last-child { font-size: 13px; color: rgba(255,255,255,0.5); }
.footprint-china-map { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-width: 600px; margin: 0 auto; }
.fp-city-dot { padding: 8px 12px; text-align: center; border-radius: 10px; font-size: 13px; cursor: pointer; transition: all 0.2s; background: rgba(255,255,255,0.9); border: 1.5px solid #bfdbfe; color: #1e40af; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.fp-city-dot:hover { background: #fff; border-color: #3b82f6; box-shadow: 0 2px 8px rgba(59,130,246,0.15); transform: scale(1.05); }
.fp-city-dot.visited { background: linear-gradient(135deg,#dbeafe,#bfdbfe); color: #1d4ed8; font-weight: bold; border-color: #93c5fd; }
.footprint-list, .footprint-wishlist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.fp-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255,255,255,0.92); border: 1.5px solid #bfdbfe; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.fp-item .fp-city-name { flex: 1; font-weight: 600; color: #1e40af; }
.fp-item .fp-date { font-size: 12px; color: #6b7280; }
.fp-item button { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 16px; padding: 4px; border-radius: 6px; }
.fp-item button:hover { color: #ef4444; background: rgba(239,68,68,0.1); }

/* 💞 爱情树 */
.love-tree-container { padding: 20px; text-align: center; }
.love-tree-display { margin: 30px auto; padding: 40px; background: linear-gradient(180deg, rgba(59,130,246,0.05), rgba(29,78,216,0.08)); border-radius: 24px; max-width: 400px; border: 1.5px solid #bfdbfe; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.love-tree-stage { font-size: 100px; line-height: 1.2; margin-bottom: 16px; animation: treeSway 3s ease-in-out infinite; }
@keyframes treeSway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.love-tree-name { font-size: 20px; font-weight: bold; color: #3b82f6; margin-bottom: 12px; }
.love-tree-progress { height: 8px; background: rgba(255,255,255,0.85); border-radius: 4px; overflow: hidden; margin: 0 auto; max-width: 250px; }
.love-tree-progress-bar { height: 100%; background: linear-gradient(90deg, #3b82f6, #1d4ed8); border-radius: 4px; transition: width 0.5s; }
.love-tree-level { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,0.6); }
.love-tree-actions { margin: 20px 0; display: flex; gap: 12px; justify-content: center; }
.btn-love-tree-water { background: linear-gradient(135deg, #3b82f6, #06b6d4); color: #fff; border: none; border-radius: 50px; padding: 14px 32px; font-size: 16px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 20px rgba(59,130,246,0.3); transition: all 0.3s; }
.btn-love-tree-water:hover { transform: scale(1.05); }
.btn-love-tree-water:disabled { opacity: 0.5; cursor: not-allowed; }

/* 🎯 30天挑战 */
.challenge-container { padding: 20px; }
.challenge-progress-bar { height: 12px; background: rgba(255,255,255,0.85); border-radius: 6px; overflow: hidden; margin-bottom: 24px; position: relative; }
.challenge-progress-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #1d4ed8); border-radius: 6px; transition: width 0.5s; }
.challenge-progress-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 11px; font-weight: bold; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.challenge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.challenge-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: rgba(255,255,255,0.85); border-radius: 12px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.challenge-item:hover { background: rgba(59,130,246,0.05); }
.challenge-item.done { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.2); }
.challenge-item .ch-num { width: 32px; height: 32px; border-radius: 50%; background: rgba(59,130,246,0.15); display: flex; align-items: center; justify-content: center; font-weight: bold; color: #3b82f6; flex-shrink: 0; }
.challenge-item.done .ch-num { background: #3b82f6; color: #fff; }
.challenge-item .ch-text { flex: 1; font-size: 14px; }
.challenge-item .ch-check { font-size: 20px; }
.challenge-reward { text-align: center; padding: 40px; }
.challenge-medal { font-size: 80px; animation: medalSpin 2s ease-out; }
@keyframes medalSpin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }

/* 💌 情书设计器 */
.love-letter-container { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media(max-width:768px){ .love-letter-container { grid-template-columns: 1fr; } }
.love-letter-editor { display: flex; flex-direction: column; gap: 14px; }
.love-letter-field { display: flex; flex-direction: column; gap: 6px; }
.love-letter-field label { font-size: 13px; font-weight: 600; color: #1e40af; }
.love-letter-field input, .love-letter-field textarea, .love-letter-field select { padding: 12px 16px; border: 2px solid #93c5fd; border-radius: 12px; background: rgba(255,255,255,0.95); color: #1a1a1a; font-size: 14px; font-family: inherit; box-shadow: 0 2px 8px rgba(0,0,0,0.06); outline: none; transition: all 0.25s ease; }
.love-letter-field input:focus, .love-letter-field textarea:focus, .love-letter-field select:focus { border-color: #3b82f6; box-shadow: 0 2px 12px rgba(59,130,246,0.2); background: #ffffff; }
.love-letter-field textarea { resize: vertical; min-height: 120px; }
.letter-stickers { display: flex; gap: 8px; flex-wrap: wrap; }
.sticker { font-size: 28px; cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: all 0.2s; }
.sticker:hover { background: rgba(59,130,246,0.1); transform: scale(1.2); }
.love-letter-actions { display: flex; gap: 10px; margin-top: 8px; }
.love-letter-paper { background: linear-gradient(135deg, #fff5f5, #eff6ff); border-radius: 16px; padding: 40px 30px; color: #333; position: relative; min-height: 400px; box-shadow: 0 8px 40px rgba(0,0,0,0.15); }
.letter-wax-seal { position: absolute; top: -15px; right: 30px; font-size: 40px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.letter-content { font-family: 'KaiTi','STKaiti',serif; line-height: 2; }
.letter-content .letter-header { font-size: 18px; margin-bottom: 20px; color: #3b82f6; }
.letter-content .letter-body-text { font-size: 15px; white-space: pre-wrap; }
.letter-content .letter-footer { margin-top: 30px; text-align: right; color: #3b82f6; }
.letter-saved-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255,255,255,0.9); border: 1.5px solid #bfdbfe; border-radius: 10px; color: #1a1a1a; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.letter-saved-item .letter-preview-text { flex: 1; font-size: 13px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 🎮 双人小游戏 */
.games-container {
  padding: 16px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.games-menu {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px 8px;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.4);
}
.game-menu-btn {
  padding: 16px 28px;
  background: rgba(59,130,246,0.08);
  border: 2px solid rgba(59,130,246,0.2);
  border-radius: 14px;
  color: #3b82f6;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
  min-width: 120px;
}
.game-menu-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(59,130,246,0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.game-menu-btn:hover {
  background: rgba(59,130,246,0.15);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.2);
  border-color: rgba(59,130,246,0.5);
}
.game-menu-btn:hover::after { opacity: 1; }
.game-menu-btn:active { transform: scale(0.96); transition: transform 0.1s; }

.game-board {
  animation: gameBoardIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes gameBoardIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.game-status {
  display: inline-block;
  font-size: 18px;
  font-weight: bold;
  color: #3b82f6;
  padding: 10px 24px;
  background: rgba(59,130,246,0.08);
  border-radius: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(59,130,246,0.15);
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(59,130,246,0); }
}

.game-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.game-controls button {
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid rgba(59,130,246,0.25);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #3b82f6;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.game-controls button:hover {
  background: rgba(59,130,246,0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.15);
}

.game-canvas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#game-canvas {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.90);
  max-width: 100%;
  height: auto !important;
  background: #1a1a2e;
  cursor: pointer;
  transition: box-shadow 0.3s;
}
#game-canvas:hover {
  box-shadow: 0 12px 40px rgba(59,130,246,0.25), 0 0 0 1px rgba(59,130,246,0.2);
}

/* 游戏胜利庆祝动画 */
.game-win-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 999;
}
.game-win-particle {
  position: absolute;
  font-size: 24px;
  animation: winBurst 1.5s ease-out forwards;
}
@keyframes winBurst {
  0% { transform: translate(0,0) scale(0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--tx),var(--ty)) scale(1.5) rotate(var(--tr)); opacity: 0; }
}

/* 移动端游戏适配 */
@media (max-width: 600px) {
  .games-container { padding: 12px 8px; }
  .games-menu { gap: 8px; padding: 12px 6px; }
  .game-menu-btn { padding: 14px 16px; font-size: 14px; min-width: 90px; }
  .game-status { font-size: 15px; padding: 8px 16px; }
  .game-controls button { padding: 10px 16px; font-size: 13px; }
  #game-canvas { border-radius: 8px; }
}

/* 🔄 升级按钮 + 📢 公告按钮 */
.btn-upgrade, .btn-changelog {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(59,130,246,0.15); color: #3b82f6; font-size: 16px;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  transition: all 0.3s; position: relative;
}
.btn-upgrade.show, .btn-changelog.show {
  display: flex !important;
}
.btn-upgrade.show {
  animation: upgradePulse 1.5s ease-in-out infinite;
}
@keyframes upgradePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(59,130,246,0); }
}
.btn-upgrade .upgrade-badge {
  position: absolute; top: -4px; right: -4px; width: 12px; height: 12px;
  background: #ef4444; border-radius: 50%; border: 2px solid #1a1a2e;
}
.btn-changelog { background: rgba(139,92,246,0.15); color: #a78bfa; }
.btn-changelog.show { display: flex !important; }
.btn-upgrade:hover, .btn-changelog:hover { transform: scale(1.1); }

/* 📢 更新公告弹窗 */
.changelog-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.changelog-modal {
  background: linear-gradient(135deg, #1e1e3f, #2d1b69);
  border: 1px solid rgba(59,130,246,0.3); border-radius: 20px;
  padding: 30px; max-width: 480px; width: 90%; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.changelog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.changelog-header h2 { font-size: 20px; color: #3b82f6; }
.changelog-close { background: none; border: none; color: rgba(255,255,255,0.5); font-size: 24px; cursor: pointer; }
.cl-version { padding: 12px 16px; margin-bottom: 12px; background: rgba(255,255,255,0.85); border-radius: 12px; }
.cl-version h3 { font-size: 16px; color: #a78bfa; margin-bottom: 6px; }
.cl-version ul { padding-left: 20px; font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.8; }
.cl-version .cl-new { color: #4ade80; }
.cl-version .cl-remove { color: #f87171; }

/* ==================== 🍾 漂流瓶 v2 新增样式 ==================== */

/* 天气Banner */
.drift-weather-banner {
  display: flex;
  align-items: center;
  border-radius: 16px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #38bdf8cc, #0ea5e9cc);
  min-height: 42px;
  transition: background 1s ease, color 0.5s ease;
  backdrop-filter: blur(4px);
}

/* 标签页4个 */
.drift-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 2px solid #e5e7eb;
  overflow-x: auto;
  scrollbar-width: none;
}
.drift-tabs::-webkit-scrollbar { display: none; }
.drift-tab {
  padding: 8px 14px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.drift-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; }

/* 成就卡片 */
.drift-ach-item {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  animation: driftFadeIn 0.3s ease;
}
.drift-ach-item.locked { opacity: 0.55; }
.ach-body { flex: 1; }
.ach-name { font-size: 14px; font-weight: 700; }
.ach-desc { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.ach-date { font-size: 10px; color: #d97706; margin-top: 2px; }

/* 瓶子类型选择按钮 hover 效果 */
.bottle-type-btn:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* 深夜模式 canvas 容器 */
.drift-ocean-wrap.night-mode {
  background: linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

/* Firebase 状态badge */
#drift-firebase-status { margin-top: 4px; }
/* v2.0 新增动画效果 */

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== v2.0 游戏模块优化 ==================== */
.games-container {
  text-align: center;
  padding: 20px;
  animation: fadeInUp 0.5s ease;
}

.games-menu {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.game-menu-btn {
  background: linear-gradient(135deg, #dbeafe, #ffe4e6);
  border: 2px solid #93c5fd;
  padding: 16px 32px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #1d4ed8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.18);
}

.game-menu-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
}

.game-menu-btn:active {
  transform: translateY(0) scale(0.95);
}

.game-board {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.12);
  margin: 20px auto;
  max-width: 600px;
  animation: fadeInUp 0.5s ease;
}

.game-status {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #1d4ed8;
  margin-bottom: 16px;
  padding: 12px;
  background: linear-gradient(135deg, #dbeafe, #fff0f6);
  border-radius: 12px;
}

.game-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

#game-canvas {
  display: block;
  margin: 0 auto;
  background: #eff6ff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.08);
  cursor: pointer;
}

/* 翻翻乐卡片样式 */
.memory-card {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #dbeafe, #ffe4e6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.memory-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

.memory-card.flipped {
  background: white;
  border: 2px solid #3b82f6;
}

.memory-card.matched {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 2px solid #10b981;
  animation: pulse 0.5s ease;
}

/* ==================== v2.0 便签系统优化 ==================== */
.sticky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px 0;
}

.sticky-note {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 12px;
  padding: 16px;
  min-height: 150px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.sticky-note:hover {
  transform: translateY(-4px) rotate(2deg);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.sticky-note::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-top: 20px solid rgba(255, 255, 255, 0.5);
}

.sticky-note.blue {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.sticky-note.green {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.sticky-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
  font-size: 16px;
}

.sticky-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

/* ==================== v2.0 日历模块优化 ==================== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.calendar-day:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
  background: #eff6ff;
}

.calendar-day.today {
  background: linear-gradient(135deg, #3b82f6, #ef4444);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.calendar-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
}

.calendar-day.today.has-event::after {
  background: white;
}

/* ==================== v2.0 财务模块优化 ==================== */
.finance-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #ef4444);
}

.summary-amount {
  font-size: 24px;
  font-weight: 800;
  color: #1d4ed8;
  margin: 8px 0;
}

.summary-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

/* ==================== 纸飞机模块 ==================== */
.paperplane-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: planeSlideIn 0.5s ease;
  position: relative;
  overflow: hidden;
}

@keyframes planeSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.paperplane-card::before {
  content: '✈️';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 30px;
  opacity: 0.1;
}

.paperplane-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-light);
}

.paperplane-sender {
  font-weight: bold;
  color: var(--primary-color);
}

.paperplane-time {
  margin-left: auto;
}

.paperplane-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 10px;
}

.paperplane-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.paperplane-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}

.paperplane-btn.reply {
  background: var(--primary-color);
  color: white;
}

.paperplane-btn.delete {
  background: #ef4444;
  color: white;
}

.paperplane-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 纸飞机飞行动画 */
.paperplane-flying {
  position: fixed;
  font-size: 50px;
  z-index: 9999;
  animation: flyAcross 2s ease-in-out forwards;
  pointer-events: none;
}

@keyframes flyAcross {
  0% {
    left: -100px;
    top: 50%;
    opacity: 1;
    transform: rotate(-30deg);
  }
  50% {
    opacity: 1;
    transform: rotate(0deg);
  }
  100% {
    left: 100vw;
    top: 30%;
    opacity: 0;
    transform: rotate(30deg);
  }
}

/* 纸飞机输入框样式 */
#paperplane-msg {
  width: 100%;
  min-height: 100px;
  padding: 15px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 15px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

#paperplane-msg:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 放飞纸飞机按钮样式 */
.send-paperplane button[onclick="sendPaperPlane()"] {
  flex: 1;
  padding: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.3s;
}

.send-paperplane button[onclick="sendPaperPlane()"]:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.send-paperplane button[onclick="sendPaperPlane()"]:active {
  transform: scale(0.98);
}

/* ==================== 🚨 全局紫红色/紫色清除（适合天空蓝背景）==================== */
/* 主色调替换：紫红色(#3b82f6) → 蓝色(#3b82f6)，紫色(#1d4ed8) → 深蓝(#1d4ed8) */

/* 主色变量覆盖 */
:root {
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --rose-400: #fca5a5;
  --rose-500: #f87171;
  --season-accent: #3b82f6;
  --season-accent2: #60a5fa;
}

/* 全站主色按钮（蓝色） */
.btn-spin,
.btn-blue,
.btn-primary,
button[style*="ec4899"],
button[style*="f43f5e"] {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  box-shadow: 0 4px 20px rgba(59,130,246,0.4) !important;
}

/* 今日日期高亮（日历） */
.calendar-day.today,
.cal-day.today {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
}

/* 所有进度条 */
.wishlist-progress-fill,
.challenge-progress-fill,
.love-tree-progress-bar,
.music-progress-fill {
  background: linear-gradient(90deg, #3b82f6, #06b6d4) !important;
}

/* 所有强调色文字（#3b82f6 → #3b82f6） */
[style*="color: #3b82f6"],
[style*="color:#3b82f6"] {
  color: #3b82f6 !important;
}

/* 所有强调色背景（#3b82f6 → #3b82f6） */
[style*="background: #3b82f6"],
[style*="background:#3b82f6"],
[style*="background: linear-gradient(135deg, #3b82f6"],
[style*="background:linear-gradient(135deg, #3b82f6"] {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
}

/* 音乐星球 */
.music-planet {
  background: radial-gradient(circle at 40% 40%, #3b82f6, #1e40af) !important;
  box-shadow: 0 0 40px rgba(59,130,246,0.5), 0 0 80px rgba(59,130,246,0.2) !important;
}

.music-progress-fill {
  background: linear-gradient(90deg, #3b82f6, #06b6d4) !important;
}

.music-play-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
}

.music-dot {
  background: #3b82f6 !important;
}

/* 幸运转盘 */
.btn-spin {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
}

.wheel-result {
  background: rgba(59,130,246,0.1) !important;
  color: #3b82f6 !important;
}

/* 爱情树 */
.love-tree-name {
  color: #3b82f6 !important;
}

.love-tree-progress-bar {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8) !important;
}

/* 30天挑战 */
.challenge-progress-fill {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8) !important;
}

.challenge-item .ch-num {
  background: rgba(59,130,246,0.15) !important;
  color: #3b82f6 !important;
}

.challenge-item.done .ch-num {
  background: #3b82f6 !important;
}

/* 情书设计器 */
.letter-content .letter-header {
  color: #3b82f6 !important;
}

.letter-content .letter-footer {
  color: #1d4ed8 !important;
}

/* 弹幕 */
.barrage-item {
  color: #3b82f6 !important;
  text-shadow: 0 1px 4px rgba(59,130,246,0.3) !important;
}

.barrage-input button:first-child {
  background: #3b82f6 !important;
}

.barrage-input input:focus {
  border-color: #3b82f6 !important;
}

/* MBTI */
.mbti-card.bibi-card {
  border-top: 3px solid #3b82f6 !important;
}

.mbti-type-btn:hover {
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
}

.mbti-type-btn.selected {
  border-color: #3b82f6 !important;
  background: linear-gradient(135deg, #dbeafe, #eff6ff) !important;
  color: #1d4ed8 !important;
}

.mbti-select-user.active {
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
  color: #3b82f6 !important;
}

/* 音乐风格标签 */
.music-opt-btn.active {
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

.music-genre-tab.active {
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

/* 心愿单 */
.wishlist-filter .tab.active {
  background: #3b82f6 !important;
}

/* 成就统计 */
.achievements-stats b {
  color: #3b82f6 !important;
}

/* 骰子 */
.dice-number {
  color: #3b82f6 !important;
}

/* 情侣打卡 */
.drift-tab.active {
  color: #3b82f6 !important;
  border-bottom-color: #3b82f6 !important;
}

/* 便签模块 */
.note-color-btn.active {
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
}

/* 顶部导航按钮激活色 */
.top-nav button.active,
.quick-nav-item.active {
  color: #3b82f6 !important;
  border-bottom-color: #3b82f6 !important;
}

/* 更新日志按钮 */
.btn-upgrade,
.btn-changelog {
  background: rgba(59,130,246,0.15) !important;
  color: #3b82f6 !important;
}

/* 卡片悬停边框 */
.main-card:hover,
.feature-card:hover {
  border-color: #3b82f6 !important;
}

/* 记忆卡片翻转边框 */
.memory-card.flipped {
  border: 2px solid #3b82f6 !important;
}

/* 所有渐变背景（紫红→蓝色） */
[style*="linear-gradient(135deg, #3b82f6, #ef4444"],
[style*="linear-gradient(135deg, #3b82f6, #1d4ed8"] {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
}

/* 所有SVG进度圆（冥想、测验等） */
[style*="stroke:#3b82f6"],
[style*="stroke:#1d4ed8"] {
  stroke: #3b82f6 !important;
}

/* 分数文字 */
.quiz-score-text {
  color: #3b82f6 !important;
}

/* 盲盒结果标题 */
.blindbox-result h3 {
  color: #3b82f6 !important;
}

/* 心情按钮 */
.mood-btn:hover {
  border-color: #60a5fa !important;
  background: #eff6ff !important;
}

.mood-btn.active {
  border-color: #3b82f6 !important;
  background: #dbeafe !important;
}

/* PWA安装按钮 */
.btn-pwa-install {
  color: #3b82f6 !important;
}

/* 底部弹出菜单按钮 */
.more-menu button:hover {
  background: rgba(59,130,246,0.1) !important;
  color: #3b82f6 !important;
}



/* ===== 在线状态按钮优化样式 ===== */
.btn-online {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-online:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-online:active {
  transform: translateY(0);
}

/* 在线状态指示灯 */
.btn-online .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: pulse-dot 2s infinite;
}

.btn-online .status-dot.offline {
  background: #9ca3af;
  box-shadow: none;
  animation: none;
}

.btn-online .status-dot.away {
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 对方在线时的样式 */
.btn-online.other-online {
  background: rgba(74, 222, 128, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.btn-online.other-online .status-dot {
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80, 0 0 16px #4ade80;
}

/* 按钮文字 */
.btn-online .status-text {
  white-space: nowrap;
}

/* 响应式：手机端缩小 */
@media (max-width: 768px) {
  .btn-online {
    padding: 5px 10px;
    font-size: 12px;
  }
}


/* ===== 底部导航手机端优化 ===== */
@media (max-width: 768px) {
  #bottom-nav {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding: 0 8px;
  }
  
  #bottom-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }
  
  #bottom-nav .nav-item {
    flex-shrink: 0;
    min-width: 60px;
    padding: 8px 12px;
    font-size: 12px;
  }
  
  #bottom-nav .nav-item span {
    font-size: 18px;
    display: block;
    margin-bottom: 2px;
  }
  
  /* 顶部栏在手机端优化 */
  #top-bar {
    flex-wrap: wrap;
    padding: 8px 12px;
  }
  
  .top-left {
    order: 2;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
  
  .top-nicknames {
    order: 1;
    flex: 1;
  }
  
  .top-right {
    order: 3;
    display: flex;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  #bottom-nav .nav-item {
    min-width: 50px;
    padding: 6px 8px;
    font-size: 11px;
  }
  
  .love-counter, .found-date {
    font-size: 12px;
  }
  
  .btn-guide {
    width: 36px;
    height: 36px;
    padding: 6px 10px;
    font-size: 16px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}

/* ========== 聊天室 v2.0 样式 ========== */

/* 回复预览 */
.chatroom-reply-preview {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
  margin: 0 12px;
}

.chatroom-reply-content {
  flex: 1;
}

.chatroom-reply-name {
  font-size: 12px;
  font-weight: 600;
  color: #3b82f6;
}

.chatroom-reply-text {
  font-size: 12px;
  color: #666;
  margin-left: 8px;
}

.chatroom-reply-cancel {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 16px;
}

/* 编辑预览 */
.chatroom-edit-preview {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: rgba(251, 191, 36, 0.1);
  border-left: 3px solid #fbb024;
  margin: 0 12px;
}

.chatroom-edit-label {
  flex: 1;
  font-size: 12px;
  color: #f59e0b;
  font-weight: 600;
}

.chatroom-edit-cancel {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 16px;
}

/* 搜索栏 */
.chatroom-search {
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#chatroom-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 14px;
}

.chatroom-search-results {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 8px;
}

.chatroom-search-result {
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatroom-search-result:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* 反应选择器 */
.chatroom-reaction-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: white;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.chatroom-reaction-btn {
  background: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s;
}

.chatroom-reaction-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: scale(1.2);
}

/* 消息反应 */
.chatroom-msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.chatroom-msg-reaction {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.chatroom-msg-reaction.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
}

.chatroom-msg-reaction:hover {
  transform: scale(1.1);
}

/* 回复引用 */
.chatroom-msg-reply {
  background: rgba(0, 0, 0, 0.05);
  border-left: 3px solid #3b82f6;
  padding: 4px 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  cursor: pointer;
}

.chatroom-msg-reply-name {
  font-size: 11px;
  font-weight: 600;
  color: #3b82f6;
  margin-right: 6px;
}

.chatroom-msg-reply-text {
  font-size: 11px;
  color: #666;
}

/* 消息菜单 */
.chatroom-msg-menu {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 4px;
  z-index: 10000;
  min-width: 120px;
}

.chatroom-msg-menu button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  color: #333;
}

.chatroom-msg-menu button:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

/* 已删除消息 */
.chatroom-msg-deleted {
  font-style: italic;
  color: #999;
  font-size: 13px;
}

/* 已编辑标记 */
.chatroom-msg-edited {
  font-size: 11px;
  color: #999;
  margin-left: 4px;
}

/* 图片消息 */
.chatroom-msg-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  cursor: pointer;
  margin: 4px 0;
}

/* 贴纸面板 */
.chatroom-sticker-panel {
  position: absolute;
  bottom: 60px;
  left: 12px;
  right: 12px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.chatroom-sticker-header {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.chatroom-sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.chatroom-sticker-item {
  background: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.chatroom-sticker-item:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: scale(1.1);
}

/* 消息高亮 */
.chatroom-msg-highlight {
  animation: highlightMsg 2s ease;
}

@keyframes highlightMsg {
  0%, 100% { background: transparent; }
  50% { background: rgba(59, 130, 246, 0.3); }
}

/* 头部按钮 */
.chatroom-header-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.chatroom-header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 输入区域按钮 */
.chatroom-input-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.chatroom-input-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* ========== 消息反应功能样式 ========== */

/* 消息容器 */
.chatroom-msg {
  position: relative;
}

/* 反应容器 */
.chatroom-msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  margin-bottom: 2px;
}

/* 单个反应 */
.chatroom-msg-reaction {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.chatroom-msg-reaction:hover {
  transform: scale(1.1);
  background: rgba(59, 130, 246, 0.1);
}

.chatroom-msg-reaction.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #3b82f6;
}

/* 反应选择器 */
.reaction-picker {
  position: fixed;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 8px 12px;
  display: flex;
  gap: 4px;
  z-index: 10000;
  animation: fadeInScale 0.2s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.reaction-picker-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  transition: all 0.2s;
}

.reaction-picker-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.3);
}

/* 双击提示 */
.chatroom-msg-doubleclick-hint {
  position: absolute;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  animation: fadeOut 1s ease 0.5s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ========== 语音消息功能样式 ========== */

/* 语音按钮 */
.chatroom-voice-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.chatroom-voice-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.chatroom-voice-btn:active {
  transform: scale(0.95);
}

/* 语音消息容器 */
.chatroom-msg-voice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  cursor: pointer;
  min-width: 120px;
  transition: all 0.2s;
}

.chatroom-msg-voice:hover {
  background: rgba(0, 0, 0, 0.08);
}

.chatroom-msg-mine .chatroom-msg-voice {
  background: rgba(255, 255, 255, 0.2);
}

.chatroom-msg-mine .chatroom-msg-voice:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 播放图标 */
.voice-play-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* 时长 */
.voice-duration {
  font-size: 13px;
  color: #666;
  flex-shrink: 0;
}

.chatroom-msg-mine .voice-duration {
  color: rgba(255, 255, 255, 0.9);
}

/* 波形动画 */
.voice-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  flex: 1;
}

.voice-waveform span {
  display: block;
  width: 3px;
  background: #667eea;
  border-radius: 2px;
  animation: voiceWave 0.8s ease-in-out infinite;
}

.chatroom-msg-mine .voice-waveform span {
  background: white;
}

.voice-waveform span:nth-child(1) { height: 8px; animation-delay: 0s; }
.voice-waveform span:nth-child(2) { height: 12px; animation-delay: 0.1s; }
.voice-waveform span:nth-child(3) { height: 16px; animation-delay: 0.2s; }
.voice-waveform span:nth-child(4) { height: 10px; animation-delay: 0.3s; }
.voice-waveform span:nth-child(5) { height: 14px; animation-delay: 0.4s; }

@keyframes voiceWave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.5); }
}

/* 正在录制提示 */
.chatroom-recording-indicator {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #ef4444;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.recording-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ========== 消息搜索功能样式 ========== */

/* 搜索按钮容器 */
.chatroom-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 搜索按钮 */
.chatroom-header-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.chatroom-header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* E2EE 未加密警告横幅 */
.chatroom-e2ee-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-bottom: 1px solid #3b82f6;
  font-size: 12px;
  color: #1e40af;
  animation: e2eeBannerSlideIn 0.3s ease;
}
.chatroom-e2ee-banner span {
  text-align: center;
}
@keyframes e2eeBannerSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes e2eeShake {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-4px); }
  30%, 70% { transform: translateX(4px); }
}

/* 搜索容器 */
.chatroom-search {
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* 搜索输入框 */
#chatroom-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

#chatroom-search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 搜索结果容器 */
.chatroom-search-results {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 8px;
}

/* 搜索结果项 */
.chatroom-search-result {
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.chatroom-search-result:hover {
  background: rgba(102, 126, 234, 0.1);
}

.chatroom-search-result-from {
  font-size: 16px;
  flex-shrink: 0;
}

.chatroom-search-result-text {
  font-size: 13px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* 搜索高亮 */
.chatroom-search-highlight {
  background: #fbbf24;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

/* 搜索信息 */
.chatroom-search-info {
  font-size: 12px;
  color: #6b7280;
  padding: 4px 8px;
  margin-bottom: 4px;
}

/* 无搜索结果 */
.chatroom-search-no-results {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  padding: 16px;
}

/* ========== 消息格式化样式 ========== */

/* 粗体 */
.chatroom-msg-text strong {
  font-weight: 700;
}

/* 斜体 */
.chatroom-msg-text em {
  font-style: italic;
}

/* 下划线 */
.chatroom-msg-text u {
  text-decoration: underline;
}

/* 代码 */
.chatroom-msg-text code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.chatroom-msg-mine .chatroom-msg-text code {
  background: rgba(255, 255, 255, 0.2);
}

/* 链接 */
.chatroom-msg-link {
  color: #667eea;
  text-decoration: none;
  word-break: break-all;
}

.chatroom-msg-link:hover {
  text-decoration: underline;
}

.chatroom-msg-mine .chatroom-msg-link {
  color: white;
  text-decoration: underline;
}

/* 消息高亮（搜索跳转） */
.chatroom-msg-highlight {
  animation: highlightMsg 2s ease;
}

@keyframes highlightMsg {
  0%, 100% { background: transparent; }
  50% { background: rgba(102, 126, 234, 0.3); }
}

/* ========== 手机端适配优化 ========== */

@media (max-width: 480px) {
  .chatroom-panel {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
  
  .chatroom-header {
    padding: 12px 16px;
    min-height: 60px;
  }
  
  .chatroom-partner-avatar {
    font-size: 28px;
  }
  
  .chatroom-partner-name {
    font-size: 15px;
  }
  
  .chatroom-msg-bubble {
    max-width: 85%;
    padding: 8px 12px;
  }
  
  .chatroom-input-bar {
    padding: 8px 12px;
  }
  
  .chatroom-input {
    font-size: 16px; /* 防止iOS自动缩放 */
  }
  
  .chatroom-voice-btn,
  .chatroom-emoji-btn,
  .chatroom-send-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  /* 语音消息移动端优化 */
  .chatroom-msg-voice {
    min-width: 100px;
    padding: 6px 10px;
  }
  
  .voice-duration {
    font-size: 12px;
  }
  
  /* 搜索移动端优化 */
  .chatroom-search {
    padding: 8px;
  }
  
  #chatroom-search-input {
    font-size: 16px; /* 防止iOS自动缩放 */
  }
}

@media (max-width: 360px) {
  .chatroom-panel {
    width: 100vw;
  }
  
  .chatroom-msg-bubble {
    max-width: 90%;
    padding: 6px 10px;
  }
  
  .chatroom-input-bar {
    padding: 6px 8px;
  }
}

/* ===== v8.8: Reply / Edit / Delete / R2 Voice ===== */
.chatroom-msg-reply {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 4px 8px; margin-bottom: 4px;
  background: rgba(0,0,0,0.06); border-radius: 8px;
  cursor: pointer; transition: background 0.15s;
  max-width: 220px; overflow: hidden;
}
.chatroom-msg-mine .chatroom-msg-reply { background: rgba(255,255,255,0.15); }
.chatroom-msg-reply:hover { background: rgba(0,0,0,0.1); }
.chatroom-msg-mine .chatroom-msg-reply:hover { background: rgba(255,255,255,0.25); }
.reply-quote-bar {
  width: 3px; min-height: 28px; border-radius: 2px;
  background: #ff6b9d; flex-shrink: 0;
}
.reply-quote-body { display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.reply-quote-from { font-size: 11px; font-weight: 600; color: #ff6b9d; }
.reply-quote-text { font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chatroom-msg-mine .reply-quote-text { color: rgba(255,255,255,0.6); }
.chatroom-reply-preview {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: rgba(0,0,0,0.04);
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 12px;
}
.reply-preview-bar { width: 3px; height: 24px; border-radius: 2px; background: #ff6b9d; flex-shrink: 0; }
.reply-preview-content { flex: 1; display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.reply-preview-label { font-size: 10px; font-weight: 700; color: #ff6b9d; text-transform: uppercase; letter-spacing: 0.5px; }
.reply-preview-from { font-size: 11px; font-weight: 600; color: #333; }
.reply-preview-text { font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-preview-cancel {
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: rgba(0,0,0,0.08); color: #999; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.reply-preview-cancel:hover { background: rgba(0,0,0,0.15); color: #666; }
.chatroom-msg-edited {
  font-size: 10px;
  color: rgba(150,150,150,0.7);
  margin-left: 4px;
  font-style: italic;
  cursor: pointer;
  text-decoration: underline dotted;
  transition: color 0.2s;
}
.chatroom-msg-edited:hover {
  color: rgba(180,180,255,0.9);
}

/* 撤回消息占位 */
.chatroom-msg-recalled { display: flex; justify-content: center; padding: 6px 0; }
.chatroom-msg-recalled-bubble {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 6px 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}
.chatroom-msg-recalled-bubble .recalled-icon { font-size: 14px; opacity: 0.6; }
.chatroom-msg-recalled-bubble .recalled-time { font-size: 10px; opacity: 0.4; margin-left: 4px; }

/* 编辑历史弹窗 */
.edit-history-entry {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}
.edit-history-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.edit-history-index { font-size: 12px; color: rgba(255,255,255,0.7); font-weight: 600; }
.edit-history-time { font-size: 11px; color: rgba(255,255,255,0.35); }
.edit-history-diff { display: flex; gap: 8px; align-items: flex-start; }
.diff-label { display: block; font-size: 10px; color: rgba(255,255,255,0.3); margin-bottom: 2px; text-transform: uppercase; }
.diff-text { font-size: 13px; color: rgba(255,255,255,0.85); word-break: break-all; }
.edit-history-old, .edit-history-new { flex: 1; min-width: 0; }
.edit-history-old .diff-text { color: rgba(255,255,255,0.45); text-decoration: line-through; }
.diff-arrow { color: rgba(255,255,255,0.2); font-size: 18px; padding-top: 14px; flex-shrink: 0; }

/* ===== v8.9: Three-state Online Status (green/yellow/gray) ===== */

/* Green — online / active foreground */
.status-light.green {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16,185,129,0.5);
}
.status-light.green.pulse {
  animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 4px rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 12px rgba(16,185,129,0.8); }
}

/* Yellow — idle / background / lock screen */
.status-light.yellow {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245,158,11,0.5);
}
.status-light.yellow.pulse-slow {
  animation: pulseYellow 3s infinite;
}
@keyframes pulseYellow {
  0%, 100% { box-shadow: 0 0 4px rgba(245,158,11,0.3); opacity: 0.8; }
  50% { box-shadow: 0 0 10px rgba(245,158,11,0.6); opacity: 1; }
}

/* Gray — offline */
.status-light.gray {
  background: #9ca3af;
  box-shadow: 0 0 2px rgba(156,163,175,0.3);
}

/* Status light base (ensure circle shape) */
.status-light {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Status transition animation between states */
@keyframes statusTransition {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.status-light.transitioning {
  animation: statusTransition 0.4s ease;
}

/* Toast notification for state changes */
.status-toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  padding: 8px 20px; border-radius: 24px;
  font-size: 13px; font-weight: 500;
  background: rgba(0,0,0,0.8); color: #fff;
  z-index: 10000;
  animation: toastSlideIn 0.3s ease, toastSlideOut 0.3s ease 2.5s forwards;
}
.status-toast.idle { background: rgba(245,158,11,0.9); }
.status-toast.online { background: rgba(16,185,129,0.9); }
.status-toast.offline { background: rgba(156,163,175,0.9); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastSlideOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes menuFadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
#msg-action-menu { animation: menuFadeIn 0.15s ease; }

/* ===== v9.0: Notification Toast System ===== */

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

#notification-toast-container {
  pointer-events: none;
}

#notification-toast-container > div {
  overflow: hidden;
}

/* Notification permission hint */
#notification-permission-hint {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease;
}

/* Quiet hours badge */
.quiet-hours-badge {
  display: inline-block;
  background: rgba(139,92,246,0.15);
  color: #8b5cf6;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 6px;
  vertical-align: middle;
}
