/* ===== 全局重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #fdf6ff;
  color: #333;
  min-height: 100vh;
  position: relative;
}

.bg-gradient {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #fce4f3 0%, #f3e8ff 40%, #e0f2fe 100%);
  z-index: -1;
}

/* ===== Header ===== */
.header {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding: 16px 20px;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 800px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
}
.logo { font-size: 1.3rem; font-weight: 700; color: #c026d3; }
.tagline { font-size: 0.85rem; color: #9333ea; opacity: 0.8; }

/* ===== 主容器 ===== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== 卡片 ===== */
.card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 4px 24px rgba(192, 38, 211, 0.08);
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title small {
  font-size: 0.78rem;
  font-weight: 400;
  color: #a78bfa;
}
.step-num {
  background: linear-gradient(135deg, #c026d3, #7c3aed);
  color: white;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== 表单 ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.form-item label {
  display: block;
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 6px;
  font-weight: 500;
}
.form-item input,
.form-item select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e9d5ff;
  border-radius: 12px;
  font-size: 0.92rem;
  background: rgba(255,255,255,0.9);
  color: #333;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-item input:focus,
.form-item select:focus {
  border-color: #c026d3;
  box-shadow: 0 0 0 3px rgba(192,38,211,0.12);
}

/* ===== 标签选择 ===== */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-item {
  padding: 8px 18px;
  border-radius: 50px;
  border: 1.5px solid #e9d5ff;
  background: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  color: #6b21a8;
}
.tag-item:hover { border-color: #c026d3; background: #fdf4ff; }
.tag-item.active {
  background: linear-gradient(135deg, #c026d3, #7c3aed);
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(192,38,211,0.3);
}

/* ===== 颜色选择 ===== */
.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.color-item {
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 2.5px solid transparent;
  transition: all 0.2s;
  user-select: none;
}
.color-item:hover { transform: scale(1.05); }
.color-item.active {
  border-color: white;
  box-shadow: 0 0 0 3px rgba(192,38,211,0.4), 0 4px 16px rgba(0,0,0,0.2);
  transform: scale(1.08);
}

/* ===== 场景选择 ===== */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.scene-item {
  padding: 12px 10px;
  border-radius: 14px;
  border: 1.5px solid #e9d5ff;
  background: rgba(255,255,255,0.8);
  text-align: center;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  color: #6b21a8;
}
.scene-item:hover { border-color: #c026d3; background: #fdf4ff; }
.scene-item.active {
  background: linear-gradient(135deg, #fdf4ff, #f3e8ff);
  border-color: #c026d3;
  color: #7c3aed;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(192,38,211,0.15);
}

/* ===== 生成按钮 ===== */
.btn-wrap {
  text-align: center;
  padding: 10px 0;
}
.btn-generate {
  background: linear-gradient(135deg, #c026d3, #7c3aed);
  color: white;
  border: none;
  padding: 16px 48px;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(192,38,211,0.35);
  transition: all 0.25s;
  letter-spacing: 0.5px;
}
.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(192,38,211,0.45);
}
.btn-generate:active { transform: translateY(0); }
.btn-generate.loading { opacity: 0.7; cursor: not-allowed; }

/* ===== 结果区域 ===== */
.result-area {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 40px rgba(192,38,211,0.12);
  overflow: hidden;
}
.result-header {
  background: linear-gradient(135deg, #c026d3, #7c3aed);
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
}
.btn-regen {
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.5);
  color: white;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-regen:hover { background: rgba(255,255,255,0.35); }

/* ===== 单个场景方案卡片 ===== */
.outfit-card {
  padding: 24px;
  border-bottom: 1px solid #f3e8ff;
}
.outfit-card:last-child { border-bottom: none; }

.outfit-scene-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.outfit-summary {
  background: linear-gradient(135deg, #fdf4ff, #f3e8ff);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 0.95rem;
  color: #4c1d95;
  line-height: 1.7;
  border-left: 4px solid #c026d3;
}

.outfit-items-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #9333ea;
  margin-bottom: 12px;
}

.outfit-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.outfit-item-card {
  background: white;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid #f3e8ff;
  box-shadow: 0 2px 8px rgba(192,38,211,0.06);
}
.item-category {
  font-size: 0.75rem;
  color: #c026d3;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}
.item-desc {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.5;
}
.item-price {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #9333ea;
  font-weight: 600;
}

/* 配色方案 */
.color-scheme {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.color-scheme-title {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
}
.color-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  cursor: default;
  position: relative;
}

/* 穿搭技巧 */
.tips-box {
  background: #fffbeb;
  border-radius: 12px;
  padding: 14px 18px;
  border-left: 4px solid #f59e0b;
}
.tips-box-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d97706;
  margin-bottom: 8px;
}
.tips-list {
  list-style: none;
  padding: 0;
}
.tips-list li {
  font-size: 0.85rem;
  color: #78350f;
  padding: 3px 0;
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.tips-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: #f59e0b;
  font-size: 0.7rem;
}

/* 体型分析标签 */
.body-analysis {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 0.8rem;
  color: #166534;
  margin-bottom: 14px;
}

/* 搜索推荐 */
.search-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.search-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  font-size: 0.78rem;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s;
}
.search-link:hover {
  background: #f3e8ff;
  border-color: #c026d3;
  color: #7c3aed;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 0.82rem;
  color: #a78bfa;
}

/* ===== 加载动画 ===== */
.loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 40px;
}
.loading-dots span {
  width: 10px; height: 10px;
  background: #c026d3;
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .scene-grid { grid-template-columns: repeat(3, 1fr); }
  .outfit-items { grid-template-columns: 1fr 1fr; }
  .btn-generate { padding: 14px 32px; font-size: 0.95rem; }
}
