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

body {
    overflow: hidden;
    background: #05070a;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #fff;
    cursor: crosshair;
}

canvas { display: block; }

#loading {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 40%, #16202c, #05070a 70%);
    transition: opacity 0.6s ease;
}

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

.loading-title {
    font-size: 3rem;
    letter-spacing: 0.35em;
    font-weight: 200;
    text-align: center;
}

.loading-sub {
    margin-top: 18px;
    text-align: center;
    opacity: 0.6;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    text-transform: uppercase;
}

#hud {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

#speed-readout {
    position: absolute;
    right: 42px;
    bottom: 38px;
    font-size: 3.4rem;
    font-weight: 200;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

#speed-readout em {
    font-size: 0.9rem;
    font-style: normal;
    opacity: 0.55;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

#gear-readout {
    position: absolute;
    right: 42px;
    bottom: 118px;
    font-size: 1.5rem;
    letter-spacing: 0.25em;
    opacity: 0.85;
}

#objective {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 22px;
    border-radius: 999px;
    background: rgba(8, 12, 18, 0.55);
    backdrop-filter: blur(6px);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

#score-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 2rem;
    font-weight: 200;
    letter-spacing: 0.15em;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#score-banner.show { opacity: 1; }

#controls-hint {
    position: fixed;
    bottom: 18px;
    left: 24px;
    z-index: 10;
    font-size: 0.72rem;
    opacity: 0.45;
    letter-spacing: 0.04em;
    pointer-events: none;
}

#controls-hint b { color: #ffd479; font-weight: 600; }

#pause-menu {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(4, 6, 10, 0.82);
    backdrop-filter: blur(4px);
}

#pause-menu.show { display: flex; }

#pause-menu h2 {
    font-weight: 200;
    letter-spacing: 0.4em;
    margin-bottom: 18px;
}

.menu-btn {
    min-width: 240px;
    padding: 12px 26px;
    border: 1px solid rgba(255, 212, 121, 0.5);
    border-radius: 8px;
    background: rgba(255, 212, 121, 0.08);
    color: #ffd479;
    font: inherit;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.menu-btn:hover { background: rgba(255, 212, 121, 0.2); }
