.ld-frontend-stats-container {
    margin: 20px 0;
}

.ld-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ld-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.ld-stats-table th,
.ld-stats-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.ld-stats-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.ld-stats-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.ld-stats-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.filter-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.date-range {
    flex-wrap: wrap;
}

#apply-filters {
    margin-left: 10px;
}

/* DataTables customization */
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
}

.dt-buttons {
    margin-bottom: 15px;
}

/* DataTables specific styling */
.wpProQuiz_statisticsTable {
    width: 100% !important;
    border-collapse: collapse !important;
}

.wpProQuiz_statisticsTable th,
.wpProQuiz_statisticsTable td {
    padding: 8px !important;
}

.wpProQuiz_statisticsTable thead th {
    background-color: #f5f5f5 !important;
    font-weight: bold !important;
    border-bottom: 2px solid #ddd !important;
}

/* DataTables wrapper styling */
.dataTables_wrapper {
    margin: 20px 0;
    padding: 0;
}

.dataTables_wrapper .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
}

.dataTables_wrapper .dt-buttons {
    float: none !important;
}

.dataTables_wrapper .dataTables_filter {
    float: none !important;
    margin: 0 !important;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5em;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Button styling */
.dt-button {
    padding: 6px 12px !important;
    margin-right: 5px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background: #f8f9fa !important;
    color: #333 !important;
}

.dt-button:hover {
    background: #e9ecef !important;
    border-color: #ccc !important;
}

/* Row hover effect */
.wpProQuiz_statisticsTable tbody tr:hover {
    background-color: #f5f5f5 !important;
}

/* Correct/Incorrect styling */
.wpProQuiz_statisticsTable .correct {
    color: #28a745;
}

.wpProQuiz_statisticsTable .incorrect {
    color: #dc3545;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .dataTables_wrapper .top {
        flex-direction: column;
        gap: 1em;
    }
    
    .dataTables_wrapper .dt-buttons {
        text-align: center;
    }
    
    .dataTables_wrapper .dataTables_filter {
        text-align: center;
    }
}

/* Quiz List Table Styles */
.ld-quiz-list-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ld-quiz-list-table th,
.ld-quiz-list-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.ld-quiz-list-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #4a5568;
}

.ld-quiz-list-table tbody tr:hover {
    background-color: #f7fafc;
}

.ld-quiz-list-table .view-stats-btn {
    display: inline-block;
    padding: 6px 12px;
    background: #4299e1;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.ld-quiz-list-table .view-stats-btn:hover {
    background: #3182ce;
}

/* Make the table responsive */
@media screen and (max-width: 768px) {
    .ld-quiz-list-table {
        display: block;
        overflow-x: auto;
    }
}

.quiz-selector {
    margin: 20px 0;
    max-width: 600px;
}

.quiz-dropdown {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 16px;
    color: #333;
}

.quiz-dropdown:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

.quiz-dropdown option {
    padding: 10px;
}

.loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.error {
    padding: 20px;
    color: #dc3545;
    text-align: center;
}