@import url('https://cdn.jsdelivr.net/gh/ryanoasis/nerd-fonts@latest/webfonts.css');

/* Modernize the game visuals */
body {
    font-family: 'Nerd Font', sans-serif; /* Set default font to Nerd Font */
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* Gradient background */
    color: #fff;
    text-align: center;
    margin: 0;
    padding: 0;
    overflow: hidden;
    touch-action: manipulation; /* Prevent double-tap to zoom on iOS */
}

#gameContainer {
    text-align: center;
    padding: 5px;
}

#gameBoard {
    background: #000; /* Black background for contrast */
    border: 5px solid #FFD700; /* Gold border */
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); /* Glow effect */
    margin: 20px auto;
    display: block;
    width: 90vw; /* 90% of viewport width */
    max-width: 600px; /* Limit max width for large screens */
    height: auto; /* Maintain aspect ratio */
}

/* Ensure the margin remains the same on mobile */
@media (max-width: 600px) {
    #gameBoard {
        width: 95vw;
        max-width: 100%;
        margin: 10vh auto 0 auto; /* Same margin as desktop */
    }
}

/* Adjust text size based on screen size */
#scoreText {
    font-family: "Consolas", monospace;
    font-size: 5vw; 
    text-align: center;
    color: #b62d2d;
    text-shadow: black 0.05em 0.05em 0.05em;
    letter-spacing: 2px;
    margin: 3px auto;
    transition: transform 0.2s ease-in-out;
    background-color: transparent;
    width: 20%;
    display: block;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 10px; /* Default: position at the bottom for desktop */
    left: 50%;
    transform: translateX(-50%);
}

/* Move to top on mobile screens */
@media (max-width: 768px) {
    #scoreText {
        top: 10px;
        bottom: auto;
    }

    #gameBoard {
        width: 90%;
        height: auto;
    }

    button {
        font-size: 16px;
        padding: 8px 16px;
    }
}

#lives {
    position: fixed;
    top: 5px;
    left: 20px;
    max-width: 8ch;
    oveflow: hidden;
    white-space: wrap;
    text-flow: ellipsis;
    font-size: 24px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

/* Mobile-specific adjustments */
@media (max-width: 600px) {
    #gameBoard {
        width: 95vw; /* Slightly larger on small screens */
        max-width: 100%;
    }

    #scoreText {
        font-size: 10vw;
    }

    /* Adjust touch buttons */
    button {
        width: 20vw;
        height: 20vw;
        font-size: 22pt;
        margin: 5pt;
    }
}

#unmuteBtn {
    position: fixed;
    top: 5px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 24px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

#unmuteBtn:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

#touchControls {
    padding-top: 10vw;
}

@media (hover: hover) {
    #touchControls {
        display: none !important;
    }
}

/* Add bounce effect when score updates */
@keyframes scoreBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Apply the animation when score updates */
.score-update {
    animation: scoreBounce 0.3s ease-in-out;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    #scoreText {
        font-size: 10vw;
    }
}

html, body {
    overflow: hidden;
    height: 100%;
}

/* Normalize arrow symbols for all platforms */
button {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, #32CD32, #228B22); /* Green gradient */
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    text-align: center;
}

button::before {
    content: attr(data-arrow); /* Use data attributes for arrow symbols */
    font-size: 24px; /* Ensure consistent size */
    display: block;
    margin-bottom: 5px;
}

button:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #228B22, #006400); /* Darker green on hover */
}

button:active {
    transform: scale(1.05);
}

#score {
    font-size: 24px;
    font-weight: bold;
    margin: 10px;
    color: #FFD700; /* Gold color */
}

