body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.quiz-container {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 700px;
}

header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 15px;
}

header h1 {
    color: #007bff;
    margin: 0 0 5px 0;
    font-size: 1.8em;
}

header h2 {
    color: #555;
    margin: 0;
    font-size: 1.1em;
    font-weight: normal;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    /* Allow wrapping for smaller screens */
}

.navigation-controls button,
.quiz-summary-controls button,
#reveal-answer,
.page-selector-container select {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.3s ease;
    margin: 5px;
}

.navigation-controls button:hover,
.quiz-summary-controls button:hover,
#reveal-answer:hover,
.page-selector-container select:hover {
    background-color: #0056b3;
}

.navigation-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#question-counter {
    font-weight: bold;
    color: #555;
    margin: 0 15px;
}

.page-selector-container {
    margin-top: 10px;
    /* Add some space if it wraps */
}

.page-selector-container label {
    margin-right: 5px;
    color: #555;
}

.page-selector-container select {
    padding: 8px 12px;
}


#question-area {
    background-color: #e9ecef;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#question-text {
    font-size: 1.1em;
    margin-bottom: 18px;
    line-height: 1.6;
    color: #212529;
}

#options-container button {
    display: block;
    width: 100%;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 12px;
    margin-bottom: 10px;
    text-align: left;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#options-container button:hover {
    background-color: #e2e6ea;
    border-color: #b8c0c8;
}

#options-container button.selected {
    background-color: #cce5ff;
    border-color: #007bff;
    font-weight: bold;
}

#options-container button.correct {
    background-color: #d4edda !important;
    /* Important to override other states */
    border-color: #28a745 !important;
    color: #155724 !important;
}

#options-container button.incorrect {
    background-color: #f8d7da !important;
    border-color: #dc3545 !important;
    color: #721c24 !important;
}

#feedback-area {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

#feedback-area.correct {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#feedback-area.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.quiz-summary-controls {
    text-align: center;
    margin-bottom: 20px;
}

#summary-area {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

#summary-area h3 {
    color: #007bff;
    margin-top: 0;
}

#summary-area ul {
    list-style-type: none;
    padding: 0;
}

#summary-area li {
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

#summary-area li:last-child {
    border-bottom: none;
}

#summary-area .summary-correct {
    color: green;
}

#summary-area .summary-incorrect {
    color: red;
}

#summary-area .summary-unanswered {
    color: orange;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .quiz-controls {
        flex-direction: column;
        align-items: stretch;
        /* Make children take full width */
    }

    .navigation-controls,
    .page-selector-container {
        width: 100%;
        display: flex;
        justify-content: space-between;
        /* Better for button layouts */
        margin-bottom: 10px;
    }

    .navigation-controls button {
        flex-grow: 1;
        /* Make buttons share space */
        margin: 0 2px;
    }

    #question-counter {
        text-align: center;
        width: auto;
        /* Adjust width */
        flex-grow: 2;
        /* Give it more space */
    }

    .page-selector-container select {
        flex-grow: 1;
    }

    header h1 {
        font-size: 1.5em;
    }

    header h2 {
        font-size: 1em;
    }
}