/* ==================== 全局样式 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #e91e63;
  --primary-dark: #c2185b;
  --primary-light: #fce4ec;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==================== 顶部导航 ==================== */
.header {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 50%, #f48fb1 100%);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(233,30,99,0.15);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.header-logo {
  font-size: 24px;
  font-weight: 700;
  color: #880e4f;
  letter-spacing: 2px;
}
.header-logo span { color: #e91e63; }
.header-nav a {
  color: #880e4f;
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 20px;
  transition: var(--transition);
  font-weight: 500;
}
.header-nav a:hover { background: rgba(255,255,255,0.4); }

/* ==================== 主页 Hero ==================== */
.hero {
  background: linear-gradient(135deg, #fce4ec, #fff0f5, #fce4ec);
  text-align: center;
  padding: 60px 24px 40px;
}
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: #880e4f;
  margin-bottom: 12px;
}
.hero p {
  font-size: 16px;
  color: #ad1457;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ==================== 品牌卡片网格 ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary-light);
  display: inline-block;
}
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.brand-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #f48fb1;
}
.brand-card-image {
  height: 180px;
  background: linear-gradient(135deg, #fce4ec, #f8bbd0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #e91e63;
}
.brand-card-body {
  padding: 20px;
}
.brand-card-body h3 {
  font-size: 20px;
  color: #880e4f;
  margin-bottom: 8px;
}
.brand-card-body p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.brand-card-body .count {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ==================== 患者列表 ==================== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  cursor: pointer;
  transition: var(--transition);
}
.back-btn:hover { color: var(--primary-dark); }
.patient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.patient-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}
.patient-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #f48fb1;
}
.patient-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fce4ec, #f8bbd0);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #e91e63;
}
.patient-card h4 {
  font-size: 18px;
  color: #880e4f;
  margin-bottom: 6px;
}
.patient-card .desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== 对比图弹窗 ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
  background: var(--card-bg);
  border-radius: 16px;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: var(--transition);
}
.modal-close:hover { background: #e0e0e0; color: #333; }
.comparison-title {
  font-size: 22px;
  font-weight: 700;
  color: #880e4f;
  margin-bottom: 24px;
  text-align: center;
}
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
.comparison-item {
  text-align: center;
}
.comparison-item img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 400px;
  object-fit: cover;
}
.comparison-item h4 {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 600;
}
.comparison-item h4.before { color: #999; }
.comparison-item h4.after { color: #e91e63; }
.comparison-label {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.label-before { background: #f5f5f5; color: #666; }
.label-after { background: #fce4ec; color: #e91e63; }
.photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.photo-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
}
.photo-card .photo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.photo-card img {
  width: 100%;
  border-radius: 8px;
  height: 150px;
  object-fit: cover;
}
.photo-card .photo-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .hero h1 { font-size: 24px; }
  .comparison-grid { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: 1fr; }
  .patient-grid { grid-template-columns: 1fr 1fr; }
  .photo-list { grid-template-columns: 1fr; }
  .modal-content { padding: 20px; }
}
@media (max-width: 480px) {
  .patient-grid { grid-template-columns: 1fr; }
}

/* ==================== 空状态 ==================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.empty-state p {
  font-size: 16px;
}

/* ==================== 页脚 ==================== */
.footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ==================== Toast 提示 ==================== */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.success { background: #4caf50; }
.toast.error { background: #f44336; }
