/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f4f4f9, #e0e0e5);
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

header {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.main-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    flex: 1;
}

.sidebar {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 25%;
    min-width: 250px;
}

.game-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 40%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#puzzle-board {
    display: grid;
    gap: 10px;
    perspective: 1000px;
    margin-bottom: 20px;
}

.puzzle-piece {
    width: 80px;
    height: 80px;
    background-color: #3498db;
    color: white;
    font-size: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    transform-style: preserve-3d;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.puzzle-piece.empty {
    background-color: transparent;
    box-shadow: none;
}

.puzzle-piece.move {
    transform: translateZ(50px) rotateY(180deg);
}

.puzzle-piece:hover {
    background-color: #2980b9;
}

#remaining-steps {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 10px 0;
}