/* === 《你懂我吗？》 / 暖珊瑚·柔和社交风 === */

:root {
  /* 主色 - 暖珊瑚/活力橘 */
  --c1: #FF7B5C;
  --c1d: #E8694A;
  --c1l: #FFF0EC;
  /* 辅助色 - 低饱和大地色 */
  --c2: #B8956A;
  --c2d: #A07D52;
  --c2l: #F5EDE4;
  /* 点缀色 - 暖金 */
  --c3: #D4A574;
  --c3l: #FDF5ED;
  /* 点缀色 - 薄荷绿（少数对比场景） */
  --c4: #7EC8A0;
  --c4l: #EDF8F2;
  /* 中性色 - 柔和米粉基调 */
  --white: #FFF8F6;
  --bg: #FFF5F1;
  --t1: #3D3028;
  --t2: #8B7D72;
  --t3: #B8ACA0;
  --bd: #EDE4DB;
  /* 圆角 - 统一 8px */
  --r: 8px;
  --rs: 8px;
  --rx: 12px;
  /* 阴影 - 暖调柔光 */
  --sd: 0 2px 16px rgba(184,149,106,0.08);
  --sdl: 0 4px 24px rgba(184,149,106,0.12);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  background: linear-gradient(180deg, #FFF8F6 0%, #FFF5F1 60%, #FDF5ED 100%);
  color: var(--t1);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

.container {
  padding: 0 16px 40px;
  min-height: 100vh;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 28px; border: none; border-radius: 28px;
  font-size: 17px; font-weight: 700; cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none; width: 100%; text-align: center;
  position: relative; overflow: hidden; letter-spacing: 0.5px;
}
.btn:active { transform: scale(0.97); }
.btn-lg { padding: 16px 36px; font-size: 17px; }

.btn-primary {
  background: linear-gradient(135deg, #F5A962, #F0905A);
  color: #fff;
  box-shadow: 0 6px 20px rgba(240,144,90,0.28);
}
.btn-primary:active { box-shadow: 0 3px 12px rgba(240,144,90,0.2); }

.btn-outline {
  background: #fff; color: #5A5A5A;
  border: 1.5px solid #E5DDD6;
  font-weight: 600;
}
.btn-outline:active { background: #FAF7F5; }

.btn-danger {
  background: linear-gradient(135deg, #E8694A, #FF7B5C);
  color: #fff;
  box-shadow: 0 4px 16px rgba(232,105,74,0.2);
}

/* ===== 输入框 ===== */
.input-group { margin-bottom: 16px; }
.input-group label { display:block; font-size:14px; color:var(--t1); margin-bottom:6px; font-weight:600; }
.input-group input, .input-group textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--bd);
  border-radius: var(--r); font-size: 16px; color: var(--t1);
  outline: none; transition: border-color 0.2s; background: var(--white);
}
.input-group input:focus, .input-group textarea:focus {
  border-color: var(--c1); box-shadow: 0 0 0 3px var(--c1l);
}
.input-group input::placeholder { color: var(--t3); }

/* ===== 卡片 ===== */
.card {
  background: var(--white);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--sd);
}
.card-title {
  font-size: 17px; font-weight: 700; color: var(--t1);
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; gap: 6px;
}

/* ===== 头部 ===== */
.header {
  text-align: center; padding: 40px 16px 24px;
}
.header .logo { font-size: 64px; margin-bottom: 12px; }
.header h1 {
  font-size: 28px; font-weight: 900;
  background: linear-gradient(135deg, var(--c1), #F0A885);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 6px;
}
.header .subtitle { font-size: 14px; color: var(--t2); letter-spacing: 2px; }

/* ===== 选项按钮 ===== */
.options-group { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  display: flex; align-items: center;
  padding: 15px 16px; background: var(--white);
  border: 1.5px solid var(--bd); border-radius: var(--r);
  font-size: 16px; cursor: pointer; text-align: left;
  transition: all 0.2s ease;
}
.option-btn:active { transform: scale(0.98); }
.option-btn.selected {
  border-color: var(--c1);
  background: linear-gradient(135deg, var(--c1l), #FFF8F6);
}
.option-btn .option-label {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--c1l);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; margin-right: 12px;
  flex-shrink: 0; color: var(--c1); transition: all 0.2s;
}
.option-btn.selected .option-label {
  background: var(--c1); color: #fff;
}

/* ===== 进度条 ===== */
.progress-bar {
  width: 100%; height: 6px; background: var(--bd);
  border-radius: 3px; margin-bottom: 20px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--c1), #F0A885);
  transition: width 0.4s ease;
}

/* ===== 得分圈 ===== */
.score-circle {
  width: 140px; height: 140px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c1), #F0A885, var(--c3));
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  margin: 24px auto; color: #fff;
  box-shadow: 0 8px 32px rgba(255,123,92,0.25), 0 0 0 16px rgba(255,123,92,0.04);
  animation: scorePulse 2.5s ease-in-out infinite;
}
.score-num { font-size: 52px; font-weight: 900; line-height: 1; }
.score-total { font-size: 14px; opacity: 0.85; font-weight: 600; }

@keyframes scorePulse {
  0%,100% { box-shadow: 0 8px 32px rgba(255,123,92,0.25), 0 0 0 16px rgba(255,123,92,0.04); }
  50% { box-shadow: 0 8px 40px rgba(255,123,92,0.35), 0 0 0 24px rgba(255,123,92,0.02); }
}

/* ===== 称号徽章 ===== */
.title-badge {
  display: inline-block; font-size: 22px; font-weight: 900;
  padding: 10px 24px; border-radius: 8px; margin-bottom: 8px;
  letter-spacing: 1px;
}
.title-badge.l1 { background: linear-gradient(135deg,#FFD93D,#E6B800); color:#7B5B00; }
.title-badge.l2 { background: linear-gradient(135deg,#74B9FF,#0984E3); color:#fff; }
.title-badge.l3 { background: linear-gradient(135deg,#B8956A,#8B6F4E); color:#fff; }
.title-badge.l4 { background: linear-gradient(135deg,#7EC8A0,#4CAF50); color:#fff; }
.title-badge.l5 { background: linear-gradient(135deg,#FFEAA7,#FDCB6E); color:#8B6914; }
.title-badge.l6 { background: linear-gradient(135deg,#FAB1A0,#E17055); color:#fff; }

/* ===== 排行榜 ===== */
.rank-list { list-style: none; }
.rank-item {
  display: flex; align-items: center; padding: 14px 14px;
  border-radius: var(--r); transition: all 0.2s;
}
.rank-item + .rank-item { margin-top: 4px; }
.rank-item:active { background: var(--c2l); }
.rank-item.highlight {
  background: linear-gradient(135deg, var(--c1l), #FFF8F6);
  box-shadow: 0 2px 12px rgba(255,123,92,0.08);
}
.rank-num {
  width: 36px; height: 36px; border-radius: 8px;
  font-size: 16px; font-weight: 900; text-align: center;
  display: flex; align-items: center; justify-content: center;
  margin-right: 14px; flex-shrink: 0;
  background: var(--c2l); color: var(--t2);
}
.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg,#FFD93D,#E6B800); color:#fff; }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg,#B8ACA0,#8B7D72); color:#fff; }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg,#D4A574,#B8956A); color:#fff; }
.rank-avatar {
  width: 42px; height: 42px; border-radius: 8px;
  background: var(--c2l); color: var(--c2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-right: 14px; flex-shrink: 0;
}
.rank-info { flex:1; min-width:0; }
.rank-name { font-size:16px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rank-score { font-size:18px; font-weight:900; color:var(--c1); flex-shrink:0; }

/* ===== 评价文字 ===== */
.eval-text { text-align: center; font-size: 16px; color: var(--t2); padding: 8px 24px; margin-bottom: 8px; line-height:1.6; }

/* ===== Toast ===== */
.toast {
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%);
  background: var(--t1); color:#fff; padding:14px 28px;
  border-radius:8px; font-size:15px; font-weight:600;
  z-index:9999; box-shadow: var(--sdl);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { opacity:0; transform:translate(-50%,-50%) scale(0.9) translateY(12px); }
  to { opacity:1; transform:translate(-50%,-50%) scale(1) translateY(0); }
}

/* ===== 广告位 ===== */
.ad-placeholder {
  background: var(--white); border-radius: var(--r);
  padding:0; margin:16px 0; text-align:center; overflow:hidden;
  box-shadow: var(--sd);
}
.ad-label { font-size:11px; color:var(--t3); padding:8px 0 4px; letter-spacing:2px; }
.ad-slot {
  background: linear-gradient(135deg,#FFF8F6,#FDF5ED);
  min-height:80px; display:flex; align-items:center; justify-content:center;
  color:var(--t3); font-size:13px;
  border:1px dashed var(--bd); margin:0 10px 10px; border-radius:var(--r);
}

/* ===== 空状态 / Loading ===== */
.empty-state { text-align:center; padding:48px 20px; color:var(--t2); }
.empty-icon { font-size:56px; margin-bottom:14px; }
.loading {
  display:flex; align-items:center; justify-content:center;
  padding:48px; color:var(--t2); font-size:15px;
}
.loading::after {
  content:''; width:22px; height:22px;
  border:2.5px solid var(--bd); border-top-color:var(--c1);
  border-radius:50%; margin-left:10px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }

/* ===== 微信头像 ===== */
.wx-avatar {
  width: 64px; height: 64px; border-radius: 8px;
  border: 2px solid var(--white); object-fit: cover;
  background: var(--c1l);
  box-shadow: 0 2px 12px rgba(255,123,92,0.1);
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(16px); }
  to { opacity:1; transform:translateY(0); }
}
@keyframes popIn {
  0% { opacity:0; transform:scale(0.6); }
  60% { transform:scale(1.05); }
  100% { opacity:1; transform:scale(1); }
}

/* ===== 响应式 ===== */
@media (max-width:360px) {
  .header h1 { font-size:24px; }
  .header .logo { font-size:52px; }
  .score-circle { width:120px; height:120px; }
  .score-num { font-size:44px; }
}
