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

body {
    overflow: hidden;
    background: #87CEEB;
    /* Sky blue */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through to canvas when playing */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#start-screen,
#game-over-screen {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    pointer-events: auto;
    /* Re-enable clicks for buttons */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hidden {
    display: none !important;
}

h1 {
    margin-bottom: 1rem;
    color: #ff6b6b;
    font-size: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0px #fff;
}

p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 2rem;
}

button {
    background: linear-gradient(45deg, #4ecdc4, #45b7af);
    border: none;
    padding: 15px 40px;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
    margin-top: 1rem;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.6);
}

button:active {
    transform: scale(0.95);
}

/* Upload Button Styling */
.upload-container {
    margin-bottom: 1.5rem;
}

input[type="file"] {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #f1c40f;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    border: 2px solid #f39c12;
    transition: all 0.2s;
}

.upload-btn:hover {
    background: #f39c12;
    color: white;
}

#score-hud {
    position: absolute;
    top: 10%;
    font-size: 5rem;
    font-weight: bold;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}