/* Assessment System Styles - Based on Java Course Design */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --card-shadow: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Assessment Header */
.assessment-header {
    background: var(--bg-gradient);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.assessment-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    z-index: 1;
}

.assessment-header .container {
    position: relative;
    z-index: 2;
}

.assessment-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.assessment-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* Question Cards */
.question-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: var(--transition);
}

.question-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.question-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.question-number {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-type {
    color: var(--secondary-color);
    font-size: 0.8rem;
    margin-left: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 20px;
}

.question-content {
    padding: 2rem;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Answer Options */
.answer-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Requirements List */
.requirements-list {
    padding: 0;
    margin: 0;
}

.requirement-item {
    padding: 0.25rem 0;
    margin: 0;
    line-height: 1.5;
}

.answer-option {
    margin-bottom: 1rem;
}

.answer-option label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: #fafbfc;
}

.answer-option label:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.answer-option input[type="radio"],
.answer-option input[type="checkbox"] {
    margin-right: 1rem;
    transform: scale(1.2);
}

.answer-option.selected label {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

.answer-option.correct label {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.answer-option.incorrect label {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Fira Code', 'JetBrains Mono', Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    margin: 1rem 0;
    position: relative;
}

.code-block::before {
    content: 'Java';
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Code Editor */
.code-editor {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    min-height: 200px;
    font-family: 'Fira Code', monospace;
}

.code-editor-header {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.8rem;
    color: var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-editor-content {
    padding: 1rem;
}

.code-editor textarea {
    width: 100%;
    min-height: 150px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    background: transparent;
}

/* Execution Results */
.execution-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

.execution-result.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.execution-result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

.execution-result.pending {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

/* Action Buttons */
.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-execute {
    background: var(--success-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-execute:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-execute:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Navigation */
.assessment-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

/* Results Summary */
.results-summary {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.score-display {
    text-align: center;
    margin-bottom: 2rem;
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.score-label {
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.score-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.score-item {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background: #f8fafc;
}

.score-item-number {
    font-size: 1.5rem;
    font-weight: 600;
}

.score-item-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .assessment-title {
        font-size: 1.5rem;
    }

    .question-content {
        padding: 1.5rem;
    }

    .answer-option label {
        padding: 0.75rem;
    }

    .assessment-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .score-breakdown {
        grid-template-columns: 1fr;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Review Mode Styles */
.review-mode.question-card.correct {
    border-left: 4px solid var(--success-color);
    background: rgba(16, 185, 129, 0.02);
}

.review-mode.question-card.incorrect {
    border-left: 4px solid var(--danger-color);
    background: rgba(239, 68, 68, 0.02);
}

.question-status {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.question-status i {
    font-size: 1.2rem;
}

.review-answers {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.user-answer, .correct-answer {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    min-height: 60px;
}

.code-answer {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Fira Code', 'JetBrains Mono', Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    overflow-x: auto;
}

.explanation {
    background: rgba(13, 110, 253, 0.1);
    border-left: 3px solid var(--primary-color);
    padding: 1rem;
    border-radius: 0 6px 6px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}