body {
    background-color: #1a1a1a;
    color: #eee;
    font-family: 'Press Start 2P', cursive; /* Assuming you have this font or similar */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden; /* Hide scrollbars if canvas expands */
}

/* Add this to your style.css */
#gameCanvas {
    cursor: none; /* This line hides the mouse cursor */
    display: block;
    background-color: #0d0d0d;
    image-rendering: optimizeSpeed; /* For pixel art feel */
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
    width: 100%; /* Ensure canvas fills its wrapper */
    height: 100%; /* Ensure canvas fills its wrapper */
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 5px;
    background-color: #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    position: relative;
}

#canvas-wrapper {
    position: relative;
    width: 850px; /* Base width */
    height: 750px; /* Base height */
    overflow: hidden; /* Prevent content overflow during zoom */
    border: 2px solid #00ffdd; /* Player color border */
    border-radius: 8px;
    /* Ensure the canvas wrapper can go fullscreen */
    transition: width 0.3s, height 0.3s; /* Smooth transition for size change */
}

#gameCanvas {
    display: block;
    background-color: #0d0d0d;
    image-rendering: optimizeSpeed; /* For pixel art feel */
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
    width: 100%; /* Ensure canvas fills its wrapper */
    height: 100%; /* Ensure canvas fills its wrapper */
}

#game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Slightly darker for game over */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5em;
    text-align: center;
    z-index: 10;
    display: none; /* Hidden by default */
    padding: 5px;
    box-sizing: border-box;
}

#game-over-overlay h2 {
    color: #ff4136;
    margin-bottom: 10px;
}

#game-over-overlay p {
    margin-bottom: 5px;
    font-size: 0.8em;
}

#highscore-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}

#player-name {
    padding: 8px;
    font-size: 0.8em;
    border: 1px solid #00ffdd;
    background-color: #1a1a1a;
    color: #eee;
    border-radius: 4px;
    text-align: center;
}

#submit-score, #play-again {
    padding: 5px;
    background-color: #00ffdd;
    color: #1a1a1a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

#submit-score:hover, #play-again:hover {
    background-color: #00cccc;
}

/* Styles for the in-game score display */
#game-score-display {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 5; /* Above canvas, below game over overlay */
    color: white;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.0); /* Semi-transparent background */
    padding: 5px;
    border-radius: 1px;
    max-width: 10%;
    font-size: 18px; /* Example base size for everything in this div */
    color: #fff;
    font-family: 'Arial', sans-serif;
 
}

#game-score-display h1 {
    font-size: 1.2em;
    margin: 0 0 10px 0;
    color: #00ffdd;
}

#score {
    font-size: 1.5em;
    margin: 0; /* Remove bottom margin */
}

#score span {
    color: #ffc107;

    font-size: 2em;
}

/* High Score list styling (now inside game-over-overlay) */
#game-over-overlay h3 {
    font-size: 1em;
    margin-top: 5px;
    margin-bottom: 5px;
    color: #00ffdd;
}

/* In your style.css file */

#game-score-display {
    /* Assuming you have a base font size here for the score display area */
   /* ... other styles for the main score area */
}

#threading-ratio-display {
    /* This rule applies directly to the div containing "Thread Ratio: X.X" */
    font-size: 1em; /* Make it slightly smaller than the parent score font */
    color: #00ffdd; /* Or a color that makes it stand out */
    margin-top: 5px; /* Add some space below the main score */
}

#ratio-display {
    /* This rule applies directly to the number itself (0.0x) */
    font-size: 1.3em; /* Make the number a bit larger than "Thread Ratio:" text */
    font-weight: bold;
    color: lightgreen; /* Could be same as main score or different */
}

#high-scores-list {
    list-style: none;
    padding: 0;
    margin: 0 0 5px 0; /* Add some bottom margin */
    font-size: 0.7em;
    max-height: 150px;
    overflow-y: auto;
    width: 80%; /* Constrain width within overlay */
    max-width: 300px; /* Max width for readability */
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    padding: 10px;
}

#high-scores-list li {
    padding: 2px 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dotted rgba(255,255,255,0.1);
}
#high-scores-list li:last-child {
    border-bottom: none;
}
#high-scores-list .name {
    color: #aaa;
}
#high-scores-list .score {
    color: #ffc107;
}


/* Styles for the fullscreen button */
#fullscreen-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10;
    padding: 8px 15px;
    background-color: #333;
    color: #eee;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.7em;
    transition: background-color 0.2s ease;
}

#fullscreen-btn:hover {
    background-color: #555;
}

/* Styles for when the canvas is in fullscreen mode */
#canvas-wrapper:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    border: none;
    z-index: 9999;
}

/* Adjust position of in-game UI elements in fullscreen */
#canvas-wrapper:fullscreen #game-score-display {
    left: 5px;
    top: 5px;
}

#canvas-wrapper:fullscreen #fullscreen-btn {
    bottom: 5px;
    left: 5px;
}

#game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Make sure it takes up full vertical space */
    background-color: #1a1a1a; /* Example background */
    overflow: hidden; /* Hide scrollbars if content overflows */
}

#canvas-wrapper {
    position: relative;
    /* Set a max width/height to control initial size, but allow responsiveness */
    max-width: 800px; /* Or whatever your desired max game width is */
    max-height: 800px;
    width: 100%; /* Take full width of parent up to max-width */
    height: 100vh; /* Take full height of viewport for calculation */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Crucial to prevent scrollbars */
}

#gameCanvas {
    display: block; /* Remove extra space below canvas */
    /* Its actual size will be set by JS, but max-width/height can help containment */
    /* transition: all 0.2s ease-out; /* Optional: smooth resize animation */
}
/* Style for overlay and score display to position correctly over the canvas */
#game-over-overlay, #game-score-display {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* other styling */
}
