/* MockMaster Frontend / Student Portal Styles */

.mmt-portal-wrapper {
    max-width: 1140px;
    margin: 30px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.mmt-portal-wrapper * {
    box-sizing: border-box;
}

/* Student Navigation Bar */
.mmt-student-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mmt-nav-brand {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.mmt-nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mmt-nav-link {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.mmt-nav-link:hover,
.mmt-nav-link.active {
    color: #1e3a8a;
    background: #eff6ff;
}

.mmt-nav-logout {
    color: #dc2626 !important;
}

/* Metric Cards */
.mmt-dash-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.mmt-metric-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.mmt-metric-num {
    font-size: 36px;
    font-weight: 800;
    color: #1e3a8a;
    line-height: 1;
    margin-bottom: 8px;
}

.mmt-metric-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

/* Test Cards Grid */
.mmt-tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.mmt-test-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mmt-test-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.mmt-test-card-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.mmt-test-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 16px;
}

.mmt-test-meta-list {
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
}

.mmt-test-meta-list li {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mmt-test-meta-list strong {
    color: #1e293b;
}

/* Buttons */
.mmt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
    text-align: center;
}

.mmt-btn-primary {
    background-color: #2563eb;
    color: #ffffff !important;
}
.mmt-btn-primary:hover {
    background-color: #1d4ed8;
}

.mmt-btn-success {
    background-color: #10b981;
    color: #ffffff !important;
}
.mmt-btn-success:hover {
    background-color: #059669;
}

.mmt-btn-secondary {
    background-color: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
}
.mmt-btn-secondary:hover {
    background-color: #e2e8f0;
}

.mmt-btn-block {
    width: 100%;
}

.mmt-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================
   TEST INTERFACE
========================================= */
.mmt-exam-wrapper {
    max-width: 900px;
    margin: 20px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
}

.mmt-exam-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    color: #ffffff;
    padding: 16px 24px;
}

.mmt-exam-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #f8fafc;
}

.mmt-exam-timer-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0f172a;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #334155;
}

.mmt-exam-timer {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    font-family: monospace;
    color: #38bdf8;
}

.mmt-exam-timer.mmt-timer-warning {
    color: #ef4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.mmt-exam-body {
    padding: 32px;
}

.mmt-exam-q-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.mmt-exam-q-indicator {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mmt-exam-marks-info {
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 4px;
}

.mmt-exam-q-text {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* Options */
.mmt-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.mmt-option-label {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.15s ease;
}

.mmt-option-label:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.mmt-option-label.selected {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1e40af;
    font-weight: 600;
}

.mmt-opt-badge {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.mmt-option-label.selected .mmt-opt-badge {
    background: #2563eb;
    color: #ffffff;
}

.mmt-option-radio {
    display: none;
}

/* Exam Controls (Preview & Submit) */
.mmt-exam-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.mmt-autosave-indicator {
    font-size: 12px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =========================================
   SCORECARD / RESULTS PAGE
========================================= */
.mmt-result-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 36px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.mmt-result-header {
    text-align: center;
    margin-bottom: 32px;
}

.mmt-result-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.mmt-result-subtitle {
    font-size: 14px;
    color: #64748b;
}

.mmt-score-circle-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.mmt-score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 6px solid #2563eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.mmt-score-big {
    font-size: 32px;
    font-weight: 800;
    color: #1e3a8a;
    line-height: 1;
}

.mmt-score-percent {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-top: 4px;
}

.mmt-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.mmt-breakdown-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.mmt-bd-val {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.mmt-bd-correct .mmt-bd-val { color: #16a34a; }
.mmt-bd-wrong .mmt-bd-val { color: #dc2626; }
.mmt-bd-skipped .mmt-bd-val { color: #64748b; }
.mmt-bd-time .mmt-bd-val { color: #0284c7; }

.mmt-bd-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

/* Certificate Eligibility Banner */
.mmt-cert-eligibility-box {
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-top: 24px;
}

.mmt-cert-eligible {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.mmt-cert-not-eligible {
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.mmt-cert-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

/* Certificates Gallery */
.mmt-cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.mmt-cert-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.mmt-cert-preview-banner {
    background: #1e293b;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
    position: relative;
}

.mmt-cert-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (max-width: 640px) {
    .mmt-student-nav {
        flex-direction: column;
        gap: 12px;
    }
    .mmt-exam-topbar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .mmt-exam-body {
        padding: 20px;
    }
}
