@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', 'Arial', sans-serif;
    background: linear-gradient(180deg, #0a1a0a 0%, #1a2e1a 50%, #0a1a0a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

#game-container {
    position: relative;
    background: #000;
    box-shadow: 0 0 30px rgba(50, 205, 50, 0.3);
    overflow: hidden;
    border: 4px solid #32CD32;
    max-width: 100vw;
}

#game-canvas {
    display: block;
    width: 800px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    image-rendering: pixelated;
}

#ui {
    position: absolute;
    top: 8px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    color: #32CD32;
    font-weight: bold;
    font-size: 11px;
    font-family: 'Press Start 2P', monospace;
    text-shadow: 2px 2px 0px #000, 0 0 8px rgba(50, 205, 50, 0.5);
    pointer-events: none;
    z-index: 10;
}

#ui > div {
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 2px;
}

#ui-score {
    color: #32CD32;
}

#ui-level {
    color: #FFFFFF;
}

#ui-lives {
    color: #FF4444;
}

#ui-enemies {
    color: #FFD700;
}

#ui-highscore {
    color: #00FFFF;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a1a0a 0%, #1a3a1a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 100;
    overflow-y: auto;
}

.screen.hidden {
    display: none;
}

.screen h1 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #32CD32;
    text-shadow: 3px 3px 0px #006600, 4px 4px 0px #000, 0 0 20px rgba(50, 205, 50, 0.5);
    font-family: 'Press Start 2P', monospace;
    letter-spacing: 2px;
}

.screen p {
    font-size: 10px;
    margin: 6px 0;
    font-family: 'Press Start 2P', monospace;
}

.controls {
    background: rgba(50, 205, 50, 0.08);
    padding: 12px 20px;
    border: 2px solid #32CD32;
    margin: 12px 0;
}

.controls p {
    margin: 4px 0;
    font-size: 8px;
    font-family: 'Press Start 2P', monospace;
}

.controls strong {
    color: #32CD32;
    font-size: 8px;
}

.level-count {
    color: #00FFFF;
    font-size: 12px !important;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 10px !important;
}

.mission-info {
    color: #FFD700;
    font-size: 8px !important;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    margin: 4px 0;
    border-radius: 2px;
}

.screen button {
    margin-top: 10px;
    padding: 12px 30px;
    font-size: 12px;
    font-weight: bold;
    font-family: 'Press Start 2P', monospace;
    background: #1a6b1a;
    color: #FFFFFF;
    border: 4px solid #32CD32;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 4px 4px 0px #000;
    text-shadow: 2px 2px 0px #000;
}

.screen button:hover {
    background: #228B22;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000;
}

.screen button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

#music-btn {
    background: linear-gradient(135deg, #1a4a1a 0%, #0a2a0a 100%);
    margin-top: 10px;
    font-size: 10px !important;
    padding: 8px 16px !important;
}

.button-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

#menu-btn, #victory-menu-btn, #pause-menu-btn {
    background: #444 !important;
    border-color: #888 !important;
}

.score-tally {
    background: rgba(50, 205, 50, 0.08);
    padding: 10px 20px;
    border: 2px solid #32CD32;
    margin: 10px 0;
    text-align: left;
}

.score-tally p {
    margin: 4px 0;
    font-size: 9px;
}

.total-line {
    color: #32CD32;
    margin-top: 8px !important;
}

.breadcrumb {
    background: rgba(0, 0, 0, 0.9);
    padding: 8px 16px;
    border-bottom: 2px solid #32CD32;
    text-align: left;
    width: 100%;
}

.breadcrumb a {
    color: #32CD32;
    text-decoration: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    text-shadow: 2px 2px 0px #000;
}

.breadcrumb a:hover {
    color: #00FFFF;
}

/* Mobile Responsive */
@media (max-width: 840px) {
    #game-container {
        width: 100vw;
        max-width: 100vw;
        border-width: 2px;
    }
    .screen {
        position: relative;
        height: auto;
        min-height: 100%;
        padding: 20px 12px;
    }
    .screen h1 {
        font-size: clamp(14px, 4vw, 24px);
        margin-bottom: 10px;
    }
    .screen p {
        font-size: clamp(7px, 2vw, 10px);
    }
    .level-count {
        font-size: clamp(9px, 2.5vw, 12px) !important;
    }
    .mission-info {
        font-size: 7px !important;
    }
    .controls {
        padding: 8px 12px;
        margin: 8px 0;
        max-width: 100%;
    }
    .controls p, .controls strong {
        font-size: clamp(6px, 1.8vw, 8px);
    }
    .screen button {
        padding: 10px 20px;
        font-size: clamp(9px, 2.5vw, 12px);
        margin-top: 8px;
    }
    .button-row {
        flex-direction: column;
        gap: 8px;
        width: 80%;
    }
    .button-row button { width: 100%; }
    .score-tally { padding: 8px 14px; }
    .score-tally p { font-size: 8px; }
    .breadcrumb { padding: 6px 10px; text-align: center; }
    .breadcrumb a { font-size: 7px; }
    #ui { font-size: 9px; }
    #music-btn { font-size: 8px !important; padding: 6px 12px !important; }
}
/* Touch device padding handled by mobile-touch.js */
