/* =============================================
   ULTIMATE MCQ QUIZ BUILDER PRO - FRONTEND STYLES
   Version: 3.0.0
   Clean, modern, fully responsive
   ============================================= */

/* ---------- Container ---------- */
.umcq-quiz-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: transparent;
}

/* ---------- Start Screen ---------- */
.umcq-start-screen {
    background: #f3f4f6;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border-radius: 16px;
}

.umcq-start-content {
    background: white;
    border-radius: 24px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
}

.umcq-start-content h2 {
    color: #1e293b;
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
}

.umcq-quiz-info {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 16px;
    margin: 20px 0;
    text-align: left;
    border-left: 4px solid #ff6e02;
}

.umcq-quiz-info p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: #334155;
}

.umcq-quiz-info strong {
    color: #ff6e02;
}

.umcq-grade-info {
    background: #fefce8;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 40px;
    font-size: 0.85rem;
    text-align: center;
    color: #854d0e;
    font-weight: 500;
}

.umcq-quiz-instructions {
    text-align: left;
    margin: 20px 0;
    padding: 16px 20px;
    background: #f1f5f9;
    border-radius: 16px;
}

.umcq-quiz-instructions h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.umcq-quiz-instructions ul {
    margin: 8px 0 4px;
    padding-left: 20px;
}

.umcq-quiz-instructions li {
    margin: 6px 0;
    font-size: 0.9rem;
    color: #334155;
}

.umcq-start-btn {
    background: #ff6e02;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 260px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-top: 10px;
}

.umcq-start-btn:hover {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 110, 2, 0.2);
}

/* ---------- Quiz Interface ---------- */
.umcq-quiz-interface {
    background: transparent;
    min-height: auto;
    padding: 0;
}

.umcq-timer {
    background: #1e293b;
    color: white;
    padding: 12px 15px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 12px 12px 0 0;
}

.timer-icon {
    margin-right: 8px;
}

.umcq-progress-bar {
    background: #e2e8f0;
    height: 6px;
    position: sticky;
    top: 48px;
    z-index: 99;
}

.umcq-progress-fill {
    background: #ff6e02;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 0 3px 3px 0;
}

.umcq-questions-wrapper {
    padding: 20px;
}

.umcq-question-page {
    display: none;
}

.umcq-question-page.active {
    display: block;
}

/* Question Card */
.umcq-question {
    margin-bottom: 25px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.umcq-question-header {
    background: #ff6e02;
    color: white;
    padding: 14px 20px;
}

.umcq-question-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.umcq-question-content {
    padding: 20px;
}

.umcq-question-image {
    max-width: 100%;
    margin-bottom: 15px;
    border-radius: 12px;
}

.umcq-question-text {
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0 0 15px 0;
    color: #0f172a;
    font-weight: 500;
}

/* Options */
.umcq-options {
    margin: 10px 0 0 0;
}

.umcq-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.umcq-option:hover {
    border-color: #ff6e02;
    background: #fff7ed;
}

.umcq-option input[type="radio"] {
    margin-right: 14px;
    transform: scale(1.1);
    accent-color: #ff6e02;
}

.umcq-option-text {
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.4;
    flex: 1;
}

/* Page Actions */
.umcq-page-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 10px;
    padding: 0 10px;
}

.umcq-submit-section {
    text-align: center;
    margin: 20px 0;
}

.umcq-prev-page,
.umcq-next-page,
.umcq-submit-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 160px;
}

.umcq-prev-page {
    background: #64748b;
    color: white;
}

.umcq-prev-page:hover {
    background: #475569;
}

.umcq-next-page {
    background: #ff6e02;
    color: white;
}

.umcq-next-page:hover,
.umcq-submit-btn:hover {
    background: #e55a00;
    transform: translateY(-2px);
}

.umcq-submit-btn {
    background: #10b981;
    color: white;
    max-width: 220px;
    margin: 0 auto;
}

/* ---------- Results Screen ---------- */
.umcq-results-screen {
    background: transparent;
    padding: 20px;
}

.umcq-result-summary {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 24px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.umcq-result-summary h2 {
    margin: 0 0 10px;
    font-size: 1.8rem;
    color: #0f172a;
}

.umcq-result-score {
    font-size: 3rem;
    font-weight: 800;
    color: #ff6e02;
    margin: 15px 0;
}

.umcq-result-summary p {
    margin: 8px 0;
    font-size: 1rem;
    color: #334155;
}

.umcq-result-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.umcq-detail-card {
    background: white;
    padding: 18px 12px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.umcq-detail-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ff6e02;
    display: block;
    line-height: 1.2;
}

.umcq-detail-card span:last-child {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    display: block;
    margin-top: 6px;
}

.umcq-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

.umcq-download-btn,
.umcq-share-btn,
.umcq-retake-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.umcq-download-btn {
    background: #1e293b;
    color: white;
}

.umcq-share-btn {
    background: #25D366;
    color: white;
}

.umcq-retake-btn {
    background: #ffc107;
    color: #1e293b;
}

.umcq-download-btn:hover,
.umcq-share-btn:hover,
.umcq-retake-btn:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

/* Detailed Results */
.umcq-detailed-results {
    margin-top: 30px;
}

.umcq-detailed-results h3 {
    border-bottom: 2px solid #ff6e02;
    padding-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
}

.umcq-question-result {
    padding: 18px;
    margin: 16px 0;
    border-radius: 20px;
    border-left: 5px solid #ef4444;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    border-left-width: 5px;
}

.umcq-question-result.correct {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.umcq-question-result.wrong {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.umcq-question-result h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #0f172a;
}

.umcq-question-result p {
    margin: 8px 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #334155;
}

.umcq-question-result p strong {
    color: #0f172a;
}

/* ---------- Quiz Sets Grid (Shortcode) ---------- */
.umcq-sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

.umcq-set-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.umcq-set-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.15);
}

.umcq-set-card h3 {
    margin: 0 0 12px;
    color: #ff6e02;
    font-size: 1.3rem;
}

.umcq-set-meta {
    margin: 10px 0;
    color: #64748b;
    font-size: 0.85rem;
}

.umcq-set-excerpt {
    margin: 12px 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}

.umcq-set-shortcode {
    margin: 12px 0;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 12px;
    font-size: 0.8rem;
    word-break: break-all;
}

.umcq-set-shortcode code {
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 8px;
    color: #ff6e02;
}

.umcq-set-card .umcq-start-btn {
    display: inline-block;
    margin-top: 10px;
    width: auto;
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* User Results Table */
.umcq-user-results {
    overflow-x: auto;
}

.umcq-user-results table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.umcq-user-results th,
.umcq-user-results td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.umcq-user-results th {
    background: #f8fafc;
    font-weight: 600;
}

/* Loading */
.umcq-loading {
    text-align: center;
    padding: 40px;
    font-size: 1rem;
    color: #ff6e02;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .umcq-start-content {
        padding: 20px 16px;
    }
    .umcq-start-content h2 {
        font-size: 1.4rem;
    }
    .umcq-quiz-info,
    .umcq-quiz-instructions {
        padding: 12px;
    }
    .umcq-question-content {
        padding: 15px;
    }
    .umcq-option {
        padding: 10px 12px;
    }
    .umcq-page-actions {
        flex-direction: column;
        align-items: center;
    }
    .umcq-prev-page,
    .umcq-next-page,
    .umcq-submit-btn {
        max-width: 100%;
        width: 100%;
    }
    .umcq-result-details {
        gap: 10px;
    }
    .umcq-detail-value {
        font-size: 1.4rem;
    }
    .umcq-result-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .umcq-download-btn,
    .umcq-share-btn,
    .umcq-retake-btn {
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .umcq-quiz-container {
        max-width: 700px;
        margin: 0 auto;
    }
}

/* Print styles */
@media print {
    .umcq-start-btn,
    .umcq-timer,
    .umcq-progress-bar,
    .umcq-result-actions {
        display: none !important;
    }
    .umcq-quiz-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    .umcq-question {
        break-inside: avoid;
    }
}
/* =============================================
   PRO MINIMAL START SCREEN (as per screenshot)
   ============================================= */

   .umcq-start-screen {
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
}

.umcq-start-content {
    background: #ffffff;
    border-radius: 28px;
    padding: 24px 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.02);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border: 1px solid #edf2f7;
}

.umcq-start-content h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 20px 0;
    text-align: center;
    letter-spacing: -0.3px;
}

/* Quick stats – two rows, four items */
.umcq-quick-stats {
    background: #f8fafc;
    border-radius: 20px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
}
.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #ff6e02;
}

/* Grade legend – inline pills */
.umcq-grade-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 12px;
    font-size: 0.7rem;
    font-weight: 500;
    background: #fef9e6;
    padding: 8px 12px;
    border-radius: 40px;
}
.umcq-grade-legend span {
    color: #b45309;
    white-space: nowrap;
}

/* One‑line instructions */
.umcq-quick-instructions {
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    margin: 12px 0 18px;
}

/* Start button */
.umcq-start-btn {
    background: #ff6e02;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: 0.2s;
}
.umcq-start-btn:hover {
    background: #e55a00;
    transform: translateY(-1px);
}

/* Mobile tight */
@media (max-width: 480px) {
    .umcq-start-content {
        padding: 20px 16px;
    }
    .umcq-start-content h2 {
        font-size: 1.4rem;
    }
    .stat-label, .stat-value {
        font-size: 0.8rem;
    }
    .umcq-grade-legend {
        gap: 6px;
        font-size: 0.65rem;
    }
}