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

body {
    background-color: #0d0d0d;
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 100%;
    max-height: 600px;
    background-color: #1a1a1a;
    border: 2px solid #333;
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.4);
    overflow: hidden;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#score-display {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 14px;
    color: #ffcc00;
    text-shadow: 2px 2px 0px #000;
    z-index: 10;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: auto;
    z-index: 20;
    padding: 20px;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay h1 {
    font-size: 28px;
    color: #ff4500;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff4500, 3px 3px 0px #8b0000;
    line-height: 1.2;
}

.overlay p {
    font-size: 10px;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #ccc;
}

button {
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    padding: 15px 20px;
    background-color: #ff4500;
    color: #fff;
    border: 4px solid #8b0000;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.1s, background-color 0.2s;
    outline: none;
}

button:hover {
    background-color: #ff6347;
    transform: scale(1.05);
}

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