* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    font-family: Arial, sans-serif;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-container {
    position: relative;
    min-width: 1000px;
    min-height: 600px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1 {
    margin: 0;
    color: #333;
    font-size: 32px;
    text-align: center;
}

.game-info {
    display: flex;
    gap: 20px;
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

#puzzle-board {
    display: grid;
    gap: 5px;
    background: #ddd;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.puzzle-tile {
    background: #2196F3;
    color: white;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    user-select: none;
}

.puzzle-tile:hover {
    transform: scale(0.98);
}

.puzzle-tile.empty {
    background: transparent;
    cursor: default;
}

.puzzle-tile.empty:hover {
    transform: none;
}

#controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

#start-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#start-btn:hover {
    background: #1976D2;
}

#difficulty {
    padding: 12px;
    font-size: 18px;
    border: 2px solid #2196F3;
    border-radius: 5px;
    cursor: pointer;
}

#message {
    font-size: 20px;
    color: #333;
    text-align: center;
    min-height: 30px;
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1200px) {
    .game-container {
        min-width: auto;
        width: 100%;
        max-width: 800px;
    }
}

@media (max-width: 600px) {
    .game-info {
        font-size: 20px;
    }

    .puzzle-tile {
        font-size: 20px;
    }

    #start-btn, #difficulty {
        font-size: 16px;
        padding: 10px 20px;
    }
} 