/* views.css — 各视图专属布局 */

/* ---------- 首页：用户档案卡 ---------- */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
}
.home-user {
  display: block;
  padding: 34px 30px;
  transition: background var(--dur) var(--ease);
}
.home-user + .home-user {
  border-left: 1px solid var(--border);
}
.home-user:hover {
  background: var(--bg-raised);
  text-decoration: none;
}
.home-name {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.home-name .uid {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.1em;
}
.home-bio {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--fg-dim);
}
.home-stats {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.home-stats b {
  font-weight: 600;
  color: var(--fg);
}

/* ---------- 时间轴 ---------- */
.year-head {
  position: sticky;
  top: 96px;
  z-index: 20;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  margin-top: 32px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.year-label {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}
.year-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
}

.tl-row {
  position: relative;
  display: grid;
  grid-template-columns: 60px 22px 1fr;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}
.tl-row:hover .tl-title {
  text-decoration: underline;
}
.tl-date {
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: right;
  color: var(--fg-dim);
  padding-top: 3px;
}
.tl-node {
  position: relative;
  height: 100%;
}
.tl-node::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--hairline);
}
.tl-dot {
  position: absolute;
  left: 10px;
  top: 12px;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg);
}
.tl-row.best .tl-dot {
  background: transparent;
  border: 2px solid var(--fg);
}
.tl-content {
  padding: 0 4px 0 14px;
}
.tl-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
.tl-stats {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 排行 ---------- */
.rank-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  transition: padding-left var(--dur) var(--ease);
}
.rank-row:hover {
  padding-left: 6px;
}
.rank-row:hover .rank-body .topic-title,
.rank-row:hover .rank-body .reply-text {
  text-decoration: underline;
}
.rank-no {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-faint);
  padding-top: 2px;
}
.rank-row.is-top3 .rank-no {
  color: var(--accent);
  font-weight: 700;
}
.rank-body .topic-title,
.rank-body .reply-text {
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.rank-body .reply-text {
  font-size: 14px;
}
.rank-body .topic-title {
  font-weight: 600;
  font-size: 15.5px;
}
.rank-meta {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 详情 ---------- */
.detail-head {
  padding: 36px 0 18px;
  border-bottom: 1px solid var(--border);
}
.detail-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 4vw, 31px);
  font-weight: 600;
  line-height: 1.4;
}
.detail-meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.detail-body {
  padding: 26px 0 10px;
  border-bottom: 1px solid var(--hairline);
}
.detail-images {
  margin-top: 14px;
}
.detail-images img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.replies-wrap {
  padding-top: 8px;
}

/* 聚焦跟帖（从跟帖榜点入时置顶高亮） */
.reply-focus {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 14px 0 4px;
  background: var(--bg-raised);
}
.reply-focus .reply-row {
  border-bottom: 0;
}
.reply-focus-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  margin-bottom: 4px;
}

/* ---------- 说说 ---------- */
.shuo-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.shuo-date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-faint);
  margin-bottom: 6px;
}
.shuo-text {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.85;
  white-space: pre-wrap;
}

/* ---------- 载入中 ---------- */
.loading {
  padding: 48px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--fg-faint);
}

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .home-user + .home-user {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .year-head {
    top: 96px;
  }
  .tl-row {
    grid-template-columns: 1fr;
    padding-left: 14px;
    border-left: 1px solid var(--hairline);
  }
  .tl-node {
    display: none;
  }
  .tl-date {
    text-align: left;
    font-size: 11px;
    margin-bottom: 2px;
  }
  .tl-content {
    padding-left: 0;
  }
  .rank-row {
    grid-template-columns: 32px 1fr;
  }
}
