/* =====================================================
   Quay Thử Page Styling
   Đồng bộ 100% với index.css, xsmn.css, xsmt.css
   ===================================================== */

/* 1. Container bao quanh bảng kết quả quay thử */
.js-wrap-content-quay-thu {
    margin-top: 15px;
}

.kqxs, .xs-table-wrapper {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 24px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* 2. Tiêu đề bảng quay thử */
.kqxs h2, .xs-table-header {
    background-color: #fef3c7 !important;
    border-bottom: 1px solid #dee2e6;
    padding: 12px 15px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937 !important;
    margin: 0;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
}

.xs-header-title {
    margin: 0 0 6px 0 !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
}

.xs-header-tree {
    font-size: 0.95rem;
    color: #4b5563;
}

/* 3. Cấu trúc bảng kết quả */
.kq-table, .xs-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
    table-layout: fixed;
}

.kq-table th, .kq-table td {
    border: 1px solid #dee2e6;
    padding: 8px 6px;
    text-align: center;
    vertical-align: middle;
}

.xs-table th, .xs-table td {
    border: 1px solid #dee2e6;
    padding: 4px 2px !important;
    text-align: center;
    vertical-align: middle;
}

/* 4. Định dạng cột giải (G.ĐB, G.1,...) */
.kq-table td:first-child,
.xs-table td.col-giai {
    width: 12%;
    font-weight: 600;
    color: #4b5563;
    background-color: #f8f9fa;
    font-size: 0.95rem;
}

/* Giải đặc biệt (Dòng ĐB) */
.kq-table tr:last-child td:first-child,
.xs-table tr.row-db td.col-giai {
    background-color: #fef08a !important;
    color: #854d0e !important;
    font-weight: 700;
}

.kq-table tr:last-child td:last-child,
.xs-table tr.row-db td.col-prize {
    background-color: #fffdf0 !important;
}

/* 5. Hiển thị chữ số trong bảng quay thử */
span.number {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    color: #000000;
    font-size: 1.65rem;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: color 0.2s ease;
}

/* Kích cỡ riêng cho Miền Trung / Miền Nam */
.xs-table span.number {
    font-size: 1.38rem;
    line-height: 1.2;
}

/* Giải đặc biệt & các giải đỏ */
.text-red, 
.kq-table tr:last-child span.number,
.xs-table tr.row-db span.number,
.xs-table tr.row-g8 span.number {
    color: #dc2626 !important;
}

/* Cỡ chữ to cho G.ĐB & G.8 */
.kq-table tr:last-child span.number,
.xsmb-table .special-prize span.number,
.xsmb-table span.number.special-prize {
    font-size: 2.1rem !important;
    letter-spacing: 1px;
    color: #dc2626 !important;
}

.xs-table tr.row-db span.number {
    font-size: 1.7rem !important;
    letter-spacing: 1px;
}

.xs-table tr.row-g8 span.number {
    font-size: 1.6rem !important;
}

/* Trạng thái hoàn thành */
.complete span.number {
    animation: highlightComplete 0.8s ease-in-out;
}

@keyframes highlightComplete {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); text-shadow: 0 0 8px rgba(220, 38, 38, 0.3); }
    100% { transform: scale(1); }
}

/* 6. Bảng lô tô quay thử */
.kqxs p.bg-primary-subtle, .xs-loto-title, .loto-header {
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 15px !important;
    font-weight: 700;
    color: #374151 !important;
    font-size: 1rem !important;
    margin: 0;
    text-align: left;
}

.kqxs table.table-bordered, .loto-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.kqxs table.table-bordered th, .kqxs table.table-bordered td,
.loto-table th, .loto-table td {
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    vertical-align: middle;
}

.kqxs table.table-bordered th, .loto-table th {
    background-color: #dbeafe !important;
    color: #1e3a8a !important;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
}

/* Cột đầu số loto */
.kqxs table.table-bordered td:first-child,
.kqxs table.table-bordered td:last-child,
.loto-table td.loto-head,
.xs-table td.col-dau {
    font-weight: 700;
    color: #dc2626 !important;
    background-color: #f8f9fa;
    width: 12%;
    text-align: center;
    font-size: 1.15rem;
}

/* Giá trị loto hiển thị */
.js-number-dau-duoi, .loto-table td.loto-vals, .xs-table td.col-loto-val {
    font-size: 1.05rem;
    color: #1f2937;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
}

/* 7. Tiện ích và tùy chỉnh khác */
.hidden {
    display: none !important;
}

.btn-success {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
}

.btn-success:hover {
    background-color: #15803d !important;
    border-color: #15803d !important;
}

.btn-primary {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

.btn-primary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

/* === RESPONSIVE ======================================== */
@media (max-width: 768px) {
    .kq-table td:first-child,
    .xs-table td.col-giai,
    .kqxs table.table-bordered td:first-child,
    .kqxs table.table-bordered td:last-child,
    .loto-table td.loto-head,
    .xs-table td.col-dau {
        width: 16% !important;
        font-size: 0.8rem !important;
    }

    span.number {
        font-size: 1.25rem !important;
    }

    .xs-table span.number {
        font-size: 1.15rem !important;
    }

    .kq-table tr:last-child span.number {
        font-size: 1.45rem !important;
    }

    .xs-table tr.row-db span.number {
        font-size: 1.35rem !important;
    }

    .xs-table tr.row-g8 span.number {
        font-size: 1.3rem !important;
    }
}

/* --- Nâng cấp phần Content Phía Dưới --- */
.article__content {
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
    padding: 24px !important;
}

.article__content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e3a8a;
    border-left: 4px solid #ef4444;
    padding-left: 10px;
    margin-bottom: 20px;
    font-family: Arial, Helvetica, sans-serif;
}

.article__content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
    margin-top: 25px;
    margin-bottom: 12px;
    border-left: 3px solid #3b82f6;
    padding-left: 8px;
    font-family: Arial, Helvetica, sans-serif;
}

.article__content p {
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Định dạng các bảng (Table) */
.article__content table {
    border: 1px solid #e2e8f0 !important;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
}

.article__content table thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    padding: 10px 12px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: 1px solid #e2e8f0 !important;
}

.article__content table thead th:last-child {
    border-right: none !important;
}

.article__content table tbody td {
    padding: 10px 12px !important;
    border-top: 1px solid #e2e8f0 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: 1px solid #e2e8f0 !important;
    color: #334155;
    font-size: 0.9rem;
    vertical-align: middle;
}

.article__content table tbody td:last-child {
    border-right: none !important;
}

.article__content table tbody tr:hover {
    background-color: #f8fafc;
}

/* Các hàng nổi bật */
.article__content table tbody tr.table-warning td,
.article__content table tbody td.table-warning {
    background-color: #fef9c3 !important;
    color: #854d0e !important;
    font-weight: 600;
}

.article__content table tbody tr.table-danger td,
.article__content table tbody td.table-danger {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    font-weight: 600;
}

/* Hộp Lưu ý (Alert Warning/Info) */
.article__content .alert-warning,
.article__content .alert-info,
.article__content .alert {
    background-color: #fef3c7 !important;
    border: none !important;
    border-left: 4px solid #f59e0b !important;
    border-radius: 6px !important;
    color: #78350f !important;
    padding: 15px 18px !important;
    font-size: 0.88rem !important;
    line-height: 1.5;
    margin-top: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.article__content .alert-info {
    background-color: #eff6ff !important;
    border-left: 4px solid #3b82f6 !important;
    color: #1e3a8a !important;
}

/* Nút bấm liên kết */
.article__content .btn-outline-primary,
.article__content .btn-outline-success,
.article__content .btn-outline-secondary {
    border-width: 1px;
    font-weight: 600;
    font-size: 0.85rem !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    transition: all 0.2s ease;
    text-decoration: none !important;
    display: inline-block;
}

.article__content .btn-outline-primary {
    border-color: #3b82f6 !important;
    color: #2563eb !important;
}
.article__content .btn-outline-primary:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

.article__content .btn-outline-success {
    border-color: #10b981 !important;
    color: #059669 !important;
}
.article__content .btn-outline-success:hover {
    background-color: #10b981 !important;
    color: #ffffff !important;
}

.article__content .btn-outline-secondary {
    border-color: #94a3b8 !important;
    color: #64748b !important;
}
.article__content .btn-outline-secondary:hover {
    background-color: #64748b !important;
    color: #ffffff !important;
}

/* Nâng cấp các thẻ đặc điểm nổi bật và card tiện ích dạng lưới */
.article__content .row.g-2 .col-6 > div,
.article__content .row.g-2 .col-md-4 > div,
.article__content .row.g-2 .col-12 > div {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    transition: all 0.25s ease !important;
}

.article__content .row.g-2 .col-6 > div:hover,
.article__content .row.g-2 .col-md-4 > div:hover,
.article__content .row.g-2 .col-12 > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
    border-color: #cbd5e1 !important;
}

.article__content .row.g-2 .fw-bold {
    color: #1e3a8a !important;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.article__content .row.g-2 .small.text-muted {
    color: #64748b !important;
    font-size: 0.85rem !important;
    line-height: 1.4;
}

/* --- Nâng cấp Box Tiện Ích Quay Thử --- */
.box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
    overflow: hidden !important;
    margin-top: 25px !important;
    margin-bottom: 25px !important;
    display: block !important;
    padding: 0 !important;
}

/* Triệt tiêu dấu chấm tròn mặc định trên mọi trình duyệt */
.box ul,
.box li,
.box ul.list__links,
.box ul.list__links li,
.box ul.list__articles-modern,
.box ul.list__articles-modern li {
    list-style: none !important;
    list-style-type: none !important;
    background-image: none !important;
}

.box ul.list__links li::before,
.box ul.list__articles-modern li::before {
    display: none !important;
}

.box__title {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    padding: 12px 18px !important;
    position: relative;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 !important;
}

.box__title::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 4px !important;
    background-color: #3b82f6 !important;
}

.box__title a.article-link {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.list__links {
    list-style: none !important;
    padding: 16px !important;
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
}

.list__links li {
    list-style-type: none !important;
    position: relative !important;
    padding: 6px 12px 6px 22px !important;
    font-size: 0.92rem !important;
    color: #475569 !important;
}

.list__links li::before {
    content: "✦" !important;
    display: inline-block !important;
    position: absolute !important;
    left: 8px !important;
    top: 5px !important;
    color: #3b82f6 !important;
    font-size: 0.8rem !important;
}

.list__links li a {
    color: #2563eb !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.list__links li a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

/* Định dạng cấu trúc đài tỉnh chia đôi cột trên PC */
.list__links li.col-px-1.col-md-7 {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
}

/* --- Nâng cấp Box Dự Đoán --- */
.dudoan-box {
    border-radius: 8px !important;
    overflow: hidden !important;
}

.list__articles-modern {
    list-style: none !important;
    padding: 16px !important;
    margin: 0 !important;
}

.list__articles-modern li {
    display: flex !important;
    align-items: center !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.list__articles-modern li:last-child {
    border-bottom: none !important;
}

.list__articles-modern .badge-region {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    margin-right: 12px !important;
    white-space: nowrap !important;
    display: inline-block !important;
}

.list__articles-modern .bg-danger-subtle {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

.list__articles-modern .bg-primary-subtle {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

.list__articles-modern .bg-success-subtle {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}

.list__articles-modern .article-title {
    color: #334155 !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    transition: color 0.15s ease !important;
}

.list__articles-modern li:hover .article-title {
    color: #2563eb !important;
}

/* Responsive */
@media (max-width: 768px) {
    .list__links li {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        border-bottom: 1px dashed #f1f5f9 !important;
    }
    .list__links li:last-child {
        border-bottom: none !important;
    }
    .list__links li.col-px-1.col-md-7 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* Custom style for latest predictions with images in quay thu pages */
.list__articles-with-img .article-item {
    display: flex !important;
    align-items: center !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.list__articles-with-img .article-item:last-child {
    border-bottom: none !important;
}

.list__articles-with-img .article-img-link {
    width: 120px;
    height: 72px;
    margin-right: 16px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: block;
}

.list__articles-with-img .article-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.list__articles-with-img .article-img-link:hover .article-thumb {
    transform: scale(1.08);
}

.list__articles-with-img .article-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1;
}

.list__articles-with-img .badge-region {
    margin-right: 0 !important;
}

.list__articles-with-img .article-title {
    color: #334155 !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    transition: color 0.15s ease !important;
}

.list__articles-with-img .article-item:hover .article-title {
    color: #2563eb !important;
}

@media (max-width: 576px) {
    .list__articles-with-img .article-img-link {
        width: 80px;
        height: 50px;
        margin-right: 10px;
    }
    .list__articles-with-img .article-title {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }
    .list__articles-with-img .article-info {
        gap: 4px;
    }
    .list__articles-with-img .badge-region {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
    }
}


