/* Snake Game Styles */
.game-container {
    padding: 40px 20px;
    max-width: 1400px;
}

.game-header {
    text-align: center;
    margin-bottom: 40px;
}

.game-header h1 {
    color: #4361ee;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.game-header .subtitle {
    color: #666;
    font-size: 1.1rem;
}

.game-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.game-sidebar {
    flex: 1;
    min-width: 300px;
}

.game-main {
    flex: 2;
    min-width: 300px;
}

/* Game Stats */
.game-stats {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.stat:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.stat-label {
    font-weight: 600;
    color: #555;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4361ee;
}

/* Game Controls */
.game-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.game-controls .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    font-size: 1.1rem;
}

/* Game Instructions */
.game-instructions {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.game-instructions h3 {
    margin-bottom: 15px;
    color: #333;
}

.game-instructions ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.game-instructions li {
    margin-bottom: 8px;
    color: #555;
}

.food-sample {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #e63946;
    border-radius: 50%;
    vertical-align: middle;
    margin: 0 5px;
}

/* Game Board */
.game-board-container {
    position: relative;
    margin-bottom: 30px;
}

#game-canvas {
    display: block;
    margin: 0 auto;
    background-color: #1a1a2e;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    height: auto;
}

.game-over, .game-paused {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    color: white;
    text-align: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.game-over.active, .game-paused.active {
    opacity: 1;
    pointer-events: all;
}

.game-over h2, .game-paused h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.game-over p, .game-paused p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* Mobile Controls */
.mobile-controls {
    display: none;
    margin-top: 30px;
    justify-content: center;
}

.control-row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.control-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #4361ee;
    color: white;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin: 0 10px;
}

.control-btn:active {
    background-color: #3a56d4;
    transform: scale(0.95);
}

.control-spacer {
    width: 100px;
}

/* Responsive */
@media (max-width: 1100px) {
    .game-content {
        flex-direction: column;
    }
    
    .game-sidebar, .game-main {
        width: 100%;
    }
}

@media (max-width: 768px) {
    #game-canvas {
        width: 100%;
        height: auto;
    }
    
    .mobile-controls {
        display: flex;
        flex-direction: column;
    }
    
    .game-controls {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .game-controls .btn {
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .game-stats, .game-controls, .game-instructions {
        padding: 20px;
    }
    
    .control-btn {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
    
    .control-spacer {
        width: 80px;
    }
}