#tooltip.fulfilled-bg {
    background-image: url('./images/Desire_fulfilled_128x128px.jpg');
    background-size: cover;
    background-position: center;
    color: #d32f2f;
    border: 2px solid #d32f2f;
    font-size: 0.87em;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tooltip.green-bg {
    background-image: url('./images/aambeeld.jpg');
    /* Vervang met het juiste pad naar jouw afbeelding */
    background-size: cover;
    background-position: center;
    color: #fff;
    border: 2px solid #388e3c;
}

#tooltip {
    position: absolute;
    pointer-events: none;
    width: 128px;
    height: 128px;
    background: rgba(40, 40, 40, 0.97);
    color: #ffe48a;
    border-radius: 18px;
    padding: 0;
    font-size: 0.87em;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    z-index: 200;
    border: 2px solid #ffea00;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s;
    background-size: cover;
    background-position: center;
}

#tooltip.green-bg {
    background-image: url('./images/Do_128x128px.jpg');
    color: #fff;
    border-color: #388e3c;
}

#tooltip.yellow-bg {
    background-image: url('./images/Interaction_128x128px.jpg');
    color: #fff;
    border-color: #fbc02d;
}

#tooltip.red-bg {
    background-image: url('./images/Recover_128x128px.jpg');
    color: #fff;
    border-color: #d32f2f;
}

#tooltip.blue-bg {
    background-image: url('./images/Learn_128x128px.jpg');
    color: #fff;
    border-color: #1976d2;
}

#tooltip.orange-bg {
    background-image: url('./images/Think_128x128px.jpg');
    color: #fff;
    border-color: #f57c00;
}

#tooltip.purple-bg {
    background-image: url('./images/Experience_128x128px.jpg');
    color: #fff;
    border-color: #7b1fa2;
}

#tooltip.white-bg {
    background-image: url('./images/Desire_128x128px.jpg');
    color: #fff;
    border-color: #fff;
}

#tooltip span {
    /*   background: rgba(0,0,0,0.85);*/
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    display: block;
    text-align: center;
    margin: 0 auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.85), 0 0 2px #000;
}

body {
    font-family: Arial, sans-serif;
    color: white;
    text-align: center;
    background: #111 url('./images/Bord_leeg_repeat.jpg') repeat center center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#game-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
}

h1 {
    margin-top: 0;
    margin-bottom: 10px;
    /*   display: none !important; /* Voeg deze regel toe */
}

label[for="white"],
label[for="coloured"] {
    display: none !important;
}

#hud {
    text-align: center;
    padding: 8px 0;
    margin-bottom: 5px;
}

#score {
    display: inline-block;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 8px;
    margin-right: 12px;
    margin-bottom: 12px;
    /* Voeg deze regel toe voor extra ruimte onder 'Punten:' */
    display: none !important
}

#next {
    display: inline-block;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 8px;
    color: #ffea00;
    display: none !important;
    /* Voeg deze regel toe */
}

#next-hex {
    display: block;
    margin-bottom: 18px;
    /* Pas dit getal aan voor meer/minder ruimte */
}

/* bovenin de volgende fiche onzichtbaar gemaakt */
#next-hex-wrap {
    display: none !important;
}

#message {
    margin-top: 6px;
    font-weight: bold;
    color: #ffe48a;
    min-height: 22px;
}

#boardWrap {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

#board {
    width: 100%;
    height: auto;
    aspect-ratio: 900 / 760;
    display: block;
    background: transparent;
}

polygon {
    cursor: pointer;
    transition: fill .18s ease;
    stroke: white;
    stroke-width: 2;
}

#controls {
    margin-top: 5px;
}

#pass-button {
    font-size: 2em;
    font-weight: bold;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

#pass-button:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.4);
}

#pass-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#card.gameover-win {
    /* Background wordt dynamisch ingesteld in JavaScript op basis van punten */
}

#card.gameover-lost {
    background: url('./images/game_over_lost.jpg') center center / cover no-repeat !important;
}

#card.pass-bg {
/*    background: url('./images/pass_bg.jpg') center center / cover no-repeat !important;*/
    background: none !important;    
}


#message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #ffe48a;
    min-height: 22px;
    background: transparent;
    padding: 0;
    border-radius: 12px;
    font-size: 1.1em;
    z-index: 50;
    pointer-events: none;
    box-shadow: none;
    border: none;
    transition: background 0.3s, padding 0.3s, box-shadow 0.3s, border 0.3s;
}

#message.active {
    background: #000;
    /* 100% zwart in plaats van rgba(0, 0, 0, 0.75) */
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 3px solid #1976d2;
    /* Blauwe rand (zelfde kleur als timer-cirkel) */
    border-radius: 12px;
    /* Afgeronde hoeken */
}


#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 25px;
    /* Was 50px, nu 25px (25px lager) */
    z-index: 100;
    transition: opacity 0.3s ease;
}

#modal.hidden {
    display: none;
    opacity: 0;
}

/*#card {
    position: relative;
    background-color: #333;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    border: 3px solid #666;
    display: flex;
    flex-direction: column;
    overflow: hidden;
 /*   width: 50vw;
    height: 75vh;
    max-width: 800px;
    max-height: 900px;*/
/*width: 90vw;
    height: 90vh;
    max-width: none;
    max-height: none;
     /*   align-items: center;*/
/* verticaal centreren */
/*justify-content: flex-start;
    min-height: 540px; /* was 700px naar 600px of de gewenste hoogte van je popup */
/* bestaande achtergrond en border-radius mag blijven */
/*}*/

/*#card {
    position: relative;
    background-color: #333;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    border: 3px solid #666;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /*   width: 90vw; /* Was 90vw, nu 450px */
   /* width: 400px;
    /* Verlaagd naar 400px */
    /* height: 90vh;*/
    /*height: 600px;
    /* Verhoogd naar 600px */
    /*max-width: none;
    max-height: none;
    justify-content: flex-start;
    min-height: 540px;
}*/
#card {
    position: relative;
    background-color: transparent; /* Was #333 */
    border-radius: 20px;
    box-shadow: none; /* Was 0 10px 30px rgba(0, 0, 0, 0.7) */
    border: none; /* Was 3px solid #666 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 400px;
    height: 600px;
    max-width: none;
    max-height: none;
    justify-content: flex-start;
    min-height: 540px;
}

/* vierkante variant voor eindspel-popups */
#card.square-popup {
    /* gebruik expliciete breedte/hoogte voor groot scherm */
    width: 600px !important;
    height: 600px !important;
    /* optioneel: we kunnen ook een aspect-ratio gebruiken:
       aspect-ratio: 1 / 1;
       height: auto;
    */
}

@media (max-width: 600px) {
    #card.square-popup {
        width: 90vw !important;
        height: 90vw !important;
        max-height: 90vw !important;
    }
}

#card-iframe {
    width: 100%;
    height: 600px !important;
    /* Verhoog de hoogte naar 700px -> 600px */
    border: none;
    margin-bottom: 10px;
    aspect-ratio: 2 / 3;
    /* Voor een rechtopstaand formaat (bijv. 2 breed bij 3 hoog) */
    /* toegevoegd tbv vert centreren: */
    display: block;
    margin: 0 auto;
    max-width: 98%;
    border-radius: 24px !important;
    /* had geen effect, was 10px, nu 24px voor rondere hoeken, pas aan in game.js */
    background: #fff;
}

#modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #d32f2f;
    color: #fff;
    border: none;
    font-size: 2em;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    /* Heel hoog zodat het over iframe heen zweeft */
}

#modal-close:hover {
    background: #b71c1c;
}



/* oude Start-button onzichtbaar maken */
#start-game-btn {
    display: none !important;
}

/* oude Pauze-button onzichtbaar maken */
#pause-btn {
    display: none !important;
}

/* verberg oude timer */
#timer {
    display: none !important;
}

#game-footer {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

#game-footer h2 {
    margin: 0;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffe48a;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 12px;
    border: 2px solid #ffea00;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}


@media (max-width: 600px) {
    body {
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    #game-container {
        width: 100vw;
        height: 100vh;
        padding: 0;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #boardWrap {
        width: 100vw;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    #board {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        display: block;
    }

    /* MESSAGE STYLING */
    #message {
        font-size: 0.95em;
        padding: 10px 20px;
        top: 45%;
        z-index: 9999;
    }

    /* TOOLTIP UITZETTEN */
    #tooltip {
        display: none !important;
    }

    .card:hover #tooltip,
    [data-tooltip]:hover::after {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    /* GAME FOOTER */
    #game-footer h2 {
        font-size: 1em;
        padding: 6px 16px;
    }

    /* MODAL AANPASSINGEN */
    #modal {
        padding: 10px;
        /* Was: padding: 60px 10px 20px 10px; */
    }

    /*#card {
        width: 95vw;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding: 10px;
        padding-top: 48px;
    } */
    /*#card {
        width: 400px;
        height: 600px;
        max-width: 95vw;
        /* Zodat het niet buiten scherm valt op smalle devices */
    /*    max-height: calc(100vh - 100px);
        /* Zodat het niet buiten scherm valt */
    /*   overflow-y: auto;
        padding: 10px;
        padding-top: 48px;
    }*/

    #card {
        width: 340px; /* Was 400px, nu 340px voor mobiel */
        height: 600px;
        max-width: 90vw;
        /* Was 95vw, nu 90vw */
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding: 10px;
        padding-top: 48px;
        margin: 0 auto;
        /* Voeg toe om te centreren */
    }

    /* mobiele override voor vierkante popups */
    #card.square-popup {
        width: 90vw !important;
        height: 90vw !important;
        max-height: 90vw !important;
    }

    /* MODAL CLOSE BUTTON */
    #modal-close,
    #modal #modal-close,
    #card #modal-close {
        top: 28px;
        /* Was 8px, nu 28px (20px lager) */
        right: 8px;
        font-size: 1.8em;
        width: 44px !important;
        height: 44px !important;
        padding: 0;
        min-width: unset !important;
        max-width: 48px;
        position: fixed;
        z-index: 10000;
    }

    /* IFRAME */
    #card-iframe {
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

/* opvallende styling voor resterende punten in gameover/winst melding */
.score-highlight {
    display: inline-block;
    background: linear-gradient(90deg, #ffea00, #ffd54f);
    color: #222;
    font-weight: 900;
    font-size: 1.35em;
    padding: 4px 10px;
    border-radius: 8px;
    margin-left: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.28), 0 0 8px rgba(255,234,0,0.25) inset;
    text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}