/* Nhúng Google Font - Roboto */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/*
Theme Name: xsmb.blog
Author: Admin
Version: 1.1 (Tinh chỉnh bởi Gemini)
*/

/* ========== BIẾN MÀU CHỦ ĐẠO & KIỂU CHUNG ========== */
:root {
    --primary-color: #3caa3e;
    /* Màu xanh chủ đạo */
    --hover-color: #0094ff;
    /* Màu khi hover */
    --text-color: #000;
    /* Màu chữ chính */
    --bg-light: #f6f6f6;
    /* Nền sáng */
    --shadow: 0 7px 22px rgba(0, 0, 0, 0.3);
    /* Bóng đổ */
    --radius-sm: 3px;
    /* Bo góc nhỏ */
    --radius-md: 5px;
    /* Bo góc trung bình */
    --radius-lg: 8px;
    /* Bo góc lớn */
}

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

body {
    font-family: 'Roboto', Arial, Helvetica, Geneva, Swiss, SunSans-Regular;
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--bg-light);
    color: var(--text-color);
    max-width: 750px;
    margin: auto;
    box-shadow: var(--shadow);
}

/* Ngắt dòng & Tránh tràn */
* {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ========== KHỐI BOX & CONTAINER CHUNG ========== */
.container,
.box,
.lottery-block {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    /* Cho phép cuộn ngang nếu nội dung tràn (như bảng) */
}

.container,
.box {
    background: #fff;
    padding: 2px;
    /* TĂNG PADDING để nhất quán */
    border-radius: var(--radius-lg);
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.03);
    margin-bottom: 5px;

}

/* ========== TYPOGRAPHY (Tiêu đề, Chữ viết) ========== */
strong,
b {
    font-weight: 700;
}

a {
    text-decoration: none;
    color: #000;
    text-transform: uppercase;
}

a:hover,
a:focus {
    color: #a92f25;
    text-decoration: none;
}

/* Tiêu đề H1 chính (ẩn) */
.custom-h1-title {
    font-size: 18px;
    /* TĂNG FONT (12px quá nhỏ cho H1) */
    font-weight: bold;
    color: #222;
    text-align: center;
    margin: 2px 0;
    padding: 2px 0;
    width: 100%;
}

/* Tiêu đề bài viết */
.post-title {
    font-size: 24px;
    font-weight: 700;
    text-align: left;
    color: var(--primary-color);
    margin: 5px 0;
    /* XÓA margin-left */
}

/* Tiêu đề trang */
.site-title {
    font-size: 24px;
    font-weight: 700;
    text-align: left;
    color: var(--primary-color);
    margin: 5px 0;
    /* XÓA margin-left */
}

/* Tiêu đề mục */
.section-title {
    font-size: 20px;
    font-weight: bold;
    margin: 5px 0 5px;
    color: var(--primary-color);
    /* XÓA margin-left */
}

/* ========== HEADER & LOGO ========== */
#header {
    text-align: center;
    background: #8ad12f;
    padding: 6px;
    color: #fff;
    font-size: 15px;
}

.site-logo {
    text-align: center;
    /* Canh giữa logo */
}

.site-logo img {
    max-width: 400px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ========== MENU CHÍNH (EXTRA NAVIGATION) ========== */
.extra-menu-wrapper {
    width: 100%;
    background: #FFFFFF;
    border: 2px solid #6bc135;
    border-radius: 5px;
    margin: 2px auto;
    overflow: hidden;
}

.navigation.extra-navigation {
    width: 100%;
}

.navigation.extra-navigation .menu-list {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 2px;
    background: #FFFFFF;
    margin: 0;
    list-style: none;
}

.navigation.extra-navigation .menu-list li {
    flex: 1;
    /* Đơn giản hóa (thay vì flex: 1 1 0) */
    margin: 0 2px;
}

.navigation.extra-navigation .menu-list li a {
    display: block;
    width: 100%;
    background: #6bc135;
    color: #fff;
    padding: clamp(2px, 0.5vw, 5px) clamp(6px, 1.2vw, 10px);
    font-size: clamp(13px, 2vw, 17px);
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.3s ease;
}

.navigation.extra-navigation .menu-list li a:hover {
    background: #5ca82e;
}

@media (max-width: 480px) {
    .navigation.extra-navigation .menu-list li a {
        font-size: clamp(11px, 3vw, 13px);
        padding: 3px 5px;
    }
}

/* ========== MENU PHỤ (CUỘN NGANG) ========== */
.menu-phu {
    display: flex;
    justify-content: center;
    padding: 2px;
    width: 100%;
    background: #FFFFFF;
    border: 2px solid #6bc135;
    border-radius: 100px;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.menu-phu::-webkit-scrollbar {
    display: none;
}

.menu-list-phu {
    list-style: none;
    margin: 0;
    padding: 0 8px;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
}

.menu-list-phu li {
    display: inline-block;
    white-space: nowrap;
}

.menu-list-phu a {
    display: inline-flex;
    align-items: center;
    padding: 6px clamp(8px, 1.8vw, 14px);
    background-color: #f0f0f5;
    color: #0077cc;
    border: 1px solid #d0d0d0;
    border-radius: 999px;
    font-size: clamp(11px, 1vw, 14px);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    cursor: pointer;
    max-width: 100%;
}

.menu-list-phu img {
    margin-right: 6px;
    max-height: 18px;
    border-radius: 2px;
}

.menu-list-phu a:hover {
    background-color: #e6e6f0;
    color: #005fa3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.menu-list-phu a:active {
    background-color: #d9d9e6;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}

@media (min-width: 1024px) {
    .menu-list-phu {
        gap: 12px;
        padding: 0 16px;
    }

    .menu-list-phu a {
        padding: 8px 18px;
        font-size: 14px;
    }

    .menu-list-phu img {
        max-height: 20px;
    }
}


/* ========== DÃY SỐ MAY MẮN & CUỘN TỰ ĐỘNG ========== */
#lucky-number {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin: 10px 0;
    color: #e53900;
    background: #fff4e5;
    border: 1px dashed #e53900;
    border-radius: 6px;
    padding: 5px;
}

/* Vùng cuộn tự động */
.scroll-wrapper {
    position: relative;
    height: 450px;
    overflow: hidden;
    pointer-events: none;
    mask-image: linear-gradient(to top, transparent 0%, black 10%, black 90%, transparent 100%);
}

.scroll-content {
    display: flex;
    flex-direction: column;
    animation: autoScroll 25s linear infinite;
}

/* ========== KHỐI XỔ SỐ (NỘI DUNG CUỘN) ========== */
.lottery-block {
    background: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    margin: 10px auto;
    max-width: 700px;
    animation: fadeIn 0.8s ease-in-out;
}

.lottery-block h2 {
    font-size: 22px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 6px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

.lottery-block h3 {
    font-size: 18px;
    margin-top: 5px;
    color: #0073aa;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.lottery-block p {
    font-size: 14px;
    color: #222;
    line-height: 1.5;
    margin: 6px 0;
}

.lottery-block p:last-child {
    color: #004085;
    font-style: italic;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
}

/* Chữ số */
.lottery-block .num {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 3px 6px;
    border-radius: 5px;
    margin: 2px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lottery-block .num:hover {
    background: #2a8d2d;
    transform: scale(1.08);
}


/* ========== BẢNG KẾT QUẢ ========== */
.lottery-table {
    width: 100%;
    border-collapse: collapse;
    margin: 5px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.lottery-table th,
.lottery-table td {
    border: 1px solid #ddd;
    padding: 10px 14px;
    text-align: center;
    font-size: 16px;
}

.lottery-table th {
    background: var(--primary-color);
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
}

.lottery-table tr:nth-child(even) {
    background: #f9f9f9;
}

.lottery-table tr:hover {
    background-color: #e3f2fd;
}

/* ========== DANH SÁCH BÀI VIẾT ========== */
.post-list {
    list-style: none;
    margin: 2px;
    padding: 15px;
}

.post-list li {
    border-bottom: 1px solid #c2e0c6;
    margin-bottom: 5px;
    padding-bottom: 5px;
    /* Thêm padding bottom cho đẹp hơn */
}

.post-list li a {
    color: var(--text-color);
}

.post-list li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ========== PHÂN TRANG ========== */
.pagination {
    display: flex;
    justify-content: center;
    margin: 5px 0;
}

.pagination .page-numbers {
    margin: 0 5px;
    padding: 4px 6px;
    background: #eaeaea;
    border-radius: var(--radius-sm);
    color: var(--text-color);
}

.pagination .current {
    background: var(--primary-color);
    color: #fff;
}

/* ========== FORM TÌM KIẾM ========== */
.search-form {
    display: flex;
    justify-content: center;
    margin-top: 5px;
    margin-bottom: 5px;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form input[type="text"] {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid #ddd;
    flex: 1 1 300px;
    /* THAY ĐỔI: Linh hoạt hơn width: 80% */
    min-width: 200px;
    /* Đảm bảo không quá nhỏ */
}

.search-form button {
    padding: 10px 20px;
    font-size: 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    /* Không bị co lại */
}

/* ========== DANH SÁCH BÌNH LUẬN ========== */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment-list li {
    margin-bottom: 15px;
    padding: 10px;
    background: #f1f1f1;
    border-radius: var(--radius-md);
}

.comment-author {
    font-weight: bold;
    color: var(--primary-color);
}

.comment-content {
    margin-top: 5px;
    line-height: 1.6;
}

/* ========== THÔNG BÁO (NOTICE) ========== */
.notice {
    padding: 15px;
    border: 1px dashed #ffc107;
    background: #fff8e1;
    color: #856404;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.notice.success {
    border-color: #28a745;
    background: #e6ffed;
    color: #155724;
}

.notice.error {
    border-color: #dc3545;
    background: #ffe2e6;
    color: #721c24;
}

/* ========== NÚT XEM THÊM ========== */
.xem-them-wrapper {
    text-align: center;
    margin: 10px 0;
}

.xem-them-wrapper a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Nút xem thêm kiểu .more-link */
.more-link {
    text-align: center;
    margin: 15px 0 30px;
}

.more-link .button {
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.15);
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.more-link .button:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.25);
}

/* ========== BÀI VIẾT LIÊN QUAN (ĐÃ HỢP NHẤT) ========== */
.related-posts {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-left: 4px solid var(--primary-color);
    /* Dùng màu chủ đạo */
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.related-posts h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    /* Tăng font (từ 10px/16px) */
    color: var(--primary-color);
    /* Dùng màu chủ đạo */
    font-weight: 600;
}

.related-posts ul {
    list-style: disc inside;
    margin: 0;
    padding: 0;
}

.related-posts li {
    margin-bottom: 8px;
}

.related-posts a {
    color: var(--text-color);
    /* Màu chữ bình thường */
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.related-posts a:hover {
    color: var(--primary-color);
    /* Hover ra màu chủ đạo */
    text-decoration: underline;
}

/* ========== TÁC GIẢ (AUTHOR BOX) ========== */
.author-box-advanced {
    display: flex;
    gap: 5px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 5px;
    margin-top: 5px;
    border-radius: 8px;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.author-details {
    flex: 1;
    margin-left: 10px;
}

.author-name {
    margin: 2px;
    font-size: 15px;
    color: #222;
}

.author-bio {
    margin: 2px 0;
    color: #555;
    font-size: 10px;
}

.author-link {
    text-decoration: none;
    color: #0073aa;
    font-weight: 500;
}

.author-link:hover {
    text-decoration: underline;
}

/* ========== WIDGET/MENU DANH SÁCH (BMENU3) ========== */
.bmenu3 {
    background-color: #3caa3e;
    padding: 10px 15px;
    border-radius: 6px 6px 0 0;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    user-select: none;
}

.bmenu3 h3 {
    margin: 0;
    font-size: 16px;
}

.list1 {
    background-color: #f9fefa;
    border: 1px solid #c2e0c6;
    padding: 8px 15px;
    margin: 0;
    border-top: none;
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.list1+.list1 {
    border-top: none;
}

.list1 img {
    width: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.list1 a {
    color: #FF3333;
    text-decoration: none;
    font-weight: 500;
    flex-grow: 1;
}

.list1:hover {
    background-color: #d9f0d8;
}

.list1:hover a {
    text-decoration: underline;
}

/* ========== ACCESSIBILITY (Trợ năng) ========== */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== FOOTER ========== */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #FFFFFF;
    padding: 20px 0;
}


/* ========== KEYFRAMES (Hiệu ứng) ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes autoScroll {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateY(-100%);
    }
}