/* TK Lô Rơi - Lottery Falling Numbers Statistics Styles */

/* Container và Layout chính */
.pagedb-content {
    padding: 10px;
}

/* Filter Section */
.statistics-filter {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Button Group */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.button-group span {
    font-weight: 600;
    color: #495057;
    margin-right: 10px;
}

.btn-date {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #007bff;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-date:hover {
    background: #007bff;
    color: #fff;
    text-decoration: none;
}

.btn-date.active {
    background: #007bff;
    color: #fff;
    font-weight: 600;
}

/* Results Section */
.statistics-results {
    margin-top: 30px;
}

.statistics-results h2 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    border-bottom: 3px solid #007bff;
    padding-bottom: 10px;
}

.statistics-results p {
    color: #6c757d;
    font-size: 16px;
}

/* Table Styles */
.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,.05);
}

.table th,
.table td {
    padding: 6px;
    vertical-align: middle;
    text-align: center;
}
.table thead tr {    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);}
.table thead th {
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid;
}

.table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table tbody tr:hover {
    background-color: rgba(0,123,255,0.1);
}

/* Special Prize Styling */
.special-prize {
    color: #dc3545;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Falling Number Highlight */
.falling-number.highlight {
    background: linear-gradient(45deg, #ffeb3b, #ffc107);
    color: #d32f2f;
    font-weight: 700;
    padding: 6px;
    border-radius: 20px;
    border: 2px solid #ff9800;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.no-falling {
    color: #6c757d;
    font-style: italic;
    opacity: 0.7;
}

/* Summary Info */
.summary-info {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 15px;
    margin:10px 0;
}

.summary-info p {
    margin: 0;
    color: #155724;
    font-weight: 600;
}

/* Text Center */
.text-center {
    text-align: center;
}

/* Debug Info Styles */
.debug-info {
    background: #f0f0f0;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.debug-info h4 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
}

.debug-info h5 {
    color: #555;
    margin: 10px 0 5px 0;
}

.debug-info pre {
    background: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
    max-height: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {    
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .button-group {
        justify-content: center;
    }
    
    .btn-date {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px 4px;
    }
    
    .special-prize {
        font-size: 16px;
    }
    
    .falling-number.highlight {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .statistics-results h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .table {
        font-size: 11px;
    }
    
    .table th,
    .table td {
        padding: 6px 2px;
    }
    
    .btn-date {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .falling-number.highlight {
        padding: 3px 6px;
        font-size: 11px;
    }
}

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

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

/* Loading States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.loading-text {
    font-size: 16px;
    color: #666;
    font-weight: 500;
    margin: 0;
}

/* Error States */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    margin: 20px 0;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.error-text {
    font-size: 16px;
    color: #e53e3e;
    margin-bottom: 20px;
    font-weight: 500;
}

.retry-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.retry-btn:hover {
    background: #0056b3;
}

/* Button Active State Enhancement */
.btn-date.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-date {
    transition: all 0.3s ease;
}

.btn-date:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .loading-container,
    .error-container {
        padding: 30px 15px;
    }
    
    .loading-spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }
    
    .loading-text,
    .error-text {
        font-size: 14px;
    }
    
    .error-icon {
        font-size: 36px;
    }
}

/* Smooth Transitions */
.statistics-results {
    transition: opacity 0.3s ease;
}

.statistics-results.loading {
    opacity: 0.7;
}