/* 第八版：男娘日记 · 左侧导航 + 右侧内容流
   - 左侧固定浅色侧栏导航
   - 右侧为单列阅读流 + 若干信息块
   - 整体偏 Blog / 内容站风格，适合长文阅读
*/

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

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f3f4f6;
  color: #111827;
  line-height: 1.8;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

/* 左侧导航栏 */
.sidebar {
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo-block h1 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.logo-block p {
  font-size: 0.82rem;
  color: #6b7280;
}

.nav-block h2,
.info-block h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
  margin-bottom: 0.4rem;
}

.nav-list {
  list-style: none;
  font-size: 0.92rem;
}

.nav-list li + li {
  margin-top: 0.3rem;
}

.nav-link {
  display: block;
  padding: 0.18rem 0.2rem;
  border-left: 3px solid transparent;
  color: #374151;
}

.nav-link:hover {
  border-color: #d1d5db;
}

.nav-link.active {
  border-color: #2563eb;
  color: #111827;
  font-weight: 600;
}

.info-block p {
  font-size: 0.8rem;
  color: #6b7280;
}

.sidebar-foot {
  margin-top: auto;
  font-size: 0.78rem;
  color: #9ca3af;
}

/* 右侧内容区域 */
.main {
  padding: 1.4rem 1.6rem 2.4rem;
}

.page-header {
  margin-bottom: 1.4rem;
}

.page-title {
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
}

.page-sub {
  font-size: 0.94rem;
  color: #4b5563;
}

.label-row {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.label {
  font-size: 0.78rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

.content-block {
  background: #ffffff;
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
}

.content-block h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.content-block p {
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
  color: #374151;
  text-indent: 2em;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr);
  gap: 1.3rem;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.card {
  background: #f9fafb;
  border-radius: 0.8rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e5e7eb;
}

.card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.card p {
  font-size: 0.86rem;
  color: #4b5563;
  text-indent: 0;
}

.card h3 a {
  color: #111827;
}

.card h3 a:hover {
  color: #2563eb;
}

.icon-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.icon-tag {
  font-size: 0.75rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
}

.link-row {
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

.link-row a {
  margin-right: 0.6rem;
}

.footer {
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: #6b7280;
}

/* 列表页与文章页 */
.list-header {
  margin-bottom: 1rem;
}

.list-header h1 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.list-header p {
  font-size: 0.9rem;
  color: #4b5563;
}

.article-list {
  list-style: none;
}

.article-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid #e5e7eb;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0.9rem;
}

.article-thumb img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 0.7rem;
}

.article-meta {
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 0.15rem;
}

.article-title {
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}

.article-title a {
  color: #111827;
}

.article-title a:hover {
  color: #2563eb;
}

.article-desc {
  font-size: 0.86rem;
  color: #4b5563;
}

.article-page {
  background: #ffffff;
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  padding: 1rem 1.2rem 1.4rem;
}

.article-page h1 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.article-meta-line {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.7rem;
}

.article-cover {
  margin-bottom: 0.9rem;
}

.article-cover img {
  width: 100%;
  border-radius: 0.7rem;
}

.article-body p {
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  text-indent: 2em;
  color: #374151;
}

.article-body h2 {
  font-size: 1.05rem;
  margin: 0.8rem 0 0.4rem;
  border-left: 3px solid #2563eb;
  padding-left: 0.45rem;
}

/* 响应式 */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: column;
  }
  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }
  .card-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-thumb img {
    height: 150px;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }
  .main {
    padding: 1rem 1rem 2.1rem;
  }
}

