/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
header {
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

.back-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Lesson list styles */
.lessons-list h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.lesson-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.lesson-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.lesson-card p {
    color: #666;
    margin-bottom: 15px;
}

.lesson-link {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.lesson-link:hover {
    background: #2980b9;
}

/* Lesson content styles */
.lesson-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#markdown-content {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #eee;
}

#markdown-content h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2rem;
}

#markdown-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

#markdown-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

#markdown-content strong {
    color: #2c3e50;
}

#markdown-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

#markdown-content pre code {
    background: none;
    padding: 0;
    color: #495057;
    font-size: 0.875rem;
}

#markdown-content blockquote {
    background: #e8f4fd;
    border-left: 4px solid #3498db;
    margin: 20px 0;
    padding: 20px;
    border-radius: 0 6px 6px 0;
    font-style: italic;
}

#markdown-content blockquote p {
    margin-bottom: 10px;
}

#markdown-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Atomic Knowledge section styling */
.atomic-knowledge {
    background: #e8f4fd;
    border-left: 4px solid #3498db;
    margin: 20px 0;
    padding: 20px;
    border-radius: 0 6px 6px 0;
    font-style: normal;
}

.atomic-knowledge h1,
.atomic-knowledge h2 {
    margin-top: 0;
    color: #2c3e50;
}

/* Questions section styles */
.questions-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.question {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #e74c3c;
}

.question p {
    margin-bottom: 15px;
    font-weight: 500;
}

.question code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.question input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    transition: border-color 0.3s;
}

.question input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Question input container */
.question-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: stretch;
}

.question-input input[type="text"] {
    flex: 1;
    margin-bottom: 0;
}

/* Submit button styles */
.submit-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.submit-btn:hover {
    background: #219a52;
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Feedback message styles */
.feedback {
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 500;
    margin-top: 10px;
    display: none;
}

.feedback.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Complete section styles */
.complete-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    text-align: center;
}

.complete-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.complete-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
}

.complete-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .lesson-content {
        padding: 20px;
    }
    
    .question-input {
        flex-direction: column;
        gap: 10px;
    }
    
    .submit-btn {
        align-self: flex-start;
    }
}