
:root {
  --bg: #0d0f1a;
  --bg-2: #151728;
  --card: #1a1c2e;
  --gold: #e8b54d;
  --gold-soft: #f0c674;
  --gold-dim: #8a6d3b;
  --text: #e8e6e0;
  --text-dim: #9a97a3;
  --line: #2a2c3e;
}

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

body {
  background: radial-gradient(1200px 600px at 50% -10%, #1a1d33 0%, var(--bg) 55%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* 头部 */
.site-header {
  text-align: center;
  padding: 72px 20px 48px;
}
.site-header h1 {
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 1px;
  background: linear-gradient(120deg, var(--gold-soft), var(--gold), #c88f2e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 16px;
}
.meta {
  margin-top: 8px;
  color: var(--gold-dim);
  font-size: 13px;
  letter-spacing: 1px;
}

/* 时间线 */
.timeline {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 60px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dim), transparent);
  opacity: 0.35;
}

.group {
  position: relative;
  padding-left: 72px;
  margin-bottom: 40px;
}
.group-marker {
  position: absolute;
  left: 26px;
  top: 6px;
}
.group-marker .dot {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px 2px rgba(232, 181, 77, 0.5);
}
.date {
  color: var(--gold-soft);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}

.sands {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sand-card {
  display: block;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.comment-count {
  position: absolute;
  top: 12px;
  right: 14px;
  background: #23253a;
  color: var(--gold-soft);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}
.sand-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--gold-dim);
}
.sand-title {
  font-size: 18px;
  font-weight: 650;
  color: var(--text);
}
.quote {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #23253a;
  color: var(--text-dim);
  letter-spacing: 1px;
}
.tag.layer-法层 { color: #8fbfe8; }
.tag.layer-术层 { color: #a8d8a8; }
.tag.layer-器层 { color: #e0b78f; }
.tag.layer-用层 { color: #e8a08f; }

/* 详情页 */
.sand-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}
.detail-header { margin-bottom: 32px; }
.detail-header h1 {
  font-size: clamp(24px, 4vw, 34px);
  margin: 12px 0 8px;
  color: var(--gold-soft);
}
.detail-header .meta { margin-top: 0; }
.back {
  color: var(--gold);
  font-size: 14px;
  opacity: 0.85;
}
.back:hover { opacity: 1; }

.content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 28px;
  font-size: 16px;
}
.content h1, .content h2, .content h3, .content h4 {
  color: var(--gold-soft);
  margin: 28px 0 12px;
  line-height: 1.4;
}
.content h2 { font-size: 20px; }
.content h3 { font-size: 17px; }
.content p { margin: 12px 0; }
.content blockquote {
  border-left: 3px solid var(--gold-dim);
  padding: 4px 0 4px 16px;
  margin: 16px 0;
  color: var(--text-dim);
  font-style: italic;
}
.content ul, .content ol { padding-left: 24px; margin: 12px 0; }
.content li { margin: 6px 0; }
.content table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 14px;
}
.content th, .content td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
}
.content th { background: #202236; color: var(--gold-soft); }
.content code {
  background: #202236;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.content pre {
  background: #14151f;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}
.content pre code { background: none; padding: 0; }
.content .wl { color: var(--gold); border-bottom: 1px dashed var(--gold-dim); }
.content .wl:hover { border-bottom-style: solid; }
.content .wl-ext { color: var(--text-dim); border-bottom: 1px dotted var(--text-dim); }
.content img { max-width: 100%; border-radius: 8px; }
.content hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

.detail-footer { margin-top: 32px; }

/* 评论区 */
.comments {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.comments h2 {
  font-size: 18px;
  color: var(--gold-soft);
  margin-bottom: 16px;
}
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment-empty { color: var(--text-dim); font-size: 14px; }
.comment-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.comment-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.comment-name { color: var(--gold); font-size: 14px; font-weight: 600; }
.comment-time { color: var(--text-dim); font-size: 12px; }
.comment-body { color: var(--text); font-size: 15px; line-height: 1.6; word-break: break-word; }
.comment-reply {
  margin-top: 10px;
  padding: 10px 12px;
  background: #202236;
  border-left: 3px solid var(--gold-dim);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.reply-tag { color: var(--gold); font-size: 12px; margin-right: 8px; }
.reply-time { display: block; color: var(--text-dim); font-size: 11px; margin-top: 4px; }
.comment-form { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.comment-form input, .comment-form textarea {
  background: #14151f;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}
.comment-form textarea { min-height: 90px; }
.comment-form input:focus, .comment-form textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
}
.comment-form button {
  align-self: flex-start;
  background: linear-gradient(120deg, var(--gold), #c88f2e);
  color: #1a1408;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
.comment-form button:hover { opacity: 0.9; }
.comment-status { color: var(--gold-dim); font-size: 13px; min-height: 18px; }

.site-footer {
  text-align: center;
  padding: 40px 20px 56px;
  color: var(--gold-dim);
  font-size: 13px;
  letter-spacing: 1px;
}
