/* ===== 全局基础样式 ===== */
* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(135deg, #fff1f2 0%, #fce7f3 50%, #fdf4ff 100%);
  min-height: 100vh;
}

/* ===== 页面切换 ===== */
.page-section {
  display: none;
  animation: fadeSlideIn 0.3s ease;
}
.page-section.active {
  display: block;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 导航按钮 ===== */
.nav-btn {
  color: #9ca3af;
  transition: all 0.2s ease;
  position: relative;
}
.nav-btn.active {
  color: #f43f5e;
}
.nav-btn.active i {
  transform: scale(1.15);
}
.nav-btn:hover {
  color: #fb7185;
}
.nav-btn i {
  transition: transform 0.2s ease;
}

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden {
  display: none;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: white;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
  border-bottom: 1px solid #fce7f3;
  padding-bottom: 12px;
}
.modal-body {
  padding: 16px 20px;
}
.modal-footer {
  padding: 12px 20px 24px;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ===== 表单元素 ===== */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: #374151;
  transition: all 0.2s;
  background: #fafafa;
  outline: none;
}
.form-input:focus {
  border-color: #f9a8d4;
  background: white;
  box-shadow: 0 0 0 3px rgba(249, 168, 212, 0.2);
}
textarea.form-input {
  resize: none;
}

/* ===== 按钮 ===== */
.btn-primary {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: white;
  color: #f43f5e;
  border: 1.5px solid #fda4af;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: #fff1f2;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

/* ===== 卡片 ===== */
.card {
  background: white;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(253, 164, 175, 0.2);
}

/* ===== 进度条 ===== */
.progress-bar {
  height: 8px;
  background: #fce7f3;
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f43f5e, #ec4899);
  border-radius: 99px;
  transition: width 0.5s ease;
}

/* ===== 标签/徽章 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.badge-rose { background: #fff1f2; color: #f43f5e; }
.badge-green { background: #f0fdf4; color: #16a34a; }
.badge-yellow { background: #fefce8; color: #ca8a04; }
.badge-blue { background: #eff6ff; color: #2563eb; }
.badge-purple { background: #faf5ff; color: #7c3aed; }
.badge-gray { background: #f9fafb; color: #6b7280; }

/* ===== 任务项 ===== */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: white;
  border: 1.5px solid #f3f4f6;
  transition: all 0.2s;
  cursor: pointer;
}
.task-item:hover {
  border-color: #fda4af;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.1);
}
.task-item.completed {
  opacity: 0.6;
  background: #f9fafb;
}
.task-item.completed .task-title {
  text-decoration: line-through;
  color: #9ca3af;
}
.task-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fda4af;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  cursor: pointer;
  margin-top: 1px;
}
.task-checkbox.checked {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  border-color: transparent;
  color: white;
}

/* ===== 宾客/供应商列表项 ===== */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-radius: 14px;
  border: 1.5px solid #f3f4f6;
  transition: all 0.2s;
}
.list-item:hover {
  border-color: #fda4af;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.1);
}
.avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== 心愿板网格 ===== */
.wish-grid {
  columns: 2;
  column-gap: 12px;
}
.wish-card {
  break-inside: avoid;
  margin-bottom: 12px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid #f3f4f6;
  transition: all 0.2s;
  cursor: pointer;
}
.wish-card:hover {
  border-color: #fda4af;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
  transform: translateY(-2px);
}
.wish-card img {
  width: 100%;
  object-fit: cover;
  display: block;
}

/* ===== AI 聊天 ===== */
.ai-msg-bot, .ai-msg-user {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.ai-msg-user {
  flex-direction: row-reverse;
}
.ai-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  flex-shrink: 0;
}
.ai-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
}
.ai-msg-bot .ai-bubble {
  background: #f3f4f6;
  color: #374151;
  border-bottom-left-radius: 4px;
}
.ai-msg-user .ai-bubble {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: white;
  border-bottom-right-radius: 4px;
}
.ai-quick-btn {
  white-space: nowrap;
  background: #fce7f3;
  color: #be185d;
  border: none;
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.ai-quick-btn:hover {
  background: #fbcfe8;
}
.ai-typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: #f3f4f6;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.ai-typing span {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ===== 倒计时 ===== */
.countdown-card {
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 50%, #a855f7 100%);
  border-radius: 24px;
  padding: 28px 24px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.countdown-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.countdown-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 150px;
  height: 150px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.countdown-number {
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ===== 统计卡片 ===== */
.stat-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(253, 164, 175, 0.2);
}

/* ===== 分段控制器 ===== */
.segment-control {
  display: flex;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}
.segment-btn {
  flex: 1;
  padding: 7px 8px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.segment-btn.active {
  background: white;
  color: #f43f5e;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #9ca3af;
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ===== 搜索框 ===== */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 14px;
  transition: all 0.2s;
}
.search-box:focus-within {
  border-color: #f9a8d4;
  box-shadow: 0 0 0 3px rgba(249, 168, 212, 0.2);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #374151;
  background: transparent;
}

/* ===== 平台跳转按钮 ===== */
.platform-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}
.platform-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #fda4af; border-radius: 99px; }

/* ===== 供应商状态颜色 ===== */
.status-pending { background: #fef9c3; color: #854d0e; }
.status-contacted { background: #dbeafe; color: #1e40af; }
.status-signed { background: #dcfce7; color: #166534; }
.status-paid { background: #f3e8ff; color: #6b21a8; }

/* ===== 响应式 ===== */
@media (min-width: 480px) {
  .modal-box {
    border-radius: 24px;
    margin: auto;
    max-height: 85vh;
  }
  .modal-overlay {
    align-items: center;
  }
}

/* ===== 花瓣动画 ===== */
.petal {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 20px;
  animation: petalFall linear forwards;
}
@keyframes petalFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ===== 加载动画 ===== */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 预算进度 ===== */
.budget-progress-ring {
  transform: rotate(-90deg);
}
