:root {
    --primary: #2c3e50;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #34495e;
    --success: #27ae60;
    --warning: #f39c12;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: #f8f9fa;
}

header {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.hero {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.intro p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.highlight-box {
    background: white;
    border-left: 5px solid var(--accent);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.highlight-box h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.timeline-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.timeline-card .year {
    background: var(--accent);
    color: white;
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 1rem;
}

.timeline-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover {
    background: #c0392b;
}

.concepts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.concept {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.concept h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.map-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.map-placeholder {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.map-placeholder ul {
    text-align: left;
    max-width: 600px;
    margin: 1rem auto;
    list-style: none;
}

.map-placeholder li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.quiz-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.quiz-question {
    margin-bottom: 1.5rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.quiz-btn {
    padding: 0.8rem;
    border: 2px solid var(--primary);
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-btn:hover {
    background: var(--light);
}

.quiz-btn.correct {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.quiz-btn.incorrect {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.quiz-feedback {
    margin-top: 1rem;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 5px;
}

footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Timeline page styles */
.timeline-full {
    position: relative;
    padding: 2rem 0;
}

.timeline-full::before {
    content: '';
    position: absolute;
    left: 100px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-marker {
    width: 200px;
    text-align: right;
    padding-right: 2rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
    position: relative;
}

.timeline-marker::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px var(--accent);
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-left: 2rem;
}

.timeline-content h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border: none;
}

.timeline-tags {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.timeline-tags span {
    background: var(--light);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* Pioneers page styles */
.pioneers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.pioneer-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.pioneer-card:hover {
    transform: translateY(-5px);
}

.pioneer-header {
    background: var(--primary);
    color: white;
    padding: 1.5rem;
}

.pioneer-header h2 {
    margin: 0;
    border: none;
    font-size: 1.5rem;
}

.years {
    font-size: 0.9rem;
    opacity: 0.9;
}

.pioneer-body {
    padding: 1.5rem;
}

.pioneer-body p {
    margin-bottom: 1rem;
}

.quote {
    background: var(--light);
    padding: 1rem;
    border-left: 4px solid var(--accent);
    font-style: italic;
    margin-top: 1rem;
}

/* Instruments page styles */
.instruments-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.instrument-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.instrument-year {
    grid-column: 1 / -1;
    background: var(--accent);
    color: white;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
}

.instrument-card h2 {
    grid-column: 1 / -1;
    color: var(--primary);
    border: none;
    margin: 0;
}

.instrument-diagram {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.diagram-placeholder {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.instrument-desc h3 {
    color: var(--accent);
    margin: 1rem 0 0.5rem;
}

.instrument-desc ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.formula {
    background: var(--light);
    padding: 1rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    text-align: center;
    margin: 1rem 0;
}

/* Theory page styles */
.theory-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.theory-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
}

.theory-card.highlight {
    border-left: 5px solid var(--accent);
    background: #fff5f5;
}

.theory-era {
    background: var(--primary);
    color: white;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 1rem;
}

.theory-card h2 {
    color: var(--primary);
    border: none;
    margin-bottom: 1rem;
}

.theory-content h3 {
    color: var(--accent);
    margin: 1.5rem 0 0.5rem;
}

.theory-key {
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.theory-key h3 {
    margin-top: 0;
}

.theory-key ul {
    margin-left: 1.5rem;
}

.theory-diagram {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.diagram-step {
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.step-number {
    background: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 0.5rem;
}

.theory-formula {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.theory-formula .formula {
    text-align: center;
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
}

/* Quiz page styles */
.quiz-full {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    background: var(--light);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    background: var(--accent);
    height: 100%;
    width: 0;
    transition: width 0.3s;
}

.question-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.question-card h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-btn {
    padding: 1rem;
    border: 2px solid var(--primary);
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-align: left;
}

.option-btn:hover:not(:disabled) {
    background: var(--light);
}

.option-btn.correct {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.option-btn.incorrect {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

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

.quiz-result {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.quiz-result h2 {
    color: var(--primary);
    border: none;
}

.result-message {
    font-size: 1.2rem;
    margin: 1.5rem 0;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .timeline-grid {
        grid-template-columns: 1fr;
    }

    .timeline-full::before {
        left: 20px;
    }

    .timeline-marker {
        width: 60px;
        font-size: 1.2rem;
    }

    .timeline-content {
        margin-left: 1rem;
    }

    .instrument-card {
        grid-template-columns: 1fr;
    }

    .pioneers-grid {
        grid-template-columns: 1fr;
    }
}