/* ============================================
   萌宠乐园 - PC端简洁设计 (一屏布局)
   ============================================ */

:root {
  --primary: #FF6B9D;
  --primary-light: #FF8FB1;
  --primary-dark: #E84A7F;
  --secondary: #FFA94D;
  --accent: #4ECDC4;
  
  --hunger-color: #FFB347;
  --happiness-color: #FF6B9D;
  --energy-color: #51CF66;
  --health-color: #20C997;
  --exp-color: #CC5DE8;
  
  --bg-primary: #FFF5F7;
  --bg-card: #FFFFFF;
  --text-primary: #2D3436;
  --text-secondary: #636E72;
  
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  background: linear-gradient(135deg, #FFF5F7 0%, #FFE8EE 100%);
  color: var(--text-primary);
}

.hidden { display: none !important; }

/* ============================================
   加载屏幕
   ============================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #FFE8ED 0%, #FFF5F7 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-dog {
  font-size: 6rem;
  animation: bounce 1.5s ease-in-out infinite;
}

.loading-text {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.loading-bar-container {
  width: 180px;
  height: 5px;
  background: rgba(255, 107, 157, 0.2);
  border-radius: 3px;
  margin-top: 1.5rem;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  animation: loading 2s ease-in-out forwards;
}

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

@keyframes loading {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ============================================
   登录界面
   ============================================ */
.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
}

.showcase-dog {
  font-size: 6rem;
  animation: float 3s ease-in-out infinite;
}

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

.auth-title {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 1rem 0 0.5rem;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.input-group {
  margin-bottom: 1rem;
  text-align: left;
}

.input-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8e8e8;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-main {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 0.5rem;
}

.auth-toggle {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.toggle-link {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

/* ============================================
   主游戏界面 - 一屏布局
   ============================================ */
.game-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px 20px 70px;
}

/* 顶部状态栏 */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 8px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

/* 任务小部件 */
.task-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #51CF66, #2E7D32);
  color: white;
  padding: 8px 16px;
  border-radius: 50px;
  cursor: pointer;
  animation: pulse 2s infinite;
  transition: all 0.2s;
}

.task-widget:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(81, 207, 102, 0.4);
}

.task-widget-icon { font-size: 1.1rem; }

.task-widget-text {
  font-weight: 700;
  font-size: 0.85rem;
}

.task-widget-badge {
  background: white;
  color: #2E7D32;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
}

/* 天气迷你预览 */
.weather-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.3), rgba(255, 255, 255, 0.5));
  padding: 8px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.weather-mini:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.5), rgba(255, 255, 255, 0.7));
}

.weather-mini span:first-child { font-size: 1.2rem; }

.weather-mini span:last-child {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.player-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.player-name {
  font-weight: 800;
  font-size: 1.1rem;
}

.player-level-badge {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
}

.currency-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FFF9E6, #FFF3D6);
  padding: 8px 16px;
  border-radius: 50px;
  border: 2px solid #FFE082;
}

.coin-icon { font-size: 1.2rem; }

.coin-amount {
  font-weight: 900;
  font-size: 1.1rem;
  color: #F57C00;
}

.settings-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.04);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
}

/* ============================================
   主内容区 - 左右布局
   ============================================ */
.main-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 8px;
}

/* 响应式布局 - 小屏幕 */
@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr 260px;
  }
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    overflow-y: auto;
  }

  .status-panel {
    max-height: 300px;
  }
}

/* 左侧 - 宠物展示区 */
.pet-stage-area {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pet-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.pet-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pet-display-name {
  font-size: 1.4rem;
  font-weight: 900;
}

.stage-badge {
  background: linear-gradient(135deg, var(--accent), #3DBDB5);
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
}

.level-badge {
  background: linear-gradient(135deg, var(--exp-color), #A855F7);
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
}

.mood-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.04);
  padding: 8px 16px;
  border-radius: 50px;
}

.mood-emoji { font-size: 1.4rem; }

.mood-text {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* 天气指示器 */
.weather-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.2), rgba(255, 255, 255, 0.5));
  padding: 6px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.weather-indicator:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.3), rgba(255, 255, 255, 0.6));
}

.weather-emoji { font-size: 1.3rem; }

.weather-text {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.weather-temp {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 6px;
  border-radius: 50px;
}

/* 天气效果层 */
.weather-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  overflow: hidden;
}

.weather-content {
  position: absolute;
  inset: 0;
}

/* 雨天效果 */
.weather-rain .weather-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(100, 120, 140, 0.1) 0%, transparent 100%);
}

.rain-drop {
  position: absolute;
  width: 2px;
  height: 15px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.6));
  border-radius: 2px;
  animation: rain-fall linear infinite;
}

@keyframes rain-fall {
  0% { transform: translateY(-20px); opacity: 1; }
  100% { transform: translateY(400px); opacity: 0.3; }
}

/* 雪天效果 */
.weather-snow .weather-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(200, 210, 220, 0.15) 0%, transparent 100%);
}

.snow-flake {
  position: absolute;
  font-size: 1rem;
  animation: snow-fall linear infinite;
  opacity: 0.8;
}

@keyframes snow-fall {
  0% { 
    transform: translateY(-20px) rotate(0deg); 
    opacity: 1; 
  }
  100% { 
    transform: translateY(400px) rotate(360deg); 
    opacity: 0.3; 
  }
}

/* 雷雨效果 */
.weather-thunder .weather-content {
  animation: thunder-flash 5s infinite;
}

@keyframes thunder-flash {
  0%, 90%, 100% { background: transparent; }
  92%, 96% { background: rgba(255, 255, 255, 0.3); }
  94%, 98% { background: transparent; }
}

/* 多云效果 */
.weather-cloudy .weather-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(180, 190, 200, 0.1) 0%, transparent 100%);
}

/* 夜晚效果 */
.weather-night .stage-bg {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #1a1a2e 100%) !important;
}

.weather-night .grass-pattern {
  opacity: 0.6;
}

.weather-night .sun {
  display: none;
}

.weather-night .moon {
  display: block;
  position: absolute;
  top: 5%;
  right: 5%;
  font-size: 3rem;
  animation: moon-glow 4s ease-in-out infinite;
}

@keyframes moon-glow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5)); }
  50% { filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.8)); }
}

/* 星星 */
.star {
  position: absolute;
  font-size: 0.5rem;
  animation: star-twinkle 2s ease-in-out infinite;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* 彩虹效果 */
.weather-rainbow .weather-content::after {
  content: '🌈';
  position: absolute;
  top: 10%;
  right: 10%;
  font-size: 4rem;
  animation: rainbow-float 3s ease-in-out infinite;
}

@keyframes rainbow-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.1); }
}

/* 雾天效果 */
.weather-fog .weather-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(200, 200, 200, 0.3) 0%, rgba(200, 200, 200, 0.1) 100%);
  backdrop-filter: blur(2px);
}

/* 宠物舞台 */
.pet-stage {
  position: relative;
  flex: 1;
  background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 30%, #C8E6C9 60%, #A5D6A7 100%);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.stage-bg {
  position: absolute;
  inset: 0;
}

/* 草地纹理 */
.grass-pattern {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: 
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 20px,
      rgba(139, 195, 74, 0.1) 20px,
      rgba(139, 195, 74, 0.1) 22px
    ),
    linear-gradient(180deg, rgba(139, 195, 74, 0.3) 0%, rgba(104, 159, 56, 0.5) 100%);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* 草地细节纹理 */
.grass-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.3) 2px, transparent 2px),
    radial-gradient(circle at 60% 70%, rgba(255,255,255,0.2) 1px, transparent 1px),
    radial-gradient(circle at 80% 85%, rgba(255,255,255,0.25) 1.5px, transparent 1.5px),
    radial-gradient(circle at 40% 90%, rgba(255,255,255,0.2) 1px, transparent 1px);
  background-size: 50px 50px, 30px 30px, 40px 40px, 35px 35px;
}

/* 云朵 */
.cloud {
  position: absolute;
  font-size: 3rem;
  opacity: 0.8;
  animation: cloud-float 20s ease-in-out infinite;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.cloud-1 { top: 8%; left: 10%; animation-delay: 0s; }
.cloud-2 { top: 15%; right: 15%; animation-delay: -7s; font-size: 2.5rem; }
.cloud-3 { top: 5%; left: 60%; animation-delay: -14s; font-size: 2rem; opacity: 0.6; }

@keyframes cloud-float {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(20px) translateY(-5px); }
  50% { transform: translateX(-10px) translateY(5px); }
  75% { transform: translateX(15px) translateY(-3px); }
}

/* 太阳 */
.sun {
  position: absolute;
  top: 5%;
  right: 5%;
  font-size: 3.5rem;
  animation: sun-pulse 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255, 200, 0, 0.5));
}

@keyframes sun-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(255, 200, 0, 0.5)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 30px rgba(255, 200, 0, 0.7)); }
}

.floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, transparent 0%, rgba(139, 195, 74, 0.4) 100%);
}

/* 狗屋 */
.dog-house {
  position: absolute;
  bottom: 10%;
  left: 6%;
  width: 90px;
  height: 95px;
  z-index: 5;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.dog-house:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}

.dog-house svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
}

.house-edit-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #FF6B6B, #EE5A24);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(238,90,36,0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.dog-house:hover .house-edit-badge {
  opacity: 1;
}

.house-body {
  width: 100%;
  height: 100%;
  position: relative;
}

.house-roof {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  color: #D32F2F;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.house-wall {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 45px;
  background: linear-gradient(180deg, #F5F5DC 0%, #E8E4C9 100%);
  border-radius: 0 0 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.house-door {
  font-size: 1.8rem;
  opacity: 0.8;
}

.outfit-layer {
  pointer-events: none;
}

/* 装饰元素 */
.decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.deco-item {
  position: absolute;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.3s ease;
  z-index: 5;
}

.deco-emoji {
  font-size: 2.2rem;
  display: block;
  transition: all 0.3s ease;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.2));
}

.deco-glow {
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.deco-item:hover .deco-emoji {
  transform: scale(1.2) rotate(10deg);
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
}

.deco-item:hover .deco-glow {
  opacity: 1;
}

/* 装饰元素位置 */
.deco-item.bone { top: 8%; left: 5%; }
.deco-item.ball { top: 12%; right: 8%; }
.deco-item.bowl { bottom: 10%; right: 12%; }
.deco-item.yarn { bottom: 20%; left: 25%; }
.deco-item.bell { top: 25%; left: 15%; }

/* 装饰元素动画 */
.deco-item.ball .deco-emoji {
  animation: ball-roll 3s ease-in-out infinite;
}

@keyframes ball-roll {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

.deco-item.bell .deco-emoji {
  animation: bell-ring 2s ease-in-out infinite;
}

@keyframes bell-ring {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(-15deg); }
  30% { transform: rotate(10deg); }
  40% { transform: rotate(-10deg); }
  50% { transform: rotate(0deg); }
}

/* 宠物角色 - 完整SVG狗狗样式 */
.pet-character-wrapper {
  position: relative;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* SVG狗狗基础样式 */
.pet-dog-svg {
  width: 200px;
  height: 240px;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.2));
  animation: dog-idle 2.5s ease-in-out infinite;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 生长阶段 - 幼犬期 (baby) */
.pet-dog-svg.stage-baby {
  width: 120px;
  height: 144px;
  opacity: 0.95;
}

.pet-dog-svg.stage-baby .dog-body {
  transform-origin: center;
  transform: scale(0.85);
}

.pet-dog-svg.stage-baby .dog-head {
  transform-origin: 100px 90px;
  transform: scale(1.15);
}

.pet-dog-svg.stage-baby .dog-legs {
  transform-origin: center bottom;
  transform: scale(0.7);
}

/* 生长阶段 - 成长期 (child) */
.pet-dog-svg.stage-child {
  width: 160px;
  height: 192px;
}

.pet-dog-svg.stage-child .dog-body {
  transform-origin: center;
  transform: scale(0.95);
}

.pet-dog-svg.stage-child .dog-head {
  transform-origin: 100px 90px;
  transform: scale(1.05);
}

/* 生长阶段 - 少年期 (teen) */
.pet-dog-svg.stage-teen {
  width: 200px;
  height: 240px;
}

/* 生长阶段 - 成熟期 (adult) */
.pet-dog-svg.stage-adult {
  width: 240px;
  height: 288px;
}

.pet-dog-svg.stage-adult .dog-body {
  transform-origin: center;
  transform: scale(1.1);
}

.pet-dog-svg.stage-adult .dog-head {
  transform-origin: 100px 90px;
  transform: scale(1.05);
}

/* 生长阶段 - 精英期 (master) */
.pet-dog-svg.stage-master {
  width: 280px;
  height: 336px;
  filter: drop-shadow(0 20px 40px rgba(255, 215, 0, 0.3)) drop-shadow(0 15px 30px rgba(0, 0, 0, 0.2));
}

.pet-dog-svg.stage-master .dog-body,
.pet-dog-svg.stage-master .dog-head {
  filter: brightness(1.1);
}

/* 狗狗动画 */
@keyframes dog-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes dog-happy {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(-3deg); }
  75% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes dog-tail-wag {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
}

@keyframes dog-tail-wag-fast {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(25deg); }
  75% { transform: rotate(-25deg); }
}

@keyframes dog-eat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05) translateY(3px); }
}

@keyframes dog-sleep {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes dog-jump {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-40px) scale(1.1); }
}

@keyframes dog-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes dog-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* 尾巴摇摆动画 */
.dog-tail {
  transform-origin: 160px 140px;
  animation: dog-tail-wag 1s ease-in-out infinite;
}

/* 开心状态 */
.pet-dog-svg.happy {
  animation: dog-happy 0.8s ease-in-out infinite;
}

.pet-dog-svg.happy .dog-tail {
  animation: dog-tail-wag-fast 0.3s ease-in-out infinite;
}

.pet-dog-svg.happy .dog-tongue {
  display: block;
}

.pet-dog-svg.happy .dog-blush {
  display: block;
}

/* 兴奋跳跃状态 */
.pet-dog-svg.excited {
  animation: dog-jump 0.6s ease-in-out infinite;
}

.pet-dog-svg.excited .dog-tail {
  animation: dog-tail-wag-fast 0.2s ease-in-out infinite;
}

/* 转圈状态 */
.pet-dog-svg.spinning {
  animation: dog-spin 1s ease-in-out;
}

/* 吃东西状态 */
.pet-dog-svg.eating {
  animation: dog-eat 0.5s ease-in-out infinite;
}

.pet-dog-svg.eating .dog-tongue {
  display: block;
}

/* 睡觉状态 */
.pet-dog-svg.sleeping {
  animation: dog-sleep 3s ease-in-out infinite;
}

.pet-dog-svg.sleeping .dog-eyes {
  display: none;
}

.pet-dog-svg.sleeping .dog-sleep-eyes {
  display: block;
}

.pet-dog-svg.sleeping .dog-tail {
  animation: dog-tail-wag 3s ease-in-out infinite;
}

/* 生病状态 */
.pet-dog-svg.sick {
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.2)) grayscale(0.3);
  animation: dog-sleep 4s ease-in-out infinite;
}

.pet-dog-svg.sick .dog-sick {
  display: block;
}

/* 饿了状态 */
.pet-dog-svg.hungry {
  animation: dog-shake 2s ease-in-out infinite;
}

.pet-dog-svg.hungry .dog-hungry {
  display: block;
}

.pet-dog-svg.hungry .dog-ears {
  transform: rotate(-10deg);
  transform-origin: 100px 75px;
}

/* 悲伤状态 */
.pet-dog-svg.sad {
  animation: dog-sleep 5s ease-in-out infinite;
}

.pet-dog-svg.sad .dog-eyes {
  display: none;
}

.pet-dog-svg.sad .dog-sad {
  display: block;
}

.pet-dog-svg.sad .dog-ears {
  transform: rotate(15deg);
  transform-origin: 100px 75px;
}

/* 惊讶状态 */
.pet-dog-svg.surprised {
  animation: dog-shake 0.5s ease-in-out;
}

.pet-dog-svg.surprised .dog-eyes {
  display: none;
}

.pet-dog-svg.surprised .dog-surprised {
  display: block;
}

/* 爱心眼状态 */
.pet-dog-svg.love .dog-eyes {
  display: none;
}

.pet-dog-svg.love .dog-love-eyes {
  display: block;
}

.pet-dog-svg.love .dog-blush {
  display: block;
}

/* 隐藏元素 */
.hidden {
  display: none !important;
}

/* 状态效果 */
.status-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.effect {
  position: absolute;
  font-size: 1.8rem;
}

.effect.love-burst { top: -30px; left: 50%; transform: translateX(-50%); }
.effect.food-float { top: -20px; right: -30px; }
.effect.sleep-zzz { top: -40px; right: -10px; }

/* 对话气泡 */
.speech-bubble {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: white;
  padding: 12px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  z-index: 20;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 2px solid var(--primary-light);
}

.speech-bubble.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid var(--primary-light);
}

/* 粒子特效 */
.particle {
  position: absolute;
  pointer-events: none;
  z-index: 1000;
}

@keyframes particle-burst {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    transform: translate(calc(-50% + var(--tx, 0)), calc(-50% + var(--ty, 0))) scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: translate(calc(-50% + var(--tx, 0)), calc(-50% + var(--ty, -50px))) scale(0.5);
    opacity: 0;
  }
}

/* 不同类型粒子样式 */
.particle-love { filter: drop-shadow(0 0 5px #FF6B9D); }
.particle-stars { filter: drop-shadow(0 0 5px #FFD700); }
.particle-hearts { filter: drop-shadow(0 0 5px #FF6B6B); }
.particle-bubbles { filter: drop-shadow(0 0 3px #74C0FC); }
.particle-sparkles { filter: drop-shadow(0 0 5px #FFA94D); }
.particle-food { filter: drop-shadow(0 0 3px #FFB347); }

/* 触摸提示 */
.touch-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow);
  animation: pulse 2s infinite;
}

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

/* ============================================
   右侧 - 状态和控制面板
   ============================================ */
.status-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

/* 状态条容器 */
.status-bars-container {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.status-bar-group {
  margin-bottom: 8px;
}

.status-bar-group:last-of-type { margin-bottom: 0; }

.status-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

/* 拟人化状态图标 */
.status-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  transition: all 0.3s ease;
}

/* 饱食度 - 小狗叼饭盆 */
.icon-hunger {
  background: linear-gradient(135deg, #FFE5CC, #FFB347);
}
.icon-hunger::before {
  content: "🍖";
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* 心情值 - 爱心气泡 */
.icon-happiness {
  background: linear-gradient(135deg, #FFE4EC, #FF6B9D);
  animation: icon-pulse 2s ease-in-out infinite;
}
.icon-happiness::before {
  content: "💕";
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* 精力值 - 闪电狗爪 */
.icon-energy {
  background: linear-gradient(135deg, #E0F7FA, #4ECDC4);
  animation: icon-shine 2s ease-in-out infinite;
}
.icon-energy::before {
  content: "⚡";
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* 健康值 - 医疗十字 */
.icon-health {
  background: linear-gradient(135deg, #E3F2FD, #56CCF2);
}
.icon-health::before {
  content: "💚";
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* 清洁度 - 泡沫 */
.icon-cleanliness {
  background: linear-gradient(135deg, #E0F7FA, #A8EDEA);
}
.icon-cleanliness::before {
  content: "🫧";
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* 图标动画 */
@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes icon-shine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

/* 低值状态图标警告 */
.status-bar-group.low .status-icon {
  animation: icon-warning 1s ease-in-out infinite;
}

@keyframes icon-warning {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-5deg); }
  75% { transform: scale(1.1) rotate(5deg); }
}

.status-name {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex: 1;
}

.status-num {
  font-weight: 700;
  font-size: 0.8rem;
}

.progress-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.5s ease;
}

/* 属性条渐变色彩 */
.hunger-fill { 
  background: linear-gradient(90deg, #FF9F43 0%, #FF6B35 50%, #FF9F43 100%);
  background-size: 200% 100%;
  animation: progress-shine 2s linear infinite;
}

.happiness-fill { 
  background: linear-gradient(90deg, #FF6B9D 0%, #FF8FB1 50%, #FF6B9D 100%);
  background-size: 200% 100%;
  animation: progress-shine 2s linear infinite;
}

.energy-fill { 
  background: linear-gradient(90deg, #4ECDC4 0%, #44A08D 50%, #4ECDC4 100%);
  background-size: 200% 100%;
  animation: progress-shine 2s linear infinite;
}

.health-fill { 
  background: linear-gradient(90deg, #56CCF2 0%, #2F80ED 50%, #56CCF2 100%);
  background-size: 200% 100%;
  animation: progress-shine 2s linear infinite;
}

.cleanliness-fill { 
  background: linear-gradient(90deg, #A8EDEA 0%, #74C0FC 50%, #A8EDEA 100%);
  background-size: 200% 100%;
  animation: progress-shine 2s linear infinite;
}

.exp-fill { 
  background: linear-gradient(90deg, #CC5DE8 0%, #DA77F2 50%, #CC5DE8 100%);
  background-size: 200% 100%;
  animation: progress-shine 2s linear infinite;
}

/* 进度条光泽动画 */
@keyframes progress-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 低值警告动画 */
.progress-fill.warning {
  animation: progress-warning 1s ease-in-out infinite;
}

@keyframes progress-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 满值闪光效果 */
.progress-fill.full {
  animation: progress-full 1.5s ease-in-out infinite;
}

@keyframes progress-full {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.exp-bar-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

/* 羁绊显示 */
.bond-display {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.bond-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--primary);
}

.bond-icon { font-size: 0.85rem; }

.bond-track {
  height: 5px;
  background: rgba(255, 105, 180, 0.15);
  border-radius: 50px;
  overflow: hidden;
}

.bond-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6B9D, #FFA94D);
  border-radius: 50px;
  transition: width 0.5s ease;
}

/* 操作按钮 */
.action-panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.action-title {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
  flex-shrink: 0;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  flex: 1;
  overflow: visible;
  padding: 2px;
}

.action-card {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-height: 60px;
  width: 100%;
}

.action-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.15);
}

.action-emoji { 
  font-size: 1.4rem;
  line-height: 1;
}

.action-card span:last-child {
  font-weight: 600;
  font-size: 0.7rem;
}

/* ============================================
   底部导航
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 8px 30px;
  z-index: 100;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 24px;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius);
  font-family: inherit;
}

.nav-tab:hover { background: rgba(255, 107, 157, 0.1); }
.nav-tab.active { background: rgba(255, 107, 157, 0.15); }

.tab-icon { font-size: 1.5rem; }

.tab-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.nav-tab.active .tab-label { color: var(--primary); }

/* ============================================
   弹窗
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-window {
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-y: auto;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* 提示消息 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================
   背包系统样式
   ============================================ */
.inventory-modal {
  max-width: 600px;
  padding: 0;
  overflow: hidden;
}

.inventory-modal .modal-header {
  padding: 20px 24px;
  margin: 0;
  background: linear-gradient(135deg, #FFF5F7, #FFE8EE);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.inventory-stats {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
  margin-right: 15px;
}

.inv-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  background: white;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.inv-stat .stat-icon { font-size: 1rem; }

/* 背包标签页 */
.inventory-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  overflow-x: auto;
}

.inv-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.04);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}

.inv-tab:hover {
  background: rgba(255, 107, 157, 0.1);
}

.inv-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.inv-tab .tab-icon { font-size: 1rem; }

/* 背包内容区 */
.inventory-content {
  padding: 20px 24px;
  min-height: 300px;
  max-height: 400px;
  overflow-y: auto;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
}

/* 物品卡片 */
.inventory-item {
  background: white;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.inventory-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary-light);
  box-shadow: 0 6px 16px rgba(255, 107, 157, 0.15);
}

.inventory-item.selected {
  border-color: var(--primary);
  background: rgba(255, 107, 157, 0.05);
}

.item-emoji {
  font-size: 2.2rem;
  line-height: 1;
}

.item-quantity {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--primary);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.item-quantity:empty,
.item-quantity[data-qty="0"],
.item-quantity[data-qty="1"] {
  display: none;
}

.item-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-category {
  font-size: 0.65rem;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.04);
  padding: 2px 8px;
  border-radius: 50px;
}

/* 空背包状态 */
.inventory-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.inventory-empty .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.inventory-empty p {
  font-size: 1rem;
  margin-bottom: 20px;
}

.btn-goto-shop {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-goto-shop:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

/* 物品详情面板 */
.item-detail-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 20px 24px;
  border-top: 2px solid rgba(0,0,0,0.06);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.item-detail-panel.show {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

.detail-emoji {
  font-size: 3rem;
  width: 60px;
  height: 60px;
  background: rgba(0,0,0,0.04);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-name {
  font-size: 1.1rem;
  font-weight: 800;
}

.detail-category {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.06);
  padding: 4px 10px;
  border-radius: 50px;
}

.detail-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.5;
}

.detail-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.effect-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.04);
  border-radius: 50px;
  font-size: 0.8rem;
}

.effect-tag.positive {
  background: rgba(81, 207, 102, 0.15);
  color: #2E7D32;
}

.effect-tag.negative {
  background: rgba(255, 107, 107, 0.15);
  color: #C62828;
}

.detail-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  padding: 4px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: white;
  border-radius: 6px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: var(--primary);
  color: white;
}

.qty-value {
  font-weight: 700;
  min-width: 30px;
  text-align: center;
}

.btn-use-item {
  flex: 1;
  padding: 12px 20px;
  background: linear-gradient(135deg, #51CF66, #2E7D32);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-use-item:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(81, 207, 102, 0.3);
}

.btn-sell-item {
  padding: 12px 20px;
  background: rgba(0,0,0,0.06);
  color: var(--text-secondary);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sell-item:hover {
  background: rgba(0,0,0,0.1);
}

/* ============================================
   商店系统样式
   ============================================ */
.shop-modal {
  max-width: 600px;
  padding: 0;
  overflow: hidden;
}

.shop-modal .modal-header {
  padding: 20px 24px;
  margin: 0;
  background: linear-gradient(135deg, #FFF9E6, #FFF3D6);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.shop-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 8px 16px;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-left: auto;
  margin-right: 15px;
}

.balance-icon { font-size: 1.2rem; }

.balance-amount {
  font-weight: 900;
  font-size: 1.1rem;
  color: #F57C00;
}

/* 商店标签页 */
.shop-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  overflow-x: auto;
}

.shop-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.04);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}

.shop-tab:hover {
  background: rgba(255, 167, 77, 0.15);
}

.shop-tab.active {
  background: linear-gradient(135deg, #FFA94D, #FF8C42);
  color: white;
}

.shop-tab .tab-icon { font-size: 1rem; }

/* 商店内容 */
.shop-content {
  padding: 20px 24px;
  min-height: 350px;
  max-height: 450px;
  overflow-y: auto;
}

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

/* 商品卡片 */
.shop-item {
  background: white;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.shop-item:hover {
  transform: translateY(-4px);
  border-color: #FFA94D;
  box-shadow: 0 8px 24px rgba(255, 167, 77, 0.2);
}

.shop-item.special {
  border-color: #FFD700;
  background: linear-gradient(135deg, white, #FFFBEB);
}

.shop-item.special::before {
  content: '特惠';
  position: absolute;
  top: -2px;
  right: -2px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 0 12px 0 12px;
}

.shop-item.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.shop-item.locked::after {
  content: '🔒';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  background: rgba(255,255,255,0.9);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-item-emoji {
  font-size: 3rem;
  line-height: 1;
}

.shop-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.shop-item-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

.shop-item-effects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.effect-mini {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: rgba(0,0,0,0.04);
  border-radius: 50px;
}

.shop-item-price {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  color: #F57C00;
  font-size: 1rem;
}

.shop-item-price .original-price {
  text-decoration: line-through;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-buy {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #FFA94D, #FF8C42);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-buy:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(255, 167, 77, 0.3);
}

.btn-buy:disabled {
  background: rgba(0,0,0,0.1);
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* 限时特惠横幅 */
.shop-special-banner {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.special-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.special-badge {
  background: white;
  color: #FF8C00;
  padding: 6px 14px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.85rem;
}

.special-timer {
  color: white;
  font-weight: 700;
  font-size: 1rem;
}

/* ============================================
   任务系统样式
   ============================================ */
.tasks-overview {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(255, 169, 77, 0.1));
  border-radius: 12px;
}

.task-stat {
  flex: 1;
  text-align: center;
  padding: 10px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.task-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  display: block;
}

.task-stat .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.daily-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card {
  background: white;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.2s;
}

.task-card:hover {
  border-color: var(--primary-light);
  transform: translateX(5px);
}

.task-card.completed {
  border-color: #51CF66;
  background: rgba(81, 207, 102, 0.05);
}

.task-card.claimed {
  opacity: 0.6;
}

.task-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.task-card.completed .task-icon {
  background: linear-gradient(135deg, #51CF66, #2E7D32);
}

.task-content {
  flex: 1;
}

.task-name {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.task-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.task-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 50px;
  margin-top: 10px;
  overflow: hidden;
}

.task-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 50px;
  transition: width 0.5s ease;
}

.task-card.completed .task-progress-fill {
  background: linear-gradient(90deg, #51CF66, #2E7D32);
}

.task-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.task-progress-text {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.85rem;
}

.btn-claim-reward {
  padding: 8px 16px;
  background: linear-gradient(135deg, #51CF66, #2E7D32);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  animation: pulse 1.5s infinite;
}

.task-reward {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* 成就卡片 */
.achievements-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 169, 77, 0.1));
  border-radius: 12px;
}

.achievement-stat {
  flex: 1;
  text-align: center;
  padding: 10px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.achievement-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: #FFA500;
  display: block;
}

.achievement-stat .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.achievement-card {
  background: white;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  transition: all 0.2s;
  position: relative;
}

.achievement-card.unlocked {
  border-color: #FFD700;
  background: linear-gradient(135deg, white, rgba(255, 215, 0, 0.05));
}

.achievement-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.achievement-unlock-date {
  position: absolute;
  top: -2px;
  right: -2px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 0 12px 0 12px;
}

.achievement-card .achievement-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}

.achievement-card .achievement-name {
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.achievement-card .achievement-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.achievement-reward-tag {
  display: inline-block;
  background: rgba(255, 215, 0, 0.15);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #D4A017;
}

.achievement-card.locked {
  opacity: 0.5;
}

.achievement-card.locked .achievement-icon {
  filter: grayscale(1);
}

/* ============================================
   社交系统样式
   ============================================ */
.social-modal {
  max-width: 550px;
  padding: 0;
  overflow: hidden;
}

.social-modal .modal-header {
  padding: 20px 24px;
  margin: 0;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.social-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  overflow-x: auto;
}

.social-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.04);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}

.social-tab:hover {
  background: rgba(76, 175, 80, 0.15);
}

.social-tab.active {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
  color: white;
}

.social-tab .tab-icon { font-size: 1rem; }

.social-panel {
  padding: 20px 24px;
  min-height: 350px;
}

/* ============================================
   领取中心样式
   ============================================ */
.supply-modal {
  max-width: 520px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #FFF9FB 0%, #FFFFFF 100%);
}

.supply-modal .modal-header {
  padding: 20px 24px;
  margin: 0;
  background: linear-gradient(135deg, #FFE4EC, #FFF0F5);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.supply-modal .modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 标签页样式 */
.supply-tabs {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  overflow-x: auto;
}

.supply-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #F8F9FA;
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  position: relative;
}

.supply-tab:hover {
  background: rgba(255,107,157,0.08);
  border-color: rgba(255,107,157,0.2);
}

.supply-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(255,107,157,0.35);
}

.supply-tab .tab-icon {
  font-size: 1.1rem;
}

.tab-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #333;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255,165,0,0.4);
}

/* 面板内容区域 */
.supply-panel {
  padding: 20px 24px;
  max-height: 55vh;
  overflow-y: auto;
}

.supply-panel.hidden {
  display: none;
}

/* 引导文字 */
.section-intro {
  background: linear-gradient(135deg, #FFF9E6, #FFF5D6);
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  border-left: 4px solid #FFD700;
}

.section-intro p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* 领取卡片网格 */
.daily-claims-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

/* 单个领取卡片 */
.claim-card {
  background: white;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 16px;
  transition: all 0.25s;
}

.claim-card:hover {
  border-color: rgba(255,107,157,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.claim-card.can-claim {
  border-color: rgba(255,107,157,0.4);
  background: linear-gradient(135deg, #FFF9FB, #FFF0F5);
  box-shadow: 0 4px 20px rgba(255,107,157,0.12);
}

.claim-card.claimed {
  opacity: 0.7;
  background: #F8F9FA;
}

.claim-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.claim-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.claim-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.claim-status.available {
  background: linear-gradient(135deg, #4ADE80, #22C55E);
  color: white;
}

.claim-status.done {
  background: #E5E7EB;
  color: #6B7280;
}

.claim-status.cooldown {
  background: #FEF3C7;
  color: #D97706;
}

/* 物品列表 */
.claim-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.claim-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: white;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  font-size: 0.9rem;
}

.claim-item-emoji {
  font-size: 1.4rem;
}

.claim-item-name {
  font-weight: 600;
  color: var(--text-primary);
}

.claim-item-count {
  color: var(--primary);
  font-weight: 700;
}

/* 领取按钮 */
.btn-claim {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-claim:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,157,0.4);
}

.btn-claim:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 时间恢复区域 */
.time-recovery-section {
  background: linear-gradient(135deg, #F0F9FF, #E0F2FE);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.time-recovery-section .section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-recovery-section .section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 14px 0;
}

.recovery-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recovery-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 12px;
}

.recovery-item-emoji {
  font-size: 1.8rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 10px;
}

.recovery-item-info {
  flex: 1;
}

.recovery-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.recovery-progress-bar {
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
}

.recovery-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.recovery-item-count {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
  max-height: 450px;
  overflow-y: auto;
}

/* 好友列表 */
.friends-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-add-friend, .btn-invite {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: 2px dashed rgba(0,0,0,0.1);
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-friend:hover, .btn-invite:hover {
  border-color: #4CAF50;
  background: rgba(76, 175, 80, 0.05);
  color: #2E7D32;
}

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 14px;
  transition: all 0.2s;
}

.friend-card:hover {
  border-color: #4CAF50;
  transform: translateX(5px);
}

.friend-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #C8E6C9, #81C784);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.friend-info {
  flex: 1;
}

.friend-name {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.friend-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.friend-status.online {
  color: #4CAF50;
}

.friend-actions {
  display: flex;
  gap: 8px;
}

.btn-friend-action {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0,0,0,0.04);
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-friend-action:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* 排行榜 */
.leaderboard-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.lb-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: rgba(0,0,0,0.04);
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.lb-tab:hover {
  background: rgba(255, 215, 0, 0.15);
}

.lb-tab.active {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.lb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
}

.lb-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  border-radius: 50%;
}

.lb-rank.rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
}

.lb-rank.rank-2 {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: white;
}

.lb-rank.rank-3 {
  background: linear-gradient(135deg, #CD7F32, #B87333);
  color: white;
}

.lb-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.lb-info {
  flex: 1;
}

.lb-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.lb-detail {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.lb-score {
  font-weight: 900;
  font-size: 1rem;
  color: var(--primary);
}

.my-rank {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(255, 169, 77, 0.1));
  border-radius: 12px;
  border: 2px dashed rgba(255, 107, 157, 0.3);
}

.my-rank .rank-label {
  font-weight: 700;
  color: var(--text-secondary);
}

.my-rank .rank-value {
  font-weight: 900;
  color: var(--primary);
  font-size: 1.1rem;
}

/* 访客列表 */
.visitors-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.visitors-title {
  font-weight: 800;
  font-size: 1rem;
}

.visitors-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.visitors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.visitor-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: white;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 12px;
  min-width: 80px;
}

.visitor-avatar {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #E1BEE7, #CE93D8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.visitor-name {
  font-weight: 700;
  font-size: 0.8rem;
}

.visitor-time {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* 赠送礼物弹窗 */
.gift-modal {
  max-width: 400px;
}

.gift-target {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(0,0,0,0.04);
  border-radius: 10px;
  margin-bottom: 16px;
}

.gift-friend-name {
  font-weight: 800;
  color: var(--primary);
}

.gift-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.gift-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: white;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.gift-item:hover {
  border-color: var(--primary-light);
  transform: scale(1.05);
}

.gift-item.selected {
  border-color: var(--primary);
  background: rgba(255, 107, 157, 0.05);
}

.gift-item-emoji {
  font-size: 1.8rem;
}

.gift-item-name {
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
}

.gift-message textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
  height: 80px;
}

.gift-message textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-send-gift {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.2s;
}

.btn-send-gift:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
}

/* 空状态 */
.friends-empty, .visitors-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  text-align: center;
}

.friends-empty .empty-icon, .visitors-empty .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.friends-empty p, .visitors-empty p {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.friends-empty span, .visitors-empty span {
  font-size: 0.85rem;
}

/* ==================== 宠物命名界面 ==================== */
.naming-screen {
  min-height: 100vh;
  background: linear-gradient(135deg, #FFE4EC 0%, #FFF0F5 50%, #FFF5F8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.naming-container {
  width: 100%;
  max-width: 480px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(255, 107, 157, 0.15);
  padding: 40px 30px;
  text-align: center;
}

/* 揭示区域 */
.naming-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.reveal-box {
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(255, 165, 0, 0.3);
  animation: float 2s ease-in-out infinite;
}

.mystery-mark {
  font-size: 5rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.reveal-btn {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.3);
  transition: all 0.3s;
}

.reveal-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 28px rgba(255, 107, 157, 0.4);
}

/* 命名内容区域 */
.naming-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.naming-content.hidden {
  display: none;
}

.newborn-dog {
  position: relative;
  width: 120px;
  height: 120px;
}

.dog-bounce {
  font-size: 5rem;
  animation: bounce 1s ease-in-out infinite;
}

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

.sparkle-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.sparkle-effect::before,
.sparkle-effect::after {
  content: '✨';
  position: absolute;
  font-size: 1.5rem;
  animation: sparkle 1.5s ease-in-out infinite;
}

.sparkle-effect::before {
  top: -10px;
  left: -10px;
  animation-delay: 0s;
}

.sparkle-effect::after {
  top: 0;
  right: -10px;
  animation-delay: 0.5s;
}

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

.naming-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 输入框区域 */
.name-input-container {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

#pet-name-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid rgba(255, 107, 157, 0.2);
  border-radius: 14px;
  font-family: inherit;
  font-size: 1.05rem;
  text-align: center;
  transition: all 0.25s;
  background: white;
}

#pet-name-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.12);
}

#pet-name-input::placeholder {
  color: #aaa;
  font-size: 0.95rem;
}

/* 随机按钮 */
.random-name-btn {
  padding: 12px 16px;
  background: linear-gradient(135deg, #FFF5F7, #FFE4EC);
  border: 2px solid rgba(255, 107, 157, 0.25);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.random-name-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: var(--primary);
  transform: scale(1.05);
}

.random-name-btn:active {
  transform: scale(0.98);
}

/* 名字建议标签 */
.name-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 320px;
}

.suggestion-tag {
  padding: 8px 16px;
  background: white;
  border: 2px solid rgba(255, 107, 157, 0.15);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-tag:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.25);
}

.suggestion-tag:active {
  transform: translateY(0);
}

/* 确认按钮 */
.btn-confirm-name {
  width: 100%;
  max-width: 320px;
  padding: 16px 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.35);
  margin-top: 10px;
}

.btn-confirm-name:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(255, 107, 157, 0.45);
}

.btn-confirm-name:active {
  transform: translateY(-1px);
}

/* 浮动动画 */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

/* ==================== 住所系统 ==================== */
.house-modal {
  max-width: 520px;
}

.house-header {
  background: linear-gradient(135deg, #FF8A65, #FF6E40);
}

.house-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.house-current-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,138,101,0.08), rgba(255,110,64,0.04));
  border-radius: 16px;
  border: 2px solid rgba(255,110,64,0.12);
}

.house-current-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.house-current-preview {
  width: 120px;
  height: 126px;
}

.house-current-preview svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.15));
}

.house-current-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.house-tabs {
  display: flex;
  gap: 8px;
}

.house-tab {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  background: white;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.house-tab:hover {
  border-color: rgba(255,110,64,0.3);
  color: #FF6E40;
}

.house-tab.active {
  background: linear-gradient(135deg, #FF8A65, #FF6E40);
  color: white;
  border-color: transparent;
}

.house-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px;
}

.house-card {
  background: white;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.house-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.house-card[data-rarity="common"]::before { background: linear-gradient(90deg, #9E9E9E, #BDBDBD); }
.house-card[data-rarity="rare"]::before { background: linear-gradient(90deg, #42A5F5, #64B5F6); }
.house-card[data-rarity="epic"]::before { background: linear-gradient(90deg, #AB47BC, #CE93D8); }
.house-card[data-rarity="legendary"]::before { background: linear-gradient(90deg, #FFA726, #FFD54F); }

.house-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: rgba(255,110,64,0.2);
}

.house-card.active {
  border-color: #FF6E40;
  background: linear-gradient(135deg, rgba(255,138,101,0.06), rgba(255,110,64,0.02));
}

.house-card.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.house-card.locked:hover {
  transform: none;
  box-shadow: none;
}

.house-card-preview {
  width: 80px;
  height: 84px;
}

.house-card-preview svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(1px 2px 4px rgba(0,0,0,0.12));
}

.house-card-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
}

.house-card-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}

.house-card-price {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #FF8F00;
}

.house-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  color: white;
}

.house-card-badge.owned {
  background: linear-gradient(135deg, #66BB6A, #43A047);
}

.house-card-badge.current {
  background: linear-gradient(135deg, #FF8A65, #FF6E40);
}

.house-card-badge.locked {
  background: linear-gradient(135deg, #9E9E9E, #757575);
}

.house-card-rarity {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.house-card-rarity.common { background: #F5F5F5; color: #757575; }
.house-card-rarity.rare { background: #E3F2FD; color: #1565C0; }
.house-card-rarity.epic { background: #F3E5F5; color: #7B1FA2; }
.house-card-rarity.legendary { background: #FFF8E1; color: #E65100; }

.house-card-bonus {
  font-size: 0.65rem;
  color: #66BB6A;
  font-weight: 600;
}

.house-card-action {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.house-card-action.buy {
  background: linear-gradient(135deg, #FF8A65, #FF6E40);
  color: white;
}

.house-card-action.buy:hover {
  transform: scale(1.03);
  box-shadow: 0 3px 10px rgba(255,110,64,0.3);
}

.house-card-action.switch {
  background: linear-gradient(135deg, #42A5F5, #1E88E5);
  color: white;
}

.house-card-action.switch:hover {
  transform: scale(1.03);
  box-shadow: 0 3px 10px rgba(30,136,229,0.3);
}

.house-card-action.equipped {
  background: #F5F5F5;
  color: #9E9E9E;
  cursor: default;
}

/* ==================== 装扮系统 ==================== */
.outfit-modal {
  max-width: 520px;
}

.outfit-header {
  background: linear-gradient(135deg, #CE93D8, #AB47BC);
}

.outfit-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.outfit-slots-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.outfit-slot-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  background: white;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.outfit-slot-btn:hover {
  border-color: rgba(171,71,188,0.3);
  color: #AB47BC;
}

.outfit-slot-btn.active {
  background: linear-gradient(135deg, #CE93D8, #AB47BC);
  color: white;
  border-color: transparent;
}

.outfit-equipped-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(206,147,216,0.08), rgba(171,71,188,0.04));
  border-radius: 14px;
  border: 2px solid rgba(171,71,188,0.1);
  overflow-x: auto;
}

.outfit-equipped-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.outfit-equipped-slots {
  display: flex;
  gap: 8px;
  flex: 1;
}

.outfit-equipped-slot {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px dashed rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  position: relative;
  background: white;
  transition: all 0.2s;
}

.outfit-equipped-slot.filled {
  border-style: solid;
  border-color: rgba(171,71,188,0.3);
  background: rgba(206,147,216,0.06);
}

.outfit-equipped-slot .slot-label {
  position: absolute;
  bottom: -14px;
  font-size: 0.55rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.outfit-tabs {
  display: flex;
  gap: 8px;
}

.outfit-tab {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  background: white;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.outfit-tab:hover {
  border-color: rgba(171,71,188,0.3);
  color: #AB47BC;
}

.outfit-tab.active {
  background: linear-gradient(135deg, #CE93D8, #AB47BC);
  color: white;
  border-color: transparent;
}

.outfit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
}

.outfit-card {
  background: white;
  border: 2px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.outfit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}

.outfit-card[data-rarity="common"]::before { background: linear-gradient(90deg, #9E9E9E, #BDBDBD); }
.outfit-card[data-rarity="rare"]::before { background: linear-gradient(90deg, #42A5F5, #64B5F6); }
.outfit-card[data-rarity="epic"]::before { background: linear-gradient(90deg, #AB47BC, #CE93D8); }
.outfit-card[data-rarity="legendary"]::before { background: linear-gradient(90deg, #FFA726, #FFD54F); }

.outfit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  border-color: rgba(171,71,188,0.2);
}

.outfit-card.equipped {
  border-color: #AB47BC;
  background: linear-gradient(135deg, rgba(206,147,216,0.06), rgba(171,71,188,0.02));
}

.outfit-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.outfit-card.locked:hover {
  transform: none;
  box-shadow: none;
}

.outfit-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.outfit-card-icon svg {
  width: 36px;
  height: 36px;
}

.outfit-card-icon .outfit-emoji {
  font-size: 1.6rem;
}

.outfit-card-name {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
}

.outfit-card-rarity {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
}

.outfit-card-rarity.common { background: #F5F5F5; color: #757575; }
.outfit-card-rarity.rare { background: #E3F2FD; color: #1565C0; }
.outfit-card-rarity.epic { background: #F3E5F5; color: #7B1FA2; }
.outfit-card-rarity.legendary { background: #FFF8E1; color: #E65100; }

.outfit-card-price {
  font-size: 0.7rem;
  font-weight: 700;
  color: #FF8F00;
}

.outfit-card-bonus {
  font-size: 0.6rem;
  color: #66BB6A;
  font-weight: 600;
}

.outfit-card-action {
  width: 100%;
  padding: 6px;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.outfit-card-action.buy {
  background: linear-gradient(135deg, #CE93D8, #AB47BC);
  color: white;
}

.outfit-card-action.buy:hover {
  transform: scale(1.03);
  box-shadow: 0 3px 10px rgba(171,71,188,0.3);
}

.outfit-card-action.equip {
  background: linear-gradient(135deg, #66BB6A, #43A047);
  color: white;
}

.outfit-card-action.equip:hover {
  transform: scale(1.03);
  box-shadow: 0 3px 10px rgba(67,160,71,0.3);
}

.outfit-card-action.unequip {
  background: linear-gradient(135deg, #EF5350, #E53935);
  color: white;
}

.outfit-card-action.unequip:hover {
  transform: scale(1.03);
  box-shadow: 0 3px 10px rgba(229,57,53,0.3);
}

.outfit-card-action.equipped {
  background: #F5F5F5;
  color: #9E9E9E;
  cursor: default;
}

.outfit-card-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

.outfit-card-badge.equipped {
  background: linear-gradient(135deg, #AB47BC, #7B1FA2);
  color: white;
}

.outfit-card-badge.locked {
  background: #9E9E9E;
  color: white;
}

/* ==================== 住所 & 装扮 动画 ==================== */
@keyframes house-switch {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.house-switching {
  animation: house-switch 0.5s ease;
}

@keyframes outfit-sparkle {
  0% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
  100% { opacity: 0; transform: scale(0) rotate(360deg); }
}

.outfit-sparkle {
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
  animation: outfit-sparkle 0.6s ease forwards;
}

@keyframes card-appear {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.house-card, .outfit-card {
  animation: card-appear 0.3s ease backwards;
}

.house-card:nth-child(1), .outfit-card:nth-child(1) { animation-delay: 0.02s; }
.house-card:nth-child(2), .outfit-card:nth-child(2) { animation-delay: 0.04s; }
.house-card:nth-child(3), .outfit-card:nth-child(3) { animation-delay: 0.06s; }
.house-card:nth-child(4), .outfit-card:nth-child(4) { animation-delay: 0.08s; }
.house-card:nth-child(5), .outfit-card:nth-child(5) { animation-delay: 0.10s; }
.house-card:nth-child(6), .outfit-card:nth-child(6) { animation-delay: 0.12s; }
.house-card:nth-child(7), .outfit-card:nth-child(7) { animation-delay: 0.14s; }
.house-card:nth-child(8), .outfit-card:nth-child(8) { animation-delay: 0.16s; }
