* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #2c3e50;
    color: white;
    border-radius: 8px;
}

header h1 {
    margin: 0 0 10px 0;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header p {
    margin: 0;
    opacity: 0.9;
}

nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

nav a {
    padding: 10px 16px;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    transition: all 0.2s;
}

nav a:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

nav a.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.intro, .content-page {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-page h2 {
    margin-top: 0;
    color: #2c3e50;
}

.content-page h3 {
    color: #2c3e50;
    margin-top: 24px;
}

.content-page ul,
.intro ul {
    padding-left: 20px;
}

.content-page li,
.intro li {
    margin-bottom: 8px;
}

.intro a {
    color: #007bff;
}

.intro a:hover {
    text-decoration: none;
}

.content-page a {
    color: #007bff;
}

.content-page a:hover {
    text-decoration: none;
}

.quiz-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.question {
    margin-bottom: 20px;
}

.question h3 {
    margin-top: 0;
}

.question img {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 10px 0;
    border-radius: 4px;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer {
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.answer:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.answer.selected {
    border-color: #007bff;
    background: #e7f1ff;
}

.answer.correct {
    border-color: #28a745;
    background: #d4edda;
}

.answer.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
}

.progress {
    margin-bottom: 20px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 8px;
    text-align: center;
}

.progress-bar {
    height: 10px;
    background: #dee2e6;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007bff;
    transition: width 0.3s;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.results {
    text-align: center;
    padding: 40px 20px;
}

.results h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.results.passed h2 {
    color: #28a745;
}

.results.failed h2 {
    color: #dc3545;
}

.score {
    font-size: 3em;
    font-weight: bold;
    margin: 20px 0;
}

.hidden {
    display: none;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 20px;
}

footer {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 30px;
    border-top: 1px solid #dee2e6;
}

footer a {
    color: #6c757d;
    text-decoration: none;
    margin: 0 8px;
}

footer a:hover {
    color: #007bff;
}

footer .footer-links {
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    nav {
        flex-direction: column;
    }

    nav a {
        text-align: center;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .question img {
        max-width: 100%;
    }
}
