* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    color: #0c1b33;
    user-select: none; /* Prevents text selection while clicking */
}

body {
    background: #4ec0ca; /* Fallback color matching the sky */
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* Disables scrolling */
    position: relative;
}

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

/* Heads Up Display (Score) */
.hud {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 15px;
    z-index: 10;
    pointer-events: none;
}

.badge {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 16px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Full Screen Overlay */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4); /* Darkens the game background slightly */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

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

/* The Menu Card */
.overlay-card {
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    text-align: center;
    width: 90%;
    max-width: 400px;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.game-branding h1 {
    font-size: 36px;
    margin-bottom: 8px;
    color: #274064;
}

.tagline {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.overlay-hint {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

/* Buttons */
button {
    border: none;
    background: #ffb703;
    color: #0c1b33;
    font-size: 18px;
    font-weight: 800;
    padding: 14px 32px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 0 #d99a00; /* 3D effect */
    transition: transform 0.1s;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #d99a00;
}

.pause-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    pointer-events: auto;
}

#pauseOverlay {
    z-index: 30;
}

.hidden {
    display: none !important;
}