body {
    margin: 0;
    padding: 0;
    background-color: #000;
    touch-action: none;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    font-family: monospace;
}


#leaderboard a {
    text-decoration: none;
    color: #0f0;
}


#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    filter: contrast(1.2);
}

#player {
    position: absolute;
    left: 0;
    bottom: 50px;
    width: 50px;
    height: 50px;
    z-index: 10;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 5px #0f0);
    display: none;
    will-change: transform;
}

.digit {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 35px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    text-shadow: 0 0 10px currentColor;
    display: none;
    will-change: transform;
}

.zero {
    color: #f00;
    animation: melt-zero 3s infinite;
}

.one {
    color: #0f0;
    animation: melt-one 3s infinite;
}

@keyframes melt-zero {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-2px) scale(1.1);
    }
}

@keyframes melt-one {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-2px) scale(1.2);
    }
}

#score {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 50px;
    color: #0f0;
    font-family: monospace;
    text-shadow: 0 0 10px #0f0;
    animation: glitch 5s infinite;
    display: none;
}

@keyframes glitch {

    0%,
    100% {
        text-shadow: 0 0 10px #0f0;
    }

    25% {
        text-shadow: 2px 0 10px #f0f, -2px 0 10px #0ff;
    }

    50% {
        text-shadow: 0 2px 10px #ff0, 0 -2px 10px #f0f;
    }

    75% {
        text-shadow: -2px 0 10px #0ff, 2px 0 10px #ff0;
    }
}

#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#start-btn {
    font-size: 40px;
    color: #0f0;
    background: none;
    border: none;
    font-family: monospace;
    margin-top: 30px;
    text-shadow: 0 0 10px #0f0;
    animation: pulse 2s infinite;
    cursor: pointer;
}


#leaderboard {
    width: 80%;
    max-width: 400px;
    margin-top: 30px;
    color: #0f0;
    border: 2px solid #0f0;
    border-radius: 10px;
    padding: 10px;
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #0f0 rgba(0, 0, 0, 0.8);
}

#leaderboard::-webkit-scrollbar {
    width: 8px;
}

#leaderboard::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.8);
}

#leaderboard::-webkit-scrollbar-thumb {
    background-color: #0f0;
    border-radius: 4px;
    box-shadow: 0 0 10px #0f0;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #0f0;
}

.leaderboard-rank {
    width: 30px;
    text-align: center;
}

.leaderboard-name {
    flex-grow: 1;
    text-align: left;
    padding: 0 15px;
}

.leaderboard-score {
    width: 80px;
    text-align: right;
}

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

#name-input {
    background: transparent;
    border: 2px solid #0f0;
    color: #0f0;
    font-size: 24px;
    padding: 10px;
    margin: 20px 0;
    width: 80%;
    max-width: 300px;
    text-align: center;
    font-family: monospace;
}

#submit-score,
#back-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #0f0;
    color: #0f0;
    padding: 10px 20px;
    margin: 10px;
    font-size: 24px;
    cursor: pointer;
    font-family: monospace;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.glitch-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f0f, #0ff, #ff0, #f0f);
    background-size: 400% 400%;
    opacity: 0;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 5;
    animation: none;
    will-change: background-position, opacity;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glitch-text {
    font-size: 40px;
    white-space: pre;
    color: white;
    text-shadow: 2px 0 red, -2px 0 cyan;
    font-family: 'Orbitron', monospace;
    opacity: 0;
    animation: glitch-text-fade 2s ease-out forwards;
}

@keyframes glitch-bg {
    0% {
        background-position: 0% 50%;
        opacity: 0.3;
    }

    100% {
        background-position: 100% 50%;
        opacity: 0;
    }
}

@keyframes glitch-text-fade {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    30% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.1);
    }
}

.screen-shake {
    animation: shake 0.2s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }
}

#music-control {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
    font-family: monospace;
    opacity: 0.7;
    transition: opacity 0.3s;
}

#music-control:hover {
    opacity: 1;
}

#music-icon {
    font-size: 30px;
    margin-bottom: 5px;
}

#music-title {
    font-size: 16px;
    text-align: center;
}