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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Luckiest Guy', cursive;
    touch-action: none; /* Disables pinch-to-zoom */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard syntax */
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

body {
    background-color: #003300;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    display: block;
    background-color: #003300;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#playerImg {
    position: absolute;
    width: 50px;
    height: 50px;
    transform: translate(-50%, -50%); /* Center the image on its coordinates */
    display: none; /* Hidden until game starts */
    pointer-events: none; /* Make sure it doesn't block touch events on canvas */
    image-rendering: pixelated;
    object-fit: contain;
    z-index: 3;
}

#messageContainer {
    position: absolute;
    color: white;
    text-align: center;
    pointer-events: none;
    padding: 20px;
    margin-bottom: 20vh;
}

#messageTitle {
    font-size: 2.0em;
    font-weight: 700;
}

#messageSubtitle {
    font-size: 1.0em;
    margin-top: 10px;
}

#scoreDisplay {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 1.5em;
    font-weight: 700;
    -webkit-text-stroke: 1px black; /* Outline for visibility */
    display: none; /* Hidden until game starts */
}



#finalScore, #highScoreText {
    font-size: 1.2em;
    margin-top: 15px;
    font-weight: bold;
}

#highScoreText.new-record {
    color: #ffd700; /* Gold color for new record */
    animation: pulse 1s infinite;
}



@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#collectibleCounter {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5em;
    font-weight: 700;
    -webkit-text-stroke: 1px black;
    display: none; /* Initially hidden, JS will set to flex */
    align-items: center;
    gap: 8px;
}

#collectibleIcon {
    width: 32px;
    height: 32px;
}

#collectibleCounterText {
    color: yellow;
}