#recent-attempts-container { margin-top: 25px;}

.attempts-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 20px;
}

.attempts-section h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid #d5063f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*background: linear-gradient(135deg, #f8455a 0%, #d5063f 100%);*/
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
	color: #fff !important;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    opacity: 1;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Attempt Summary */
.attempt-summary {
    padding: 24px 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item .label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item span:not(.label) {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* Questions Container */
.questions-container {
    padding: 24px 30px;
}

.questions-container h4 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.no-questions {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px;
}

/* Question Items */
.question-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
	padding: 20px;
}

.question-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.question-item.correct {
    border-left: 4px solid #10b981;
}

.question-item.wrong {
    border-left: 4px solid #ef4444;
}

.question-item.not_answered {
    border-left: 4px solid #f59e0b;
}

.question-header {
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-number {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.question-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-status.correct {
    background: #dcfce7;
    color: #166534;
}

.question-status.wrong {
    background: #fee2e2;
    color: #991b1b;
}

.question-status.not_answered {
    background: #fef3c7;
    color: #92400e;
}

.summary-stats{ margin-bottom: 15px;}

.stat-item { margin: 10px; padding: 8px 15px; border-radius: 20px;}

.stat-item.correct {
    background: #dcfce7;
    color: #166534;
}

.stat-item.wrong {
    background: #fee2e2;
    color: #991b1b;
}

.stat-item.not_answered {
    background: #fef3c7;
    color: #92400e;
}





.question-content {
    padding: 16px;
}

.question-text {
    color: #1f2937;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 500;
	padding: 20px;
}

.answers-section, .answer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.answer-item label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-answer, .correct-answer {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
}

.user-answer.correct {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.user-answer.wrong {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.user-answer.not_answered {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.user-answer {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.correct-answer {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.explanation, .explanation-section {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.explanation-text {
    padding: 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    color: #0c4a6e;
    font-size: 14px;
    line-height: 1.5;
}

/* Message Styles */
.message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.success-message {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Animation for table rows */
.attempt-row {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    #recent-attempts-table {
        font-size: 12px;
    }
    
    #recent-attempts-table th,
    #recent-attempts-table td {
        padding: 8px 6px;
    }
    
    .modal-container {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .attempt-summary {
        padding: 16px 20px;
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .questions-container {
        padding: 16px 20px;
    }
    
    .question-content {
        padding: 12px;
    }
    
    .login-card {
        margin: 10px;
        padding: 24px;
    }
    
    .attempts-section {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .table-container {
        font-size: 11px;
    }
    
    .accuracy-badge {
        font-size: 10px;
        padding: 4px 8px;
        min-width: 50px;
    }
    
    .view-details-btn, .view-btn {
        font-size: 10px;
        padding: 4px 12px;
    }
    
    .grade {
        font-size: 10px;
        padding: 2px 6px;
    }
}