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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content h1 {
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 0.5rem;
    margin-bottom: 3rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.loading-bar {
    width: 400px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 2rem;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
}

#loading-text {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.8;
}

/* HUD */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.hud-element {
    position: absolute;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    color: white;
    font-weight: 300;
}

/* Speedometer */
#speedometer {
    bottom: 40px;
    right: 40px;
    text-align: center;
    min-width: 120px;
}

.speed-value {
    font-size: 3rem;
    font-weight: 200;
    line-height: 1;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.speed-label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 5px;
    letter-spacing: 0.2rem;
}

/* Distance Counter */
#distance {
    top: 40px;
    right: 40px;
    text-align: center;
    min-width: 120px;
}

.distance-value {
    font-size: 2rem;
    font-weight: 200;
    line-height: 1;
    color: #00ff88;
}

.distance-label {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
    letter-spacing: 0.15rem;
}

/* Instructions */
#instructions {
    top: 40px;
    left: 40px;
    font-size: 0.95rem;
}

.instruction-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    opacity: 0.8;
}

.instruction-item:last-child {
    margin-bottom: 0;
}

.key {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    margin-right: 12px;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .loading-content h1 {
        font-size: 2.5rem;
        letter-spacing: 0.3rem;
    }
    
    .loading-bar {
        width: 80%;
    }
    
    .hud-element {
        padding: 15px;
    }
    
    #speedometer,
    #distance,
    #instructions {
        bottom: 20px;
        right: 20px;
        top: auto;
        left: auto;
    }
    
    #instructions {
        top: 20px;
        left: 20px;
        font-size: 0.85rem;
    }
    
    .speed-value {
        font-size: 2.5rem;
    }
    
    .distance-value {
        font-size: 1.5rem;
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hud-element {
    animation: fadeIn 0.5s ease forwards;
}

#speedometer {
    animation-delay: 0.1s;
}

#instructions {
    animation-delay: 0.2s;
}

#distance {
    animation-delay: 0.3s;
}