* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'RetroFont';
    /* Using a standard system font fallback that looks somewhat blocky if no custom webfont is loaded, 
       but we will just use Courier New for that retro vibe */
    src: local('Courier New');
}

body,
html {
    width: 100%;
    height: 100%;
    background-color: #222;
    overflow: hidden;
    /* Prevent scrolling */
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', Courier, monospace;
    user-select: none;
    /* Prevent text selection */
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 100%;
    max-height: 700px;
    background-image: url('assets/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #70c5ce;
    /* Sky color fallback */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    /* Aspect ratio fallback for older browsers */
    aspect-ratio: 4 / 7;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    /* Retro pixel look */
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through to canvas if needed, though we handle global clicks */
    display: flex;
    flex-direction: column;
    align-items: center;
}

#score-display {
    margin-top: 10%;
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
    z-index: 10;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    /* Allow interacting with buttons if any */
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
    text-align: center;
}

p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 0 #000;
}