/* General body and page styling */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevents scrollbars */
    background-color: #111; /* Dark background for the page */
    color: white; /* Default text color */
    font-family: Arial, Helvetica, sans-serif; /* Consistent font */
}

/* Ensure canvas takes full screen and is behind UI elements */
#gameCanvas {
    display: block; /* Remove potential extra space below inline elements */
    width: 100vw;
    height: 100vh;
    position: fixed; /* Cover the entire viewport */
    top: 0;
    left: 0;
    z-index: 1; /* Behind most UI but above body background */
}

/* Styling for the instructions box */
#instructions {
    position: absolute; /* Positioned relative to the body */
    top: 20%; /* Center vertically */
    left: 45%; /* Center horizontally */
    justify-content: center; /* Centers horizontally */
    align-items: center;    /* Centers vertically */
    background-color: rgba(30, 30, 30, 0.85); /* Semi-transparent dark box */
    color: #f0f0f0; /* Light grey text */
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    z-index: 5; /* Above canvas, but below crosshair and main UI like score/lives */
    max-width: 250px; /* Constrain width */
    box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Optional subtle shadow */
}

/* Styles moved from index.html <style> block and inline styles */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    pointer-events: none; /* Allows clicks to pass through */
    z-index: 10; /* Ensure it's above other elements */
}

#ui {
    position: fixed;
    top: 10px;
    left: 10px;
    color: white;
    font-size: 18px;
    z-index: 20;
}

#gameOver {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: red;
    font-size: 48px;
    font-weight: bold;
    z-index: 30;
    display: none; /* Initially hidden */
}

#safeCrackedBanner {
    display: none; /* Initially hidden */
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0,50,0,0.8);
    color: lime;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 1001;
}

#crushBanner {
    display: none; /* Initially hidden */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 24px;
    z-index: 1000;
}

#debugOverlay {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    z-index: 1000;
}

/* Add any existing styles from style.css below or above this block */