/* 推箱子游戏样式 */
.sokoban-game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--dark-card);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.sokoban-game-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(110, 92, 247, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    opacity: 0.7;
}

.sokoban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.sokoban-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
}

.sokoban-title i {
    margin-right: 10px;
    color: #6e5cf7;
}

.sokoban-info {
    display: flex;
    gap: 15px;
}

.sokoban-level, .sokoban-moves {
    font-size: 1rem;
    color: var(--text-color);
    background-color: rgba(110, 92, 247, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid rgba(110, 92, 247, 0.3);
}

.sokoban-canvas-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    position: relative;
    touch-action: none;
}

#sokobanCanvas {
    background-color: #1a1a2e;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    cursor: pointer;
    tabindex: 0;
}

#sokobanCanvas:focus {
    outline: 2px solid rgba(110, 92, 247, 0.5);
    outline-offset: 3px;
}

.sokoban-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.sokoban-btn {
    padding: 10px 20px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, #6e5cf7, #a29bfe);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(110, 92, 247, 0.3);
}

.sokoban-btn i {
    margin-right: 8px;
}

.sokoban-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(110, 92, 247, 0.4);
}

.sokoban-btn:active {
    transform: translateY(1px);
}

.direction-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    width: 150px;
    margin: 20px auto;
}

.direction-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6e5cf7, #a29bfe);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(110, 92, 247, 0.3);
}

.direction-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 12px rgba(110, 92, 247, 0.4);
}

.direction-btn:active {
    transform: scale(0.95);
}

#moveUp {
    grid-column: 2;
    grid-row: 1;
}

#moveLeft {
    grid-column: 1;
    grid-row: 2;
}

#moveRight {
    grid-column: 3;
    grid-row: 2;
}

#moveDown {
    grid-column: 2;
    grid-row: 3;
}

.win-message {
    display: none;
    text-align: center;
    margin-top: 15px;
    color: #6e5cf7;
    font-size: 1.2rem;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

#nextLevelBtn {
    display: none;
    margin: 10px auto;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

#nextLevelBtn:hover {
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.sokoban-instructions {
    margin-top: 30px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sokoban-instructions h3 {
    margin-top: 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

.sokoban-instructions ul {
    padding-left: 20px;
    color: var(--light-text);
}

.sokoban-instructions li {
    margin-bottom: 8px;
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .sokoban-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .sokoban-title {
        font-size: 1.5rem;
        justify-content: center;
    }
    
    .sokoban-info {
        justify-content: center;
    }
    
    .sokoban-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .sokoban-btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .sokoban-level, .sokoban-moves {
        font-size: 0.9rem;
        padding: 5px 10px;
    }
    
    .direction-controls {
        width: 120px;
    }
    
    .direction-btn {
        width: 35px;
        height: 35px;
    }
}

/* 防止触摸设备上的滚动 */
.sokoban-game-section {
    touch-action: none;
} 