

.body {
    width: auto;
    height: 100vh;
    overflow: hidden;
    background: #02030a;
    font-family: Arial, sans-serif;
    touch-action: none;
        padding: 0;
    border: 0;
}

#game {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 20%, #101b42 0%, #050816 35%, #02030a 80%);
}

/* Stars */
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: .7;
}

/* HUD */
#hud {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    z-index: 20;

    display: flex;
    justify-content: space-between;
    align-items: center;

    color: white;
    font-size: 18px;
    font-weight: bold;

    pointer-events: none;
}

.hudBox {
    background: rgba(0,0,0,.45);
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.15);
    backdrop-filter: blur(5px);
}

/* Ship */
#ship {
    position: absolute;
    width: 48px;
    height: 62px;
    z-index: 10;

    transform: translate(-50%, -50%);
    user-select: none;
}

.shipBody {
    position: absolute;
    left: 50%;
    top: 0;

    width: 0;
    height: 0;

    transform: translateX(-50%);

    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 52px solid #dceeff;

    filter: drop-shadow(0 0 8px #55bfff);
}

.shipWindow {
    position: absolute;
    left: 50%;
    top: 18px;

    width: 13px;
    height: 13px;

    transform: translateX(-50%);

    background: #269cff;
    border: 2px solid #fff;
    border-radius: 50%;
}

.flame {
    position: absolute;
    left: 50%;
    bottom: -7px;

    width: 13px;
    height: 22px;

    transform: translateX(-50%);

    background: #ff9d00;
    border-radius: 50% 50% 60% 60%;

    animation: flame .08s infinite alternate;
}

@keyframes flame {
    from {
        height: 15px;
    }

    to {
        height: 25px;
    }
}

/* Asteroid */
.asteroid {
    position: absolute;
    z-index: 8;

    border-radius: 42% 58% 55% 45%;

    background:
        radial-gradient(circle at 30% 25%, #ffb000 0 7%, transparent 8%),
        radial-gradient(circle at 65% 60%, #ffb000 0 10%, transparent 11%),
        radial-gradient(circle at 45% 75%, #ffb000 0 7%, transparent 8%),
        #555;

    box-shadow:
        inset -8px -10px 15px rgba(0,0,0,.5),
        0 0 5px rgba(255,255,255,.1);

    border: 2px solid #666;
}

/* Explosion */
.explosion {
    position: absolute;
    z-index: 15;

    width: 30px;
    height: 30px;

    border-radius: 50%;

    background: #ffb000;

    transform: translate(-50%, -50%);

    animation: explode .4s forwards;
}

@keyframes explode {
    0% {
        transform: translate(-50%, -50%) scale(.3);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Start / Game Over screen */
#overlay {
    position: absolute;
    inset: 0;

    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,.7);
    backdrop-filter: blur(5px);
}

.panel {
    width: min(76%, 430px);

    padding: 35px 25px;

    text-align: center;

    color: white;

    background: rgba(8,12,35,.95);

    border: 1px solid rgba(255,255,255,.2);

    border-radius: 20px;

    box-shadow: 0 20px 70px rgba(0,0,0,.6);
}

.panel h1 {
    font-size: 38px;
    margin-bottom: 12px;

    color: #7ed6ff;

    text-shadow: 0 0 15px #188dff;
}

.panel p {
    color: #c8d4ef;
    line-height: 1.6;
    margin-bottom: 20px;
}

#startBtn {
    border: none;
    outline: none;

    padding: 13px 28px;

    border-radius: 30px;

    background: #168cff;
    color: white;

    font-size: 18px;
    font-weight: bold;

    cursor: pointer;

    box-shadow: 0 0 20px rgba(22,140,255,.5);
}

#startBtn:active {
    transform: scale(.95);
}

/* Mobile controls */
#controls {
    position: absolute;

    bottom: 25px;
    left: 0;
    right: 0;

    z-index: 30;

    display: none;

    justify-content: center;
    gap: 18px;
}

.controlBtn {
    width: 65px;
    height: 65px;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,.3);

    background: rgba(255,255,255,.12);

    color: white;

    font-size: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    user-select: none;
}

.controlBtn:active {
    background: rgba(255,255,255,.3);
}

@media (max-width: 700px) {
    #controls {
        display: flex;
    }

    #hud {
        font-size: 15px;
    }

    #ship {
        width: 42px;
        height: 55px;
    }

    .panel h1 {
        font-size: 32px;
    }
}