.game-container {
     text-align: center;
}


.puzzle-board {
    display: grid;
    /* Grid columns/rows will be set by JS based on gridSize */
    gap: 5px; /* Gap between tiles */
    width: 400px; /* Fixed width for the puzzle area */
    height: 400px; /* Fixed height for the puzzle area */
    margin: 20px auto;
    border: 2px solid #ccc;
    background-color: #eee;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}


.message-area {
    margin-top: 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: #28a745; /* Green for success */
}

.message-area.error {
    color: #dc3545; /* Red for errors */
}


.preview-area {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.preview-area h3 {
    color: #6c757d;
    margin-bottom: 15px;
}
#image-preview {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    
    display: block;
    margin: 0 auto; /* centers the image */
}


.puzzle-tile {
    width: 100%;
    height: 100%;
    background-size: cover; 
    background-position: center;
    cursor: pointer;
    border: 1px solid #ddd;
    box-sizing: border-box;
    transition: transform 0.1s ease-out; 
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    border-radius: 3px;
}

.puzzle-tile.empty {
    background-color: #ccc;
    background-image: none;
    cursor: default;
}




















/* Responsive adjustments */
@media (max-width: 600px) {
    .puzzle-board {
        width: 300px;
        height: 300px;
    }
}