﻿/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;
    background: #f5f0e8;
    color: #2c2416;
    line-height: 1.8;
    font-size: 16px;
}
a { color: #8b4513; text-decoration: none; transition: color 0.2s; }
a:hover { color: #a0522d; }
img { max-width: 100%; height: auto; }

/* ===== Layout ===== */
.wrapper { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
header {
    background: #2c2416;
    padding: 20px 0 16px;
    border-bottom: 3px solid #8b4513;
}
.header-inner {
    max-width: 1000px; margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.site-title {
    font-size: 24px; font-weight: bold;
    color: #f5f0e8; letter-spacing: 3px;
}
.site-title small {
    font-size: 13px; font-weight: normal; color: #a08060;
    margin-left: 10px; letter-spacing: 1px;
}
nav { display: flex; gap: 8px; flex-wrap: wrap; }
nav a {
    color: #d4c5a9; padding: 6px 16px; border-radius: 4px;
    font-size: 14px; transition: background 0.2s, color 0.2s;
}
nav a:hover, nav a.active { background: #8b4513; color: #f5f0e8; }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #2c2416 0%, #4a3728 100%);
    padding: 60px 0 50px; text-align: center; color: #f5f0e8;
}
.hero h2 { font-size: 32px; font-weight: bold; margin-bottom: 12px; }
.hero p { font-size: 16px; color: #c4b59a; max-width: 600px; margin: 0 auto; line-height: 1.9; }

/* ===== Content ===== */
main { padding: 40px 0 60px; }
.section-title {
    font-size: 20px; font-weight: bold; color: #2c2416;
    padding-bottom: 8px; margin-bottom: 24px;
    border-bottom: 2px solid #d4c5a9; letter-spacing: 1px;
}

/* ===== Article Cards ===== */
.article-list { display: flex; flex-direction: column; gap: 20px; }
.article-card {
    background: #fff; border-radius: 6px; padding: 24px 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: box-shadow 0.2s;
    border-left: 3px solid #8b4513;
}
.article-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.1); }
.article-card h3 { font-size: 18px; margin-bottom: 6px; }
.article-card h3 a { color: #2c2416; }
.article-card h3 a:hover { color: #8b4513; }
.article-meta {
    font-size: 13px; color: #8a7a6a; margin-bottom: 10px;
    font-family: sans-serif; display: flex; gap: 16px;
}
.article-card p { color: #4a3a2a; font-size: 15px; line-height: 1.7; }
.tag {
    display: inline-block; background: #f5f0e8; color: #8b4513;
    padding: 2px 10px; border-radius: 3px; font-size: 12px;
    font-family: sans-serif; margin-right: 4px;
}

/* ===== Book Cards ===== */
.book-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.book-card {
    background: #fff; border-radius: 6px; padding: 20px; display: flex; gap: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: box-shadow 0.2s;
}
.book-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.1); }
.book-cover {
    width: 80px; height: 120px; flex-shrink: 0;
    background: #d4c5a9; border-radius: 3px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: #8a7a6a;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-info h4 { font-size: 16px; margin-bottom: 4px; color: #2c2416; }
.book-author { font-size: 13px; color: #8a7a6a; font-family: sans-serif; margin-bottom: 6px; }
.book-desc { font-size: 14px; color: #4a3a2a; line-height: 1.6; }
.book-rating { color: #c49a3c; font-size: 14px; margin-bottom: 4px; }

/* ===== Article Page ===== */
.article-page { max-width: 720px; margin: 0 auto; }
.article-page h1 { font-size: 28px; margin-bottom: 10px; color: #2c2416; }
.article-page .article-meta { margin-bottom: 24px; }
.article-body { font-size: 16px; color: #2c2416; line-height: 2; }
.article-body p { margin-bottom: 16px; text-indent: 2em; }
.article-body h2 { font-size: 20px; margin: 32px 0 12px; text-indent: 0; }
.article-body blockquote {
    border-left: 3px solid #8b4513; margin: 16px 0; padding: 8px 20px;
    background: #faf6ee; color: #4a3a2a; font-style: italic;
}
.article-body blockquote p { text-indent: 0; margin-bottom: 0; }

/* ===== About ===== */
.about-page { max-width: 700px; margin: 0 auto; }
.about-page h1 { font-size: 28px; margin-bottom: 20px; }
.about-page p { margin-bottom: 16px; text-indent: 2em; line-height: 2; font-size: 16px; }

/* ===== Footer ===== */
footer {
    background: #2c2416; padding: 24px 0; text-align: center;
    color: #8a7a6a; font-size: 13px; font-family: sans-serif;
}

/* ===== Homepage sections ===== */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 700px) {
    .home-grid { grid-template-columns: 1fr; }
    .header-inner { flex-direction: column; text-align: center; }
    .hero h2 { font-size: 24px; }
    .book-card { flex-direction: column; align-items: center; text-align: center; }
    .book-cover { width: 100px; height: 150px; }
    .article-page h1 { font-size: 22px; }
}

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 40px 0; color: #8a7a6a; font-style: italic; }

/* ===== Active nav highlight ===== */
nav a.active { background: #8b4513; color: #f5f0e8; }

/* ===== Homepage combined grid ===== */
.home-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.home-row .article-card {
    height: 100%;
}
.home-empty-col {
    visibility: hidden;
}
@media (max-width: 700px) {
    .home-row {
        grid-template-columns: 1fr;
    }
}
