/* ============================================================
 * stats.css — 周日周结页 · 总统计页 · 赠语集
 * ============================================================ */

/* ---------- 周结页 ---------- */
.sunday-title {
  text-align: center;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .5em;
  text-indent: .5em;
  margin: 22px 0 6px;
}

.stamp.full-stamp {
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  border: 2.2px solid var(--cinnabar);
  border-radius: 4px;
  color: var(--cinnabar);
  font-size: 19px;
  letter-spacing: .28em;
  text-indent: .28em;
  padding: 7px 12px;
  transform: rotate(-5deg);
  box-shadow: inset 0 0 8px rgba(176, 58, 46, .12);
  animation: stampIn .55s cubic-bezier(.2, 1.6, .4, 1) both;
}

/* ---------- 数字网格 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0 6px;
}
.stat-cell {
  border: 1px solid var(--ink-25);
  border-radius: 2px;
  text-align: center;
  padding: 12px 4px 10px;
  background: rgba(255, 255, 255, .28);
  animation: cardIn .5s ease both;
}
.stat-cell:nth-child(2) { animation-delay: .05s; }
.stat-cell:nth-child(3) { animation-delay: .1s; }
.stat-cell:nth-child(4) { animation-delay: .15s; }
.stat-cell:nth-child(5) { animation-delay: .2s; }
.stat-cell:nth-child(6) { animation-delay: .25s; }
.stat-value {
  font-size: 23px;
  letter-spacing: .04em;
  line-height: 1.2;
}
.stat-label {
  font-size: 11px;
  color: var(--ink-60);
  letter-spacing: .18em;
  margin-top: 4px;
}
.stat-cell.bad .stat-value { color: var(--cinnabar); }
.stat-cell.good .stat-value::after {
  content: '✓';
  font-size: 11px;
  color: var(--ink-45);
  vertical-align: 10px;
  margin-left: 2px;
}
.stat-cell.luck .stat-value { color: var(--gold); }

/* ---------- 小节标题 ---------- */
.stat-sec-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 12px;
}
.sec-rule { flex: 1; height: 1px; background: var(--ink-15); }
.sec-text {
  font-size: 12.5px;
  color: var(--ink-60);
  letter-spacing: .3em;
  text-indent: .3em;
  flex: none;
}

/* ---------- 条形分布 ---------- */
.bar-chart { padding: 0 4px; }
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.bar-name {
  flex: none;
  width: 3.6em;
  font-size: 13px;
  letter-spacing: .05em;
  text-align: right;
  color: var(--ink-60);
}
.bar-track {
  flex: 1;
  height: 9px;
  border: 1px solid var(--ink-25);
  border-radius: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, .3);
}
.bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--ink), rgba(43, 43, 43, .75));
  transform-origin: left;
  animation: barIn .9s cubic-bezier(.25, .9, .3, 1) both;
}
.bar-fill.zero { background: transparent; }
.bar-num {
  flex: none;
  width: 3.6em;
  font-size: 12px;
  color: var(--ink-60);
}

/* ---------- 一周七日墨点 ---------- */
.week-day-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  justify-items: center;
  margin-bottom: 8px;
}
.wd-cell { cursor: pointer; text-align: center; }
.wd-circle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--ink-45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  margin: 0 auto 4px;
  --fill: 0%;
  background: radial-gradient(circle closest-side, rgba(43, 43, 43, .26) calc(var(--fill) - 1%), transparent var(--fill));
  transition: transform .25s ease;
}
.wd-cell:hover .wd-circle { transform: scale(1.1); }
.wd-circle.all-done { border-color: var(--ink); border-width: 1.5px; }
.wd-circle.has-undone { border-color: var(--cinnabar); color: var(--cinnabar); }
.wd-circle.is-sunday { border-style: dotted; color: var(--ink-60); }
.wd-label { font-size: 11px; color: var(--ink-60); }

/* ---------- 总统计 ---------- */
.total-stats { max-width: 560px; margin: 0 auto; }
.full-weeks {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
}
.week-seal {
  width: 36px;
  height: 36px;
  border: 1.4px solid var(--ink-25);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--ink-45);
  transition: all .3s;
}
.week-seal.sealed {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
  border-width: 2px;
  transform: rotate(-5deg);
  box-shadow: inset 0 0 6px rgba(176, 58, 46, .12);
}
.full-weeks-num {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-60);
  letter-spacing: .2em;
  margin-top: 10px;
}

.seg-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.seg-btn {
  border: 1px solid var(--ink-45);
  font-size: 12.5px;
  letter-spacing: .1em;
  padding: 5px 16px;
  transition: all .25s;
}
.seg-btn:first-child { border-radius: 2px 0 0 2px; border-right: none; }
.seg-btn:last-child { border-radius: 0 2px 2px 0; }
.seg-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.wheel-grid { grid-template-columns: repeat(3, 1fr); }
.luck-tier {
  text-align: center;
  font-size: 13px;
  color: var(--ink-60);
  letter-spacing: .18em;
  margin: 6px 0 4px;
}
.tier-name {
  font-size: 19px;
  color: var(--cinnabar);
  letter-spacing: .22em;
  margin-left: 4px;
}
.tier-name.celestial {
  background: linear-gradient(100deg, #b03a2e, #c9a227, #b03a2e);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbowSlide 2.6s linear infinite;
}

/* ---------- 赠语集 ---------- */
.collection { max-width: 520px; margin: 0 auto; }
.collect-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 6px;
}
.collect-card {
  border: 1px solid var(--ink-25);
  border-radius: 3px;
  background: rgba(255, 255, 255, .3);
  padding: 14px 16px 10px;
  animation: cardIn .5s ease both;
  transition: opacity .3s, transform .3s;
}
.collect-card.leaving { opacity: 0; transform: translateX(24px); }
.collect-text {
  font-size: 15px;
  letter-spacing: .08em;
  line-height: 1.9;
  cursor: pointer;
  transition: color .3s;
}
.collect-text:hover { color: var(--cinnabar-deep); }
.collect-text::before { content: '❝ '; color: var(--cinnabar); font-size: 13px; }
.collect-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--ink-15);
}
.collect-date {
  font-size: 11.5px;
  color: var(--ink-60);
  letter-spacing: .08em;
  cursor: pointer;
  border-bottom: 1px dotted transparent;
  transition: all .25s;
}
.collect-date:hover { color: var(--ink); border-bottom-color: var(--ink-45); }
.collect-unlike {
  font-size: 15px;
  color: var(--cinnabar);
  transition: transform .25s;
  padding: 0 2px;
}
.collect-unlike:hover { transform: scale(1.2); }
