/* ===== RESULT DETAIL MODAL (PREMIUM DESIGN) ===== */

.rd-modal-inner {
    max-width: 900px;
    width: 95%;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 90vh;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

#resultDetailContent {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.rd-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #64748b;
    transition: all 0.2s ease;
    z-index: 10;
}

.rd-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: rotate(90deg);
}

.rd-header {
    padding: 32px 40px;
    background: #f8fafc;
    border-bottom: 2px solid #f1f5f9;
    flex-shrink: 0;
}

.rd-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.rd-student-info {
    flex: 1;
}

.rd-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.rd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.rd-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rd-score-badge {
    padding: 16px 24px;
    text-align: center;
    border-radius: 12px;
    border: 2px solid transparent;
    min-width: 140px;
    transition: transform 0.3s ease;
}

.rd-score-badge:hover {
    transform: scale(1.05);
}

.rd-score-num {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.rd-score-label {
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.7;
    margin: 4px 0;
}

.rd-grade {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
}

.rd-progress-bar-wrap {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 24px;
    overflow: hidden;
}

.rd-progress-fill {
    height: 100%;
    transition: width 1s ease-out;
}

.rd-body {
    padding: 32px 40px;
    overflow-y: auto;
    flex: 1;
    background: #f8fafc;
}

.rd-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rd-q-count {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
}

.rd-summary-chips {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.rd-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.rd-chip-correct {
    background: #f0fdf4;
    color: #16a34a;
}

.rd-chip-wrong {
    background: #fef2f2;
    color: #dc2626;
}

.rd-chip-skip {
    background: #f8fafc;
    color: #64748b;
}

.rd-filter-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.rd-filter-btn:hover {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.5);
}

.rd-filter-btn.active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rd-questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rd-question-card {
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.rd-question-card:hover {
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.rd-q-header {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.rd-q-num {
    background: #1e293b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
}

.rd-q-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.5;
}

.rd-q-status-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.rd-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.rd-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    background: #f8fafc;
    color: #475569;
    border: 1px solid transparent;
}

.rd-opt-label {
    font-weight: 800;
    color: #94a3b8;
    font-size: 0.85rem;
}

.rd-opt-correct-picked {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
    font-weight: 600;
}

.rd-opt-correct {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.rd-opt-wrong-picked {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
    text-decoration: line-through;
}

.rd-opt-badge {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

.rd-opt-badge-correct {
    background: #22c55e;
    color: #fff;
}

.rd-opt-badge-wrong {
    background: #ef4444;
    color: #fff;
}

.rd-empty {
    text-align: center;
    padding: 48px 24px;
    color: #94a3b8;
    font-style: italic;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}