* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
}

#game-container {
    position: relative;
    background: #000;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    border: 4px solid #333;
}

#gameCanvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#ui-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

#health-bar {
    width: 200px;
    height: 20px;
    background: #333;
    border: 2px solid #fff;
    border-radius: 3px;
    overflow: hidden;
}

#health-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff4444 0%, #ff8844 100%);
    transition: width 0.3s ease;
}

#level-info, #score {
    background: rgba(0,0,0,0.7);
    padding: 5px 15px;
    border: 2px solid #fff;
    border-radius: 3px;
    font-size: 16px;
    font-weight: bold;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.screen.active {
    display: flex;
}

#menu-screen {
    flex-direction: column;
    text-align: center;
}

#menu-screen h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
    color: #ffd700;
}

.subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    color: #aaa;
}

.btn-primary, .btn-secondary {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    padding: 15px 40px;
    margin: 10px;
    border: 3px solid #fff;
    background: #2a5298;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-weight: bold;
}

.btn-primary:hover {
    background: #fff;
    color: #2a5298;
    transform: scale(1.05);
}

.btn-secondary {
    background: #444;
}

.btn-secondary:hover {
    background: #666;
}

.code-input-container {
    margin: 30px 0;
}

#level-code {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    padding: 10px;
    width: 200px;
    text-align: center;
    border: 3px solid #fff;
    background: #222;
    color: #fff;
    margin-right: 10px;
}

#controls-info {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border: 2px solid #fff;
    border-radius: 5px;
}

#controls-info h3 {
    margin-bottom: 10px;
    color: #ffd700;
}

.cinematic-content, .complete-content, .game-over-content {
    text-align: center;
    max-width: 700px;
    padding: 40px;
    background: rgba(0,0,0,0.8);
    border: 3px solid #fff;
    border-radius: 10px;
}

#cinematic-title, .complete-content h2, .game-over-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #ffd700;
}

#cinematic-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.level-code-display {
    font-size: 24px;
    margin: 20px 0;
    padding: 15px;
    background: #222;
    border: 2px solid #ffd700;
    border-radius: 5px;
}

.level-code-display span {
    color: #ffd700;
    font-weight: bold;
    letter-spacing: 3px;
}