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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: 'Courier New', Courier, monospace;
    color: #fff;
}

#renderCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

/* ── Shared overlay base ─────────────────────────────────────────────────── */
#start-menu,
#game-over {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    background: rgba(5, 5, 18, 0.82);
    backdrop-filter: blur(4px);
}

.hidden { display: none !important; }

/* ── Menu / Game-over box ────────────────────────────────────────────────── */
.menu-box {
    text-align: center;
    padding: 40px 52px;
    border: 1px solid rgba(100, 160, 255, 0.35);
    border-radius: 12px;
    background: rgba(10, 10, 30, 0.9);
    box-shadow: 0 0 40px rgba(60, 120, 255, 0.25);
    animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.game-title {
    font-size: 52px;
    letter-spacing: 10px;
    color: #4af;
    text-shadow: 0 0 18px #4af, 0 0 40px #4af;
    margin-bottom: 14px;
}

.go-title {
    font-size: 48px;
    letter-spacing: 8px;
    color: #f44;
    text-shadow: 0 0 18px #f44;
    margin-bottom: 14px;
}

.menu-sub {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,0.72);
    margin-bottom: 10px;
}

.menu-btn {
    margin-top: 22px;
    padding: 12px 44px;
    font-family: inherit;
    font-size: 18px;
    letter-spacing: 4px;
    background: transparent;
    color: #4af;
    border: 2px solid #4af;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.menu-btn:hover {
    background: #4af;
    color: #000;
}

/* ── In-game HUD ─────────────────────────────────────────────────────────── */
#hud {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

#size-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#size-label {
    font-size: 12px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.7);
}

#size-bar {
    width: 220px;
    height: 10px;
    background: rgba(255,255,255,0.12);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(100,200,255,0.2);
}

#size-fill {
    height: 100%;
    width: 5%;   /* updated by hud.js */
    background: linear-gradient(90deg, #2af 0%, #0f8 100%);
    border-radius: 5px;
    transition: width 0.25s ease;
}

#score-wrap {
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.55);
}
