* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none; /* Prevent zooming/scrolling on mobile */
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Fredoka One', cursive; /* Fun, round cartoon font */
    background-color: #333;
}

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

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

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    pointer-events: auto; /* Re-enable clicks for buttons */
    transition: opacity 0.3s ease;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

h1 {
    font-size: 3rem;
    color: #fff;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 0 #000;
}

.btn {
    background: #e67e22; /* Carrot orange */
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    border-radius: 50px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 5px 0 #d35400; /* Darker orange shadow/3d effect */
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 #d35400;
}

.score-board {
    background: #f1c40f; /* Yellow */
    border: 3px solid #e67e22;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.score-board p {
    color: #e67e22;
    margin-bottom: 5px;
    text-shadow: none;
    font-size: 1rem;
    text-transform: uppercase;
}

.score-board div {
    font-size: 2rem;
    color: #fff;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

#score-hud {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    color: white;
    text-shadow: 3px 3px 0 #000;
    pointer-events: none;
    z-index: 10;
}

#score-hud.hidden {
    display: none;
}
