@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
    --primary-color: #3498db;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --background-color: #f7f9fc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--dark-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#quiz-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

#score-counter {
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

#score-counter:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.progress-container {
    width: 80%;
    max-width: 400px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
}

#quiz-context {
    width: 90%;
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    font-size: 1rem;
    line-height: 1.8;
}

#quiz-container {
    width: 90%;
    max-width: 800px;
    margin: 1.5rem auto 2rem;
    padding: 1rem;
}

.question {
    background: white;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.question:hover {
    transform: translateY(-5px);
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.option {
    background-color: var(--light-color);
    border: 2px solid transparent;
    border-radius: 5px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.option:hover:not([disabled]) {
    background-color: #dce4e8;
    border-color: var(--primary-color);
}

.option.correct {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.option.wrong {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.option[disabled] {
    cursor: not-allowed;
    opacity: 0.8;
}

.explanation {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.6;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease;
}

.results-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.results-content h2 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.final-score {
    margin: 1.5rem 0;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.score-percentage {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-left: 0.5rem;
}

.results-message {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.restart-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.restart-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* General Link Styling */
a {
    color: #0d6efd !important;
    text-decoration: none; 
    transition: color 0.2s ease-in-out, text-decoration 0.2s ease-in-out;
}

a:hover {
    color: #0a58ca !important;
    text-decoration: underline;
}

/* Specific styling for the context link to remove bolding from href */
#quiz-context a {
    font-weight: bold;
}

/* Responsiveness */
@media (min-width: 576px) {
    .options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    #quiz-title {
        font-size: 2.5rem;
    }
    
    #score-counter {
        font-size: 1.2rem;
        padding: 1rem 2rem;
    }
    
    .results-content {
        padding: 3rem;
        max-width: 500px;
    }
}

@media (max-width: 480px) {
    #quiz-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    #score-counter {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }
    
    .progress-container {
        width: 90%;
    }
    
    .results-content {
        padding: 1.5rem;
    }
    
    .score-number {
        font-size: 2rem;
    }
}

html {
    scroll-behavior: smooth;
} 