﻿/* Base Styles */
body {
    background-color: #0a0a1a;
    background-image: linear-gradient(rgba(0, 255, 252, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 252, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center;
    /* Keep your existing styles */
    color: #00fffc;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
}

.neon-snake-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

 /*Header Styles*/ 
.neon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.neon-logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: #00fffc;
    text-shadow: 0 0 10px #00fffc;
    letter-spacing: 2px;
    margin: 0;
}

.neon-nav {
    display: flex;
    gap: 20px;
}

.neon-nav-link {
    color: #00fffc;
    text-decoration: none;
    font-size: 1.1rem;
    text-shadow: 0 0 5px #00fffc;
    transition: all 0.3s;
}

    .neon-nav-link:hover {
        text-shadow: 0 0 15px #00fffc;
    }

 /*Game Area*/ 
.game-area {
    position: relative;
    margin: 0 auto;
    width: fit-content;
}

#gameCanvas {
    display: block;
    background-color: #12122a;
    border: 2px solid #00fffc;
    box-shadow: 0 0 20px rgba(0, 255, 252, 0.3);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 26, 0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

    .game-overlay h2 {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    .game-overlay p {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

 /*Controls*/ 
.game-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.neon-btn {
    background: transparent;
    color: #00fffc;
    border: 2px solid #00fffc;
    padding: 10px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    text-shadow: 0 0 5px #00fffc;
    box-shadow: 0 0 10px rgba(0, 255, 252, 0.3);
    transition: all 0.3s;
    margin-bottom: 15px;
}

    .neon-btn:hover {
        background: rgba(0, 255, 252, 0.1);
        box-shadow: 0 0 20px rgba(0, 255, 252, 0.6);
    }

.play-btn {
    font-size: 1.5rem;
    padding: 12px 40px;
}

.score-display {
    font-size: 1.5rem;
    color: #00fffc;
    text-shadow: 0 0 5px #00fffc;
}

.challenge-btn {
    background: rgba(255, 0, 255, 0.1);
    border-color: #ff00ff;
    color: #ff00ff;
    text-shadow: 0 0 5px #ff00ff;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
    margin-top: 10px;
}

    .challenge-btn:hover {
        background: rgba(255, 0, 255, 0.2);
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
    }

.score-display {
    font-size: 1.5rem;
    color: #00fffc;
    text-shadow: 0 0 5px #00fffc;
    display: flex;
    gap: 10px;
    align-items: center;
}
.mobile-controls {
    margin-top: 20px;
}

.btn-control {
    width: 60px;
    height: 60px;
    margin: 5px;
    background-color: rgba(0, 255, 252, 0.1);
    color: #00fffc;
    border: 2px solid #00fffc;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 255, 252, 0.5);
}

    .btn-control:active {
        background-color: rgba(0, 255, 252, 0.3);
    }
/* Responsive Design */
@media (max-width: 500px) {
    .game-overlay h2 {
        font-size: 2rem;
    }

    .game-overlay p {
        font-size: 1.2rem;
    }

    .neon-btn {
        padding: 10px 20px;
        font-size: 1.1rem;
        max-width: 220px;
    }

    .play-btn {
        font-size: 1.3rem;
    }

    .score-display {
        font-size: 1.3rem;
    }
}

/* Mobile-specific styles */
@media (max-width: 767.98px) {
    .neon-snake-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100vh;
        padding: 15px;
        box-sizing: border-box;
    }

    .game-area {
        position: relative;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
        max-height: 80vh;
    }

    .game-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: rgba(0, 0, 0, 0.8);
        color: white;
        text-align: center;
        padding: 20px;
    }

        .game-overlay h2 {
            font-size: 2.5rem;
            margin-bottom: 10px;
        }

        .game-overlay .final-score {
            font-size: 1.5rem;
            margin-bottom: 30px;
        }

    .game-overlay-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 250px;
    }

    .neon-btn {
        width: 100%;
        padding: 12px 0;
        font-size: 1.1rem;
    }

    .game-controls {
        margin-top: 20px;
        width: 100%;
        max-width: 250px;
    }

    .mobile-controls {
        margin-top: 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px; /* Vertical spacing */
    }

        .mobile-controls > div {
            display: flex;
            gap: 15px; /* Horizontal spacing */
            justify-content: center;
        }

    .btn-control {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin: 0px 20px 0px 20px;
    }
}

/* Hide the desktop score display on mobile */
@media (max-width: 767.98px) {
    .score-display {
        display: none !important;
    }
}
