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

body {
    overflow: hidden;
    font-family: Arial, sans-serif;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#loading-text {
    color: white;
    font-size: 48px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

#info {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    background: rgba(0,0,0,0.6);
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 300px;
    z-index: 1500;
}

#info h2 {
    margin-bottom: 10px;
    font-size: 18px;
}

#countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column; /* Stack texts vertically */
    justify-content: center; /* Center vertically */
    align-items: center; /* Center horizontally */
    z-index: 1000;
    pointer-events: none;
}

#countdown-text {
    font-size: 100px; /* Adjusted font size */
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8),
                 0 0 60px rgba(237, 218, 218, 0.6),
                 0 0 90px rgba(255, 255, 255, 0.4);
    animation: countdownPulse 0.8s ease-out;
    font-family: 'Arial Black', Arial, sans-serif;
    text-align: center; /* Center text alignment */
}

@keyframes countdownPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.5);
    }
}

.countdown-fade {
    animation: fadeOut 0.3s ease-out forwards;
}

#finish-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
}

#finish-text {
    font-size: 120px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8),
                 0 0 60px rgba(255, 215, 0, 0.6),
                 0 0 90px rgba(255, 215, 0, 0.4);
    animation: countdownPulse 0.8s ease-out;
    font-family: 'Arial Black', Arial, sans-serif;
    text-align: center;
}

/* Speedometer container */
#speedometer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 120px;
    height: 120px;
    background: rgba(0, 0, 0, 0.8);
    border: 4px solid #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-family: Arial, sans-serif;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Speed value */
#speed-value {
    font-size: 36px;
    font-weight: bold;
}

/* Speed unit */
#speed-unit {
    font-size: 16px;
    margin-top: 5px;
    color: #aaa;
}
