/* === Puzzle Modal (játékos overlay) === */
.modal.game-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    overflow: auto;
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 12px;
    width: 360px;
    max-width: 92%;
    position: relative;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

/* === Bezáró gomb === */
.close-button {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 1.5rem;
    color: #444;
    cursor: pointer;
}

/* === Tartalom konténer === */
.puzzle-container {
    padding-top: 10px;
    background-color: white;
}

/* === Puzzle tábla (3x3) === */
#puzzle-board {
    display: flex;
    flex-wrap: wrap;
    margin: 20px auto;
    border: 2px solid #555;
    width: 100%;
    max-width: 306px;
    aspect-ratio: 1 / 1;
    height: auto;
}

/* === Csempék === */
.puzzle-tile {
    flex: 0 0 calc(33.33% - 2px);
    aspect-ratio: 1 / 1;
    margin: 1px;
    background-image: url("/storage/images/img9_cropped.png");
    background-size: 300px 300px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.puzzle-tile.empty {
    background: none;
    cursor: default;
}

/* === Start gomb === */
#start-btn {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 10px;
}

#start-btn:hover {
    background-color: #45a049;
}

/* === Információs panel (lépések, idő) === */
.info-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-size: 14px;
    padding: 0 10px;
}

/* === Győzelmi üzenet === */
#win-message {
    color: green;
    font-weight: bold;
    font-size: 16px;
    margin-top: 10px;
}

/* === Rejtett elem === */
.hidden {
    display: none;
}


.puzzle-preview {
    margin-top: 15px;
    text-align: center;
}

.preview-label {
    display: block;
    font-size: 14px;
    color: #444;
    margin-bottom: 5px;
}

.preview-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 2px solid #888;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.preview-image:hover {
    transform: scale(1.1);
}

/* Dark mode színezés mindkét játékhoz */
body.dark-mode h2,
body.dark-mode .info-panel div,
body.dark-mode #step-counter,
body.dark-mode #timer,
body.dark-mode #memory-steps,
body.dark-mode #memoryModal h2,
body.dark-mode .game-info span {
    color: orange;
}


