@font-face {
  font-family: Amelia;
  src: url(amelia.ttf);
}

body { 
    margin: 0; 
    overflow: hidden; 
    background-color: #050510; 
    color: #00ff00; 
    font-family: 'Courier New', Courier, monospace; 
    cursor: default; 
}

body.game-active {
    cursor: none; 
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; 
}

#uiCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20; 
    pointer-events: none;
}

#start-screen {
    position: absolute; top: 0; left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(5, 5, 16, 0.95);
    z-index: 50; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
}

#start-screen h1 { 
    font-family: 'Amelia';
    font-size: 72px; 
    text-shadow: 0 0 20px #00ff00; 
    text-align: center; 
    margin-bottom: 50px; 
}

#pause-screen h2{
    font-family: 'Amelia';
}

#start-btn { 
    padding: 20px 40px; 
    font-size: 24px; 
    font-family: 'Courier New', Courier, monospace; 
    background-color: #111; 
    color: #00ff00; 
    border: 3px solid #00ff00; 
    cursor: pointer; 
    box-shadow: 0 0 15px #00ff00; 
    transition: 0.2s; 
}

#start-btn:hover { 
    background-color: #00ff00; 
    color: #111; 
    box-shadow: 0 0 30px #00ff00; 
}

#pause-screen {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(5, 5, 16, 0.7); 
    backdrop-filter: blur(4px); 
    z-index: 40; 
    display: none; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
}

#pause-screen h2 { 
    font-size: 50px; 
    text-shadow: 0 0 20px #00ffff; 
    color: #00ffff; 
    margin-bottom: 10px; 
}

#pause-screen p { 
    font-size: 24px; 
    color: #fff; 
}

#cockpit-layer { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    pointer-events: none; 
    z-index: 10; 
    display: flex; 
    flex-direction: column; 
}


#custom-cockpit {
    width: 100%;
    flex-grow: 1; 
    background-color: rgba(20, 20, 30, 0.5); 
    background-image: url('cockpit.png'); 
    background-size: 100% 100%; 
    background-position: center bottom;
    background-repeat: no-repeat;
}

#dashboard { 
    width: 100%; 
    height: 18vh; 
    background: linear-gradient(180deg, #2a2a35 0%, #111 100%); 
    border-top: 8px solid #445; 
    display: flex; 
    justify-content: space-around; 
    align-items: center; 
    box-shadow: inset 0 15px 25px rgba(0,0,0,0.8); 
    pointer-events: auto; 
}

.instrument-panel { 
    background-color: #0a0a0a; 
    border: 4px solid #222; 
    border-radius: 8px; 
    padding: 10px 20px; 
    box-shadow: inset 0 0 15px rgba(0,0,0,0.9), 0 5px 10px rgba(0,0,0,0.5); 
    text-align: center; 
}

.panel-label { 
    font-size: 14px; 
    color: #aaa; 
    margin-bottom: 5px; 
    letter-spacing: 2px; 
}

#score-display { 
    font-family: 'Amelia';
    font-size: 28px; 
    font-weight: bold; 
    text-shadow: 0 0 8px #00ff00; 
}

#health-container { 
    width: 200px; 
    height: 20px; 
    background-color: #330000; 
    border: 2px solid #00ff00; 
}

#health-bar { 
    width: 100%; 
    height: 100%; 
    background-color: #00ff00; 
    transition: width 0.2s, 
    background-color 0.2s; 
}

#hearts-container { 
    font-size: 24px; 
    letter-spacing: 4px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 24px; 
    transition: text-shadow 0.3s; 
}

.heart-full { 
    color: #00ff00; 
    text-shadow: 0 0 10px #00ff00; 
}

.heart-empty { 
    color: #1a441a; 
    text-shadow: none; 
}

.heal-flash { 
    animation: flash-green 0.5s ease-out; 
}

@keyframes flash-green { 0% { text-shadow: 0 0 30px #00ff00, 0 0 50px #00ff00; color: #fff; } 100% { text-shadow: 0 0 10px #00ff00; color: #00ff00; } }

#game-over { 
    position: absolute; 
    top: 40%; 
    font-family:'Amelia';
    left: 50%; 
    transform: translate(-50%, -50%); 
    font-size: 50px; 
    text-align: center; 
    display: none; 
    text-shadow: 0 0 20px #ff0000; 
    color: #e0e0e0; 
    z-index: 30; 
    background: rgba(0,0,0,0.8); 
    padding: 20px 40px; 
    border: 2px solid #ff0000; 
    border-radius: 10px; 
}

#damage-flash { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(255, 0, 0, 0.4); 
    pointer-events: none; 
    z-index: 15; 
    display: none; 
}

#crt-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    z-index: 9999; 
    pointer-events: none; 
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%); 
    background-size: 100% 4px; box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.9); 
    animation: crt-flicker 0.15s infinite; 
}

@keyframes crt-flicker { 0% { opacity: 0.5; } 50% { opacity: 0.95; } 100% { opacity: 0.65; } }