/* Custom CSS Variables */
:root {
    --primary: #00B98E;
    --light: #EFFDF5;
    --dark: #0E2E50;
    --text-muted: #6c757d;
    --danger: #dc3545; 
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0; padding: 0; height: 100dvh; min-height: 100vh;
    font-family: 'Heebo', sans-serif;
    background-color: var(--light); color: var(--dark);
    display: flex; flex-direction: column; overflow: hidden; 
    
    /* CRITICAL MOBILE GAME FEATURES */
    cursor: crosshair; 
    user-select: none; 
    -webkit-user-select: none; /* Prevents text highlighting */
    -webkit-touch-callout: none; /* Prevents iOS long-press popup */
    touch-action: none; /* Disables double-tap zoom and swipe-to-scroll */
}

/* Score and Reset Container */
.score-container {
    position: absolute; top: 20px; right: 20px;
    display: flex; align-items: center; gap: 10px; z-index: 100;
}

.score-board {
    background-color: #ffffff; border: 2px solid var(--primary); color: var(--primary);
    padding: 8px 18px; font-size: 1.3rem; font-weight: 700; border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: color 0.3s, border-color 0.3s;
    display: flex; gap: 12px; align-items: center;
}

.divider { color: #ccc; font-weight: 400; }
.high-score-text { color: var(--primary); }
.negative-score { color: var(--danger) !important; }

.reset-btn {
    background-color: #FF6922; color: #fff; border: none; padding: 10px 18px;
    font-size: 1.1rem; font-weight: 600; border-radius: 10px; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: transform 0.1s;
}

.reset-btn:active { transform: scale(0.9); }

/* Main Container */
.main-content {
    flex: 1; display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 10; 
}

/* Turret Wrapper and styling */
.turret-container { position: relative; display: inline-block; }

.turret-svg {
    display: block;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

/* Footer Styling */
footer {
    position: absolute; bottom: 10px; width: 100%; text-align: center;
    font-size: 0.875rem; color: var(--text-muted); z-index: 100; pointer-events: none;
}

/* Fish, Bullet & Blood Styling */
.fish { position: absolute; pointer-events: none; z-index: 0; will-change: transform, left, top; transform-origin: center; }

.bullet {
    position: absolute; width: 12px; height: 12px; background-color: #FF6922; 
    border-radius: 50%; box-shadow: 0 0 10px #FF6922, 0 0 20px #FF6922;
    pointer-events: none; z-index: 5; transform: translate(-50%, -50%);
}

.blood-drop {
    position: absolute;
    width: 6px; height: 6px; background-color: var(--danger);
    border-radius: 50%; pointer-events: none; z-index: 4;
    transform: translate(-50%, -50%); box-shadow: 0 0 5px var(--danger);
}

/* --- Highly Optimized Mobile Responsiveness --- */
@media (max-width: 650px) {
    .turret-svg { width: 70px; height: 70px; }
    
    /* Center the scoreboard dynamically at the top */
    .score-container { 
        top: 15px; left: 50%; right: auto; 
        transform: translateX(-50%); 
        width: 90%; max-width: 400px;
        justify-content: center; gap: 8px;
    }
    
    .score-board { 
        font-size: 1rem; padding: 6px 12px; gap: 8px; 
        width: 100%; justify-content: center;
    }
    
    .reset-btn { padding: 6px 12px; font-size: 0.95rem; white-space: nowrap; }
    
    /* Push the turret down slightly so it doesn't overlap the centered scoreboard */
    .turret-container { margin-top: 40px; }
    
    footer { font-size: 0.75rem; }
}