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

body {
    background: #000;
    overflow: hidden;
}

/* ── HUD overlay ────────────────────────────────── */
#hud {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #aaa;
    pointer-events: none;   /* let mouse events pass through to canvas */
    user-select: none;
    z-index: 10;
}

.hud-section {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hud-title {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: #555;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.hud-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 1px 4px;
    border-radius: 3px;
    transition: color 0.1s, background 0.1s;
    white-space: nowrap;
}

/* ── Key badge ──────────────────────────────────── */
kbd {
    display: inline-block;
    padding: 1px 5px;
    font-family: inherit;
    font-size: 11px;
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    line-height: 1.4;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}

/* ── Active state ───────────────────────────────── */
kbd.active {
    color: #1a1a1a;
    background: #7cfc00;
    border-color: #7cfc00;
}

.hud-row:has(kbd.active) {
    color: #fff;
}

/* Currently selected camera */
.hud-row.current {
    color: #7cfc00;
}

/* ── Start hint & touch notice ──────────────────── */
#hint,
#touch-note {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 8px 14px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #ddd;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    pointer-events: none;
    transition: opacity 0.4s;
    z-index: 10;
}

#hint.hidden { opacity: 0; }

#touch-note { display: none; }

@media (hover: none) and (pointer: coarse) {
    #hint { display: none; }
    #touch-note { display: block; }
}

/* ── Back to menu ───────────────────────────────── */
#back {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    color: #ddd;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;   /* the rest of the HUD ignores the mouse */
    transition: color 0.1s, border-color 0.1s;
}

#back:hover,
#back:focus-visible {
    color: #7cfc00;
    border-color: #7cfc00;
    outline: none;
}
