/**
 * 测肤样式 — 100% 像素级对齐实机截图与 shuzhi 小程序
 * 包含：图一（全屏分析进度页） + 图二（测肤报告全部卡片）
 */

:root {
  --skin-safe: #4CAF50;
  --skin-caution: #FFC107;
  --skin-warning: #FF9800;
  --skin-danger: #F44336;
}

/* ══════════════════════════════════════════════════════════════
   图一：拍照/选图后全屏分析进度页面
   ══════════════════════════════════════════════════════════════ */
.cam-progress-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #FF0055 0%, #FF2A6D 40%, #1A0510 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  box-sizing: border-box;
}

.cam-progress-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.35);
  margin-bottom: 28px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cam-progress-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cam-progress-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.cam-progress-num {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: -0.5px;
}

.cam-progress-step {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  margin-bottom: 22px;
  display: block;
  letter-spacing: 0.5px;
}

.cam-progress-bar-wrap {
  width: 55%;
  max-width: 220px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.cam-progress-bar-fill {
  height: 100%;
  background: #FFFFFF;
  border-radius: 4px;
  transition: width 0.25s ease;
}

/* ══════════════════════════════════════════════════════════════
   图二：测肤报告页面
   ══════════════════════════════════════════════════════════════ */
.result-page {
  min-height: 100vh;
  background: #F8FAFC;
  color: #1A1A1A;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 30px;
}

/* ── 顶部白色系统导航栏 ── */
.skin-nav-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 16px;
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 100;
}

.skin-nav-back {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1A1A1A;
  font-size: 20px;
  cursor: pointer;
}

.skin-nav-title {
  font-size: 17px;
  font-weight: 700;
  color: #1A1A1A;
}

.skin-nav-capsule {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 3px 10px;
  font-size: 12px;
  color: #333;
}

/* ── 头部粉红渐变卡 ── */
.skin-header {
  background: linear-gradient(180deg, #FF0055 0%, #FF3366 50%, #FF6666 100%);
  padding: 12px 16px 48px;
  border-radius: 0 0 20px 20px;
  color: #fff;
  position: relative;
  z-index: 1;
}

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

.skin-header-subnav-back {
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  opacity: 0.9;
}

.skin-header-subnav-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.skin-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.skin-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.skin-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skin-user-info {
  flex: 1;
}

.skin-user-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.skin-user-name {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.skin-age-badge {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 700;
  color: #fff;
}

.skin-type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skin-type-tag {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 600;
  color: #fff;
}

.skin-datetime {
  font-size: 12px;
  opacity: 0.95;
  font-weight: 600;
  margin-top: 10px;
  color: #fff;
  display: block;
}

/* ── 主内容区 ── */
.skin-main {
  margin-top: -32px;
  position: relative;
  z-index: 10;
}

.skin-content-wrap {
  background: #FFFFFF;
  border-radius: 20px 20px 0 0;
  padding: 16px 14px 10px;
}

/* ── 评分卡 ── */
.skin-score-card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px 12px;
  margin-bottom: 12px;
  border: 1px solid #EEF2F6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
}

.skin-score-left {
  width: 42%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #EEF2F6;
  padding-right: 10px;
}

.skin-score-number {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  color: #1A1A1A;
  font-family: Georgia, serif;
}

.skin-score-unit {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  margin-top: 2px;
}

.skin-star-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.skin-score-age-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 6px;
}

.skin-score-age-text {
  font-size: 11px;
  color: #64748B;
  font-weight: 500;
}

.skin-score-age-num {
  font-size: 17px;
  font-weight: 900;
  color: #FF0055;
}

.skin-score-grid {
  width: 58%;
  padding-left: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.skin-score-item {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  border: 1px solid #EEF2F6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.skin-score-item-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  display: block;
  margin-bottom: 2px;
}

.skin-score-item-value {
  font-size: 16px;
  font-weight: 900;
  color: #1A1A1A;
  display: block;
}

/* ── 通用标题 ── */
.skin-section-title {
  font-size: 14px;
  font-weight: 900;
  color: #1A1A1A;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

/* ── YOLO 检测卡片 ── */
.skin-yolo-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid #EEF2F6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.skin-yolo-zero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 6px;
}

.skin-yolo-zero-num {
  font-size: 32px;
  font-weight: 900;
  color: #4CAF50;
  line-height: 1;
  font-family: Georgia, serif;
}

.skin-yolo-zero-text {
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
  margin-top: 4px;
}

.skin-yolo-row {
  display: flex;
  justify-content: space-around;
  padding-top: 4px;
}

.skin-yolo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.skin-yolo-count {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.skin-yolo-label {
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
}

/* ── 肤质概况 2x2 网格 ── */
.skin-overview-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid #EEF2F6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.skin-dim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 10px;
}

.skin-dim-item {
  display: flex;
  align-items: center;
}

.skin-dim-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.skin-dim-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skin-dim-label {
  font-size: 12px;
  color: #334155;
  font-weight: 600;
}

.skin-dim-text {
  font-size: 12px;
  font-weight: 700;
  margin-left: auto;
}

/* ── AI 发现问题 ── */
.skin-ai-section {
  margin-bottom: 14px;
}

.skin-ai-bubble-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.skin-ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF0055, #FF5B73);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(255, 0, 85, 0.25);
}

.skin-ai-bubble {
  background: #FFFFFF;
  border-radius: 4px 14px 14px 14px;
  padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  border: 1px solid #EEF2F6;
  flex: 1;
}

.skin-ai-issue {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}

.skin-ai-issue:not(:last-child) {
  border-bottom: 1px solid #F1F5F9;
}

.skin-ai-issue-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.skin-ai-issue-title {
  font-size: 13px;
  font-weight: 900;
  color: #1A1A1A;
  display: block;
  margin-bottom: 2px;
}

.skin-ai-issue-desc {
  font-size: 11px;
  color: #64748B;
  line-height: 1.5;
  display: block;
  font-weight: 500;
}

/* ── Tab 导航（吸顶） ── */
.skin-tab-nav {
  margin-bottom: 6px;
  position: sticky;
  top: 44px;
  z-index: 20;
  background: #FFFFFF;
  padding-top: 6px;
}

.skin-tabs-scroll {
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.skin-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.skin-tab-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px;
  position: relative;
  cursor: pointer;
  flex: 1;
  text-align: center;
}

.skin-tab-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #94A3B8;
  white-space: nowrap;
}

.skin-tab-item.active .skin-tab-label {
  color: #FF0055;
  font-weight: 900;
}

.skin-tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.skin-tab-bar {
  position: absolute;
  bottom: 0;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(255, 0, 85, 0.3);
}

.skin-tab-desc {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
}

/* ── 颜色图例 ── */
.skin-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 8px 0;
  background: #F8FAFC;
  border-radius: 8px;
  border: 1px solid #EEF2F6;
}

.skin-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
}

.skin-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ── 指标列表 ── */
.skin-metrics-list {
  margin-bottom: 14px;
}

.skin-metric-item {
  margin-bottom: 14px;
}

.skin-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4px;
}

.skin-metric-label {
  font-size: 12px;
  color: #1A1A1A;
  font-weight: 700;
  flex: 1;
}

.skin-metric-val-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.skin-metric-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.skin-metric-value {
  font-size: 11px;
  font-weight: 900;
  color: #1A1A1A;
  font-family: Georgia, serif;
}

.skin-metric-bar {
  height: 7px;
  background: #F1F5F9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.skin-metric-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.skin-metric-desc {
  font-size: 11px;
  color: #64748B;
  line-height: 1.5;
  font-weight: 500;
  display: block;
}

.skin-metric-diff {
  display: flex;
  align-items: center;
  font-size: 10px;
  margin-top: 2px;
  font-weight: 600;
}

/* ── 建议卡片 ── */
.skin-advice-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  border: 1px solid #EEF2F6;
  margin-bottom: 14px;
}

.skin-advice-block {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #F8FAFC;
  border-radius: 8px;
  border: 1px dashed #E2E8F0;
  margin-bottom: 8px;
}

.skin-advice-block:last-child {
  margin-bottom: 0;
}

.skin-advice-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-top: 2px;
}

.skin-advice-body {
  flex: 1;
}

.skin-advice-subtitle {
  font-size: 12px;
  font-weight: 900;
  color: #1A1A1A;
  display: block;
  margin-bottom: 4px;
}

.skin-advice-text {
  font-size: 11px;
  color: #475569;
  line-height: 1.7;
  display: block;
  font-weight: 500;
}

.skin-advice-bullet {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 11px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 4px;
  font-weight: 500;
}

/* ── 免责声明 ── */
.skin-disclaimer {
  font-size: 10px;
  color: #94A3B8;
  text-align: center;
  line-height: 1.6;
  padding: 12px 10px;
  border-top: 1px solid #F1F5F9;
  margin-top: 6px;
}

/* ── 底部 ── */
.result-footer {
  text-align: center;
  padding: 16px 0 30px;
  font-size: 11px;
  color: #CBD5E1;
  font-weight: 600;
}
