@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&display=swap');

:root {
  --bg-paper: #f7f4ed;
  --ink-black: #2b2b2b;
  --ink-light: #555555;
  --seal-red: #a83926;
  --border-color: #dcd6c8;
}

body {
  background-color: var(--bg-paper);
  color: var(--ink-black);
  font-family: "Noto Serif SC", "SimSun", "Songti SC", serif;
  margin: 0;
  padding: 0;
  line-height: 2.0;
  background-image: linear-gradient(to right, #f2efe6 1px, transparent 1px), linear-gradient(to bottom, #f2efe6 1px, transparent 1px);
  background-size: 40px 40px;
}

a {
  text-decoration: none;
  color: var(--seal-red);
  transition: 0.3s;
}

a:hover {
  color: var(--ink-black);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-header {
  text-align: center;
  padding: 80px 0 60px;
  border-bottom: 3px double var(--seal-red);
  margin-bottom: 50px;
  position: relative;
}

.hero-title {
  font-size: 3.5rem;
  writing-mode: vertical-rl;
  margin: 0 auto;
  letter-spacing: 0.5rem;
  font-weight: bold;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--ink-light);
  margin-top: 20px;
  font-family: serif;
  writing-mode: horizontal-tb;
}

.chapter-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.chapter-item {
  border: 1px solid var(--border-color);
  padding: 20px;
  background: #fff;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.chapter-item:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0px var(--seal-red);
  border-color: var(--seal-red);
}

.chapter-num {
  font-size: 0.9rem;
  color: var(--ink-light);
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
  margin-bottom: 10px;
  display: block;
}

.chapter-title {
  font-size: 1.3rem;
  font-weight: bold;
  display: block;
}

.post-header {
  text-align: center;
  margin-bottom: 50px;
}

.post-title {
  font-size: 2rem;
  margin-bottom: 10px;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--ink-light);
  font-style: italic;
}

.post-content {
  font-size: 1.2rem;
  text-align: justify;
}

.post-content p {
  margin-bottom: 1.5rem;
  text-indent: 2em;
}

.seal {
  width: 60px;
  height: 60px;
  border: 3px solid var(--seal-red);
  color: var(--seal-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  border-radius: 4px;
  opacity: 0.8;
  position: absolute;
  top: 20px;
  right: 20px;
  transform: rotate(15deg);
  pointer-events: none;
}

.footer-nav {
  margin-top: 60px;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  text-align: center;
}

/* 移动端优化 */
@media (max-width: 600px) {
  .post-content {
    font-size: 1.1rem;
  }
  .hero-title {
    font-size: 2.5rem;
    letter-spacing: 0.3rem;
  }
  .chapter-title {
    font-size: 1rem !important;
  }
}

/* 夜间模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-paper: #1a1a1a;
    --ink-black: #cccccc;
    --ink-light: #888888;
    --border-color: #333333;
    --seal-red: #c9503a;
  }
  body {
    background-image: none;
  }
  .chapter-item {
    background: #252525;
    border-color: #333;
  }
  .hero-subtitle {
    color: #888;
  }
  footer {
    color: #666;
  }
}
