/* =========================================================
   星环设计 - 每日签到页样式（checkin.css）
   颜色全部取自 common.css 的主题变量，明暗主题自动适配。
   ========================================================= */

.checkin-main {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
}

/* ---------- 签到卡片顶部：标题 + 大按钮 ---------- */
.checkin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.checkin-title { margin: 0 0 4px; font-size: 22px; }
.checkin-sub { margin: 0; color: var(--text-2); font-size: 14px; }

.checkin-btn {
  min-width: 132px;
  min-height: 52px;
  font-size: 17px;
  border-radius: 12px;
  flex-shrink: 0;
}
.checkin-btn:disabled { cursor: default; }
.checkin-btn.done {
  background: var(--primary-light);
  color: var(--primary);
}

/* ---------- 统计三格 ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.stat-item {
  background: var(--bg-hover);
  border-radius: 10px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-2); }

/* ---------- 本月日历 ---------- */
.calendar-title { font-size: 16px; margin: 20px 0 10px; }
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-hover);
}
.cal-head {
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  aspect-ratio: auto;
  padding: 4px 0;
}
.cal-empty { background: transparent; }
.cal-cell.checked {
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 600;
}
.cal-cell.today { box-shadow: 0 0 0 2px var(--primary-light) inset; }
.cal-cell.checked.today { box-shadow: 0 0 0 2px var(--primary) inset; }

.checkin-hint {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--text-2);
}

/* ---------- 今日签到榜 ---------- */
.board-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.board-empty { color: var(--text-2); font-size: 14px; text-align: center; padding: 18px 0; margin: 0; }
.board-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-hover);
}
.board-rank {
  width: 30px;
  text-align: center;
  font-weight: 700;
  flex-shrink: 0;
}
.board-name { font-weight: 600; color: inherit; }
.board-name:hover { color: var(--primary); }
.board-meta { margin-left: auto; font-size: 12.5px; color: var(--text-2); }

/* ---------- 窄屏适配 ---------- */
@media (max-width: 520px) {
  .checkin-top { flex-direction: column; align-items: stretch; text-align: center; }
  .checkin-btn { width: 100%; }
  .board-meta { display: none; }
}

/* ---------- 签到榜前三名奖牌配色 ---------- */
.medal-1 { color: #f59e0b; }  /* 金 */
.medal-2 { color: #94a3b8; }  /* 银 */
.medal-3 { color: #b45309; }  /* 铜 */
