:root {
    --bg-color: #0b0c10;
    --text-color: #ffffff;
    --primary-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: var(--bg-color);
    background: radial-gradient(circle at center, #1f2833 0%, #0b0c10 100%);
    color: var(--text-color);
    font-family: var(--primary-font);
    overflow: hidden;
    /* Prevent mobile browsers from scrolling, bouncing, or zooming */
    touch-action: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
}

#score-container {
    position: absolute;
    top: 5vh;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 5vw;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
}

#score {
    color: #00e5ff;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    letter-spacing: 1px;
}

#highscore {
    color: #ffeb3b;
    text-shadow: 0 0 10px rgba(255, 235, 59, 0.5);
    letter-spacing: 1px;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 12, 16, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

#game-over.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    background: #1f2833;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 2px #45a29e;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#game-over.hidden .overlay-content {
    transform: translateY(50px);
}

.overlay-content h1 {
    font-size: 3rem;
    color: #ff2a2a;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(255, 42, 42, 0.6);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.overlay-content p {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #c5c6c7;
}

.overlay-content span {
    color: #00e5ff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.blink {
    animation: blinker 1.5s ease-in-out infinite;
    font-size: 1.2rem !important;
    color: #66fcf1 !important;
    margin-bottom: 0 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes blinker {
    50% { opacity: 0.2; }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #score-container {
        font-size: 1.2rem;
        top: 3vh;
    }
    .overlay-content h1 {
        font-size: 2.2rem;
    }
    .overlay-content p {
        font-size: 1.2rem;
    }
    .overlay-content {
        padding: 30px 20px;
        width: 85%;
    }
}
