/* 
 * CSS cho Trải nghiệm Đọc (eBook Style)
 * Tập trung vào typography, tối ưu di động và giảm thiểu xao nhãng.
 */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,300;1,400&family=Source+Sans+Pro:wght@400;600&display=swap');

:root {
    --bg-color: #fbfbf9; /* Màu nền hơi vàng nhẹ giống giấy */
    --text-color: #2c2c2c; /* Màu chữ không quá đen gắt */
    --font-reading: 'Merriweather', serif; /* Font chữ có chân chuẩn sách */
    --font-ui: 'Source Sans Pro', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-ui);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Header mỏng, tối giản */
.reader-header {
    background-color: transparent;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.reader-header .logo {
    font-family: var(--font-reading);
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
    text-decoration: none;
}

/* Vùng chứa nội dung sách */
.book-container {
    max-width: 700px; /* Khổ sách tiêu chuẩn */
    margin: 40px auto;
    padding: 0 20px;
}

/* Style cho Nội dung bài viết */
.article-content {
    font-family: var(--font-reading);
    font-size: 1.15rem; /* Size chữ to dễ đọc trên điện thoại */
    color: #333;
}

.article-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.4;
    text-align: center;
}

.article-content h2, .article-content h3 {
    font-family: var(--font-ui);
    margin-top: 40px;
    margin-bottom: 15px;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 25px;
    text-align: justify; /* Căn đều 2 bên như sách in */
    text-justify: inter-word;
}

/* Tối ưu hóa cho Mobile */
@media (max-width: 768px) {
    .book-container {
        margin: 20px auto;
    }
    .article-content {
        font-size: 1.05rem; /* Nhỏ lại một chút trên đt */
    }
    .article-content h1 {
        font-size: 1.8rem;
    }
    .article-content p {
        text-align: left; /* Tắt căn 2 bên trên mobile để tránh khoảng trắng quá to */
    }
}

/* Các chuyên mục ngoài trang chủ */
.category-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}
.category-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.category-card h3 a {
    color: #2c3e50;
    text-decoration: none;
    font-family: var(--font-reading);
}
