:root {
    --bg-dark: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-dark);
    color: white;
    font-family: 'Outfit', sans-serif;
    margin: 0;
    overflow-x: hidden;
    overflow-y: hidden; /* Prevent scrolling while playing */
    touch-action: none; /* Prevent swipe-to-refresh on mobile iOS */
}

.game-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.game-header { text-align: center; }
.game-header h1 { font-size: 2.2rem; margin: 0.5rem 0 0.5rem 0; line-height: 1; }

.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    margin: 2rem auto;
    text-align: center;
}

.btn-group {
    display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem;
}

.score-board {
    display: flex; justify-content: space-around; background: rgba(0,0,0,0.3); border-radius: 12px; padding: 0.5rem; margin-bottom: 0.5rem; border: 1px solid var(--glass-border); align-items: stretch;
}
.score-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 1rem;
}
#enemy-hud {
    border-left: 1px solid var(--glass-border);
}
.score-label {
    font-size: 0.8rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px;
}
.score-value {
    font-size: 1.5rem; font-weight: 700;
}
.text-red { color: #ef4444; font-size: 1.2rem; }

main { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }

.canvas-container {
    width: 100%; max-width: 500px; flex: 1; min-height: 0; margin-bottom: 1rem; display: flex; justify-content: center; position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 2px solid var(--primary);
}

canvas {
    background: #000; display: block; width: 100%; height: 100%; object-fit: contain;
}

.hidden { display: none !important; }

@media (max-width: 500px) {
    .game-wrapper { padding: 0.5rem; }
    .game-header h1 { font-size: 1.8rem; }
    .score-value { font-size: 1.2rem; }
}
