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

body {
    background: #0f0f1e;
    color: #e8e8e8;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Press Start 2P', 'Courier New', monospace;
}

/* Landscape warning */
.landscape-warning {
    display: none;
    position: fixed;
    inset: 0;
    background: #0f0f1e;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    color: #ff004d;
    text-align: center;
    padding: 20px;
}
@media screen and (orientation: landscape) and (max-height: 500px) {
    .landscape-warning { display: flex; }
    .game-container { display: none !important; }
}

.game-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
    position: relative;
}

.screen {
    display: none;
    position: absolute;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.screen.active { display: flex; }

/* Start screen */
.title {
    font-size: 28px;
    color: #00ff41;
    text-shadow: 3px 3px 0 #0a0a15, 0 0 20px rgba(0,255,65,0.4);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 8px;
}
.subtitle {
    font-size: 10px;
    color: #555;
    letter-spacing: 3px;
    margin-bottom: 30px;
}
.best-score {
    font-size: 10px;
    color: #ffd700;
    margin-top: 12px;
    min-height: 16px;
}
.instructions {
    margin-top: 24px;
    font-size: 9px;
    color: #888;
    line-height: 2;
    text-align: center;
}

/* Pixel button */
.pixel-btn {
    background: transparent;
    color: #00ff41;
    border: 3px solid #00ff41;
    padding: 14px 28px;
    font-size: 13px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    letter-spacing: 1px;
    position: relative;
    box-shadow: 4px 4px 0 #0a0a15;
    transition: all 0.08s;
    margin: 8px;
}
.pixel-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #0a0a15;
}

/* HUD */
.hud {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(15,15,30,0.85);
    font-size: 11px;
    color: #00ff41;
}
#hudCombo {
    color: #ffd700;
    font-size: 10px;
}

/* Canvas */
#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Over screen */
.over-title {
    font-size: 22px;
    color: #ff004d;
    text-shadow: 2px 2px 0 #0a0a15;
    margin-bottom: 24px;
}
.over-stats {
    background: rgba(0,0,0,0.4);
    border: 2px solid #333;
    padding: 16px 24px;
    margin-bottom: 24px;
    min-width: 220px;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 10px;
    border-bottom: 1px solid #222;
}
.stat-row.best {
    border-bottom: none;
    color: #ffd700;
}

/* Responsive */
@media (max-width: 360px) {
    .title { font-size: 22px; }
    .pixel-btn { font-size: 11px; padding: 12px 20px; }
    .instructions { font-size: 8px; }
}
