@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700&display=swap');

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

body {
    font-family: 'Orbitron', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at top, #2a1b65 0%, transparent 40%),
        radial-gradient(circle at bottom, #0d0221 0%, transparent 45%),
        linear-gradient(135deg, #04030f, #090921, #12003b);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(#6ef5ff 1px, transparent 1px),
        radial-gradient(#ffffff 2px, transparent 2px);
    background-size: 80px 80px, 140px 140px, 220px 220px;
    opacity: .35;
    animation: starsMove 40s linear infinite;
    pointer-events: none;
}

@keyframes starsMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(500px);
    }
}

.container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

#gameCanvas {
    display: block;
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, .15);
    background: linear-gradient(#050510, #0d1035);
    box-shadow:
        0 0 20px rgba(0, 255, 255, .2),
        0 0 50px rgba(138, 43, 226, .5),
        0 0 100px rgba(0, 255, 255, .15);
    transition: .3s;
}

#gameCanvas:hover {
    transform: scale(1.005);
}

.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.title {
    font-size: 28px;
    font-weight: 700;
    color: #00f5ff;
    text-shadow: 0 0 10px cyan, 0 0 30px cyan;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px cyan, 0 0 20px cyan;
    }

    to {
        text-shadow: 0 0 20px cyan, 0 0 40px cyan, 0 0 60px cyan;
    }
}

.card {
    min-width: 120px;
    padding: 10px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, .15);
    color: white;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 255, 255, .12), inset 0 0 15px rgba(255, 255, 255, .05);
    transition: .3s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px cyan, 0 0 50px #8e2de2;
}

.score {
    color: #00ffb3;
}

.life {
    color: #ff5d8f;
}

.level {
    color: #ffd43b;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 14px;
    padding: 10px 20px;
    background: linear-gradient(45deg, #00e5ff, #7b2cff);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    transition: .3s;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px cyan, 0 0 40px #8e2de2;
}

@media(max-width:900px) {
    .hud {
        flex-wrap: wrap;
        justify-content: center;
    }

    .title {
        width: 100%;
        text-align: center;
    }

    #gameCanvas {
        width: 95vw;
        height: auto;
    }
}