:root {
    --primary-color: #005f73; /* Deep Teal */
    --secondary-color: #0a9396; /* Teal */
    --accent-color: #94d2bd; /* Pale Cyan */
    --light-color: #e9d8a6; /* Pale Yellow/Sand */
    --text-color: #001219; /* Dark Blue/Black */
    --background-color: #f0f8ff; /* Alice Blue, very light */
    --correct-color: #2a9d8f;
    --incorrect-color: #e76f51;
    --white: #ffffff;
    --gray: #f0f0f0;
    --medium-gray: #cccccc;
    --dark-gray: #333333;

    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
}

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

body {
    font-family: var(--font-secondary);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top for scroll */
    min-height: 100vh;
    padding: 20px;
    background-image: url('background_wave_pattern.png');
    background-repeat: repeat;
    background-attachment: fixed;
}

#quiz-app {
    width: 100%;
    max-width: 800px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px 30px;
    text-align: center;
    border-bottom: 4px solid var(--accent-color);
}

header h1 {
    font-family: var(--font-primary);
    font-size: 1.8em;
    margin: 0;
}

main#quiz-container {
    padding: 30px;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.screen.active {
    display: flex;
}

#start-screen h2, #end-screen h2 {
    color: var(--primary-color);
    font-family: var(--font-primary);
    margin-bottom: 15px;
    font-size: 1.8em;
}

#start-screen p, #end-screen p {
    margin-bottom: 25px;
    font-size: 1.1em;
    color: var(--dark-gray);
    max-width: 90%;
}

.quiz-button {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    font-family: var(--font-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.quiz-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.quiz-button:disabled {
    background-color: var(--medium-gray);
    cursor: not-allowed;
}

#progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: var(--gray);
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--accent-color);
    transition: width 0.3s ease-in-out;
}

#question-counter {
    font-size: 0.9em;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

#question-area {
    width: 100%;
    margin-bottom: 20px;
    text-align: left;
}

#question-text {
    font-size: 1.4em;
    font-family: var(--font-primary);
    color: var(--primary-color);
    margin-bottom: 25px;
    line-height: 1.4;
}

#options-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 10px;
}

#options-list li {
    background-color: var(--white);
    border: 2px solid var(--accent-color);
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-size: 1.05em;
}

#options-list li:hover {
    background-color: var(--light-color);
    border-color: var(--secondary-color);
}

#options-list li.selected {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: bold;
}

#options-list li.correct {
    background-color: var(--correct-color);
    color: var(--white);
    border-color: var(--correct-color);
}

#options-list li.incorrect {
    background-color: var(--incorrect-color);
    color: var(--white);
    border-color: var(--incorrect-color);
}

#options-list li.disabled {
    pointer-events: none;
    opacity: 0.7;
}

#feedback-area {
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
    min-height: 25px; /* Reserve space */
}

#feedback-area.correct {
    color: var(--correct-color);
}

#feedback-area.incorrect {
    color: var(--incorrect-color);
}

#score-text {
    font-size: 1.5em;
    font-family: var(--font-primary);
    color: var(--primary-color);
}

#summary-area {
    margin-top: 15px;
    margin-bottom: 25px;
    width: 100%;
    text-align: left;
}
.summary-question {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    background-color: #f9f9f9;
    border-left: 4px solid;
}
.summary-question.correct {
    border-left-color: var(--correct-color);
}
.summary-question.incorrect {
    border-left-color: var(--incorrect-color);
}
.summary-question p { font-size: 0.9em; margin: 0 0 5px 0; }
.summary-question strong { font-size: 0.8em; }


footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    color: var(--dark-gray);
    background-color: var(--gray);
    border-top: 1px solid var(--medium-gray);
}

/* Responsive adjustments */
@media (min-width: 600px) {
    #options-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* More flexible grid for larger screens */
    }
    header h1 {
        font-size: 2.2em;
    }
    #question-text {
        font-size: 1.6em;
    }
}

