html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #000;
    color: #ccc;
    font-family: monospace;
}

#wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

#game {
    background: #000;
    /* keep crisp pixels for the retro look */
    image-rendering: pixelated;
    outline: none;
    box-shadow: 0 0 45px rgba(242, 100, 34, 0.30);
    max-width: 100vw;
    max-height: 100vh;
}

/* ── High-score overlay ─────────────────────────────────────────────────── */
.hs-hidden { display: none !important; }

#hs-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.78);
    z-index: 10;
}

.hs-panel {
    width: min(440px, 90vw);
    background: #14100c;
    border: 2px solid rgba(242, 100, 34, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(242, 100, 34, 0.35);
    padding: 28px 26px;
    color: #e8e0d6;
    font-family: monospace;
}

.hs-panel h2 {
    margin: 0 0 14px;
    color: #f26422;
    font-size: 22px;
    text-align: center;
}

.hs-panel p { margin: 8px 0; text-align: center; }
.hs-panel .hs-score strong { color: #ffd34d; font-size: 1.2em; }

.hs-field {
    display: block;
    margin: 14px 0 4px;
    font-size: 14px;
    color: #c7bcae;
}

.hs-field input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 10px 12px;
    background: #0c0a08;
    border: 1px solid #4a3f33;
    border-radius: 6px;
    color: #fff;
    font-family: monospace;
    font-size: 16px;
}

.hs-field input:focus,
.hs-consent input:focus { outline: 2px solid #f26422; }

.hs-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 18px 0 6px;
    font-size: 13px;
    line-height: 1.4;
    color: #b7ab9c;
    text-align: left;
}
.hs-consent input { margin-top: 2px; flex: 0 0 auto; }

.hs-name-meter {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 6px 2px 0;
    font-family: monospace;
    font-size: 15px;
    color: #c7bcae;
}
.hs-name-meter #hs-name-preview {
    white-space: pre;                 /* keep the padding spaces */
    letter-spacing: 2px;
    color: #ffd34d;
}
.hs-name-meter #hs-name-count { color: #8a7d6c; }

.hs-name-status {
    margin: 6px 2px 0;
    font-size: 13px;
    text-align: left;
    min-height: 1em;
    color: #b7ab9c;
}
.hs-name-status.is-ok  { color: #6fdc8c; }
.hs-name-status.is-bad { color: #ff5a7a; }

.hs-error {
    color: #ff5a7a;
    font-size: 13px;
    min-height: 1em;
}

.hs-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.hs-btn {
    padding: 10px 18px;
    border: 1px solid #4a3f33;
    border-radius: 6px;
    background: #241c14;
    color: #e8e0d6;
    font-family: monospace;
    font-size: 15px;
    cursor: pointer;
}
.hs-btn:hover { border-color: #f26422; }
.hs-primary {
    background: #f26422;
    border-color: #f26422;
    color: #1a1206;
    font-weight: bold;
}
.hs-primary:hover { background: #ff7a3d; }
