/* ===== TK-DD.CSS - THỐNG KÊ ĐẦU ĐUÔI CHUYÊN NGHIỆP ===== */

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


/* Form filter - Thiết kế card hiện đại */
.statistics-filter {
    background: white;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.statistics-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3);
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

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

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    align-items: end;
}

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

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    padding-left: 15px;
}

.form-group label::before {
    content: '●';
    position: absolute;
    left: 0;
    color: #667eea;
    font-size: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Form controls - Thiết kế premium */
.form-control {
    padding: 15px 20px;
    border: 2px solid #e8ecf4;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #2c3e50;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 8px 25px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* Select dropdown - Thiết kế custom */
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 24 24" fill="%23667eea"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 50px;
    appearance: none;
}

select.form-control:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

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

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="%23667eea"><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: 22px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Button group - Thiết kế pill buttons */
.button-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 1px solid #dee2e6;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.button-group span {
    font-weight: 700;
    color: #495057;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 15px;
    position: relative;
}

.button-group span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.btn-date {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.btn-date:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

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

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

.btn-date:active {
    transform: translateY(-1px) scale(1.02);
}

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

.statistics-summary {
    margin-bottom: 30px;
    background: white;
    border-radius: 15px;
    padding: 10px;
        border: 1px solid #e9ecef;
    overflow: hidden;
}

.statistics-summary h2 {
    margin: 0;
    padding: 15px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.bg_red {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
/* Box loto container - Thiết kế card premium */
.box-loto {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

/* Bảng thống kê - Thiết kế hiện đại */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.table-statis {
    border-radius: 12px;
    overflow: hidden;
}

.bgF5F5F5 {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Header bảng */
.table th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 6px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    border: none;
    position: relative;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Header đặc biệt */
.table th.thdau {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 800;
    width: 100px;
    position: sticky;
    left: 0;
    z-index: 10;
}

/* Cells bảng */
.table td {
    padding: 6px;
    text-align: center;
    border: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.table td.bgDEDEDE {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 5;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Hover effects cho bảng */
.table tr:nth-child(even) {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.table tr:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

/* Hàng tổng - Thiết kế nổi bật */
.table tr.total-row {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
    color: white;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.table tr.total-row td {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-size: 16px;
    padding: 15px 8px;
}

.table tr.total-row:hover {
    background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%) !important;
    transform: scale(1.05);
}

/* Heading thống kê */
.heading-tk {
    margin: 0;
    font-weight: 600;
    color: white;
}

/* Số loto - Thiết kế badge */
.lo-gan {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 16px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.lo-gan:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.5);
}

/* Responsive Design - Mobile First */
@media (max-width: 1200px) {    
    .filter-row {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .page-title {
        font-size: 28px;
    }
    
    .filter-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .table {
        font-size: 13px;
    }
    
    .table th, .table td {
        padding: 10px 6px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 24px;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn-date {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th, .table td {
        padding: 8px 4px;
    }
    
    .lo-gan {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .heading-tk {
        font-size: 16px;
    }
    
    /* Horizontal scroll cho bảng trên mobile */
    .box-loto {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 20px;
    }
    
    .button-group {
        align-items: stretch;
    }
    
    .button-group span {
        text-align: center;
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .btn-date {
        margin: 3px 0;
        text-align: center;
    }
    
    .table {
        font-size: 11px;
        min-width: 500px;
    }
    
    .table th, .table td {
        padding: 6px 3px;
    }
    
    .lo-gan {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Hover effects nâng cao */
.form-control:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
    background-color: #f8f9ff;
}

.btn-date:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility improvements */
.btn-date:focus,
.form-control:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}
