/* =====================================================
   XSMN Page Styles - Đồng bộ màu sắc với trang chủ XSMB
   ===================================================== */

/* Title Box - Clean no background for page heading */
.xs-title-section {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 20px;
    text-align: left;
}

.xs-title-section h1 {
    margin: 0 0 6px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    font-family: Arial, Helvetica, sans-serif;
}

.xs-title-section p {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
    font-family: Arial, Helvetica, sans-serif;
}

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

/* Table Header - nền vàng nhạt giống XSMB header */
.xs-table-header {
    background-color: #fef3c7;
    border-bottom: 1px solid #dee2e6;
    padding: 12px 15px;
    text-align: left;
}

.xs-header-title {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    font-family: Arial, Helvetica, sans-serif;
}

.xs-header-tree {
    font-size: 0.95rem;
    font-family: Arial, Helvetica, sans-serif;
    color: #4b5563;
}

.xs-red-txt {
    color: #dc2626;
    font-weight: 600;
}

.xs-sep {
    margin: 0 8px;
    color: #4b5563;
}

/* Table Base */
.xs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    table-layout: fixed;
}

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

/* Header hàng Giải + hàng Tỉnh - nền xanh nhạt */
.xs-table th.col-giai {
    width: 12%;
    background-color: #dbeafe;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 0.95rem;
}

.xs-table th.col-tinh {
    background-color: #dbeafe;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 1rem;
}

.xs-table th.col-tinh a {
    color: #2563eb;
    text-decoration: underline;
}

.xs-table th.col-tinh a:hover {
    color: #1d4ed8;
}

/* Cột giải (td) - nền xám nhạt */
.xs-table td.col-giai {
    font-weight: 600;
    color: #4b5563;
    background-color: #f8f9fa;
    font-size: 0.9rem;
    width: 12%;
}

/* Ô số liệu bình thường */
.xs-table td.col-prize {
    background-color: #ffffff;
    font-weight: 700;
    color: #000000;
    font-size: 1.85rem;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-align: right;
}

/* Hàng Giải Đặc Biệt - nền vàng kem, số đỏ to */
.xs-table tr.row-db td.col-giai {
    background-color: #fef08a;
    color: #854d0e;
    font-weight: 700;
}

.xs-table tr.row-db td.col-prize {
    background-color: #fffdf0;
    color: #dc2626;
    font-size: 2.1rem;
    letter-spacing: 1px;
    line-height: 1.2;
    text-align: right;
}

/* Hàng G.8 - số đỏ (giống G.7 XSMB) */
.xs-table tr.row-g8 td.col-prize {
    color: #dc2626;
    font-size: 2.0rem;
    line-height: 1.2;
    text-align: right;
}

/* Nhóm số nhiều (G.3, G.4, G.6) */
.xs-number-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.xs-number-item {
    display: inline-block;
}

/* =====================================================
   LOTO SECTION - đồng bộ với loto trang chủ
   ===================================================== */

.xs-loto-title {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-weight: 700;
    color: #374151;
    padding: 10px 15px;
    font-size: 0.95rem;
    text-align: left;
}

/* Hàng header loto: Đầu | Tỉnh 1 | Tỉnh 2 | ... */
.xs-loto-header-row td {
    background-color: #dbeafe;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e3a8a;
}

.xs-table td.col-tinh-loto {
    background-color: #dbeafe;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e3a8a;
}

.xs-table td.col-loto-val {
    background-color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: 0.5px;
}

/* Cột đầu số */
.xs-loto-row td.col-dau {
    font-weight: 700;
    color: #dc2626;
    font-size: 1rem;
    background-color: #f8f9fa;
    width: 12%;
}

.xs-loto-val-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.xs-loto-val-item {
    font-size: 0.95rem;
    color: #111827;
    font-weight: 600;
}

/* =====================================================
   Prediction Card - Horizontal
   ===================================================== */

.prediction-card-horizontal {
    display: flex;
    gap: 16px;
    background: #ffffff;
    padding: 14px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.prediction-img-box {
    flex: 0 0 160px;
    width: 160px;
    height: 110px;
    overflow: hidden;
    border-radius: 4px;
}

.prediction-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prediction-content-box {
    flex: 1;
}

.prediction-title-horiz {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    font-family: Arial, Helvetica, sans-serif;
}

.prediction-title-horiz a {
    color: #dc2626;
    text-decoration: none;
}

.prediction-title-horiz a:hover {
    text-decoration: underline;
}

.prediction-desc-horiz {
    margin: 0;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 768px) {
    .xs-table th.col-giai,
    .xs-table td.col-giai,
    .xs-loto-row td.col-dau {
        width: 16%;
        font-size: 0.82rem;
    }

    .xs-table td.col-prize {
        font-size: 1.35rem;
    }

    .xs-table tr.row-db td.col-prize {
        font-size: 1.55rem;
    }

    .xs-table tr.row-g8 td.col-prize {
        font-size: 1.55rem;
    }

    .xs-number-group {
        gap: 6px;
    }

    .prediction-card-horizontal {
        flex-direction: column;
        gap: 10px;
    }

    .prediction-img-box {
        width: 100%;
        height: auto;
        aspect-ratio: 16/7;
        flex: none;
    }
}
