/* Container chính */
.pagedb-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* Form filter chọn tỉnh và ngày */
.statistics-filter {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.statistics-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc3545, #007bff, #28a745);
}

/* Form horizontal layout */
.form-horizontal {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-row, .form-control {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.form-group label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #dc3545;
    border-radius: 1px;
}

/* Select dropdown styling */
select.form-control {
    cursor: pointer;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    appearance: none;
}

/* Date input styling */
input[type="date"].form-control {
    cursor: pointer;
    position: relative;
    color: #495057;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23007bff"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/></svg>') no-repeat;
    background-size: 18px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Bảng chọn số */
.bang_tuy_chon {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

/* Hàng nút tùy chọn */
.nut_chon_tuy_chon td, .table thead tr.bg-ligh-blue th{
    padding: 10px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
}

.nut_chon_tuy_chon button, .btn.btn-white {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nut_chon_tuy_chon button:hover, .btn.btn-white:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Hàng nút chọn đầu và đuôi */
.nut_chon_dau td,
.nut_chon_duoi td {
    padding: 10px 5px;
    text-align: center;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    border-bottom: 1px solid #dee2e6;
}

.nut_chon_dau button, .nut_chon_duoi button, .btn-tk {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s ease;
    width: 100%;
}

.nut_chon_dau button:hover,
.nut_chon_duoi button:hover, .btn-tk:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.4);
}

/* Ô checkbox số */
.o_checkbox {
    padding: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
    background: white;
    transition: all 0.3s ease;
    position: relative;
}

.o_checkbox:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.o_checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    margin: 0;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.o_checkbox input[type="checkbox"] {
    margin-right: 5px;
    transform: scale(1.2);
    accent-color: #dc3545;
}

.o_checkbox input[type="checkbox"]:checked + span,
.o_checkbox label:has(input:checked) {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

/* Nút xem kết quả */
.nut_xem_ket_qua {
    text-align: center;
}

.nut_xem_ket_qua_btn, .btn-red{
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.nut_xem_ket_qua_btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nut_xem_ket_qua_btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.nut_xem_ket_qua_btn:hover::before {
    left: 100%;
}

.nut_xem_ket_qua_btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Kết quả thống kê */
.statistics-results {
    margin-top: 30px;
}

.statistics-summary {
    margin-bottom: 20px;
}

.statistics-summary h2 {
    margin: 0;
    padding: 10px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg_red {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.pad10-5 {
    padding: 15px 20px;
}

/* Bảng kết quả */
.kqtktslotomb {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 12px;
}

.bang_ket_qua {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.bang_ket_qua th {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    color: white;
    padding: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    border-right: 1px solid #6c757d;
    position: sticky;
    top: 0;
    z-index: 10;
}

.bang_ket_qua th:first-child {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    font-weight: 700;
}

.bang_ket_qua td {
    padding: 6px;
    text-align: center;
    border: 1px solid #e9ecef;
    font-weight: 500;
    transition: all 0.3s ease;
}

.bang_ket_qua td:first-child {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 700;
    color: #dc3545;
    position: sticky;
    left: 0;
    z-index: 5;
}

.bang_ket_qua tr:nth-child(even) {
    background: #f8f9fa;
}

.bang_ket_qua tr:hover {
    background: #e3f2fd;
}

.bang_ket_qua td:not(:first-child):not(:empty) {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 992px) {
    .filter-row, .form-control {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .page-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .filter-row, .form-control {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nut_chon_tuy_chon button {
        padding: 6px 10px;
        margin: 2px;
    }
    
    .bang_tuy_chon {
        font-size: 12px;
    }
    
    .o_checkbox {
        padding: 4px;
    }
    
    .nut_xem_ket_qua_btn {
        padding: 12px 25px;
        font-size: 14px;
        min-width: 150px;
    }
    
    .bang_ket_qua th, .bang_ket_qua td {
    }
}

@media (max-width: 576px) {
    .statistics-filter {
        overflow-x: auto;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .nut_chon_tuy_chon td {
        padding: 10px 5px;
    }
        
    .bang_ket_qua {
        font-size: 11px;
    }
}

/* Animation cho loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.statistics-results {
    animation: fadeIn 0.5s ease-out;
}

/* Hiệu ứng hover cho các nút */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.nut_xem_ket_qua_btn:focus {
    animation: pulse 1.5s infinite;
}

/* Scrollbar styling cho bảng kết quả */
.kqtktslotomb::-webkit-scrollbar {
    height: 8px;
}

.kqtktslotomb::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.kqtktslotomb::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 4px;
}

.kqtktslotomb::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
}
/*css cho tần suất loto cặp*/

/* Input và Select styling */
.input, .select {
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    font-family: inherit;
}

.input.full, .select.full {
    width: 100%;
}

.input:focus, .select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.input:hover, .select:hover {
    border-color: #ced4da;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Select dropdown styling */
.select {
    cursor: pointer;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    padding-right: 45px;
    appearance: none;
}

/* Row flex cho số ngày */
.row-flex {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.row-flex:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.row-flex .btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.row-flex .btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: scale(1.1);
}

.row-flex .input {
    flex: 1;
    text-align: center;
    border: none;
    background: white;
    margin: 0;
    padding: 8px;
    font-weight: 600;
}

.input-group-addon {
    background: #e9ecef;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
}
.btn-item {
    margin: 10px 0;
}
.block-content {
    border: 1px solid #e9ecef;
    border-radius: 12px;
}
/* Table scroll container */
.table-scroll {
    overflow-x: auto;
    border-radius: 12px;
}

/* Table styling */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin: 0;
}

.table.table-bordered {
    border: none;
}

.table.font-bold {
    font-weight: 600;
}

.table.text-center {
    text-align: center;
}

/* Table header */

tr.bg-ligh-blue {
    background: bisque;
}

/* Table body cells */
.bg-ligh-blue td {padding:10px 5px !important}
.table tbody td {
    padding: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.table tbody tr:hover td {
    background: #e3f2fd;
    transform: scale(1.02);
}

/* Checkbox labels trong bảng */
.table tbody td label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #495057;
    margin: 0;
    padding: 0 3px;
    gap: 3px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.table tbody td label:hover {
    color: red;
}

/* Checkbox styling */
.checkbox {
    cursor: pointer;
}

/* Checked state */
.checkbox:checked + span,
.table tbody td label:has(.checkbox:checked) {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
    border-color: #dc3545 !important;
}

/* Submit button */
.btn.btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    margin: 20px auto;
    display: block;
}

.btn.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn.btn-primary:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.btn.btn-primary:hover::before {
    left: 100%;
}

.btn.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Kết quả thống kê */
.statistics-results {
    background: white;
    border-radius: 10px;
    padding: 10px;
    border: 1px solid #e9ecef;
}


/* Bảng kết quả */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin: 0;
}

.results-table th {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    border-right: 1px solid #6c757d;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.results-table th:first-child {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    font-weight: 700;
    position: sticky;
    left: 0;
    z-index: 11;
}

.results-table td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #e9ecef;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.results-table td:first-child {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 700;
    color: #dc3545;
    position: sticky;
    left: 0;
    z-index: 5;
    border-right: 2px solid #dc3545;
}

.results-table tr:nth-child(even) {
    background: #f8f9fa;
}

.results-table tr:hover {
    background: #e3f2fd;
    transform: scale(1.01);
}

.results-table td:not(:first-child):not(:empty) {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-weight: 700;
    border-color: #28a745;
}

/* Responsive Design */
@media (max-width: 1200px) {

}

@media (max-width: 992px) {
   .page-title {
        font-size: 28px;
    }
    
}

@media (max-width: 768px) {
    .page-title {
        font-size: 24px;
        letter-spacing: 1px;
    }
    
    .btn.btn-white {
        padding: 8px 15px;
        margin: 2px;
        font-size: 12px;
    }
    
    .table tbody td label {
        font-size: 12px;
    }
    
    .btn.btn-primary {
        padding: 12px 25px;
        font-size: 14px;
        min-width: 150px;
    }
}

@media (max-width: 576px) {
    
    .page-title {
        font-size: 20px;
        letter-spacing: 0.5px;
    }
    
    .table-scroll {
        overflow-x: auto;
    }
    
    .table tbody td label {
        font-size: 11px;
    }
    
    .results-table {
        font-size: 11px;
    }
    
    .results-table th, .results-table td {
        padding: 6px 4px;
    }
}

/* Animation cho loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hiệu ứng hover cho các nút */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.btn.btn-primary:focus {
    animation: pulse 1.5s infinite;
}

/* Scrollbar styling */
.table-scroll::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.table-scroll::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.table-scroll::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 5px;
}

.table-scroll::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
}

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.button-group .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.button-group .btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}