.container {
    max-width: 900px;
    padding: 20px;
    background-color: rgba(255,255,255, 0.5);
    border-radius: 30px;
}

.game-board-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#puzzle-board {
    position: relative;
    background-color: #eee;
    border: 2px solid #333;
    /* Width will be set dynamically via JS */
    /* Height will be set dynamically via JS */
    overflow: hidden;
}

.tile {
    position: absolute;
    border: 1px solid #222;
    box-sizing: border-box;
    cursor: pointer;
    transition: left 0.2s ease, top 0.2s ease;
    background-repeat: no-repeat;
    /* Background size and position set dynamically via JS */
}

.tile.empty {
    background-image: none !important;
    background-color: #222;
    cursor: default;
    border: none;
}

.tile.correct {
    /* Optional: add a subtle indicator if the tile is in the correct spot */
    /* border-color: #4CAF50; */
}

.tile.locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(76, 175, 80, 0.4); /* Greenish tint */
    pointer-events: none;
}

/* Increased button and select size for mobile */
.controls button, .controls select {
    font-size: 24px !important;
    padding: 15px 30px !important;
    margin: 5px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    color: #333;
}
.controls select {
    cursor: pointer;
}

.scoreboard {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.85);
    padding: 10px;
    border-radius: 14px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#puzzle-caption {
    font-style: italic;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
    font-size: 1.1rem;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.mode-btn {
    display: block;
    width: 100%;
    margin: 15px 0;
    padding: 15px;
    font-size: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mode-btn:hover {
    background-color: #45a049;
}

.tile.jigsaw-dragging {
    z-index: 100;
    opacity: 0.8;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    transition: none !important; /* Disable transition while dragging */
}
