:root {
    --ebx: #01689B;
    --ebx-d: #014b73;
    --ring: #cbd5e1;

    /* Houd card-padding centraal zodat header/footer exact kunnen "doortrekken" */
    --card-pad-y: 22px;
    --card-pad-x: 26px;
}

/* =========================
   PAGE2 ONLY
   ========================= */

/* CARD (basis) */
#page2 .card {
    background: #fff;
    border: 3px solid var(--ebx);
    border-radius: 16px;
    padding: unset;

    position: relative;
    overflow: hidden;

    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    max-width: 700px;
    width: clamp(360px, 84vw, 690px);

    display: flex;
    flex-direction: column;
}

#page2 .card.zin-card {
    max-width: 840px !important;
    width: clamp(340px, 90vw, 840px);
}

/* =========================
   HEADER (titelbalk)
   ========================= */
#page2 .card .modal-header {
    padding: 12px 16px;
    background: var(--ebx);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;

    border-radius: 13px 13px 0 0;
    box-sizing: border-box;

    height: 46px;
    line-height: 22px;

    /* ruimte voor links Abc en rechts X */
    padding-left: 62px;
    padding-right: 62px;
}

#page2 .modal-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-align: center;
    margin: 0;
    width: 100%;
}

/* Abc knop links in de titelbalk */
#page2 .card .modal-header #btnSpell.abc-btn2 {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;

    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;

    background: transparent;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    line-height: 1;
}

#page2 .card .modal-header #btnSpell .abc-badge {
    width: 28px;
    height: 22px;
    border: 1px solid #fff;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: #fff;
    font: 700 10px system-ui, -apple-system, Segoe UI, Roboto, Arial;
    letter-spacing: .6px;
    background: transparent;
}

/* Wit X rechts in de titelbalk */
#page2 .modal-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);

    background: none;
    border: none;
    color: #fff;

    font-size: 12px;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;
    opacity: 0.9;
    z-index: 200;
    transition: opacity 0.2s ease;
}

#page2 .modal-close:hover {
    opacity: 1;
}

/* =========================
   BODY INHOUD
   ========================= */
#page2 .modal-body {
    padding: 0 16px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
}

#page2 .champion-title {
    font-size: 44px;
    color: var(--ebx);
    margin: 6px 0 10px 0;
    text-align: center;
}

#page2 #woord {
    font-size: clamp(64px, 14vw, 132px);
    font-weight: 800;
    margin: 10px 0 4px 0;
    line-height: 1.05;
    letter-spacing: 1px;
    text-align: center;
}

#page2 .subline {
    color: #475569;
    margin-bottom: 6px;
    text-align: center;
}

/* =========================
   FOOTER (2 rijen)
   Rij 1: knoppen (grijs/blauw subtiel)
   Rij 2: hint (wit, alleen desktop)
   ========================= */
#page2 .modal-footer {
    display: block;
    padding: 0;
    border-top: 1px solid #e2e8f0;
}

/* Rij 1: knoppen */
#page2 .footer-row--buttons {
    background: rgba(1, 104, 155, 0.06);
    padding: 0;
    display: flex;
    justify-content: center;
}

/* Rij 2: hint (wit) — standaard uit */
#page2 .footer-row--hint {
    background: #fff;
    padding: 3px 12px 6px 12px;
    display: none;
}

/* Alleen desktops/laptops: toon hint-rij */
@media (hover: hover) and (pointer: fine) {
    #page2 .footer-row--hint {
        display: block;
    }
}

/* Extra safety: touch devices (iPad/iPhone/telefoon) altijd uit */
@media (pointer: coarse) {
    #page2 .footer-row--hint {
        display: none;
    }
}

/* Knoppen layout: dicht bij elkaar, niet breder */
#page2 .answers {
    width: 100%;
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: center;
    gap: 40px;
    /* dichter bij elkaar */
    padding: 6px 14px;
    margin: 0;
    box-sizing: border-box;
}

/* Basis knopstijl */
#page2 .btn {
    font-size: 14px;
    padding: 8px 18px;
    border-radius: 8px;
    background-color: var(--ebx);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color .15s ease;
    user-select: none;
    font-weight: bold;
    box-shadow: none;
}

/* Geen marges in footer */
#page2 .answers .btn {
    margin: 0;
}

#page2 .btn:hover {
    background-color: var(--ebx-d);
}

#page2 .btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

/* Antwoordknoppen (vaste breedte, dus niet breder worden) */
#page2 .btn-antwoord {
    height: 64px;
    min-height: 64px;
    border-radius: 14px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 34px;
    min-width: 235px;
    color: #fff;
}

/* Groen / Rood */
#page2 #btnJuist.btn-antwoord {
    background: #16a34a;
}

#page2 #btnJuist.btn-antwoord:hover {
    background: #15803d;
}

#page2 #btnOnjuist.btn-antwoord {
    background: #dc2626;
}

#page2 #btnOnjuist.btn-antwoord:hover {
    background: #b91c1c;
}

/* Hint compact */
#page2 .kb-hint {
    margin: 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.1;
    color: #334155;
    background: #f2f6f9;
    padding-bottom: 4px;
}

#page2 .kb-hint kbd {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

/* =========================
   MOBIEL
   ========================= */
@media (max-width: 500px) {
    #page2 .modal-title {
        font-size: 14px;
    }

    #page2 .modal-close {
        right: 8px;
        font-size: 12px;
    }

    #page2 .modal-header #btnSpell.abc-btn2 {
        width: 40px;
        height: 40px;
        left: 10px;
    }

    #page2 .modal-header #btnSpell .abc-badge {
        width: 26px;
        height: 20px;
        font-size: 10px;
    }

    #page2 .btn-antwoord {
        width: 45px;
        height: 46px;
        min-height: 40px;
        font-size: 18px;
        min-width: min(35vw, 130px);
    }

    #page2 .answers {
        gap: 40px;
        padding: 10px 10px;
    }

    #page2 .kb-hint {
        display: none;
    }
}

@media (min-width: 500px) and (max-width: 820px) {
    #page2 .modal-title {
        font-size: 16px;
    }

    #page2 .modal-close {
        right: 8px;
        font-size: 12px;

    background: var(--ebx) !important;
        color: white !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 8px !important;
        font-size: 20px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-weight: normal !important;
        top: 4px !important;
        right: 2px !important;
    
        position: absolute !important;

    }

        #page2 .modal-close:hover {
            opacity: 1;
        }

    #page2 .modal-header #btnSpell.abc-btn2 {
        width: 40px;
        height: 40px;
        left: 10px;
    }

    #page2 .modal-header #btnSpell .abc-badge {
        width: 26px;
        height: 20px;
        font-size: 10px;
    }

    #page2 .btn-antwoord {
        width: 45px;
        height: 46px;
        min-height: 40px;
        font-size: 20px;
        min-width: min(35vw, 175px);
    }

    #page2 .answers {
        gap: 20px;
        padding: 10px 10px;
    }

    #page2 .kb-hint {
        display: none;
    }
}

/* =========================
   iPAD / tablets (custom sectie)
   ========================= */
@media (hover: none) and (pointer: coarse) and (min-width: 700px) and (max-width: 1024px) {

    #page2 .answers {
        gap: 40px;
        padding: 10px 12px;
    }

    #page2 .btn-antwoord {
        width: 230px;
        height: 60px;
        min-height: 60px;
        font-size: 32px;
        min-width: min(35vw, 220px);
    }

    #page2 .modal-header #btnSpell.abc-btn2 {
        width: 44px;
        height: 44px;
    }

    /* hint nooit op touch (dus ook iPad) */
    #page2 .kb-hint {
        display: none;
    }
}

#page2 #btnJuist.btn-antwoord,
#page2 #btnOnjuist.btn-antwoord {
    background: var(--ebx);
}

#page2 #btnJuist.btn-antwoord:hover,
#page2 #btnOnjuist.btn-antwoord:hover {
    background: var(--ebx-d);
}