/* --- General Quiz & Leaderboard Styling --- */
.aql-quiz-container, .aql-leaderboard-container {
    background-color: #f9f9f9; /* Light grey background */
    border: 1px solid #ddd;
    border-radius: 12px; /* Rounded corners */
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* Subtle shadow */
    font-family: 'Arial', sans-serif; /* Cleaner font */
}

.aql-quiz-container h2, .aql-leaderboard-container h2 {
    color: #333; /* Darker heading color */
    text-align: center;
    margin-bottom: 25px;
    font-size: 2em; /* Larger title */
    border-bottom: 2px solid #0073aa; /* WP Admin Blue Accent */
    padding-bottom: 10px;
}

/* --- Quiz Specific Styling --- */
.aql-question {
    background-color: #ffffff; /* White background for questions */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s ease-in-out;
}

.aql-question:hover {
    transform: translateY(-5px); /* Slight lift on hover */
}

.aql-question h3 {
    color: #555;
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
}

.aql-options {
    list-style: none;
    padding-left: 0;
}

.aql-options li {
    margin-bottom: 12px;
    background-color: #f0f8ff; /* Alice blue for options */
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px dashed #add8e6; /* Light blue dashed border */
    transition: background-color 0.3s;
}

.aql-options li:hover {
    background-color: #e0f0ff; /* Slightly darker on hover */
}

.aql-options label {
    font-size: 1.1em;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.aql-options input[type="radio"] {
    margin-right: 12px;
    accent-color: #0073aa; /* WP Admin Blue for radio button */
    transform: scale(1.2); /* Slightly larger radio buttons */
}

.aql-submit-button {
    background-color: #0073aa; /* WordPress Blue */
    color: white;
    border: none;
    padding: 12px 25px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: block; /* Make it a block to center */
    margin: 20px auto 0; /* Center the button */
}

.aql-submit-button:hover {
    background-color: #005a87; /* Darker shade of WP Blue */
    transform: scale(1.05); /* Slight zoom on hover */
}

/* --- Quiz Results Styling --- */
.aql-quiz-results {
    background-color: #e6ffed; /* Light green for success */
    border: 1px solid #c3e6cb;
    color: #155724; /* Dark green text */
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.aql-quiz-results h3 {
    color: #155724;
    margin-top: 0;
}

/* --- Leaderboard Table Styling --- */
.aql-leaderboard-table {
    width: 100%;
    border-collapse: collapse; /* Clean table lines */
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.aql-leaderboard-table th, .aql-leaderboard-table td {
    border: 1px solid #ccc;
    padding: 12px 15px; /* More padding */
    text-align: left;
}

.aql-leaderboard-table th {
    background-color: #ffffff; /* WP Blue for header */
    color: white;
    font-weight: bold;
    font-size: 1.1em;
}

.aql-leaderboard-table tbody tr:nth-child(even) {
    background-color: #f2f2f2; /* Zebra striping for rows */
}

.aql-leaderboard-table tbody tr:hover {
    background-color: #e9eff3; /* Lighter blue on hover */
    cursor: default;
}

.aql-leaderboard-table td:first-child, /* Rank */
.aql-leaderboard-table td:last-child { /* Points */
    text-align: center;
    font-weight: bold;
}

/* --- Topic Specific Themes (Example) --- */
.aql-quiz-math {
    border-left: 5px solid #ffc107; /* Amber for Math */
}
.aql-quiz-math h2 {
    color: #bf8d00;
    border-bottom-color: #ffc107;
}

.aql-quiz-english {
    border-left: 5px solid #4CAF50; /* Green for English */
}
.aql-quiz-english h2 {
    color: #388E3C;
    border-bottom-color: #4CAF50;
}

.aql-quiz-history {
    border-left: 5px solid #9c27b0; /* Purple for History */
}
.aql-quiz-history h2 {
    color: #7b1fa2;
    border-bottom-color: #9c27b0;
}

.aql-quiz-science {
    border-left: 5px solid #2196F3; /* Blue for Science */
}
.aql-quiz-science h2 {
    color: #1976D2;
    border-bottom-color: #2196F3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .aql-quiz-container, .aql-leaderboard-container {
        padding: 15px;
    }
    .aql-quiz-container h2, .aql-leaderboard-container h2 {
        font-size: 1.5em;
    }
    .aql-question h3 {
        font-size: 1.2em;
    }
    .aql-options label {
        font-size: 1em;
    }
    .aql-leaderboard-table th, .aql-leaderboard-table td {
        padding: 8px;
        font-size: 0.9em;
    }
}

.agl-question { margin-bottom: 15px; }
.agl-question h3 { margin-top: 0; font-size: 1.2em; }
.agl-options { list-style: none; padding-left: 0; }
.agl-options li { margin-bottom: 8px; }
.agl-options label { font-weight: normal; cursor: pointer; }
.agl-options input[type="radio"] { margin-right: 8px; }
.agl-submit-button { padding: 10px 15px; background-color: #0073aa; color: white; border: none; border-radius: 3px; cursor: pointer; }
.agl-submit-button:hover { background-color: #005177; }
.agl-quiz-results { padding: 15px; border: 1px solid #ccc; background-color: #f9f9f9; margin-top: 20px; border-radius: 5px; }
.agl-quiz-results h3 { margin-top: 0; }
.agl-quiz-results ul { padding-left: 20px; }
.agl-correct { color: green; font-weight: bold; }
.agl-incorrect { color: red; }
.agl-unanswered { color: orange; }
.agl-ai-notice { font-style: italic; color: #555; margin-bottom: 10px; font-size:0.9em; }
.agl-login-notice { font-style: italic; color: #777; margin-bottom: 10px; padding:10px; background-color:#f0f0f0; border-left: 3px solid #0073aa;}
.agl-leaderboard-container { margin-bottom: 20px; }
.agl-leaderboard-table { width: 100%; border-collapse: collapse; }
.agl-leaderboard-table th, .agl-leaderboard-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }
.agl-leaderboard-table th { background-color: #f2f2f2; }