  /* style.css */
  body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent scrollbars */
    font-family: sans-serif;
    background-color: #222; /* Fallback background */
    color: white;
}

#gameCanvas {
    display: block; /* Remove potential extra space below canvas */
    width: 100vw;
    height: 100vh;
}

/* UI Overlays */
.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    z-index: 10;
    box-sizing: border-box;
    padding: 20px;
    text-align: center;
}

.hidden {
    display: none !important; /* Use !important to override default flex */
}

/* Intro Screen Specifics */
#introScreen {
    background-color: rgba(30, 60, 30, 0.8); /* Dark green tint */
    /* TODO: Add cool background image via background-image property */
    background-image: url('placeholder-intro-bg.jpg'); /* Example */
    background-size: cover;
    background-position: center;
}
#introScreen h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px #000;
}
#introScreen button,
#pauseScreen button,
#endScreen button {
    padding: 15px 30px;
    font-size: 1.2em;
    margin: 10px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    transition: background-color 0.3s ease;
}
#introScreen button:hover,
#pauseScreen button:hover,
#endScreen button:hover {
    background-color: #45a049;
}
#highScores {
    margin-top: 20px;
    background-color: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: 8px;
    min-width: 250px;
}
#highScores h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5em;
}
#highScoreList {
    list-style: none;
    padding: 0;
    margin: 0;
}
#highScoreList li {
    margin-bottom: 5px;
    font-size: 1.1em;
}
#soundToggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.5em; /* Adjust size via font */
}
#fullscreenButton {
    position: absolute;
    top: 20px;
    left: 20px;
     width: 50px;
    height: 50px;
    font-size: 1.2em; /* Adjust size via font */
}


/* In-Game HUD */
#gameHud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* Below overlays, above canvas */
    pointer-events: none; /* Allow clicks to pass through to canvas unless on specific element */
}
#scoreDisplay, #timeDisplay {
    position: absolute;
    top: 10px;
    padding: 10px 15px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 5px;
    font-size: 1.5em;
    text-shadow: 1px 1px 2px #000;
}
#scoreDisplay {
    left: 10px;
}
#timeDisplay {
    right: 10px;
}
#rearViewMirror {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px; /* Example size */
    height: 80px; /* Example size */
    background-color: rgba(50, 50, 50, 0.7);
    border: 2px solid #aaa;
    border-radius: 4px;
    /* Content will be rendered by Three.js viewport */
    overflow: hidden; /* Ensure nothing spills out */
}
#powerupIndicator {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
    background-color: rgba(0, 150, 255, 0.7);
    border-radius: 5px;
    font-size: 1.1em;
    display: none; /* Hidden by default */
}
#pauseButton {
    position: absolute;
    top: 80px; /* Below score/time */
    right: 10px;
    padding: 10px;
    background-color: rgba(200, 150, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    pointer-events: auto; /* Make button clickable */
    width: 40px;
    height: 40px;
    line-height: 1; /* Center symbol */
    text-align: center;
}
#pauseButton:hover {
    background-color: rgba(230, 180, 0, 0.9);
}

/* Pause Screen */
#pauseScreen {
    background-color: rgba(0, 0, 0, 0.85);
}
#pauseScreen h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
}

/* End Screen */
#endScreen {
     background-color: rgba(80, 20, 20, 0.85); /* Reddish tint */
}
#endScreen h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
}
#endScreen p {
    font-size: 1.3em;
    margin: 5px 0;
}
#highScoreInput {
    margin-top: 15px;
    display: none; /* Show only if new high score */
}
#highScoreInput label {
     margin-right: 10px;
     font-size: 1.1em;
}
#highScoreInput input {
    padding: 8px;
    font-size: 1.1em;
    width: 60px; /* For 3 initials */
    text-transform: uppercase;
}
#highScoreInput button {
    padding: 8px 15px;
    font-size: 1.1em;
    margin-left: 10px;
}

/* Loading Indicator (Optional but good practice) */
#loadingIndicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    z-index: 20;
    background: rgba(0,0,0,0.8);
    padding: 20px;
    border-radius: 10px;
}
