/* ===== 智能首页样式 ===== */

/* 智能信息栏 */
.smart-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 13px;
  margin-bottom: 8px;
  border-radius: 12px;
}

.weather-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weather-icon {
  font-size: 20px;
}

.weather-temp {
  font-weight: 600;
  font-size: 16px;
}

.weather-condition {
  opacity: 0.9;
}

.user-level-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.level-badge.开心果 {
  background: linear-gradient(135deg, #FFB6C1, #FF69B4);
  color: white;
}

.level-badge.小福星 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #333;
}

.level-badge.暖心宝 {
  background: linear-gradient(135deg, #FF6B6B, #EE5A24);
  color: white;
}

.level-badge.全家宠 {
  background: linear-gradient(135deg, #00D2FF, #3A7BD5);
  color: white;
}

.points-count {
  font-size: 12px;
  opacity: 0.9;
}

/* 快速操作按钮 */
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: white;
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 70px;
}

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

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

.action-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.action-label {
  font-size: 12px;
  color: #333;
  font-weight: 500;
}

/* 智能提醒项 */
.reminder-item.smart {
  display: flex;
  align-items: center;
  padding: 12px;
  background: white;
  border-radius: 10px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  border-left: 3px solid #667eea;
}

.reminder-item.smart .reminder-pet {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

/* 洞察建议卡片 */
.home-insights {
  margin-top: 12px;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insight-card {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  border-left: 3px solid #28a745;
}

.insight-card.weather {
  border-left-color: #17a2b8;
}

.insight-card.vaccine {
  border-left-color: #dc3545;
}

.insight-card.weight {
  border-left-color: #ffc107;
}

.insight-icon {
  font-size: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

.insight-content {
  flex: 1;
}

.insight-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.insight-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

/* 一键打卡按钮 */
.one-click-checkin {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  font-size: 24px;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.one-click-checkin:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.one-click-checkin:active {
  transform: scale(0.95);
}

/* 批量打卡弹窗 */
.batch-checkin-sheet {
  max-width: 360px;
  border-radius: 20px 20px 0 0;
}

.batch-pet-name {
  text-align: center;
  color: #888;
  font-size: 14px;
  margin-bottom: 16px;
}

.batch-pet-name span {
  color: #667eea;
  font-weight: 600;
}

.batch-checkin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.batch-checkin-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: #f5f5fa;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.batch-checkin-item input {
  display: none;
}

.batch-checkin-item:has(input:checked) {
  background: #ede8ff;
  border-color: #667eea;
}

.batch-checkin-item .batch-icon {
  font-size: 28px;
}

.batch-checkin-item .batch-label {
  font-size: 13px;
  color: #555;
}

.batch-checkin-item:has(input:checked) .batch-label {
  color: #667eea;
  font-weight: 600;
}

.batch-checkin-item:active {
  transform: scale(0.95);
}

/* 萌宠情绪状态 */
.mascot-mood {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.9);
  border-radius: 20px;
  font-size: 12px;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mascot-mood-icon {
  font-size: 16px;
}

.mascot-mood-text {
  color: #333;
  font-weight: 500;
}

.mascot-mood-score {
  color: #667eea;
  font-weight: 600;
}

/* 互动按钮 */
.mascot-interact-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
}

.interact-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 15px;
  background: #f0f0f0;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.interact-btn:hover {
  background: #667eea;
  color: white;
}

.interact-btn.pet { background: #ffeb3b; }
.interact-btn.feed { background: #ff9800; color: white; }
.interact-btn.play { background: #4caf50; color: white; }

/* ===== 健康仪表盘样式 ===== */
.health-dashboard { padding: 0 0 80px 0; }

.health-pet-selector {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  overflow-x: auto;
}

.health-pet-avatars { display: flex; gap: 10px; }

.health-pet-avatar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 60px;
}

.health-pet-avatar-btn.active {
  border-color: #667eea;
  background: #ede8ff;
}

.health-pet-avatar-btn img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.health-pet-avatar-btn span {
  font-size: 11px;
  color: #374151;
  white-space: nowrap;
}

.health-overview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  margin: 12px;
  border-radius: 16px;
}

.health-score-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 6px solid rgba(0,0,0,0.08);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.3s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.score-ring-inner { text-align: center; }

.score-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.score-label {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.health-metrics {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.health-metric-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: 0.9;
}

.health-metric-item.positive .metric-icon { color: #a7f3d0; }
.health-metric-item.negative .metric-icon { color: #fca5a5; }

.health-period-tabs {
  display: flex;
  gap: 8px;
  padding: 0 12px;
  margin-bottom: 12px;
}

.period-tab {
  flex: 1;
  padding: 8px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.period-tab.active {
  border-color: #667eea;
  background: #667eea;
  color: #fff;
}

.health-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin: 0 12px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.health-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.health-card-icon { font-size: 18px; }
.health-card-title { font-size: 15px; font-weight: 600; color: #1f2937; }
.health-card-meta { margin-left: auto; font-size: 12px; font-weight: 600; }

.health-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.health-stat-item {
  background: #f9fafb;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}

.stat-num { font-size: 22px; font-weight: 700; }
.stat-desc { font-size: 11px; color: #6b7280; margin-top: 2px; }

.health-suggestions { grid-column: 1 / -1; margin-top: 4px; }

.suggestion-item {
  font-size: 12px;
  color: #4b5563;
  padding: 4px 0;
  border-bottom: 1px solid #f3f4f6;
}

.suggestion-item:last-child { border-bottom: none; }

.alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fef2f2;
  border-radius: 8px;
  margin-bottom: 6px;
}

.alert-item:last-child { margin-bottom: 0; }
.alert-icon { font-size: 16px; }
.alert-msg { font-size: 13px; color: #374151; }

.breed-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.breed-stat {
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}

.breed-label { font-size: 11px; color: #6b7280; }
.breed-value { font-size: 16px; font-weight: 600; color: #1f2937; margin-top: 2px; }

.breed-bar-wrapper { margin-top: 8px; }

.breed-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.breed-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  position: relative;
}

.breed-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #667eea);
  border-radius: 4px;
  transition: width 0.5s;
}

.breed-bar-marker {
  position: absolute;
  top: -3px;
  width: 14px;
  height: 14px;
  background: #667eea;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 0.5s;
}

/* ===== 疫苗日历样式 ===== */
.vaccine-calendar {
  padding: 12px 16px;
}

.vaccine-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 10px;
  margin-bottom: 8px;
}

.vaccine-item.urgent {
  background: #fef2f2;
  border-left: 3px solid #ef4444;
}

.vaccine-item-icon { font-size: 24px; }

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

.vaccine-item-name { font-size: 14px; font-weight: 600; color: #1f2937; }

.vaccine-item-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }

.vaccine-item-status {
  font-size: 12px;
  font-weight: 600;
}

.vaccine-knowledge-item {
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.vaccine-knowledge-item:last-child { border-bottom: none; }

.vk-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.vk-name { font-size: 14px; font-weight: 600; color: #1f2937; }

.vk-frequency { font-size: 12px; color: #6b7280; margin-left: auto; }

.vk-importance {
  font-size: 11px;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
}

.vk-desc { font-size: 12px; color: #4b5563; margin-bottom: 4px; }

.vk-notes { font-size: 12px; color: #667eea; }

.vaccine-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.vaccine-history-item:last-child { border-bottom: none; }

.vhi-date { font-size: 13px; color: #6b7280; min-width: 70px; }

.vhi-name { font-size: 14px; font-weight: 500; color: #1f2937; flex: 1; }

.vhi-note { font-size: 12px; color: #9ca3af; }

.vhi-status { font-size: 12px; }

.vaccine-cert-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #bae6fd;
  border-radius: 12px;
  padding: 16px;
}

.vc-title { font-size: 16px; font-weight: 700; color: #0c4a6e; text-align: center; margin-bottom: 12px; }

.vc-pet-info { font-size: 12px; color: #0369a1; margin-bottom: 12px; }

.vc-vaccines { margin-bottom: 12px; }

.vc-vaccine-row {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: #1e3a5f;
}

.vc-batch { font-size: 11px; color: #6b7280; }

.vc-footer { font-size: 11px; color: #6b7280; text-align: center; margin-top: 8px; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

.health-pet-selector {
  overflow-x: auto;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.health-pet-avatars {
  display: flex;
  gap: 12px;
  padding-bottom: 4px;
}

.health-pet-avatar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.health-pet-avatar-btn img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.health-pet-avatar-btn.active img {
  border-color: var(--primary, #667eea);
}

.health-pet-avatar-btn span {
  font-size: 12px;
  color: #6b7280;
}

.health-pet-avatar-btn.active span {
  color: var(--primary, #667eea);
  font-weight: 600;
}

/* ===== Habits Learning (习惯学习) ===== */
.habits-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.habits-stat {
  text-align: center;
  padding: 12px 8px;
  background: linear-gradient(135deg, #f5f7fa, #e4e8ec);
  border-radius: 12px;
}

.habits-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.habits-stat-label {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

.habits-insights-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.habits-insight-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f9fafb;
}

.habits-insight-item.success {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.habits-insight-item.warning {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.habits-insight-item.info {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.insight-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.insight-content { flex: 1; }

.insight-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.insight-message {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

.habits-chart-container {
  margin-top: 16px;
}

.habits-chart-title {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}

.habits-calendar-grid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 4px;
}

.habits-day {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #9ca3af;
}

.habits-day.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.habits-day-count {
  font-weight: 600;
}

/* ===== 每日海报 Daily Poster ===== */

/* 首页海报入口 */
.daily-poster-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
}
.daily-poster-entry:active {
  transform: scale(0.97);
}
.daily-poster-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
}
.daily-poster-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.daily-poster-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.daily-poster-label {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}
.daily-poster-pet {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.daily-poster-arrow {
  font-size: 20px;
  color: rgba(255,255,255,0.6);
  flex-shrink: 0;
}

/* 海报弹窗 */
.poster-modal-content {
  max-width: 400px;
  margin: auto;
  background: #1a1a2e;
  border-radius: 20px;
  overflow: hidden;
}
.poster-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.poster-modal-header h3 {
  color: #fff;
  font-size: 17px;
  margin: 0;
}
.poster-modal-header .modal-close {
  color: rgba(255,255,255,0.6);
  font-size: 20px;
}
.poster-modal-body {
  padding: 16px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.poster-loading {
  text-align: center;
  color: rgba(255,255,255,0.6);
}
.poster-spinner {
  font-size: 48px;
  animation: posterSpin 1.5s ease infinite;
  margin-bottom: 12px;
}
@keyframes posterSpin {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
}
.poster-image-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.poster-image {
  width: 100%;
  display: block;
  border-radius: 12px;
}
.poster-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.poster-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.poster-btn:active {
  transform: scale(0.95);
}
.poster-btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}
.poster-btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.poster-btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.5);
}

/* ===== 启动页海报 Splash ===== */
.splash-poster {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s;
}
.splash-poster.hidden {
  display: none;
}
.splash-poster-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
}
.splash-poster-content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 380px;
  text-align: center;
}
.splash-poster-loading {
  color: rgba(255,255,255,0.6);
  padding: 60px 0;
}
.splash-spinner {
  font-size: 56px;
  animation: posterSpin 1.5s ease infinite;
  margin-bottom: 16px;
}
.splash-poster-image {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.splash-poster-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}
.splash-btn {
  padding: 12px 28px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.splash-btn:active { transform: scale(0.95); }
.splash-btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}
.splash-btn-ghost {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
}
