/* ===== 随想 - 卡片时间轴 ===== */

.memos-timeline {
  position: relative;
  padding: 0;
  margin: 1.5em 0 0 0;
  list-style: none;
}

/* 时间轴线 — 更细腻 */
.memos-timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #d4d4d4, #eee 80%, transparent);
}

/* 卡片容器 */
.memo-card {
  position: relative;
  margin: 0 0 32px 0;
  padding: 0 0 0 52px;
  list-style: none;
}

/* 时间轴圆点 — 带光晕 */
.memo-card::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 36px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2ecc71;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #2ecc71, 0 0 0 6px rgba(46,204,113,0.08);
  z-index: 1;
}

/* 日期 */
.memo-date {
  display: block;
  font-size: 0.78em;
  color: #999;
  margin-bottom: 8px;
}

/* 卡片 */
.memo-card-inner {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  position: relative;
}

.memo-card-inner::after {
  content: '';
  position: absolute;
  top: 30px;
  left: -8px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid #eaeaea;
  border-bottom: 1px solid #eaeaea;
  transform: rotate(45deg);
}

.memo-card-inner:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  transform: translateY(-3px);
}

/* 无标题时的首段预览加粗 */
.memo-card-inner .memo-content > p:first-child {
  color: #333;
  line-height: 1.75;
}

.memo-card-inner .memo-content p {
  margin: 0 0 6px 0;
  color: #555;
  font-size: 0.92em;
  line-height: 1.7;
}

.memo-card-inner .memo-content p:last-child {
  margin-bottom: 0;
}

/* 标签 */
.memo-tags {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}

.memo-tags a {
  display: inline-block;
  font-size: 0.75em;
  padding: 3px 12px;
  margin: 0 5px 5px 0;
  border-radius: 14px;
  background: #f0f9f4;
  color: #2ecc71;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  font-weight: 500;
}

.memo-tags a:hover {
  background: #2ecc71;
  color: #fff;
  transform: scale(1.05);
}

/* 继续阅读链接 */
.memo-read-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82em;
  color: #2ecc71;
  text-decoration: none;
  font-weight: 500;
  transition: gap 0.2s;
  border: none;
}

.memo-read-more:hover {
  text-decoration: underline;
}

/* 空状态 */
.memos-empty {
  text-align: center;
  padding: 60px 20px;
  color: #ccc;
  font-size: 0.95em;
}

/* ===== 详情页 ===== */

.memo-single {
  max-width: 700px;
  margin: 0 auto;
  padding: 10px 0 30px;
}

.memo-single-header {
  margin-bottom: 28px;
}

.memo-single-header .memo-date {
  font-size: 0.85em;
  color: #aaa;
}

.memo-single-body {
  font-size: 1em;
  line-height: 1.85;
  color: #444;
}

.memo-single-body p {
  margin-bottom: 14px;
}

/* 返回链接 */
.memo-back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #aaa;
  text-decoration: none;
  font-size: 0.85em;
  transition: color 0.2s;
}

.memo-back-link:hover {
  color: #2ecc71;
}

/* 上一页/下一页 */
.memo-single footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.memo-single footer .actions {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.memo-single footer .actions a {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #555;
  text-decoration: none;
  font-size: 0.85em;
  transition: all 0.2s;
}

.memo-single footer .actions a:hover {
  border-color: #2ecc71;
  color: #2ecc71;
  background: #f0f9f4;
}

/* ===== 暗色模式 ===== */

@media (prefers-color-scheme: dark) {
  .memos-timeline::before {
    background: linear-gradient(to bottom, #444, #333 80%, transparent);
  }

  .memo-card-inner {
    background: #262626;
    border-color: #383838;
  }

  .memo-card-inner::after {
    background: #262626;
    border-color: #383838;
  }

  .memo-card-inner .memo-content > p:first-child {
    color: #ddd;
  }

  .memo-card-inner .memo-content p {
    color: #aaa;
  }

  .memo-card::before {
    border-color: #262626;
  }

  .memo-tags {
    border-top-color: #383838;
  }

  .memo-tags a {
    background: #1a3a2a;
    color: #4ade80;
  }

  .memo-tags a:hover {
    background: #2ecc71;
    color: #fff;
  }

  .memo-date {
    color: #777;
  }

  .memo-single-body {
    color: #bbb;
  }

  .memo-single footer {
    border-top-color: #333;
  }

  .memo-single footer .actions a {
    border-color: #444;
    color: #aaa;
  }

  .memo-single footer .actions a:hover {
    border-color: #4ade80;
    color: #4ade80;
    background: #1a3a2a;
  }
}

/* ===== 移动端 ===== */

@media screen and (max-width: 736px) {
  .memo-card {
    padding-left: 42px;
  }
  .memo-card-inner {
    padding: 16px 18px;
  }
  .memo-card-inner::after {
    display: none;
  }
  .memo-card::before {
    left: 6px;
    top: 30px;
    width: 16px;
    height: 16px;
  }
  .memos-timeline::before {
    left: 14px;
  }
  .memo-single footer .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .memo-single footer .actions a {
    text-align: center;
  }
}
