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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #040d18;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

#canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ── Loading overlay ───────────────────────────────────────────────────── */

#loading-overlay {
    position: fixed;
    inset: 0;
    background: #040d18;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 100;
    transition: opacity 0.6s ease;
}

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

.loading-logo {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 30px rgba(80, 160, 255, 0.8);
}

.loading-logo span {
    color: #4ea8ff;
}

.loading-sub {
    font-size: 0.75rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #5580aa;
}

#loading-status {
    font-size: 0.85rem;
    color: #6688aa;
    min-height: 1.2em;
    letter-spacing: 0.05em;
}

.loading-bar-track {
    width: 260px;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    overflow: hidden;
}

#loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1a5fff, #4ea8ff);
    border-radius: 99px;
    transition: width 0.3s ease;
}

/* ── HUD ───────────────────────────────────────────────────────────────── */

#hud {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

#hud-top-left {
    position: absolute;
    top: 16px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hud-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
}

#hud-clock {
    font-size: 1.35rem;
    font-weight: 600;
    color: rgba(255,255,255,0.88);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

#hud-top-right {
    position: absolute;
    top: 16px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

#hud-weather {
    font-size: 1.5rem;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4));
}

#hud-bottom {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hud-hint {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.28);
    letter-spacing: 0.06em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
