/**
 * XoSo API Plugin - Modernized Frontend Stylesheet
 * Version: 2.5.0
 * Fully responsive, optimized for performance and Flatsome UX Builder
 */

:root {
    --xs-primary: #d32f2f;
    --xs-primary-hover: #b71c1c;
    --xs-primary-light: #fee2e2;
    --xs-text-main: #1e293b;
    --xs-text-muted: #64748b;
    --xs-border: #e2e8f0;
    --xs-bg-light: #f8fafc;
    --xs-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --xs-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --xs-radius: 8px;
}

/* CONTAINER CHÍNH */
.xs-tructiep-theme {
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
    border: 1px solid var(--xs-border);
    border-radius: var(--xs-radius);
    background: #ffffff;
    margin: 20px 0;
    box-shadow: var(--xs-shadow-md);
    position: relative;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
    color: var(--xs-text-main);
    line-height: 1.5;
}

/* BANNER FALLBACK THÔNG MINH */
.xs-fallback-banner {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-bottom: 1px solid #fde68a;
    color: #92400e;
    padding: 9px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 1. THANH THỨ TRONG TUẦN */
.xs-weekday-bar {
    display: flex;
    align-items: center;
    background: var(--xs-bg-light);
    border-bottom: 1px solid var(--xs-border);
    padding: 8px 14px;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.xs-weekday-label {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--xs-primary);
    white-space: nowrap;
    padding-right: 8px;
    border-right: 2px solid var(--xs-border);
}
.xs-weekday-items {
    display: flex;
    gap: 6px;
    align-items: center;
}
.xs-weekday-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    padding: 5px 13px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
    outline: none;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}
.xs-weekday-btn:hover {
    background: var(--xs-primary-light, #fee2e2);
    border-color: #f87171;
    color: #991b1b;
    text-decoration: none !important;
}
.xs-weekday-btn.active {
    background: var(--xs-primary) !important;
    color: #ffffff !important;
    border-color: var(--xs-primary-hover, var(--xs-primary)) !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(211, 47, 47, 0.35);
    text-decoration: none !important;
}

/* 2. HEADER TIÊU ĐỀ & TOOLBAR */
.xs-yellow-info-box {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 12px 14px 8px 14px;
}
.xs-info-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.xs-info-status-left {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.xs-countdown-label {
    font-weight: 700;
    color: #1e293b;
}
.xs-countdown-timer {
    color: #dc2626 !important;
    font-size: 16px;
    font-weight: 800;
    font-family: monospace;
}
.xs-live-status-text {
    color: #dc2626;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.xs-completed-status-text {
    font-weight: 700;
    color: #1e293b;
}
.xs-info-date-right .xs-input-date {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 600;
    background: #ffffff;
    outline: none;
    cursor: pointer;
}
.xs-info-breadcrumbs {
    margin-top: 6px;
    font-size: 13.5px;
    line-height: 1.5;
}
.xs-bc-link {
    color: #dc2626 !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}
.xs-bc-link:hover {
    color: #b91c1c !important;
}
.xs-bc-sep {
    color: #64748b;
    margin: 0 4px;
}

.xs-header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 14px 18px;
    border-bottom: 1px solid #edf2f7;
    flex-wrap: wrap;
    gap: 12px;
}
.xs-main-heading {
    margin: 0;
    font-size: 1.22rem;
    color: var(--xs-primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.xs-sub-date {
    font-size: 0.88rem;
    color: var(--xs-text-muted);
    font-weight: 600;
    margin-top: 4px;
}

/* BIỂU TƯỢNG & ANIMATION LIVE TRỰC TIẾP */
.xs-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 5px;
    flex-shrink: 0;
}
.xs-live-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 14px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
    line-height: 1.2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

/* 5 CLASS ANIMATION CHO ICON LIVE */
.xs-anim-pulse {
    animation: xsAnimPulse 1.2s infinite ease-in-out;
}
@keyframes xsAnimPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.22); opacity: 1; }
}

.xs-anim-blink {
    animation: xsAnimBlink 0.85s infinite steps(1, start);
}
@keyframes xsAnimBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.15; }
}

.xs-anim-ripple {
    position: relative;
    display: inline-block;
}
.xs-anim-ripple::after {
    content: "";
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: inherit;
    border: 2px solid currentColor;
    animation: xsAnimRipple 1.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    opacity: 0;
}
@keyframes xsAnimRipple {
    0% { transform: scale(0.85); opacity: 0.9; }
    100% { transform: scale(1.6); opacity: 0; }
}

.xs-anim-spin {
    display: inline-block;
    animation: xsAnimSpin 1.2s linear infinite;
}
@keyframes xsAnimSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.xs-anim-bounce {
    display: inline-block;
    animation: xsAnimBounce 1.2s infinite;
}
@keyframes xsAnimBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
    60% { transform: translateY(-2px); }
}

/* NÚT XEM THÊM (LOAD MORE) */
.xs-btn-loadmore {
    transition: all 0.22s ease;
    font-size: 13.5px !important;
    border-radius: 6px !important;
    padding: 10px 28px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.xs-btn-loadmore:hover {
    background: var(--xs-primary) !important;
    color: #ffffff !important;
    border-color: var(--xs-primary-hover) !important;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
    transform: translateY(-1px);
}

/* MULTI DATES LIST */
.xs-multi-dates-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px;
    background: var(--xs-bg-light);
}
.xs-date-result-block {
    border: 1px solid var(--xs-border);
    border-radius: var(--xs-radius);
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--xs-shadow-sm);
    transition: box-shadow 0.2s;
}
.xs-date-result-block:hover {
    box-shadow: var(--xs-shadow-md);
}
.xs-date-group-header {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 11px 18px;
    border-bottom: 2px solid var(--xs-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.xs-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.xs-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}
.xs-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}
.xs-btn-today {
    background: var(--xs-primary);
    color: #ffffff;
    border-color: var(--xs-primary-hover);
}
.xs-btn-today:hover {
    background: var(--xs-primary-hover);
    color: #ffffff;
}
.xs-input-date {
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    padding: 5px 9px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.xs-input-date:focus {
    border-color: var(--xs-primary);
}

/* 3. BỘ LỌC TƯƠNG TÁC (ĐẦU - ĐUÔI) */
.xs-filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff5f5;
    border-bottom: 1px solid #fee2e2;
    padding: 9px 18px;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.88rem;
}
.xs-filter-title {
    font-weight: 700;
    color: #991b1b;
    margin-right: 6px;
}
.xs-filter-radios {
    display: flex;
    align-items: center;
    gap: 12px;
}
.xs-radio-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
}
.xs-radio-item input {
    margin: 0;
    cursor: pointer;
    accent-color: var(--xs-primary);
}
.xs-filter-digits {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.xs-digit-btn {
    background: #ffffff;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    min-width: 27px;
    height: 27px;
    padding: 0 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #991b1b;
    cursor: pointer;
    transition: all 0.15s;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.xs-digit-btn:hover {
    background: var(--xs-primary-light);
}
.xs-digit-btn.active {
    background: var(--xs-primary);
    color: #fff;
    border-color: var(--xs-primary-hover);
    box-shadow: 0 1px 3px rgba(211,47,47,0.3);
}

/* 4. BẢNG KẾT QUẢ XỔ SỐ */
.xs-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.xs-main-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    margin: 0;
    background: #fff;
}
.xs-main-table th {
    background: #f8fafc;
    color: #1e293b;
    padding: 10px 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
    font-weight: 800;
}
.xs-main-table th.th-prize {
    background: #dbeafe !important;
    color: #1e293b !important;
    font-weight: 700;
    width: 16%;
}
.xs-main-table th.th-station {
    color: #2563eb !important;
    font-weight: 800 !important;
    font-size: 1.05rem;
    text-transform: uppercase;
    text-align: center;
}
.xs-main-table td {
    padding: 9px 8px;
    border: 1px solid #cbd5e1;
    font-size: 1.05rem;
    transition: background 0.15s;
}
.col-prize-name {
    font-weight: 700;
    background: #f8fafc;
    color: #475569;
    width: 16%;
    font-size: 0.92rem;
}
.tr-db {
    background: #fff8f8;
}
.tr-db:hover {
    background: #fef2f2 !important;
}
.tr-g8, .tr-g7 {
    background: #fffafa;
}
.val-db, .num-db {
    color: #d32f2f !important;
    font-size: 1.65rem !important;
    font-weight: 900 !important;
    letter-spacing: 2px;
    line-height: 1.2;
}
.val-g8, .val-g7, .num-red, .num-g8 {
    color: #d32f2f !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    letter-spacing: 1px;
    line-height: 1.2;
}
.xs-num-grid {
    display: flex;
    justify-content: center;
    gap: 8px 20px;
    flex-wrap: wrap;
}
.xs-grid-2cols {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    text-align: center;
}
.xs-grid-3cols {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px 12px !important;
    text-align: center;
}
.xs-grid-4cols {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px 10px !important;
    text-align: center;
}
@media (max-width: 640px) {
    .xs-grid-4cols {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
.xs-grid-g4-mn {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 4px 10px !important;
    text-align: center;
}
.grid-dense {
    gap: 6px 14px;
}
.xs-num-item {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
    font-variant-numeric: tabular-nums;
}
.num-g1 {
    color: #1e293b !important;
    font-weight: 800 !important;
    font-size: 1.22rem !important;
    letter-spacing: 1px;
}
.num-madb {
    color: #1d4ed8 !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px;
}
.xs-pending {
    color: #94a3b8;
    font-style: italic;
}
.xs-highlight-active {
    background: #fef08a !important;
    color: #854d0e !important;
    box-shadow: 0 0 0 2px #facc15;
    font-weight: 800;
    border-radius: 4px;
}

/* 5. BẢNG LÔ TÔ ĐẦU - ĐUÔI 4 CỘT */
.xs-loto-wrapper {
    margin-top: 14px;
}
.xs-loto-station-container {
    margin-bottom: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
}
.xs-loto-top-bar {
    background: #dbeafe;
    border-bottom: 1px solid #bfdbfe;
    padding: 7px 12px;
    font-weight: 700;
    font-size: 13.5px;
    color: #1e293b;
    text-align: left;
}
.xs-loto-4col-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    margin: 0;
    background: #fff;
}
.xs-loto-4col-table th {
    background: #f1f5f9;
    padding: 7px 8px;
    border: 1px solid #cbd5e1;
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
}
.xs-loto-4col-table td {
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    font-size: 13.5px;
}
.loto-digit {
    font-weight: 800 !important;
    color: #dc2626 !important;
    background: #f8fafc;
    font-size: 14px;
    width: 12%;
    text-align: center !important;
}
.loto-vals-cell {
    font-weight: 600;
    color: #1e293b;
    text-align: left !important;
    padding-left: 12px !important;
    letter-spacing: 0.5px;
    width: 38%;
}

/* SỔ KẾT QUẢ */
.xs-soketqua-wrapper {
    margin-top: 16px;
}
.xs-soketqua-title {
    background: #fef3c7;
    border: 1px solid #fde047;
    padding: 7px 12px;
    font-weight: 700;
    font-size: 13.5px;
    color: #92400e;
    border-radius: 4px 4px 0 0;
    text-align: left;
}
.xs-soketqua-actions {
    background: #ffffff;
    border: 1px solid #fde047;
    border-top: none;
    padding: 9px 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-radius: 0 0 4px 4px;
}
.xs-btn-soketqua {
    border: 1px solid #dc2626;
    color: #dc2626;
    background: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
}
.xs-btn-soketqua:hover,
.xs-btn-soketqua.active {
    background: #dc2626 !important;
    color: #ffffff !important;
}
.loto-vals {
    font-weight: 600;
    color: #1e293b;
    letter-spacing: 0.5px;
}
.loto-empty {
    color: #cbd5e1;
}
.xs-loto-row.highlighted {
    background: #fef9c3 !important;
}

/* 6. DÒ VÉ SỐ */
.xs-doveso-wrap, .xs-doso-wrap {
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 20px;
    overflow: hidden;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.xs-doveso-header, .xs-doso-header {
    background: var(--xs-primary, #cc0000);
    color: #fff;
    padding: 7px 12px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}
.xs-doveso-header h3, .xs-doso-header h3 {
    margin: 0;
    font-size: 15px;
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
}
.xs-doveso-body, .xs-doso-body {
    padding: 14px 16px;
}
.xs-doveso-grid, .xs-doso-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: flex-end;
}
.xs-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.xs-form-group label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    font-family: inherit;
}
.xs-form-input, .xs-form-select {
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 13.5px;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    background: #fff;
    box-sizing: border-box;
    width: 100%;
}
.xs-form-input:focus, .xs-form-select:focus {
    border-color: var(--xs-primary, #cc0000);
}
.xs-btn-doveso, .js-doso-btn {
    background: var(--xs-primary, #cc0000);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: opacity 0.2s ease;
    text-transform: uppercase;
}
.xs-btn-doveso:hover, .js-doso-btn:hover {
    opacity: 0.9;
}
.xs-doveso-result {
    margin-top: 14px;
}
.xs-win-card {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 4px;
    padding: 12px 14px;
}
.xs-win-title {
    color: #166534;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}
.xs-win-item {
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.xs-lose-card {
    background: #f8fafc;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 12px 14px;
    text-align: center;
    color: #334155;
    font-size: 13px;
}

/* 7. ĐIỆN TOÁN & VIETLOTT */
.xs-dientoan-card, .xs-vietlott-card {
    padding: 18px;
}
.dt-header, .vl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--xs-primary);
    padding-bottom: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
.dt-header h4, .vl-header h4 {
    margin: 0;
    color: var(--xs-primary);
    font-size: 1.18rem;
    font-weight: 800;
}
.dt-time, .vl-code {
    font-size: 0.88rem;
    color: var(--xs-text-muted);
    font-weight: 600;
}
.dt-thantai-num {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 18px 0;
}
.dt-digit {
    width: 52px;
    height: 58px;
    line-height: 58px;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
    font-size: 2.1rem;
    font-weight: 900;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
}
.dt-123-flex {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 18px 0;
    flex-wrap: wrap;
}
.dt-bo-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 18px;
    text-align: center;
    min-width: 120px;
    box-shadow: var(--xs-shadow-sm);
}
.dt-bo-label {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 4px;
}
.dt-bo-val {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--xs-primary);
}
.dt-prizes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.88rem;
}
.dt-prizes-table th, .dt-prizes-table td {
    padding: 7px 12px;
    border: 1px solid var(--xs-border);
    text-align: left;
}
.dt-prizes-table th {
    background: #f8fafc;
    font-weight: 700;
}
.xs-balls-flex {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
    flex-wrap: wrap;
}
.xs-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    position: relative;
    user-select: none;
}
.xs-ball.red {
    background: radial-gradient(circle at 14px 14px, #f87171, #b91c1c);
}
.xs-ball.bonus {
    background: radial-gradient(circle at 14px 14px, #fde047, #ca8a04);
    color: #713f12;
}
.xs-jackpot-box {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 10px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: 6px;
    border: 1px dashed #f59e0b;
}
.xs-jackpot-box .jackpot-val {
    color: #ea580c;
    font-size: 1.5rem;
    font-weight: 900;
    margin-left: 6px;
}

/* 8. QUAY THỬ LIVE MÔ PHỎNG */
.xs-quaythu-wrap {
    margin: 20px 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    font-family: inherit;
}
.xs-qt-card-header {
    background: var(--xs-primary, #d32f2f);
    color: #ffffff;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
}
.xs-qt-controls-bar {
    background: #f8fafc;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}
.xs-qt-form-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}
.xs-qt-form-inline label {
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    margin: 0;
}
.xs-qt-select-wrap {
    flex: 1;
    min-width: 160px;
}
.xs-qt-select-wrap select {
    width: 100%;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
}
.xs-qt-select-wrap select:focus {
    border-color: #3b82f6;
}
.xs-btn-qt {
    height: 38px;
    padding: 0 24px;
    background: var(--xs-primary, #d32f2f);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s ease;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.xs-btn-qt:hover {
    opacity: 0.9;
}
.xs-btn-qt:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
@media (max-width: 600px) {
    .xs-qt-form-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .xs-qt-select-wrap {
        width: 100%;
        min-width: unset;
    }
    .xs-btn-qt {
        width: 100%;
    }
}
.xs-qt-status-badge {
    background: #fefce8;
    border: 1px solid #fde68a;
    color: #92400e;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 4px;
    margin: 12px 14px 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-family: inherit;
}
.xs-qt-status-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
    display: inline-block;
    animation: qtPulse 1s infinite;
}
@keyframes qtPulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}
.qt-placeholder {
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 1px;
}
.qt-spinning {
    background: #fef08a !important;
    color: #854d0e !important;
    font-weight: 800;
    border-radius: 4px;
    padding: 1px 4px;
    letter-spacing: 1px;
}
.qt-locked {
    background: transparent !important;
    color: inherit;
    font-weight: 700;
    letter-spacing: 1px;
}
.qt-locked.num-db {
    color: #dc2626 !important;
    font-weight: 800;
    font-size: 18px;
}
.qt-locked.num-red {
    color: #dc2626 !important;
    font-weight: 800;
}
.qt-locked.num-g1 {
    color: #dc2626 !important;
    font-weight: 800;
}

/* 9. THỐNG KÊ 30 NGÀY */
.xs-stats-container {
    padding: 18px;
}
.xs-stats-header {
    border-bottom: 2px solid var(--xs-primary);
    padding-bottom: 10px;
    margin-bottom: 16px;
}
.xs-stats-header h4 {
    margin: 0;
    color: var(--xs-primary);
    font-size: 1.2rem;
    font-weight: 800;
}
.xs-stats-sections {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.xs-stat-box-title {
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.xs-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.xs-stat-cell {
    border-radius: 6px;
    padding: 10px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: transform 0.15s;
}
.xs-stat-cell:hover {
    transform: translateY(-2px);
}
.stat-number {
    font-size: 1.35rem;
    font-weight: 900;
}
.stat-count {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
}
.xs-stat-cell.highlight-red {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.xs-stat-cell.highlight-blue {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}
.xs-stat-cell.highlight-gan {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.xs-parity-bar-wrap {
    width: 100%;
}
.xs-parity-bar {
    display: flex;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    text-align: center;
    line-height: 32px;
}
.parity-segment.even {
    background: #2ecc71;
}
.parity-segment.odd {
    background: #e74c3c;
}

/* OVERLAYS & FOOTER */
.xs-loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--xs-primary);
    backdrop-filter: blur(2px);
}
.xs-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #fecaca;
    border-top-color: var(--xs-primary);
    border-radius: 50%;
    animation: xsSpin 0.7s linear infinite;
}
@keyframes xsSpin {
    to { transform: rotate(360deg); }
}
.xs-lookup-footer {
    padding: 9px 18px;
    background: #fafafa;
    border-top: 1px solid #f1f5f9;
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: right;
}
.xs-empty-box {
    text-align: center;
    padding: 45px 20px;
    color: var(--xs-text-muted);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
    display: inline-block;
    animation: xsPulse 1.2s infinite;
}
@keyframes xsPulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.4); }
    100% { opacity: 1; transform: scale(1); }
}

/* STATIONS LIST SIDEBAR & WIDGETS (1 DÒNG DẠNG LINK TEXT) */
.xs-stations-hub {
    width: 100%;
}
.xs-stations-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.xs-station-item {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px dashed #e2e8f0;
}
.xs-station-item:last-child {
    border-bottom: none;
}
.xs-station-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 6px;
    color: var(--xs-text-main);
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.18s ease;
    border-radius: 4px;
}
.xs-station-link:hover {
    color: var(--xs-primary) !important;
    text-decoration: none !important;
    padding-left: 10px;
    background: #fef2f2;
}
.xs-station-link:hover .xs-st-bullet {
    color: var(--xs-primary) !important;
    transform: translateX(2px);
}
.xs-st-bullet {
    transition: transform 0.18s ease;
}
.xs-station-link.is-live-today {
    font-weight: 600;
}
.xs-live-badge-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
}
.xs-stations-card {
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 20px;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.xs-stations-card-header {
    background: var(--xs-primary, #cc0000);
    color: #ffffff;
    padding: 7px 12px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    font-family: inherit;
}
.xs-stations-card-body {
    padding: 10px 14px;
}
.xs-stations-bullet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    line-height: 1.7;
    min-height: 26px;
    border-bottom: 1px dashed #f1f5f9;
    padding: 3px 2px;
    font-family: inherit;
}
.xs-stations-bullet-item:last-child {
    border-bottom: none;
}
.xs-stations-bullet-item .xs-bullet {
    color: #64748b;
    font-size: 13px;
    line-height: 1;
}
.xs-stations-bullet-item a,
.xs-station-a {
    color: #1e293b !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 14px;
    font-family: inherit;
    transition: color 0.15s ease;
}
.xs-stations-bullet-item a:hover,
.xs-station-a:hover {
    color: var(--xs-primary, #cc0000) !important;
    text-decoration: underline !important;
}
.xs-stations-all-wrap {
    width: 100%;
    font-family: inherit;
}
.xs-stations-col-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 10. SOI CẦU DỰ ĐOÁN */
.xs-soicau-container {
    padding: 16px;
    background: #ffffff;
}
.xs-soicau-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 14px 0;
}
.xs-sc-card {
    border-radius: var(--xs-radius);
    padding: 12px 10px;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.xs-sc-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--xs-shadow-sm);
}
.xs-sc-content {
    background: var(--xs-bg-light);
    border: 1px solid var(--xs-border);
    border-radius: var(--xs-radius);
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--xs-text-main);
    line-height: 1.6;
}

/* RESPONSIVE DESIGN */
@media (max-width: 640px) {
    .xs-header-box {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .xs-toolbar-controls {
        justify-content: center;
    }
    .xs-filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .val-db {
        font-size: 1.3rem;
    }
    .col-prize-name {
        font-size: 0.85rem;
    }
    .xs-stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
    }
    .xs-qt-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .xs-soicau-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   VIETLOTT MODERN UI (POWER 6/55, MEGA 6/45, MAX 3D)
   ========================================================================== */
.xs-vietlott-wrapper {
    margin: 20px 0;
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; */
}
.xs-vl-tabs-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    background: #b91c1c;
    border: 1px solid #b91c1c;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
}
.xs-vl-tab-item {
    flex: 1 1 0;
    min-width: 85px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff;
    background: #b91c1c;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.xs-vl-tab-item:last-child {
    border-right: none;
}
.xs-vl-tab-item:hover {
    background: #991b1b;
    color: #ffffff;
}
.xs-vl-tab-item.active {
    background: #fef08a !important;
    color: #b91c1c !important;
    font-weight: 800 !important;
}
@media (max-width: 600px) {
    .xs-vl-tab-item {
        padding: 7px 6px;
        font-size: 11px;
        min-width: 70px;
    }
}

.xs-vl-banner-box {
    background: #fef08a;
    border: 1px solid #facc15;
    border-top: none;
    border-radius: 0 0 6px 6px;
    text-align: center;
    padding: 10px 14px;
    margin-bottom: 15px;
}
.xs-vl-banner-title {
    margin: 0;
    color: #b91c1c;
    font-size: 16.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.xs-vl-banner-sub {
    font-size: 12.5px;
    color: #475569;
    margin-top: 4px;
    line-height: 1.4;
}

.xs-vl-card {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.xs-vl-card-header {
    background: #fef08a;
    border-bottom: 1px solid #facc15;
    padding: 10px 16px;
    text-align: center;
    font-size: 14.5px;
    font-weight: 800;
    text-transform: uppercase;
    color: #b91c1c;
    letter-spacing: 0.3px;
}

/* CARD 1: NAVY RESULT BOX */
.xs-vl-navy-body {
    background: #081a36;
    color: #ffffff;
    padding: 18px 20px;
    text-align: center;
}
.xs-vl-slogan {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.xs-vl-draw-title {
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 14px;
}
.xs-vl-draw-title .draw-code {
    color: #f59e0b;
    font-weight: 800;
}
.xs-vl-balls-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px 0;
    flex-wrap: wrap;
}
.xs-vl-ball {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 3px 6px rgba(0,0,0,0.35);
}
.xs-vl-ball.yellow {
    background: #fbbf24;
    color: #0f172a;
}
.xs-vl-ball.green {
    background: #10b981;
    color: #ffffff;
}
.xs-vl-ball.red {
    background: #ef4444;
    color: #ffffff;
}

.xs-vl-jackpot-section {
    margin: 12px 0;
}
.xs-vl-jp-label {
    font-size: 13px;
    color: #e2e8f0;
    font-weight: 600;
}
.xs-vl-jp-val {
    font-size: 28px;
    font-weight: 900;
    color: #ef4444;
    line-height: 1.2;
    margin: 3px 0;
}
.xs-vl-jp-val u {
    font-size: 22px;
    text-decoration: underline;
}
.xs-vl-jp-sub {
    font-size: 11px;
    color: #94a3b8;
}
.xs-vl-jp2-wrap {
    margin-top: 10px;
}
.xs-vl-jp2-val {
    font-size: 22px;
    font-weight: 800;
    color: #ef4444;
    margin: 2px 0;
}
.xs-vl-jp2-val u {
    font-size: 18px;
    text-decoration: underline;
}

/* PRIZE BREAKDOWN TABLE */
.xs-vl-table-prizes {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0 14px 0;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: #0d2137 !important;
}
.xs-vl-table-prizes thead tr,
.xs-vl-table-prizes tbody tr {
    background: #0d2137 !important;
}
.xs-vl-table-prizes th {
    background: #0f274d !important;
    color: #ffffff !important;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
    text-align: center;
}
.xs-vl-table-prizes td {
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #0d2137 !important;
    color: #e2e8f0 !important;
    text-align: center;
}
.xs-vl-table-prizes tr:nth-child(even) td {
    background: #0f274d !important;
}
.xs-vl-table-prizes tr:hover td {
    background: #1a3a5c !important;
}
.xs-vl-table-prizes td.col-prize-name {
    text-align: left;
    font-weight: 700;
    color: #ffffff !important;
}
.xs-vl-table-prizes td.col-prize-val {
    text-align: right;
    font-weight: 800;
    color: #fde047 !important;
    font-size: 14px;
}
.xs-vl-table-prizes td.col-prize-winners {
    color: #86efac !important;
    font-weight: 600;
}
.xs-vl-match-dots {
    color: #fbbf24 !important;
    font-size: 13px;
    letter-spacing: 2px;
}
.xs-vl-match-dots .green-dot {
    color: #10b981 !important;
}
.xs-vl-disclaimer {
    font-size: 11.5px;
    color: #cbd5e1;
    text-align: left;
    line-height: 1.55;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 10px;
}

/* CARD 2: RECENT DRAWS GRID */
.xs-vl-recent-body {
    padding: 16px 20px;
}
.xs-vl-recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 16px;
    list-style: none;
    padding: 0;
    margin: 0 0 14px 0;
}
@media (max-width: 640px) {
    .xs-vl-recent-grid {
        grid-template-columns: 1fr;
    }
}
.xs-vl-recent-grid li {
    margin: 0;
    padding: 0;
    font-size: 13px;
}
.xs-vl-recent-grid a {
    color: #0284c7;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.xs-vl-recent-grid a:before {
    content: "■";
    color: #b91c1c;
    font-size: 8px;
}
.xs-vl-other-date {
    text-align: center;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
}
.xs-vl-other-date a {
    color: #475569;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* CARD 3: PREVIOUS DRAWS TABLE */
.xs-vl-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.xs-vl-history-table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    padding: 10px 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
}
.xs-vl-history-table td {
    padding: 9px 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}
.xs-vl-history-table tr:nth-child(even) {
    background: #f8fafc;
}
.xs-vl-mini-balls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}
.xs-vl-mini-ball {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.xs-vl-mini-ball.yellow {
    background: #fbbf24;
    color: #0f172a;
}
.xs-vl-mini-ball.green {
    background: #10b981;
    color: #ffffff;
}
.xs-vl-mini-ball.red {
    background: #ef4444;
    color: #ffffff;
}
.xs-vl-btn-loadmore {
    width: 100%;
    display: block;
    background: #a3e635;
    color: #1a2e05;
    border: none;
    padding: 12px 16px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s ease;
}
.xs-vl-btn-loadmore:hover {
    background: #84cc16;
}

/* ==========================================================================
   UI & TYPOGRAPHY SYNCHRONIZATION (CLEAN, MINIMAL, UNIFIED)
   ========================================================================== */
.xs-tructiep-theme,
.xs-vietlott-wrapper,
.xs-tabs-container,
.xs-homepage-wrapper,
.xs-doso-wrap,
.xs-quaythu-wrap,
.xs-thongke-wrap,
.xs-soicau-container,
.xs-lichmo-wrap,
.xs-stations-hub,
.xs-tructiep-theme *,
.xs-vietlott-wrapper *,
.xs-tabs-container *,
.xs-homepage-wrapper *,
.xs-doso-wrap *,
.xs-quaythu-wrap *,
.xs-thongke-wrap *,
.xs-soicau-container *,
.xs-lichmo-wrap *,
.xs-stations-hub * {
    font-family: inherit !important;
    box-sizing: border-box;
}

/* ĐỒNG BỘ CÁC Ô NHẬP LIỆU & SELECT */
.xs-form-input,
.xs-form-select,
.xs-input-date,
.xs-input-text,
.xs-qt-select,
.xs-doso-wrap input,
.xs-doso-wrap select {
    font-family: inherit !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    padding: 7px 11px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    background: #ffffff !important;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease;
}

.xs-form-input:focus,
.xs-form-select:focus,
.xs-input-date:focus,
.xs-input-text:focus,
.xs-qt-select:focus,
.xs-doso-wrap input:focus,
.xs-doso-wrap select:focus {
    border-color: #d32f2f !important;
}

/* ĐỒNG BỘ CÁC NÚT BẤM (BUTTONS) */
.xs-btn,
.xs-tab-btn,
.xs-btn-submit,
.xs-btn-loadmore,
.xs-weekday-btn {
    font-family: inherit !important;
    font-weight: 700;
    font-size: 13.5px;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    transition: all 0.15s ease;
}

/* ĐỒNG BỘ BẢNG KẾT QUẢ */
.xs-main-table th,
.xs-loto-4col-table th,
.xs-vl-history-table th {
    font-family: inherit !important;
    font-weight: 700;
    border: 1px solid #cbd5e1;
}

.xs-main-table td,
.xs-loto-4col-table td,
.xs-vl-history-table td {
    font-family: inherit !important;
    border: 1px solid #cbd5e1;
    font-variant-numeric: tabular-nums;
}

/* BẢNG LÔ TÔ ĐA ĐÀI (MULTI-STATION LÔ TÔ MN/MT TRANG CHỦ & TRỰC TIẾP) */
.xs-loto-multi-container {
    margin-top: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}
.xs-loto-multi-header {
    background: #e0e7ff;
    color: #1e293b;
    font-weight: 700;
    font-size: 13.5px;
    padding: 8px 12px;
    border-bottom: 1px solid #cbd5e1;
    text-align: left;
}
.xs-loto-multi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #ffffff;
}
.xs-loto-multi-table th {
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    padding: 6px 8px;
    text-align: center;
}
.xs-loto-multi-table td {
    border: 1px solid #cbd5e1;
    padding: 6px 8px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}
.xs-loto-multi-table td.loto-head-digit {
    font-weight: 800;
    color: #dc2626;
    background: #fef2f2;
}
.xs-main-table th.th-station {
    color: #1e293b !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* Quả cầu / biểu tượng lồng quay chờ mở thưởng hình vòng cung vàng có animation load xoay */
.xs-waiting-ball {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #f59e0b;
    border-top-color: transparent;
    border-radius: 50%;
    vertical-align: middle;
    margin: 4px 6px;
    box-sizing: border-box;
    animation: xs-spin-ball 1.2s linear infinite;
}

@keyframes xs-spin-ball {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Kiểu chữ hiển thị Mã ĐB / Ký hiệu vé giữ nguyên văn bản thô */
.xs-madb-wrap {
    font-weight: 700;
    font-size: 14.5px;
    color: #b45309;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 3px 0;
    line-height: 1.5;
}
.xs-madb-text {
    display: inline-block;
    color: #b45309;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.5px;
}

/* Header bar phong cách vàng cam nhẹ chuẩn ảnh mẫu */
.xs-live-stream-header-bar {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-bottom: 2px solid #f59e0b;
    padding: 10px 14px;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: inherit;
}
.xs-live-stream-header-bar .xs-live-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}
.xs-live-stream-header-bar .xs-live-countdown-wrap {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
}
.xs-live-stream-header-bar .xs-countdown-val {
    color: #dc2626;
    font-weight: 800;
    font-size: 15px;
    margin-left: 4px;
    font-variant-numeric: tabular-nums;
}

/* Hàng Mã ĐB nền vàng nhẹ */
.xs-main-table tr.tr-madb td.col-prize-name,
.xs-live-waiting-table tr.tr-madb td.col-prize-name {
    background: #fefce8 !important;
}

/* ─── THỐNG KÊ XỔ SỐ 3 MIỀN THEO THIẾT KẾ MỚI ─── */
.xs-thongke-wrap {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 24px;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.xs-tk-card-header {
    background: var(--xs-primary, #d32f2f);
    color: #ffffff;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 15px;
    font-family: inherit;
}

.xs-tk-controls-bar {
    background: #f8fafc;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.xs-tk-controls-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.xs-tk-field {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 220px;
}

.xs-tk-field label, .xs-tk-limits-wrap label {
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    margin: 0;
}

.xs-tk-field select {
    width: 100%;
    max-width: 260px;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
}

.xs-tk-field select:focus {
    border-color: #3b82f6;
}

.xs-tk-limits-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.xs-tk-limits-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.xs-btn-tk-limit {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.xs-btn-tk-limit:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.xs-btn-tk-limit.active {
    background: var(--xs-primary, #d32f2f);
    color: #ffffff;
    border-color: var(--xs-primary, #d32f2f);
    font-weight: 700;
}

/* Vùng các bảng thống kê */
.xs-tk-body {
    padding: 14px;
    background: #ffffff;
}

.xs-tk-tables-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.xs-tk-section {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
}

/* Header vàng nhạt chuẩn ảnh */
.xs-tk-header-yellow {
    background: #fef08a;
    color: #451a03;
    padding: 9px 14px;
    font-weight: 700;
    font-size: 14.5px;
    border-bottom: 1px solid #fde047;
    text-align: left;
}

/* Bảng dữ liệu */
.xs-tk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: center;
    font-family: inherit;
}

.xs-tk-table thead tr {
    background: #ffffff;
}

.xs-tk-table th {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
}

.xs-tk-table tbody td {
    border: 1px solid #cbd5e1;
    padding: 7px 10px;
    color: #334155;
    font-size: 13.5px;
}

.xs-tk-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.xs-tk-table td.col-date {
    font-weight: 500;
    color: #475569;
}

.xs-tk-table td.col-db {
    font-weight: 700;
    color: #1e293b;
}

.xs-num-red {
    color: #dc2626 !important;
    font-weight: 800;
}

.xs-num-red-bold {
    color: #dc2626 !important;
    font-weight: 800;
    font-size: 14.5px;
}

/* Thanh Bar xanh lá bo tròn chuẩn ảnh */
.xs-tk-bar-container {
    width: 100%;
    max-width: 420px;
    height: 8px;
    background: transparent;
    display: flex;
    align-items: center;
}

.xs-tk-bar-fill {
    height: 8px;
    background: #15803d;
    border-radius: 9999px;
    transition: width 0.4s ease;
}

/* Nút Xem thêm (+15 kỳ) */
.xs-tk-loadmore-wrap {
    padding: 0 14px 16px 14px;
    text-align: center;
    background: #ffffff;
}

.xs-btn-tk-loadmore {
    width: 100%;
    max-width: 320px;
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.xs-btn-tk-loadmore:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
}

.xs-btn-tk-loadmore:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .xs-tk-controls-grid {
        flex-direction: column;
        align-items: stretch;
    }
    .xs-tk-field select {
        max-width: unset;
    }
    .xs-tk-limits-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
    .xs-tk-limits-btns {
        width: 100%;
    }
    .xs-btn-tk-limit {
        flex: 1;
        text-align: center;
        padding: 6px 4px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   11. VIETLOTT MODULE & QUAY THỬ VIETLOTT (CHUẨN ẢNH MẪU 1, 2, 3)
───────────────────────────────────────────────────────────────────────────── */
.xs-vietlott-wrapper {
    width: 100%;
    font-family: inherit;
    box-sizing: border-box;
    margin: 15px 0;
}

/* THANH TABS VIETLOTT */
.xs-vl-tabs-bar {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #dc2626;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
}
.xs-vl-tab-item {
    padding: 8px 16px;
    font-weight: 700;
    font-size: 13.5px;
    border-radius: 6px 6px 0 0;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none !important;
    white-space: nowrap;
    border: 1px solid #cbd5e1;
    border-bottom: none;
    transition: all 0.2s ease;
}
.xs-vl-tab-item:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.xs-vl-tab-item.active {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

/* BANNER TIÊU ĐỀ ĐỎ */
.xs-vl-banner-box {
    background: #dc2626;
    color: #ffffff;
    padding: 14px 16px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 16px;
}
.xs-vl-banner-title {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff !important;
}
.xs-vl-banner-sub {
    margin: 0;
    font-size: 13.5px;
    opacity: 0.95;
    font-weight: 500;
}

/* CARDS CHUNG */
.xs-vl-card {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.xs-vl-card-header {
    background: #e2e8f0;
    color: #1e293b;
    font-size: 14.5px;
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 1px solid #cbd5e1;
}

/* HỘP XANH NAVY POWER 6/55 & MEGA 6/45 */
.xs-vl-navy-body {
    background: #0f172a;
    color: #ffffff;
    padding: 20px 16px;
    text-align: center;
}
.xs-vl-3d-body {
    background: #ffffff;
    color: #1e293b;
    padding: 16px;
}
.xs-vl-draw-title {
    font-size: 14.5px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 15px;
}
.xs-vl-3d-body .xs-vl-draw-title {
    color: #64748b;
}

/* BÓNG SỐ VIETLOTT */
.xs-vl-balls-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.xs-vl-ball {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 800;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
}
.xs-vl-ball.yellow {
    background: radial-gradient(circle at 35% 35%, #fef08a, #eab308 60%, #ca8a04 100%)!important;
    color: #0f172a;
}
.xs-vl-ball.green {
    background: radial-gradient(circle at 35% 35%, #86efac, #22c55e 60%, #15803d 100%)!important;
    color: #ffffff;
}

/* JACKPOT SECTION */
.xs-vl-jackpot-section {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.xs-vl-jp-label {
    font-size: 15px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 4px;
}
.xs-vl-jp-val {
    font-size: 28px;
    font-weight: 900;
    color: #ef4444;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}
.xs-vl-jp2-wrap {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
}
.xs-vl-jp2-val {
    font-size: 22px;
    font-weight: 800;
    color: #f87171;
    font-variant-numeric: tabular-nums;
}

/* BẢNG GIẢI THƯỞNG VIETLOTT */
.xs-vl-table-prizes {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: center;
    color: #1e293b;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
}
.xs-vl-table-prizes th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 700;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
}
.xs-vl-table-prizes td {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    font-weight: 600;
}
.xs-vl-table-prizes .col-prize-name {
    font-weight: 700;
    color: #dc2626;
}
.xs-vl-table-prizes .col-prize-val {
    font-weight: 700;
    color: #0f172a;
}
.xs-vl-match-dots {
    color: #dc2626;
    letter-spacing: 2px;
}
.xs-vl-match-dots .green-dot {
    color: #16a34a;
}

/* CÁC KỲ GẦN ĐÂY GRID 3 CỘT */
.xs-vl-recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 14px;
}
.xs-vl-recent-grid li a {
    text-decoration: none !important;
    color: #0284c7;
    font-weight: 600;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.xs-vl-recent-grid li a:hover {
    text-decoration: underline !important;
    color: #0369a1;
}
.xs-recent-dot {
    color: #dc2626;
    font-size: 16px;
    line-height: 1;
}
.xs-vl-other-date {
    text-align: right;
    padding: 8px 14px;
    border-top: 1px solid #f1f5f9;
}
.xs-vl-other-date a {
    text-decoration: none !important;
    color: #0284c7;
    font-weight: 600;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* BẢNG LỊCH SỬ KỲ QUAY TRƯỚC */
.xs-vl-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: center;
}
.xs-vl-history-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #1e293b;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
}
.xs-vl-history-table td {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
}
.xs-vl-mini-balls {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.xs-vl-mini-ball {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.xs-vl-mini-ball.yellow {
    background: radial-gradient(circle at 35% 35%, #fef08a, #eab308);
    color: #0f172a;
}
.xs-vl-mini-ball.green {
    background: radial-gradient(circle at 35% 35%, #86efac, #22c55e);
    color: #ffffff;
}

/* NÚT XEM THÊM KẾT QUẢ XANH CHUỐI NEON CHUẨN ẢNH 1, 3 */
.xs-vl-btn-loadmore {
    background: #84cc16 !important;
    color: #0f172a !important;
    border: none !important;
    padding: 10px 28px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
    font-size: 14.5px !important;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(132, 204, 22, 0.3);
}
.xs-vl-btn-loadmore:hover {
    background: #65a30d !important;
    color: #ffffff !important;
}

/* GIAO DIỆN 4 TẦNG GIẢI MAX 3D (CHUẨN ẢNH MẪU 2) */
.xs-vl-3d-tiers-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.xs-vl-3d-tier-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    gap: 14px;
}
.xs-vl-3d-tier-label {
    width: 220px;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    text-align: left;
}
.xs-vl-3d-tier-nums {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}
.xs-vl-3d-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}
.badge-db {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    color: #db2777;
    font-size: 22px;
}
.badge-g1 {
    background: #fefce8;
    border: 1px solid #fef08a;
    color: #ca8a04;
    font-size: 20px;
}
.badge-g2 {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    font-size: 18px;
}
.badge-g3 {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    font-size: 18px;
}
.xs-vl-3d-rules-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    color: #475569;
}
.xs-vl-3d-rules-box .rules-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}
.xs-vl-3d-rules-box .rules-list {
    margin: 0;
    padding-left: 18px;
}
.xs-vl-3d-rules-box .rules-list li {
    margin-bottom: 4px;
}

/* QUAY THỬ VIETLOTT ANIMATIONS */
.js-qt-ball.qt-spinning, .js-qt-3d-box.qt-spinning {
    animation: xsPulseSpin 0.15s infinite alternate;
}
@keyframes xsPulseSpin {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.08); opacity: 1; }
}
.js-qt-ball.qt-locked, .js-qt-3d-box.qt-locked {
    animation: xsPopIn 0.3s ease-out;
}
@keyframes xsPopIn {
    0% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@media (max-width: 680px) {
    .xs-vl-recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .xs-vl-3d-tier-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .xs-vl-3d-tier-label {
        width: 100%;
    }
}
@media (max-width: 480px) {
    .xs-vl-recent-grid {
        grid-template-columns: 1fr;
    }
    .xs-vl-ball {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

/* ─── HOMEPAGE LIVE SECTION HIGHLIGHT & REORDERING ─── */
.xs-homepage-wrapper {
    display: flex !important;
    flex-direction: column !important;
}

.xs-home-section.is-live-section {
    order: -1 !important;
    position: relative;
    z-index: 10;
}

.xs-home-section.is-live-section .xs-live-active-board {
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.15) !important;
}