/* ...existing code... */
html, body {
    height: 100%;
}
* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 20px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: #13d0ff;
    color: #111;

    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 12px;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Keep logo responsive */
#logo {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Make the player name input large and full width */
#name-input {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 4px;
    box-sizing: border-box;
    display: block;
}

/* Large full-width single-line text box (prominent on mobile) */
#name-input #player-name {
    width: 100%;
    display: block;
    padding: 0.85em 0.9em;
    font-size: clamp(18px, 5vw, 38px); /* same scale as question/answer text */
    line-height: 1.1;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff;
    color: #111;
    box-sizing: border-box;
    outline: none;

    text-align: center; /* center the name horizontally */
}

/* Submit button directly under the name input — styled like the main submit pill but static */
#name-input > button {
    width: 100%;
    margin-top: 12px;
    background: linear-gradient(180deg, #00c04b, #009a34);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: clamp(18px, 5vw, 38px); /* matches other large text */
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    cursor: pointer;
    padding: 0.7em 1.25em;
    min-height: 3.2em;
    box-sizing: border-box;
}

#question-container {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 12px;
    width: 100%;
    max-width: none;      /* allow full width on mobile */
    margin: 0;
    padding: 0 4px 12px;
    box-sizing: border-box;
}

/* The scrollable area containing question cards */
#questions-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px; /* avoid scrollbar overlap */
}

/* Question card */
.question-div {
    width: 100%;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 14px;
    margin: 10px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    display: block;
}

/* Question text (large, bold) */
.question-div .question-text {
    display: block;
    font-size: clamp(18px, 5vw, 38px);
    font-weight: 700;
    margin-bottom: 10px;
    color: #0b2545;
    line-height: 1.25;
}

/* Answer box */
.answer-box {
    width: 100%;
    min-height: 5.5em;
    padding: 10px 12px;
    font-size: clamp(18px, 5vw, 38px);
    line-height: 1.4;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    resize: vertical;
    background: #fff;
    color: #111;
    box-sizing: border-box;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* Submit button: now part of the grid (not fixed), full-width pill under the list */
#submit-button {
    width: 100%;
    background: linear-gradient(180deg, #00c04b, #009a34);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: clamp(18px, 5vw, 38px);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    cursor: pointer;
    padding: 0.7em 1.25em;
    min-height: 3.2em;
    box-sizing: border-box;
    align-self: end; /* ensure it sits at the bottom of its grid row */
}

#confirmation {
    /* layout */
    display: none; /* JS will set to 'flex' on success */
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;

    /* sizing: take up more of the screen and stay centered */
    width: 100%;
    max-width: 720px;       /* allow it to grow on larger screens */
    margin: 0 auto;         /* center horizontally when constrained */
    padding: 2rem 1rem;     /* roomy padding around content */
    box-sizing: border-box;

    /* center vertically by using a large min-height so content sits in middle of viewport */
    min-height: 60vh;
}

/* make the SVG large and responsive */
#confirmation svg {
    width: clamp(96px, 22vw, 240px);
    height: auto;
    flex-shrink: 0;
}

/* prominent confirmation text */
#confirmation #confirmation-text {
    margin: 0;
    font-size: clamp(20px, 7vw, 48px);
    font-weight: 800;
    color: #0b2545;
    text-align: center;
    line-height: 1.05;
}