/* =========================================================
 * SỔ KẾT QUẢ (history)
 * ========================================================= */
.xs-history-wrapper {
    margin: 15px 0;
}

.xs-history-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.xs-history-tab {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
}

.xs-history-tab:hover {
    background: #fff7f7;
    border-color: #ff3c3c;
    color: #d70000;
}

.xs-history-tab.active {
    background: linear-gradient(135deg, #d70000, #ff3c3c);
    border-color: #d70000;
    color: #fff;
    font-weight: bold;
}

.xs-history-content {
    padding: 10px;
}

.xs-history-day {
    display: none;
}

.xs-history-day.active {
    display: block;
}

.xs-history-day-title {
    font-weight: bold;
    color: #d70000;
    margin: 5px 0 8px;
    font-size: 14px;
}

.xs-history-empty,
.xs-history-loading,
.xs-stats-empty,
.xs-stats-loading,
.xs-predict-empty,
.xs-predict-loading {
    padding: 25px 15px;
    text-align: center;
    color: #777;
    font-size: 14px;
}

/* =========================================================
 * THỐNG KÊ NHANH (statistics)
 * ========================================================= */
.xs-stats-wrapper {
    margin: 15px 0;
}

.xs-stats-body {
    padding: 10px 12px;
}

.xs-stats-section {
    margin-bottom: 18px;
}

.xs-stats-section h4 {
    font-size: 15px;
    color: #d70000;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #f0c0c0;
}

.xs-stats-subtitle {
    font-weight: bold;
    color: #444;
    margin-bottom: 8px;
    font-size: 13px;
}

.xs-stats-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Bảng đầu - đuôi */
.dau-duoi-table th {
    background: linear-gradient(135deg, #d70000, #ff3c3c);
    color: #fff;
    padding: 8px;
    font-size: 13px;
}

.dau-duoi-key {
    width: 50px;
    font-weight: bold;
    color: #d70000;
    background: #fff7f7;
    text-align: center;
}

.dau-duoi-val {
    text-align: center;
    color: #333;
    font-size: 14px;
    padding: 6px 4px;
}

/* Số nóng / số gan */
.hot-cold-table th {
    background: #f5f5f5;
    color: #333;
    padding: 6px;
    font-size: 12px;
}

.hot-cold-table td {
    padding: 6px;
    text-align: center;
    font-size: 13px;
}

.hot-cold-table .rank {
    width: 30px;
    color: #888;
}

.hot-num {
    color: #d70000;
    background: #fff0f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.cold-num {
    color: #1565c0;
    background: #e8f1fa;
    padding: 2px 8px;
    border-radius: 4px;
}

/* =========================================================
 * GỢI Ý SỐ (prediction)
 * ========================================================= */
.xs-predict-wrapper {
    margin: 15px 0;
}

.predict-heading {
    background: linear-gradient(135deg, #6a11cb, #2575fc) !important;
}

.xs-predict-disclaimer {
    background: #fff8e1;
    border-left: 4px solid #ff9800;
    padding: 10px 14px;
    margin: 10px 12px;
    font-size: 13px;
    color: #5d4037;
    border-radius: 4px;
    line-height: 1.5;
}

.xs-predict-body {
    padding: 4px 12px 12px;
}

.xs-predict-section {
    margin-bottom: 16px;
    padding: 12px;
    background: #fafbff;
    border-radius: 8px;
    border: 1px solid #e7ebf5;
}

.xs-predict-section h4 {
    font-size: 14px;
    color: #2575fc;
    margin: 0 0 10px;
}

.xs-predict-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.predict-num {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: #fff !important;
    border-radius: 6px;
    font-size: 18px !important;
    font-weight: bold;
    min-width: 36px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(106, 17, 203, 0.25);
}

.xs-predict-desc {
    font-size: 12px;
    color: #777;
    font-style: italic;
}

.xs-predict-headtail {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.xs-predict-headtail > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.xs-predict-label {
    font-size: 13px;
    color: #555;
}

.xs-predict-meta {
    font-size: 12px;
    color: #888;
}

/* =========================================================
 * RESPONSIVE
 * ========================================================= */
@media (max-width: 768px) {
    .xs-stats-grid-2 {
        grid-template-columns: 1fr;
    }

    .xs-history-tab {
        font-size: 12px;
        padding: 5px 10px;
    }

    .predict-num {
        font-size: 16px !important;
        padding: 5px 10px;
    }

    .xs-predict-section {
        padding: 10px;
    }

    .xs-predict-headtail {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
