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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #c8dcff;
    font-family: 'DejaVu Sans Mono', 'Menlo', monospace;
    cursor: default;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 15, 0.92);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#overlay.hidden { display: none; }

#overlay-inner {
    text-align: center;
    max-width: 560px;
    padding: 2rem;
    border: 1px solid #2a3a5a;
    background: #0a0e1a;
}

#overlay-inner h1 {
    font-size: 2.5rem;
    color: #00c8ff;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

#overlay-inner .subtitle {
    color: #6a7a9a;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

#overlay-inner .hint {
    color: #c8dcff;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

#overlay-inner .hint strong {
    color: #e8c547;
}

#overlay-inner .status {
    color: #6a7a9a;
    font-size: 0.85rem;
    margin-top: 1rem;
    font-style: italic;
}

#hud {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 50;
    font-size: 0.8rem;
    color: #00c8ff;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

#hud > div {
    background: rgba(5, 8, 15, 0.55);
    padding: 4px 8px;
    margin-bottom: 4px;
    border-left: 2px solid #00c8ff;
}

#minimap {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 50;
    width: 220px;
    height: 220px;
    background: rgba(5, 8, 15, 0.75);
    border: 1px solid #2a3a5a;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    image-rendering: pixelated;
}

#hudbar {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: rgba(5, 8, 15, 0.8);
    border: 1px solid #2a3a5a;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    font-family: 'DejaVu Sans Mono', 'Menlo', monospace;
}

.hud-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.hud-slot.hud-inv {
    flex-direction: row;
    gap: 6px;
    min-width: 36px;
    font-size: 1rem;
    color: #c8dcff;
}

.hud-icon {
    font-size: 1.2rem;
}

.hud-inv[data-type="health"] .hud-icon { color: #ff5a3a; }
.hud-inv[data-type="weapon"] .hud-icon { color: #c060ff; }
.hud-inv[data-type="tempo"]  .hud-icon { color: #00c8ff; }
.hud-inv[data-type="shield"] .hud-icon { color: #4070ff; }
.hud-inv[data-type="glider_fuel"] .hud-icon { color: #e0e8f0; }
.hud-inv[data-type="glider_fuel"].active { box-shadow: 0 0 12px #e0e8f0; }
.hud-inv[data-type="bomb"] .hud-icon { color: #ff4030; }
.hud-inv[data-type="mine"] .hud-icon { color: #50ff80; }
.hud-inv[data-type="spore_pack"] .hud-icon { color: #a0e880; }
.hud-inv[data-type="mega_bomb"] .hud-icon { color: #ff2020; text-shadow: 0 0 6px #ff2020; }

#death-screen {
    position: fixed; inset: 0;
    background: rgba(40, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 50;
}
#death-screen .death-inner {
    text-align: center;
    color: #ffaaaa;
    font-family: monospace;
}
#death-screen h2 { font-size: 3rem; margin: 0 0 1rem; color: #ff4040; }
#death-screen p { font-size: 1.1rem; margin: 0 0 1.5rem; }
#death-respawn-btn {
    padding: 0.8rem 2.5rem;
    background: #2a0808; color: #ff8080;
    border: 2px solid #ff4040; border-radius: 4px;
    font-size: 1.2rem; cursor: pointer;
    font-family: inherit;
}
#death-respawn-btn:disabled {
    border-color: #5a2020; color: #884040;
    cursor: not-allowed;
}
#death-respawn-btn:not(:disabled):hover { background: #501010; }

/* S204 Cube-Zentrum-Terminal — Bildschirm-Modus */
#terminal-modal {
    position: fixed; inset: 0;
    background: rgba(5, 12, 20, 0.92);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 60;
}
.terminal-inner {
    background: #0e1622;
    border: 1px solid #2a4a6a;
    box-shadow: 0 0 24px rgba(0, 200, 255, 0.15);
    padding: 2rem 2.5rem;
    max-width: 720px;
    width: 90%;
    color: #c8e0ff;
    font-family: 'DejaVu Sans Mono', 'Menlo', monospace;
}
.terminal-inner h2 {
    font-size: 1.8rem;
    color: #00c8ff;
    letter-spacing: 0.1em;
    margin: 0 0 1rem 0;
}
.terminal-inner pre {
    background: #060c14;
    border-left: 2px solid #00c8ff;
    padding: 1rem 1.2rem;
    margin: 0 0 1rem 0;
    color: #a8d0f0;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 60vh;
    overflow-y: auto;
}
.terminal-hint {
    color: #6a8aa8;
    font-size: 0.8rem;
    margin: 0;
}

.hud-label {
    font-size: 0.65rem;
    color: #6a7a9a;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
}

.hud-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #00c8ff;
    line-height: 1;
}

.hud-health .hud-value { color: #ff5a3a; }
.hud-ammo   .hud-value { color: #e8c547; }
.hud-weapon .hud-value { color: #c8dcff; font-size: 1rem; padding-top: 6px; }
.hud-arsenal { display: flex; gap: 3px; margin-top: 4px; justify-content: center; }
.arsenal-slot {
    display: inline-block;
    width: 16px; height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 0.7rem;
    border: 1px solid #2a3a5a;
    border-radius: 2px;
    color: #4a5a7a;
}
.arsenal-slot.unlocked { color: #8aa0c0; border-color: #4a5a7a; }
.arsenal-slot.active   { color: #00c8ff; border-color: #00c8ff; box-shadow: 0 0 6px rgba(0,200,255,0.5); }
.arsenal-slot.locked   { color: #2a3040; }

.hud-divider {
    width: 1px;
    height: 30px;
    background: #2a3a5a;
}

#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #e8c547;
    font-size: 1.2rem;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 40;
    user-select: none;
}

/* S195 — Mission-Choice + Vogel-Markers */
#mission-choice {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1rem auto;
    max-width: 340px;
}
.mission-btn {
    background: #1a2438;
    border: 1px solid #3a4a68;
    color: #d8e0f0;
    padding: 0.7rem 1rem;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s, border 0.15s;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.mission-btn:hover {
    background: #2a3858;
    border-color: #6a8aff;
}
.mission-btn.selected {
    background: #2c1f10;
    border-color: #e8c547;
}
.mission-btn .mission-title {
    font-size: 1rem;
    color: #ffffff;
}
.mission-btn .mission-sub {
    font-size: 0.78rem;
    color: #8a9cb8;
}
.mission-btn.auth-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.mission-btn.auth-disabled:hover {
    background: #1a2438;
    border-color: #3a4a68;
}

#auth-block {
    margin: 0.8rem auto 0.5rem;
    max-width: 340px;
    text-align: left;
}
#auth-form {
    display: flex;
    gap: 0.4rem;
    align-items: stretch;
}
#auth-token-input {
    flex: 1;
    background: #0e1422;
    color: #d8e0f0;
    border: 1px solid #3a4a68;
    padding: 0.45rem 0.7rem;
    font-family: inherit;
    font-size: 0.85rem;
    min-width: 0;
}
#auth-token-input:focus {
    outline: none;
    border-color: #6a8aff;
}
#auth-signin-btn, #auth-signout-btn {
    background: #2a3858;
    border: 1px solid #3a4a68;
    color: #d8e0f0;
    padding: 0.45rem 0.9rem;
    font-family: inherit;
    cursor: pointer;
    font-size: 0.85rem;
}
#auth-signin-btn:hover, #auth-signout-btn:hover {
    background: #3a4a68;
}
#auth-status.signed-in {
    color: #6ec774;
}
#hud-player {
    color: #6ec774;
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

/* S205 Mission-HUD + Modal */
#mission-hud {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 14, 26, 0.85);
    border: 1px solid rgba(0, 200, 255, 0.3);
    padding: 0.6rem 1rem;
    color: #c8dcff;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    min-width: 320px;
    z-index: 100;
}
#mission-hud .hud-label {
    color: #00c8ff;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
#mission-hud .hud-value {
    color: #fff;
    font-size: 1rem;
    margin: 0.2rem 0;
}
#mission-hud .hud-progress {
    height: 6px;
    background: rgba(0, 200, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.4rem 0 0.3rem;
}
#mission-hud-bar {
    height: 100%;
    background: linear-gradient(90deg, #00c8ff, #3fb950);
    width: 0%;
    transition: width 0.5s ease-out;
}

#mission-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0a0e1a;
    border: 1px solid rgba(0, 200, 255, 0.3);
    padding: 2rem;
    color: #c8dcff;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    z-index: 200;
    min-width: 480px;
}
#mission-modal h2 {
    color: #fff;
    margin-top: 0;
}
#mission-modal label {
    display: block;
    margin: 0.8rem 0 0.2rem;
    font-size: 0.85rem;
    color: rgba(200, 220, 255, 0.7);
}
#mission-modal select,
#mission-modal input,
#mission-modal textarea {
    width: 100%;
    background: rgba(0, 200, 255, 0.05);
    border: 1px solid rgba(0, 200, 255, 0.2);
    color: #c8dcff;
    font-family: inherit;
    padding: 0.4rem;
    box-sizing: border-box;
}
#mission-modal button {
    margin-top: 1rem;
    margin-right: 0.5rem;
    background: #00c8ff;
    color: #0a0e1a;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}
#mission-modal #mission-modal-close {
    background: transparent;
    color: #00c8ff;
    border: 1px solid #00c8ff;
}
