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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0b0c10;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    touch-action: none; /* Prevent double-tap zoom and scrolling on mobile */
}

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

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#hud {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.8), 0 0 20px rgba(0, 240, 255, 0.5);
    pointer-events: none;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    text-align: center;
}

#overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

#overlay-title {
    font-size: 4.5rem;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 0 15px #00f0ff, 0 0 30px #00f0ff;
    letter-spacing: 8px;
    text-transform: uppercase;
    font-weight: 900;
}

#overlay-desc, #overlay-desc2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #c5c6c7;
    font-weight: 500;
    letter-spacing: 1px;
}

#overlay-instruction {
    margin-top: 50px;
    font-size: 1.5rem;
    color: #ffaa00;
    font-weight: bold;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite alternate;
    cursor: pointer;
    padding: 15px 30px;
    border: 2px solid rgba(255, 170, 0, 0.3);
    border-radius: 8px;
    background: rgba(255, 170, 0, 0.1);
    text-shadow: 0 0 10px #ffaa00;
}

#overlay-instruction:hover {
    background: rgba(255, 170, 0, 0.2);
    border-color: rgba(255, 170, 0, 0.8);
}

@keyframes pulse {
    0% { opacity: 0.6; box-shadow: 0 0 10px rgba(255, 170, 0, 0.2); }
    100% { opacity: 1; box-shadow: 0 0 25px rgba(255, 170, 0, 0.6); }
}

@media (max-width: 600px) {
    #overlay-title {
        font-size: 2.8rem;
    }
    #overlay-desc, #overlay-desc2 {
        font-size: 1rem;
        padding: 0 20px;
    }
    #hud {
        font-size: 20px;
        top: 20px;
        left: 20px;
    }
}
