body {
    font-family: Arial, sans-serif;
    margin: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #c3c9cd;
}
     h1 {
    position:fixed;
    display:top;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 10vh;
    max-height: 10vh; /* toegevoegd */
    margin: 0;
    animation: scaleTitle 8s;
    z-index: 1;
    overflow:hidden; /* toegevoegd */
}
@keyframes scaleTitle {
    0% { font-size: 1.5rem; opacity: 1; }
    50% { font-size: 4rem; opacity: 0; }
    100% { font-size: 2rem; opacity: 1; }
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
}
.overlay img {
    max-width: 80%;
    max-height: 80%;
}
.overlay .close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}
/* Extra schaalbaarheid voor kleine schermen */
@media (max-width: 900px) {
    .slice {
        width: 10vmin;
        height: 10vmin;
        line-height: 10vmin;
        font-size: 4vmin;
    }
    @keyframes scaleTitle {
        0% { font-size: 0.5rem; opacity: 1; }
        50% { font-size: 2.5rem; opacity: 0; }
        100% { font-size: 1.2rem; opacity: 1; }
        } 
        .popup img {
            max-width:300px;
            height: auto; /* Hoogte past zich automatisch aan */
            max-height: 80vh; /* Beperkt de maximale hoogte */
            display: block; /* Voorkomt extra ruimte rondom */
            margin: auto; /* Centreert de afbeelding */
        }
}

    .bottom-container {
        position:absolute;
        bottom: 20px; /* Afstand vanaf de onderkant */
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
    }
    .home-link {
        margin-bottom: 10px; /* Ruimte tussen HOME en de footer */
    }
    .home-link a {
        font-size: 1.5rem;
        font-weight: bold;
        color: #3b404d;
        text-decoration: none;
    }
    .home-link a:hover {
        text-decoration: underline;
    }
    footer {
        font-size: 0.7rem;
        color: #363434;
    }
    .home-link a {
        font-size: 1.5rem;
        font-weight: bold;
        color: #3b404d;
        text-decoration: none;
    } 
    .home-link a:hover {
        text-decoration: underline;
    }


    .puzzle-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px; /* Ruimte tussen puzzel en knop */
    }
    .puzzle-container {
        display: grid;
        background-color: antiquewhite;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 2%;
        
        width: 75vmin; /* Grotere container */
        height: 75vmin;
        max-width: 90vw;
        max-height: 90vh;
        
        padding: 4%; /* Extra ruimte aan alle kanten */
        border-radius: 20px; /* Mooie afgeronde hoeken */
        box-shadow: 10px 20px 30px rgba(101, 107, 109, 0.9);
        box-sizing: border-box;
        position: relative;
    }
            .tile {
                background-color: #3498db;
                color: white;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 5vmin;
                font-weight: bold;
                cursor: pointer;
                border-radius: 20px;
                box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.6);
                background-size: cover;
                background-position: center;
            }
            .empty {
                background-color: #bbb; /* Grijze kleur bij start */
            }
            .popup {
                display: none;
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 98%;
                height: 98%;
                background: white;
                box-shadow: 8px 3px 30px rgba(0, 0, 0, 10);
                z-index: 1000;
                border-radius: 10px;
                overflow: hidden;
            }
            
            .popup-content {
                width: 100%;
                height: 100%;
                display: flex;
                flex-direction: column;
            }
            .popup img {
                
                height: auto; /* Hoogte past zich automatisch aan */
                max-height: 80vh; /* Beperkt de maximale hoogte */
                display: block; /* Voorkomt extra ruimte rondom */
                margin: auto; /* Centreert de afbeelding */
            }
            
            
            
            .close {
                padding: 10px;
                background: rgb(119, 120, 122);
                color: white;
                border: none;
                cursor: pointer;
                width: 100%;
                text-align: center;
                font-size: 1rem;
            }
            
            .overlay {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.1);
                z-index: 999;
            }
            .shuffle-btn {
                margin-top: 20px;
                padding: 10px 40px;
                font-size: 1rem;
                cursor: pointer;
                background: #3498db;
                color: white;
                border: none;
                border-radius: 5px;
                box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
            }

  

