/* 静音贪吃蛇样式 */
.snake-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
    text-align: center;
}

.game-header {
    margin-bottom: 20px;
}

.game-title {
    font-size: 28px;
    color: #776e65;
    margin: 0 0 10px 0;
}

.game-description {
    color: #776e65;
    margin: 0;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 14px;
    color: #666;
}

.info-value {
    font-weight: bold;
    color: #1e3c72;
    font-size: 18px;
}

.game-board {
    width: 500px;
    height: 500px;
    background: #f0f0f0;
    border: 2px solid #8b4513;
    border-radius: 5px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.cell {
    position: absolute;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
}

.snake {
    background: linear-gradient(to bottom, #32CD32, #228B22);
    border: 1px solid #006400;
    border-radius: 3px;
}

.snake-head {
    background: linear-gradient(to bottom, #228B22, #006400);
    border: 1px solid #004d00;
    border-radius: 4px;
}

.food {
    background: linear-gradient(to bottom, #FF6347, #DC143C);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 100;
    display: none;
}

.game-over-title {
    font-size: 36px;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.game-over-text {
    font-size: 20px;
    margin-bottom: 30px;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.control-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    background: #8f7a66;
    color: #f9f6f2;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #7c6b5d;
    transform: translateY(-2px);
}

.direction-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
}

.direction-row {
    display: flex;
    justify-content: center;
}

.direction-btn {
    width: 60px;
    height: 60px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    background: #8f7a66;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.direction-btn:hover {
    background: #7c6b5d;
}

.speed-control {
    margin: 15px 0;
}

.speed-slider {
    width: 200px;
    margin: 0 10px;
}

/* 隐藏按钮和工作模式 */
.hidden-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    z-index: 9999;
    display: none;
}

.work-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.work-screen {
    background: #f0f0f0;
    width: 90%;
    height: 80%;
    border: 1px solid #ccc;
    padding: 20px;
    font-family: 'Courier New', monospace;
    overflow: auto;
}

.work-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.work-content {
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-board {
        width: 300px;
        height: 300px;
    }
    
    .snake-container {
        margin: 10px;
        padding: 15px;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .direction-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
}