/**
 * QuizMaster Pro Frontend Styles
 * 
 * Modern and responsive styling for quizzes, results, and user dashboard
 */

/* Base & Reset */
.qmp-container * {
    box-sizing: border-box;
}

.qmp-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.qmp-button {
    display: inline-block;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.qmp-button:hover {
    background-color: #135e96;
    color: #fff;
    text-decoration: none;
}

.qmp-button-primary {
    background-color: #28a745;
}

.qmp-button-primary:hover {
    background-color: #218838;
}

.qmp-button-outline {
    background-color: transparent;
    color: #2271b1;
    border: 1px solid #2271b1;
}

.qmp-button-outline:hover {
    background-color: rgba(34, 113, 177, 0.1);
    color: #2271b1;
}

.qmp-button-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.qmp-button[disabled],
.qmp-button.qmp-disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Messages */
.qmp-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.qmp-error {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.qmp-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.qmp-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Quiz Container */
.qmp-quiz-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.qmp-quiz-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.qmp-quiz-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.qmp-quiz-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* --- Redesigned Timer Container --- */
.qmp-timer-container {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #ff8a00 0%, #e52e71 100%);
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 1.2em;
    color: #fff;
    box-shadow: 0 2px 12px rgba(229, 46, 113, 0.15);
    letter-spacing: 1px;
    margin: 0 8px;
    position: relative;
    min-width: 220px;
    justify-content: center;
    transition: background 0.3s;
}
.qmp-timer-container .qmp-timer-label {
    margin-right: 10px;
    font-weight: 600;
    opacity: 0.9;
}
.qmp-timer-container .qmp-timer-value {
    font-family: 'Roboto Mono', 'Consolas', monospace;
    font-size: 1.3em;
    margin: 0 8px;
    letter-spacing: 2px;
    background: rgba(255,255,255,0.12);
    padding: 2px 10px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.qmp-timer-container .qmp-timer-info {
    margin-left: 10px;
    font-size: 0.95em;
    opacity: 0.85;
    font-weight: 400;
}
.qmp-timer-container.qmp-timer-warning {
    animation: pulse 1s infinite;
    background: linear-gradient(90deg, #fff3cd 0%, #ff8a00 100%);
    color: #856404;
}

/* --- Responsive Quiz Meta & Timer --- */
@media (max-width: 600px) {
    .qmp-quiz-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }
    .qmp-timer-container {
        min-width: 0;
        width: 100%;
        font-size: 1em;
        padding: 10px 8px;
        margin: 0;
    }
}

.qmp-certification-notice {
    background-color: #fff3cd;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.qmp-field-summary {
    margin-bottom: 20px;
}

.qmp-field-summary h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.qmp-field-summary ul {
    padding-left: 20px;
}

.qmp-quiz-instructions {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
}

.qmp-quiz-instructions h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.qmp-quiz-instructions ul {
    padding-left: 20px;
}

/* Question Styles */
.qmp-question-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.qmp-question-number {
    font-weight: 500;
    color: #666;
    margin-bottom: 10px;
}

.qmp-question-text {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.qmp-question-media {
    margin-bottom: 20px;
}

.qmp-question-media img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.qmp-question-options {
    margin-bottom: 20px;
}

.qmp-option {
    margin-bottom: 12px;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qmp-option:hover {
    background-color: #f4f4f4;
    border-color: #ccc;
}

.qmp-option-selected {
    background-color: #e6f7ff;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px rgba(34, 113, 177, 0.2);
}

.qmp-option-selected:hover {
    background-color: #d6f0ff;
}

.qmp-option input[type="radio"] {
    margin-right: 10px;
}

.qmp-option-label {
    cursor: pointer;
}

.qmp-flag-question {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.qmp-flag-input {
    margin-right: 8px;
}

/* Quiz Navigation */
.qmp-quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.qmp-nav-button {
    padding: 8px 16px;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.qmp-nav-button:hover {
    background-color: #135e96;
}

.qmp-nav-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.qmp-question-progress {
    font-size: 16px;
    font-weight: 500;
}

/* Question Map */
.qmp-question-map {
    margin: 30px 0;
}

.qmp-question-map h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

.qmp-map-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qmp-map-item {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.qmp-map-item:hover {
    background-color: #e0e0e0;
}

.qmp-map-item.qmp-current {
    background-color: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.qmp-map-item.qmp-answered {
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.qmp-map-item.qmp-flagged {
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.qmp-map-item.qmp-answered.qmp-current {
    background-color: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Submit Section */
.qmp-submit-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.qmp-answer-status {
    font-size: 14px;
    color: #666;
}

.qmp-submit-button {
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.qmp-submit-button:hover {
    background-color: #218838;
}

.qmp-submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Loading Overlay */
.qmp-quiz-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.qmp-quiz-loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2271b1;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.qmp-loader-message {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
}

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

/* Quiz Results */
.qmp-quiz-results {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.qmp-result-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.qmp-result-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.qmp-result-summary {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.qmp-result-score {
    text-align: center;
    margin-right: 30px;
    padding: 15px 25px;
    border-radius: 8px;
}

.qmp-result-score.qmp-passed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.qmp-result-score.qmp-failed {
    background-color: #f8d7da;
    color: #842029;
}

.qmp-score-value {
    font-size: 36px;
    font-weight: 700;
    display: block;
}

.qmp-score-label {
    display: block;
    margin-top: 5px;
    font-weight: 500;
}

.qmp-passed-text {
    color: #0f5132;
}

.qmp-failed-text {
    color: #842029;
}

.qmp-result-stats {
    flex: 1;
}

.qmp-certification-result {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

.qmp-certification-passed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.qmp-certification-failed {
    background-color: #f8d7da;
    color: #842029;
}

.qmp-certification-actions {
    margin-top: 15px;
}

.qmp-field-results {
    margin-bottom: 30px;
}

.qmp-field-results h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

/* --- Responsive Results by Field Table --- */
.qmp-field-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.qmp-field-results-table th,
.qmp-field-results-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .qmp-field-results-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .qmp-field-results-table thead, .qmp-field-results-table tbody, .qmp-field-results-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    .qmp-field-results-table th, .qmp-field-results-table td {
        font-size: 0.98em;
        padding: 8px 6px;
    }
}

/* --- Responsive Table Wrapper for Results by Field --- */
.qmp-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.qmp-field-results-table {
    min-width: 520px;
}
.qmp-field-results-table th, .qmp-field-results-table td {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 140px;
}
@media (max-width: 600px) {
    .qmp-field-results-table th, .qmp-field-results-table td {
        font-size: 0.97em;
        padding: 8px 4px;
        max-width: 90px;
    }
}

.qmp-field-passed {
    background-color: rgba(209, 231, 221, 0.3);
}

.qmp-field-failed {
    background-color: rgba(248, 215, 218, 0.3);
}

.qmp-status-passed {
    color: #0f5132;
    font-weight: 500;
}

.qmp-status-failed {
    color: #842029;
    font-weight: 500;
}

.qmp-question-review {
    margin-bottom: 30px;
}

.qmp-question-review h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.qmp-review-item {
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.qmp-review-item.qmp-correct {
    border-left: 4px solid #28a745;
}

.qmp-review-item.qmp-incorrect {
    border-left: 4px solid #dc3545;
}

.qmp-review-question {
    margin-bottom: 15px;
}

.qmp-question-status {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.qmp-status-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
}

.qmp-correct-icon:before {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #28a745;
    font-weight: bold;
}

.qmp-incorrect-icon:before {
    content: "✗";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dc3545;
    font-weight: bold;
}

.qmp-status-text {
    font-weight: 500;
}

.qmp-review-answers {
    margin-bottom: 15px;
}

.qmp-option {
    position: relative;
}

.qmp-your-answer,
.qmp-correct-answer-text {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
}

.qmp-your-answer {
    background-color: #e5f5fa;
    color: #046581;
}

.qmp-correct-answer-text {
    background-color: #d1e7dd;
    color: #0f5132;
}

.qmp-selected-correct {
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.qmp-selected-incorrect {
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.qmp-correct-answer {
    border: 2px solid #28a745;
}

.qmp-explanation {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.qmp-explanation h4 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 10px;
}

.qmp-result-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* User Dashboard */
.qmp-user-dashboard {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.qmp-dashboard-header {
    margin-bottom: 20px;
}

.qmp-dashboard-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    overflow-x: auto;
}

.qmp-tab-trigger {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.qmp-tab-trigger .dashicons {
    margin-right: 5px;
}

.qmp-tab-trigger:hover {
    color: #2271b1;
    text-decoration: none;
}

.qmp-tab-trigger.qmp-tab-active {
    color: #2271b1;
    border-color: #2271b1;
    font-weight: 500;
}

.qmp-dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.qmp-summary-card {
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    background-color: #f9f9f9;
}

.qmp-summary-card h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
}

.qmp-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
}

.qmp-stat-item {
    text-align: center;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qmp-stat-label {
    font-size: 12px;
    color: #666;
}

.qmp-stat-value {
    font-size: 24px;
    font-weight: 600;
    margin: 5px 0;
}

.qmp-stat-meter {
    height: 6px;
    background-color: #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
}

.qmp-stat-meter-bar {
    height: 100%;
    background-color: #28a745;
}

.qmp-certification-status {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 4px;
}

.qmp-certification-status .dashicons {
    font-size: 30px;
    margin-right: 15px;
}

.qmp-certified {
    background-color: #d1e7dd;
    color: #0f5132;
}

.qmp-certified .dashicons {
    color: #28a745;
}

.qmp-not-certified {
    background-color: #f8f9fa;
    color: #666;
}

.qmp-status-text {
    flex: 1;
}

.qmp-status-text p {
    margin: 0 0 10px;
}

.qmp-waiting-period {
    font-style: italic;
    color: #856404;
}

.qmp-quick-actions {
    margin-bottom: 30px;
}

.qmp-quick-actions h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.qmp-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.qmp-action-button {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f4f4f4;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    border: 1px solid #ddd;
}

.qmp-action-button .dashicons {
    margin-right: 8px;
    color: #2271b1;
}

.qmp-action-button:hover {
    background-color: #e0e0e0;
    color: #333;
    text-decoration: none;
}

.qmp-action-button.qmp-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.qmp-recent-activity {
    margin-bottom: 30px;
}

.qmp-recent-activity h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.qmp-activity-list {
    border: 1px solid #eee;
    border-radius: 4px;
}

.qmp-activity-item {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.qmp-activity-item:last-child {
    border-bottom: none;
}

.qmp-activity-item:hover {
    background-color: #f9f9f9;
}

.qmp-activity-icon {
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.qmp-activity-icon .dashicons {
    font-size: 20px;
    color: #2271b1;
}

.qmp-activity-details {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.qmp-activity-type {
    font-weight: 500;
    margin-right: 10px;
}

.qmp-activity-result {
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 15px;
}

.qmp-activity-result.qmp-passed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.qmp-activity-result.qmp-failed {
    background-color: #f8d7da;
    color: #842029;
}

.qmp-activity-date {
    font-size: 12px;
    color: #666;
    margin-left: auto;
}

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

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

.qmp-history-table th {
    background-color: #f4f4f4;
    font-weight: 500;
}

.qmp-result-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.qmp-result-badge.qmp-passed {
    background-color: #d1e7dd;
    color: #0f5132;
}

.qmp-result-badge.qmp-failed {
    background-color: #f8d7da;
    color: #842029;
}

.qmp-certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.qmp-certificate-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qmp-certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.qmp-certificate-preview {
    height: 150px;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.qmp-certificate-preview .dashicons {
    font-size: 48px;
    color: #2271b1;
}

.qmp-certificate-details {
    padding: 15px;
}

.qmp-certificate-details h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.qmp-certificate-info {
    margin-bottom: 15px;
}

.qmp-certificate-info p {
    margin: 5px 0;
    font-size: 14px;
}

.qmp-certificate-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.qmp-status-active {
    background-color: #d1e7dd;
    color: #0f5132;
}

.qmp-status-expired {
    background-color: #f8d7da;
    color: #842029;
}

.qmp-certificate-actions {
    display: flex;
    gap: 10px;
}

.qmp-quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.qmp-quiz-option-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qmp-quiz-option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.qmp-disabled-card {
    opacity: 0.7;
    pointer-events: none;
}

.qmp-option-header {
    background-color: #f4f4f4;
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.qmp-option-icon {
    margin-right: 10px;
}

.qmp-option-icon .dashicons {
    font-size: 24px;
    color: #2271b1;
}

.qmp-option-header h3 {
    margin: 0;
    font-size: 18px;
}

.qmp-option-body {
    padding: 15px;
}

.qmp-option-body ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.qmp-waiting-notice {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff3cd;
    border-radius: 4px;
    font-size: 14px;
    color: #856404;
}

.qmp-option-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.qmp-field-selection {
    margin-top: 15px;
}

.qmp-field-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Login Form */
.qmp-login-container {
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.qmp-login-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    width: 100%;
    max-width: 400px;
}

.qmp-login-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

.qmp-login-card form {
    margin-bottom: 20px;
}

.qmp-login-card label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.qmp-login-card input[type="text"],
.qmp-login-card input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.qmp-login-card .submit {
    text-align: center;
    margin-top: 15px;
}

.qmp-login-links {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-top: 15px;
}

/* Notifications */
.qmp-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background-color: #fff;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
    max-width: 320px;
}

.qmp-notification-visible {
    transform: translateY(0);
    opacity: 1;
}

.qmp-notification-warning {
    border-left: 4px solid #f0ad4e;
}

.qmp-notification-error {
    border-left: 4px solid #dc3545;
}

.qmp-notification-success {
    border-left: 4px solid #28a745;
}

/* Empty States */
.qmp-empty-state {
    text-align: center;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.qmp-empty-state p {
    margin-bottom: 20px;
    color: #666;
}

/* Certificate Verification */
.qmp-certificate-verification {
    max-width: 800px;
    margin: 0 auto;
}

.qmp-verification-result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
}

.qmp-verification-success {
    margin-bottom: 20px;
}

.qmp-valid {
    border: 1px solid #badbcc;
    background-color: #d1e7dd;
}

.qmp-invalid {
    border: 1px solid #f5c2c7;
    background-color: #f8d7da;
}

.qmp-verification-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

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

.qmp-verification-table th {
    background-color: #f4f4f4;
    width: 30%;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .qmp-result-summary {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .qmp-result-score {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .qmp-dashboard-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .qmp-tab-trigger {
        scroll-snap-align: start;
        flex: 0 0 auto;
    }
    
    .qmp-action-buttons {
        flex-direction: column;
    }
    
    .qmp-action-button {
        width: 100%;
    }
    
    .qmp-activity-details {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .qmp-activity-date {
        margin-left: 0;
        margin-top: 5px;
    }
}

/* Quiz Mode Selector */
.qmp-mode-selection {
    max-width: 900px;
    margin: 0 auto 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.qmp-mode-selection h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
}

.qmp-mode-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.qmp-mode-card {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.qmp-mode-card.active {
    border-color: #0073aa;
    background: #f0f7fc;
}

.qmp-mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.qmp-mode-icon {
    margin-bottom: 15px;
}

.qmp-mode-icon span.dashicons {
    font-size: 40px;
    width: 60px;
    height: 60px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qmp-mode-card h3 {
    margin: 0 0 15px;
    font-size: 20px;
}

.qmp-mode-card p {
    margin-bottom: 20px;
    color: #666;
}

.qmp-mode-details {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.qmp-mode-details h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.qmp-mode-details ul {
    margin: 0;
    padding-left: 25px;
}

.qmp-mode-details li {
    margin-bottom: 8px;
}

/* Mode Switcher */
.qmp-mode-switcher {
    text-align: right;
    margin-bottom: 20px;
}

.qmp-button.qmp-switch-mode {
    display: inline-block;
    padding: 8px 16px;
    background: #f9f9f9;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.qmp-button.qmp-switch-mode:hover {
    background: #f0f0f0;
    color: #0073aa;
    border-color: #0073aa;
}

/* Practice Type Selector */
.qmp-practice-type-selector {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.qmp-practice-type-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.qmp-practice-type-selector select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.qmp-practice-details {
    margin: 15px 0;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.qmp-practice-details h4 {
    margin-top: 0;
    color: #343a40;
}

.qmp-practice-details p {
    margin-bottom: 5px;
    color: #495057;
}

/* Certificate Type Selector (already added, for reference) */
.qmp-certificate-type-selector {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.qmp-certificate-type-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.qmp-certificate-type-selector select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.qmp-certificate-details {
    margin: 15px 0;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.qmp-certificate-details h4 {
    margin-top: 0;
    color: #343a40;
}

.qmp-certificate-details p {
    margin-bottom: 5px;
    color: #495057;
}

/* Certificate Section */
.qmp-certificate-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
}

.qmp-certificate-section h3 {
    margin-top: 0;
    color: #343a40;
    font-size: 1.5em;
}

.qmp-certificate-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#qmp-certificate-result {
    margin-top: 15px;
}

.qmp-success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

.qmp-error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* Admin Quiz History Styles */
.qmp-admin-tools {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.qmp-admin-tools h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.qmp-user-filter-form select {
    width: 100%;
    max-width: 300px;
    padding: 8px;
}

.qmp-history-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

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

.qmp-history-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

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

.qmp-passed {
    color: #27ae60;
    font-weight: bold;
}

.qmp-failed {
    color: #e74c3c;
    font-weight: bold;
}

.qmp-certificate-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.qmp-view-cert {
    background: #2271b1 !important;
    color: white !important;
    border-color: #2271b1 !important;
}

.qmp-download-cert {
    background: #3c903c !important;
    color: white !important;
    border-color: #3c903c !important;
}

.qmp-verify-cert {
    background: #555 !important;
    color: white !important;
    border-color: #555 !important;
}

/* Quiz Submit Styles - make sure the submit button stands out */
.qmp-submit-btn {
    background-color: #4CAF50 !important;
    color: white !important;
    font-size: 16px !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.3s !important;
}

.qmp-submit-btn:hover {
    background-color: #45a049 !important;
}

.qmp-submit-btn.qmp-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.qmp-quiz-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#qmp-submit-loader {
    border: 5px solid #f3f3f3;
    border-radius: 50%;
    border-top: 5px solid #3498db;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

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

.qmp-button-success {
    background-color: #3c903c;
    color: #fff;
    border-color: #2e732e;
}

.qmp-button-success:hover {
    background-color: #2e732e;
    color: #fff;
    border-color: #205320;
}

/* Ensure proper spacing between certificate action buttons */
.qmp-certificate-actions a {
    margin-right: 10px;
    margin-bottom: 10px;
    display: inline-block;
}

/* Fix for certificate download button */
.qmp-download-cert, 
a.qmp-button.qmp-button-success {
    background-color: #3c903c;
    color: #fff;
    border-color: #2e732e;
    text-decoration: none;
}

.qmp-download-cert:hover,
a.qmp-button.qmp-button-success:hover {
    background-color: #2e732e;
    color: #fff;
    border-color: #205320;
}