:root {
    --bg: #05060a;
    --panel: rgba(255, 255, 255, 0.06);
    --panel-border: rgba(255, 255, 255, 0.12);
    --text: #eef2ff;
    --muted: rgba(238, 242, 255, 0.55);
    --accent: #7c8cff;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    overflow: hidden;
}

#gl {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    cursor: grab;
}
#gl.grabbing { cursor: grabbing; }

#hud {
    position: fixed;
    inset: 0;
    pointer-events: none;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#hud-top {
    display: flex;
    align-items: center;
    gap: 16px;
    width: max-content;
    padding: 8px 16px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hud-title {
    font-weight: 700;
    letter-spacing: 0.28em;
    font-size: 13px;
    background: linear-gradient(90deg, #8ea2ff, #56e0c8, #ff8ad0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hud-fps {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--muted);
}

#hud-bottom {
    align-self: flex-end;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding: 8px 16px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#fallback {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 24px;
    background: var(--bg);
}
#fallback h2 { margin: 0; font-size: 22px; }
#fallback p { margin: 0; color: var(--muted); max-width: 46ch; }

body.no-webgl #fallback { display: flex; }
body.no-webgl #gl,
body.no-webgl #hud { display: none; }
