/*
 * Copyright (C) 2026 Lele
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

* {
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 20px;
}

.back-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.back-link:hover {
    text-decoration: underline;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 20px 25px 30px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

h1 {
    color: #1e3c72;
    margin: 0 0 5px;
}

.subtitle {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f0f0;
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 25px;
    font-size: 1.2rem;
    font-weight: bold;
}

#shuffleBtn {
    background: #ff9800;
    border: none;
    color: white;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

#shuffleBtn:hover {
    background: #e68900;
    transform: scale(1.02);
}

.puzzle-grid {
    display: grid;
    gap: 8px;
    background-color: #2c3e50;
    padding: 12px;
    border-radius: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
}

.tile {
    aspect-ratio: 1 / 1;
    min-width: 0;
    background-color: #3498db;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.1s linear;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.tile.empty {
    background-color: #ecf0f1;
    color: transparent;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px #bdc3c7;
}

.tile:active {
    transform: scale(0.97);
}

.tips {
    background: #e8f4f8;
    border-radius: 20px;
    padding: 10px;
    margin-top: 20px;
    font-size: 0.8rem;
    color: #2c3e50;
    text-align: center;
  }

.message {
    font-size: 1.2rem;
    font-weight: bold;
    height: 50px;
    color: #2ecc71;
}

@media (max-width: 450px) {
    .tile {
        font-size: 1.3rem;
    }
    .game-info {
        font-size: 1rem;
    }
}