* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
}

body {
    font-family: 'Courier New', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

#gameCanvas {
    display: block;
    background: #87CEEB;
    border: none;
    image-rendering: pixelated;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10;
    color: #fff;
    text-align: center;
    padding: 20px;
}

.screen.hidden {
    display: none;
}

h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 4px 4px 0px #000;
    color: #FFD700;
    letter-spacing: 2px;
}

h2 {
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0px #000;
    color: #ff4444;
}

.subtitle {
    font-size: 16px;
    margin-bottom: 30px;
    color: #FFD700;
}

.pixel-btn {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    padding: 15px 40px;
    background: #FFD700;
    color: #000;
    border: 4px solid #333;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px #000;
    transition: all 0.1s;
}

.pixel-btn:hover {
    background: #FFA500;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

.pixel-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #000;
}

.instructions {
    margin-top: 30px;
    font-size: 14px;
    line-height: 1.8;
    color: #ccc;
}

#final-score, #high-score {
    font-size: 24px;
    margin: 10px 0;
    color: #FFD700;
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 5;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 3px 3px 0px #000,
                -1px -1px 0px #000,
                1px -1px 0px #000,
                -1px 1px 0px #000,
                1px 1px 0px #000;
}
