#game-wrapper {
    text-align: center;
    padding: 80px 20px 40px;
}

#game-wrapper h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.dark-mode #game-wrapper h1 {
    color: #ecf0f1;
}

#game-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.info-item {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.dark-mode .info-item {
    color: #ecf0f1;
}

.info-item span:last-child {
    color: #3498db;
    margin-left: 8px;
}

#size-select {
    padding: 8px 12px;
    font-size: 14px;
    border: 2px solid #3498db;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.dark-mode #size-select {
    background: #2c3e50;
    color: #ecf0f1;
}

#puzzle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#puzzle {
    display: grid;
    gap: 5px;
    background: #2c3e50;
    padding: 10px;
    border-radius: 10px;
}

.tile {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.tile:hover:not(.empty) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

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

.tile.correct {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.actions button {
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

#new-game-btn {
    background: #2ecc71;
    color: white;
}

#new-game-btn:hover {
    background: #27ae60;
}

#undo-btn {
    background: #3498db;
    color: white;
}

#undo-btn:hover:not(:disabled) {
    background: #2980b9;
}

#undo-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

#message {
    font-size: 24px;
    font-weight: bold;
    min-height: 36px;
}

#message.win {
    color: #2ecc71;
    animation: bounce 0.5s infinite alternate;
}

@keyframes bounce {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

@media (max-width: 480px) {
    .tile {
        font-size: 20px;
        width: 60px;
        height: 60px;
    }
    
    #game-info {
        gap: 15px;
    }
}
