* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Trebuchet MS';
}

body {
    width: 100%;
    height: 100vh;
    overflow: hidden;

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

    background: radial-gradient(1100px 600px at 50% 20%, #1e1e2a 0%, #151521 40%, #0f0f17 100%);
    color: #f2f2f2;
}

.wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index: 2;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 4rem;
    letter-spacing: 2px;
    margin-top: 10vh;
    /* Responsive top margin */
    text-shadow: 0 0 20px rgba(67, 211, 100, 0.4);
    /* Glow effect */
}

.subtitle {
    font-size: 1.2rem;
    color: #bdbdbd;
    font-weight: 300;
    margin-top: 10px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.score-flex {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translate(-50%);
    /* Adjusted center alignment */
    display: flex;
    align-items: center;
    background-color: #18181800;
    pointer-events: none;
}

.hud {
    gap: 20px;
    padding: 12px 24px;
    background: rgba(22, 22, 26, 0.8);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.gameOver {
    position: absolute;
    font-size: 5rem;
    font-weight: 900;
    color: #ff4d4d;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    z-index: 10;
}

.score {
    padding: 0;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.score span {
    color: #43d364;
    font-weight: 800;
    margin-left: 5px;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border: none;
    /* border-radius: 10px; removed border radius for fullscreen */
    /* box-shadow: 0 15px 50px rgba(0,0,0,0.45); removed shadow */
}

   