/* GENERAL LAYOUT */
body {
    font-family: Arial, sans-serif;
    margin: 10px;
}

/* HEADER: title + progress horizontally, progress right-aligned */
#headerBar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

/* USER CONTROLS */
#userControls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

#username {
    width: 120px;
}

/* PROGRESS BAR CONTAINER */
#progressContainer {
    width: 45%;
}

/* PROGRESS BARS */
.progress-row {
    display: flex;
    align-items: center;
    margin: 4px 0;
    font-size: 12px;
}

.progress-label {
    width: 40px;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: #ddd;
    margin-left: 5px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
}

/* COLOR SCALE */
.w0 { background: #2ecc71; }  /* green */
.w1 { background: #27ae60; }
.w2 { background: #f1c40f; }  /* yellow */
.w3 { background: #e67e22; }
.w4 { background: #e74c3c; }  /* red */
.w5 { background: #c0392b; }

/* QUIZ CONTAINER */
#quizContainer {
    margin-top: 10px;
}

/* NAVIGATION BUTTONS */
#navigation button {
    font-size: 16px;
    padding: 10px 20px;
    margin: 5px;
}

/* ANSWERS */
#answers button {
    display: block;
    width: 100%;
    margin: 5px 0;
    padding: 12px;           /* increase padding for larger click area */
    font-size: 1.5em;        /* increase text size */
    text-align: left;        /* left-justify text */
    white-space: normal;     /* allow wrapping */
    word-wrap: break-word;   /* break long words if needed */
}

/* EXPLANATION */
#questionExplanation {
    margin-top: 10px;
    font-size: 14px;
}

/* MOBILE FRIENDLY */
@media (max-width: 600px) {
    #headerBar {
        flex-direction: column;
        align-items: flex-start;
    }
    #progressContainer {
        width: 100%;
        margin-top: 8px;
    }
    #userControls {
        flex-direction: column;
        align-items: flex-start;
    }
    #navigation button {
        width: 48%;
    }
}
