* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header .subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.main-content {
    flex: 1;
    padding: 40px 20px;
}

.input-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.input-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
}

#questionInput {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    resize: vertical;
    transition: border-color 0.3s;
}

#questionInput:focus {
    outline: none;
    border-color: #667eea;
}

.help-text {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
    font-style: italic;
}

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    margin-top: 15px;
    margin-right: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.quiz-section {
    animation: slideIn 0.3s ease-in;
}

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

.question-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid #667eea;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.question-number {
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.score {
    background: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.case-description {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    line-height: 1.8;
    color: #333;
}

.question-text {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
}

.options-container {
    display: grid;
    gap: 12px;
    margin: 25px 0;
}

.option-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    text-align: left;
    font-weight: 500;
}

.option-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.option-btn.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.option-btn.correct {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.option-btn.incorrect {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.option-btn:disabled {
    cursor: not-allowed;
}

.result-feedback {
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    animation: slideIn 0.3s ease-in;
}

.result-feedback.correct {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.result-feedback.incorrect {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.explanation-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    animation: slideIn 0.3s ease-in;
}

.explanation-section h3 {
    color: #667eea;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.explanation-section h3:first-child {
    margin-top: 0;
}

.explanation-section div {
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
}

.explanation-section h4 {
    color: #555;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1em;
}

action-buttons {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    animation: slideIn 0.3s ease-in;
}

footer {
    background: #f8f9fa;
    color: #666;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .main-content {
        padding: 20px;
    }

    .input-section, .question-card {
        padding: 20px;
    }

    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}