/* Fullscreen & Font Setup */
html, body {
    margin: 0; padding: 0; overflow: hidden; height: 100%; width: 100%;
    background-color: #000; font-family: 'Roboto Mono', monospace;
}
#game-container { position: relative; width: 100%; height: 100%; }
#gameCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* Main Menu Styles */
#start-screen {
    background-image: url('images/menu_background.png'); background-size: cover; background-position: center;
    display: flex; flex-direction: column;
    justify-content: center;
    align-items: center;
}
#game-title {
    color: #f0e6d2; font-size: clamp(2rem, 8vw, 5rem); text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    letter-spacing: 5px; border: 3px solid #f0e6d2; padding: 10px 20px; margin-bottom: 20px;
}
#menu-u2-graphic { width: clamp(300px, 50%, 700px); margin-bottom: -50px; filter: drop-shadow(0 0 15px rgba(0,0,0,0.7)); }

.menu-button {
    background-color: #4d443a; color: #f0e6d2; border: 2px solid #2e2821; padding: 15px 30px;
    font-family: 'Roboto Mono', monospace; font-size: 1.2rem; font-weight: 700;
    margin: 10px; cursor: pointer; transition: all 0.2s ease; min-width: 250px;
}
.menu-button:hover { background-color: #635749; }
.menu-button:disabled { background-color: #333; color: #777; cursor: not-allowed; }

/* Menu content boxes */
.menu-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    background-color: rgba(0,0,0,0.88); border: 2px solid #f0e6d2;
    padding: 2vw 4vw;
    width: clamp(500px, 80%, 1200px);
    color: #f0e6d2;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.menu-content h2 { font-size: 2.5rem; margin-top: 0; }
.menu-content p { font-size: 1.2rem; line-height: 1.8; max-width: 80%; }
.menu-content .back-button { margin-top: 30px; }

/* Generic Screen Overlay */
.screen {
    position: absolute; width: 100%; height: 100%; z-index: 10;
    display: none; justify-content: center; align-items: center;
}
#start-screen { display: flex; flex-direction: column; }
#pause-screen, #enter-score-screen, #level-end-message-screen, #mission-briefing-screen { background-color: rgba(0, 0, 0, 0.7); }

/* Level End Message */
#level-end-text {
    font-size: 5rem;
    color: #f0e6d2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    padding: 20px;
}

/* Pause & Debrief Panel Styles */
.menu-panel-debrief {
    background-color: #2e2821; border: 2px solid #f0e6d2; padding: 40px;
    text-align: center; color: #f0e6d2; width: clamp(400px, 70%, 1000px);
}
.menu-panel-debrief h1 { margin-top: 0; }
/* NEW: Ensure paragraph text inside these panels is centered */
.menu-panel-debrief p {
    text-align: center;
}


/* High Score List & Menu Image Styles */
.initials-box { font-family: 'Roboto Mono', monospace; font-size: 2rem; width: 120px; text-align: center; background-color: #f0e6d2; border: 2px solid #2e2821; color: #2e2821; text-transform: uppercase; margin-bottom: 20px; }
#high-scores-list { list-style: none; padding: 0; width: 80%; font-size: 1.2rem; text-align: left; }
#high-scores-list li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed #4d443a; }
#high-scores-list li .score-date { color: #a79c88; }
.footnote { font-size: 0.9rem; color: #a79c88; margin-top: 20px; font-style: italic; }
.menu-panel-image {
    width: 60%;
    max-width: 350px;
    margin-bottom: 20px;
    border: 2px solid #4d443a;
    border-radius: 4px;
}

/* In-Game HUD */
#pause-button {
    position: absolute; bottom: 20px; right: 20px; pointer-events: all;
    background: #4d443a; color: #f0e6d2; border-radius: 50%;
    width: 56px; height: 56px; border: 2px solid #2e2821;
}