body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 320px;
    height: 480px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

canvas {
    display: block;
    background-color: #70c5ce; /* Sky blue */
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to canvas/document usually, but we handle buttons */
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    pointer-events: auto;
}

.screen.active {
    display: flex;
}

h1 {
    font-size: 40px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 #000;
    color: #f4a460;
    -webkit-text-stroke: 1px #fff;
}

p {
    font-size: 18px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 0 #000;
}

button {
    padding: 10px 20px;
    font-size: 18px;
    background-color: #e04006;
    color: white;
    border: 2px solid #fff;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 0 #8b2e04;
    transition: transform 0.1s, box-shadow 0.1s;
}

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

#score-display {
    position: absolute;
    top: 10%;
    width: 100%;
    text-align: center;
    font-size: 40px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 0 #000;
    pointer-events: none;
    z-index: 10;
}

#score-board {
    background-color: #ded895;
    border: 2px solid #543847;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    width: 200px;
    text-align: center;
    color: #e08b54;
}

#score-board p {
    margin: 5px 0;
    color: #e08b54;
    text-shadow: none;
    font-weight: bold;
    font-size: 20px;
    display: flex;
    justify-content: space-between;
}

#score-board span {
    color: #fff;
    text-shadow: 1px 1px 0 #000;
}