* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Inter', 'Unbounded', 'Arial', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Remove background animation */

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

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

h1 {
    color: #e6d6d6;
    font-size: 2.8rem;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(183, 75, 75, 0.5);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 20px rgba(183, 75, 75, 0.5); }
    100% { text-shadow: 0 0 30px rgba(183, 75, 75, 0.8), 0 0 40px rgba(183, 75, 75, 0.3); }
}

.high-score {
    background: linear-gradient(135deg, #1e1e1e, #2d2d2d);
    border: 2px solid #b74b4b;
    border-radius: 15px;
    padding: 10px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #b74b4b;
    box-shadow: 0 4px 15px rgba(183, 75, 75, 0.3);
    position: absolute;
    top: 20px;
    right: 20px;
}

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

.score {
    font-size: 1.6rem;
    font-weight: bold;
    color: #b74b4b;
    background: linear-gradient(135deg, #1e1e1e, #2d2d2d);
    border: 2px solid #b74b4b;
    border-radius: 15px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(183, 75, 75, 0.3);
    min-width: 120px;
    text-align: center;
}

.canvas-container {
    position: relative;
    margin-bottom: 20px;
}

#gameCanvas {
    background: linear-gradient(135deg, #232323, #1a1a1a);
    border: 3px solid #b74b4b;
    border-radius: 15px;
    box-shadow: 
        0 0 30px rgba(183, 75, 75, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    display: block;
    width: 90vw;
    max-width: 400px;
    height: 90vw;
    max-height: 400px;
    touch-action: none;
    transition: all 0.3s ease;
}

#gameCanvas:hover {
    box-shadow: 
        0 0 40px rgba(183, 75, 75, 0.6),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.overlay-content {
    text-align: center;
    color: white;
    animation: overlayPulse 2s ease-in-out infinite alternate;
}

@keyframes overlayPulse {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.05); opacity: 1; }
}

.overlay-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #b74b4b;
    text-shadow: 0 0 15px rgba(183, 75, 75, 0.7);
}

.overlay-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #ccc;
}

.start-btn {
    background: linear-gradient(135deg, #b74b4b, #8a3535);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(183, 75, 75, 0.4);
    transition: all 0.3s ease;
}

.start-btn:hover {
    background: linear-gradient(135deg, #d85656, #b74b4b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(183, 75, 75, 0.6);
}
/* Styling for realistic snake segments */
.snake-segment {
    /* Realistic snake skin gradient */
    background: radial-gradient(ellipse at 30% 30%, #7cb342, #558b2f, #33691e);
    border: 1px solid #1b5e20;
    border-radius: 45%;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.2),
        inset -2px -2px 4px rgba(0, 0, 0, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

/* Add scale-like texture overlay */
.snake-segment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.3) 1px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(0, 0, 0, 0.2) 1px, transparent 2px);
    background-size: 6px 6px, 8px 8px;
    border-radius: 45%;
    opacity: 0.8;
}

/* Snake head styling (first segment) */
.snake-segment:first-child {
    background: radial-gradient(ellipse at 40% 40%, #8bc34a, #689f38, #388e3c);
    border: 2px solid #1b5e20;
    box-shadow: 
        inset 3px 3px 6px rgba(255, 255, 255, 0.25),
        inset -3px -3px 6px rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Add eyes to snake head */
.snake-segment:first-child::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 25%;
    height: 25%;
    background: radial-gradient(circle, #ff1744 30%, #d32f2f 60%, #b71c1c);
    border-radius: 50%;
    box-shadow: 
        15px 0 0 rgba(255, 23, 68, 1),
        inset 1px 1px 2px rgba(255, 255, 255, 0.4);
}

/* Snake body segments get progressively darker */
.snake-segment:nth-child(2) {
    background: radial-gradient(ellipse at 30% 30%, #689f38, #4e7c31, #33691e);
}

.snake-segment:nth-child(3) {
    background: radial-gradient(ellipse at 30% 30%, #5d8f35, #47702c, #2e5d1e);
}

.snake-segment:nth-child(n+4) {
    background: radial-gradient(ellipse at 30% 30%, #52832f, #3e6428, #29531b);
}

/* Realistic food styling */
.food {
    background: radial-gradient(circle at 30% 30%, #ff5722, #e64a19, #d84315);
    border: 2px solid #bf360c;
    border-radius: 50%;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.3),
        inset -2px -2px 4px rgba(0, 0, 0, 0.4),
        0 3px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: foodGlow 2s ease-in-out infinite alternate;
}

/* Food glow animation */
@keyframes foodGlow {
    0% {
        box-shadow: 
            inset 2px 2px 4px rgba(255, 255, 255, 0.3),
            inset -2px -2px 4px rgba(0, 0, 0, 0.4),
            0 3px 8px rgba(0, 0, 0, 0.5);
    }
    100% {
        box-shadow: 
            inset 2px 2px 4px rgba(255, 255, 255, 0.4),
            inset -2px -2px 4px rgba(0, 0, 0, 0.5),
            0 4px 12px rgba(255, 87, 34, 0.6);
    }
}

/* Add shine effect to food */
.food::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 40%;
    height: 40%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    border-radius: 50%;
}
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }
    
    .high-score {
        position: static;
        margin-bottom: 20px;
    }
    
    h1 {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .score {
        font-size: 1.4rem;
    }
    
    #gameCanvas {
        width: 95vw;
        max-width: 95vw;
        height: 95vw;
        max-height: 95vw;
        border-width: 4px;
    }
    
    .game-tips {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .tip {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .overlay-content h2 {
        font-size: 1.8rem;
    }
    
    .overlay-content p {
        font-size: 1rem;
    }
    
    .start-btn {
        font-size: 1.1rem;
        padding: 10px 25px;
    }
}


