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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --background: #f8f9fa;
    --card-bg: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

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

/* Navigation */
.navbar {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

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

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

.nav-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--secondary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.section.active {
    display: block;
}

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

.section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

/* Cards */
.content-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.key-point {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.key-point h3 {
    margin-bottom: 0.5rem;
}

/* History Timeline */
.history-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.timeline {
    margin-top: 1.5rem;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--secondary-color);
}

.year {
    font-weight: bold;
    color: var(--secondary-color);
    min-width: 100px;
    font-size: 1.1rem;
}

/* Question Types */
.question-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.type-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

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

/* Scoring */
.scoring-explanation {
    margin-top: 1rem;
}

.scoring-explanation ul {
    margin: 1rem 0 1.5rem 2rem;
}

.scoring-explanation li {
    margin-bottom: 0.5rem;
}

.bell-curve-container {
    margin: 2rem 0;
    text-align: center;
}

#bellCurve {
    max-width: 100%;
    height: 300px;
}

.score-ranges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.range-item {
    padding: 0.75rem 1rem;
    border-radius: 5px;
    background: var(--background);
    border-left: 4px solid var(--secondary-color);
    font-weight: 500;
    transition: background 0.3s;
}

.range-item:hover {
    background: #e8f4f8;
}

/* Warning Card */
.warning-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.warning-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* Bias Grid */
.bias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.bias-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--accent-color);
    transition: transform 0.3s;
}

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

.bias-card h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.example {
    background: var(--background);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* Not Measured Grid */
.not-measured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.not-measured-item {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    transition: transform 0.3s;
}

.not-measured-item:hover {
    transform: scale(1.05);
}

/* Use Cases */
.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.use-case {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.use-case.good {
    border-left: 6px solid var(--success-color);
}

.use-case.bad {
    border-left: 6px solid var(--accent-color);
}

.use-case h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.use-case ul {
    margin-left: 1.5rem;
}

.use-case li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.important-note {
    background: var(--background);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1.5rem;
    font-style: italic;
}

/* Best Practices */
.best-practices {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.practice-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

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

.practice-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Quiz */
.quiz-intro {
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-light);
}

.quiz-container {
    margin-top: 2rem;
}

.quiz-question {
    display: none;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.quiz-question.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

.quiz-question h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.pattern-sequence {
    font-size: 1.5rem;
    text-align: center;
    padding: 2rem;
    background: var(--background);
    border-radius: 8px;
    margin: 1.5rem 0;
    font-weight: bold;
}

.spatial-pattern {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.shape-grid {
    display: flex;
    gap: 1rem;
}

.shape {
    width: 60px;
    height: 60px;
}

.shape.circle {
    background: var(--secondary-color);
    border-radius: 50%;
}

.shape.square {
    background: var(--accent-color);
}

.shape.triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 60px solid var(--success-color);
}

.shape.missing {
    border: 3px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-light);
}

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

.option {
    padding: 1rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.option:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

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

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

.option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.feedback.show {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

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

.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.nav-btn {
    padding: 0.75rem 2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.nav-btn:hover:not(:disabled) {
    background: #2980b9;
}

.nav-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

#questionCounter {
    font-weight: 600;
    color: var(--text-dark);
}

.quiz-reflection {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-top: 2rem;
    border-left: 4px solid var(--warning-color);
}

.quiz-reflection h3 {
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.quiz-reflection ul {
    margin-left: 1.5rem;
}

.quiz-reflection li {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

/* Conclusion */
.conclusion-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 2rem;
    border-radius: 15px;
    margin-top: 3rem;
    color: white;
}

.conclusion-section h2 {
    color: white;
    border-bottom-color: white;
    text-align: center;
}

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

.takeaway-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s;
}

.takeaway-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

.takeaway-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .use-cases {
        grid-template-columns: 1fr;
    }

    .question-types {
        grid-template-columns: 1fr;
    }

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

    .shape-grid {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .content-card {
        padding: 1.5rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .quiz-options {
        grid-template-columns: 1fr;
    }
}
