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

html, body {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, #0b1d3a, #000010 60%);
    color: #fff;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-container {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(180deg, #02040f 0%, #090f27 45%, #000010 100%);
}

.hud {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1024px;
    padding: 10px 18px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.hud-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.hud-row div {
    color: #cdf5ff;
}

.hint {
    margin-top: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.boost-row {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

#boostBtn {
    padding: 12px 28px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff77c1, #ff3f6b);
    color: #000;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#boostBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(255, 90, 130, 0.22);
}

#boostBtn:active {
    transform: translateY(0);
}

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 20;
}

.overlay.hidden {
    display: none;
}

.overlay-card {
    text-align: center;
    padding: 28px 32px;
    border-radius: 24px;
    background: rgba(5, 12, 34, 0.96);
    border: 2px solid rgba(40, 165, 255, 0.22);
    box-shadow: 0 0 30px rgba(0, 120, 255, 0.18);
}

.overlay-card h1 {
    font-size: 48px;
    margin-bottom: 18px;
    letter-spacing: 2px;
}

.overlay-card p {
    margin: 12px 0;
    font-size: 18px;
}

button {
    margin-top: 18px;
    padding: 14px 36px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #00c8ff, #0088ff);
    color: #000;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 200, 255, 0.24);
}

button:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .hud-row {
        flex-direction: column;
        gap: 12px;
    }

    .overlay-card {
        width: calc(100% - 40px);
        padding: 24px;
    }
}
