/* 第九版：男娘日记 · 拼图式首页 + 多图布局
   - 顶部横向导航
   - 首页主体为大图 + 三张缩略图 + 文本分区
   - 强调兴趣文化氛围和首页缩略图（利于收录）
*/

*,
*::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: #0f172a;
  color: #e5e7eb;
  line-height: 1.8;
}

a {
  color: #38bdf8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.2rem 1.4rem 2.4rem;
}

/* 顶部导航 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: radial-gradient(circle at 20% 20%, #f9a8d4 0, #ec4899 40%, #312e81 100%);
}

.brand-text strong {
  font-size: 1.2rem;
  color: #f9fafb;
}

.brand-text span {
  display: block;
  font-size: 0.8rem;
  color: #9ca3af;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.nav a {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}

.nav a.active {
  background: #f97316;
  color: #0f172a;
}

.nav a:not(.active):hover {
  background: rgba(15, 23, 42, 0.8);
}

/* 首页头图拼图区 */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.4rem;
  margin-bottom: 1.5rem;
}

.hero-main {
  background: #020617;
  border-radius: 1rem;
  padding: 0.9rem 1rem 1.1rem;
  border: 1px solid #1e293b;
}

.hero-main img {
  width: 100%;
  border-radius: 0.8rem;
  margin-bottom: 0.8rem;
}

.hero-main h1 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.hero-main p {
  font-size: 0.92rem;
  color: #cbd5f5;
}

.hero-side {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.thumb-card {
  background: #020617;
  border-radius: 0.9rem;
  border: 1px solid #1e293b;
  padding: 0.7rem 0.8rem;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 0.6rem;
}

.thumb-card img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 0.6rem;
}

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

.thumb-card p {
  font-size: 0.78rem;
  color: #9ca3af;
}

/* 首页文本区与卡片区 */
.section {
  margin-top: 1.6rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.section-head h2 {
  font-size: 1.1rem;
  color: #f9fafb;
}

.section-head span {
  font-size: 0.8rem;
  color: #9ca3af;
}

.section-text {
  background: #020617;
  border-radius: 0.9rem;
  padding: 0.8rem 1rem;
  border: 1px solid #1e293b;
  margin-bottom: 1rem;
}

.section-text p {
  font-size: 0.94rem;
  color: #cbd5f5;
  margin-bottom: 0.7rem;
  text-indent: 2em;
}

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

.card {
  background: #020617;
  border-radius: 0.9rem;
  border: 1px solid #1e293b;
  padding: 0.8rem 0.9rem;
}

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

.card h3 a {
  color: #e5e7eb;
}

.card h3 a:hover {
  color: #38bdf8;
}

.card p {
  font-size: 0.82rem;
  color: #9ca3af;
}

.tag-row {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: #111827;
  color: #9ca3af;
}

.footer {
  margin-top: 1.8rem;
  font-size: 0.8rem;
  color: #6b7280;
  border-top: 1px solid #1f2937;
  padding-top: 0.8rem;
}

/* 列表页 / 文章页通用 */
.list-shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.2rem 1.4rem 2.4rem;
}

.list-header {
  margin-bottom: 1rem;
}

.list-header h1 {
  font-size: 1.4rem;
  color: #f9fafb;
  margin-bottom: 0.3rem;
}

.list-header p {
  font-size: 0.9rem;
  color: #9ca3af;
}

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

.article-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid #1f2937;
  display: grid;
  grid-template-columns: 150px 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: #e5e7eb;
}

.article-title a:hover {
  color: #38bdf8;
}

.article-desc {
  font-size: 0.85rem;
  color: #9ca3af;
}

.article-page {
  max-width: 760px;
  margin: 0 auto;
  background: #020617;
  border-radius: 0.9rem;
  border: 1px solid #1f2937;
  padding: 1rem 1.2rem 1.5rem;
}

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

.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: #e5e7eb;
}

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

/* 响应式 */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html {
    font-size: 15px;
  }
  .page,
  .list-shell {
    padding: 1rem 1rem 2.2rem;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .card-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-thumb img {
    height: 150px;
  }
}

