* { margin: 0; padding: 0; box-sizing: border-box; } html, body { width: 100%; height: 100%; overflow: hidden; background: #8fc3ff; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #fff; user-select: none; } canvas { display: block; } /* ---------- Crosshair ---------- */ #crosshair { position: fixed; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); pointer-events: none; opacity: 0.85; z-index: 5; } #crosshair::before, #crosshair::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 2px rgba(0,0,0,0.8); } #crosshair::before { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); } #crosshair::after { top: 50%; left: 0; height: 2px; width: 100%; transform: translateY(-50%); } /* ---------- HUD ---------- */ #hud { position: fixed; top: 8px; left: 8px; font-size: 13px; line-height: 1.5; text-shadow: 1px 1px 2px rgba(0,0,0,0.9); pointer-events: none; z-index: 5; white-space: pre; } /* ---------- Hotbar ---------- */ #hotbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; background: rgba(0,0,0,0.35); border: 2px solid rgba(0,0,0,0.5); border-radius: 6px; z-index: 5; } .slot { width: 52px; height: 52px; border: 2px solid rgba(255,255,255,0.25); border-radius: 4px; background: rgba(0,0,0,0.25); position: relative; display: flex; align-items: center; justify-content: center; } .slot.active { border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.6); } .slot .num { position: absolute; top: 2px; left: 4px; font-size: 11px; text-shadow: 1px 1px 2px #000; } .slot .swatch { width: 34px; height: 34px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.4); image-rendering: pixelated; } /* ---------- Start-Overlay ---------- */ #overlay { position: fixed; inset: 0; background: radial-gradient(circle at 50% 50%, #3339 0%, #111c 120%); backdrop-filter: blur(1em); display: flex; align-items: center; justify-content: center; z-index: 10; cursor: pointer; transition: opacity 0.4s ease; } #overlay.hidden { opacity: 0; pointer-events: none; } .panel { text-align: center; background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.15); padding: 30px 42px; border-radius: 12px; max-width: 560px; } .panel h1 { font-size: 30px; margin-bottom: 10px; letter-spacing: 1px; } .panel p { font-size: 16px; margin-bottom: 16px; opacity: 0.9; } .keys { font-size: 13px; line-height: 1.9; opacity: 0.85; } .keys b { color: #ffe08a; } /* Settings-Panel offen → Spiel-HUD und Start-Overlay verstecken, damit die Welt unverstellt sichtbar bleibt. Das Overlay verdeckt sonst die ganze Welt, sobald das Panel den Pointer-Lock freigibt (pointerlockchange-Handler). */ body.panel-open #overlay, body.panel-open #hud, body.panel-open #hotbar, body.panel-open #crosshair { opacity: 0; pointer-events: none; transition: opacity 0.18s; } /* ============================================================ Settings-Panel (Drawer von rechts) ============================================================ */ .gear-btn { position: fixed; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.18); background: rgba(0,0,0,0.45); color: #fff; font-size: 20px; cursor: pointer; z-index: 20; display: flex; align-items: center; justify-content: center; transition: background 0.15s, transform 0.15s; backdrop-filter: blur(2px); } .gear-btn:hover { background: rgba(0,0,0,0.65); transform: rotate(30deg); } .settings-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 340px; max-width: 92vw; background: rgba(18,22,28,0.96); border-left: 1px solid rgba(255,255,255,0.12); box-shadow: -10px 0 40px rgba(0,0,0,0.5); transform: translateX(105%); transition: transform 0.28s cubic-bezier(0.2,0.8,0.2,1); z-index: 30; display: flex; flex-direction: column; font-size: 13px; color: #e8eaed; } .settings-panel.open { transform: translateX(0); } .sp-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); flex: 0 0 auto; } .sp-header h2 { font-size: 17px; font-weight: 600; letter-spacing: 0.5px; } .sp-close { background: none; border: none; color: #bdc1c6; font-size: 18px; cursor: pointer; padding: 2px 8px; border-radius: 4px; } .sp-close:hover { background: rgba(255,255,255,0.1); color: #fff; } .reload-banner { background: rgba(255,180,60,0.16); border-bottom: 1px solid rgba(255,180,60,0.35); color: #ffd9a0; padding: 9px 16px; font-size: 12px; flex: 0 0 auto; } .sp-body { overflow-y: auto; padding: 8px 14px 16px; flex: 1 1 auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.25) transparent; } .sp-body::-webkit-scrollbar { width: 8px; } .sp-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.22); border-radius: 4px; } .sp-group { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); } .sp-group:last-child { border-bottom: none; } .sp-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #8ab4f8; margin-bottom: 8px; font-weight: 600; } .ctrl-row { margin: 9px 0; } .ctrl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; } .ctrl-label { color: #cdd2da; } .ctrl-value { font-variant-numeric: tabular-nums; color: #9aa0a6; font-size: 12px; min-width: 56px; text-align: right; } .badge { font-size: 10px; padding: 1px 5px; border-radius: 8px; margin-left: 6px; vertical-align: middle; } .badge.live { background: rgba(80,200,120,0.18); color: #7ee2a0; } .badge.reload { background: rgba(255,180,60,0.18); color: #ffc870; } .ctrl-head-right { display: inline-flex; align-items: center; gap: 7px; } /* Standard-Wert-Hinweis (nur sichtbar wenn der Wert abweicht = dirty) */ .ctrl-default { font-size: 11px; color: #8a92a0; cursor: pointer; white-space: nowrap; padding: 1px 6px; border-radius: 8px; border: 1px solid transparent; transition: color 0.15s, background 0.15s, border-color 0.15s; user-select: none; } .ctrl-default[hidden] { display: none; } .ctrl-default:hover { color: #ffc870; background: rgba(255,180,60,0.12); border-color: rgba(255,180,60,0.35); } /* Dirty-Markierung: Wert weicht vom Standard ab → Label + Wert in amber */ .ctrl-row.dirty .ctrl-label { color: #ffc870; } .ctrl-row.dirty .ctrl-value { color: #ffc870; } /* Range-Slider */ .ctrl-row input[type=range] { width: 100%; height: 5px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,0.15); border-radius: 3px; outline: none; cursor: pointer; } .ctrl-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #8ab4f8; border: 2px solid #1b2a3a; cursor: pointer; } .ctrl-row input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #8ab4f8; border: 2px solid #1b2a3a; cursor: pointer; } /* Number / Select / Color */ .ctrl-row input[type=number] { width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); color: #fff; padding: 5px 8px; border-radius: 5px; font-size: 13px; } .ctrl-row select { width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15); color: #fff; padding: 5px 8px; border-radius: 5px; font-size: 13px; } .ctrl-row input[type=color] { width: 100%; height: 28px; padding: 0; border: 1px solid rgba(255,255,255,0.15); border-radius: 5px; background: transparent; cursor: pointer; } /* Toggle-Switch (Checkbox) */ .switch { display: inline-flex; align-items: center; cursor: pointer; } .switch input { display: none; } .switch-track { width: 38px; height: 20px; border-radius: 12px; background: rgba(255,255,255,0.18); position: relative; transition: background 0.2s; } .switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; } .switch input:checked + .switch-track { background: #4caf7d; } .switch input:checked + .switch-track::after { transform: translateX(18px); } .ctrl-row:has(.switch) .ctrl-value { display: none; } /* Footer-Buttons */ .sp-footer { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,0.1); flex: 0 0 auto; flex-wrap: wrap; } .sp-btn { flex: 1 1 auto; min-width: 90px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #e8eaed; padding: 8px 6px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: background 0.15s, border-color 0.15s; } .sp-btn:hover { background: rgba(255,255,255,0.16); } .sp-btn.restart { background: rgba(138,180,248,0.18); border-color: rgba(138,180,248,0.45); } .sp-btn.restart:hover { background: rgba(138,180,248,0.32); } .sp-btn.reset { background: rgba(240,90,90,0.15); border-color: rgba(240,90,90,0.4); } .sp-btn.reset:hover { background: rgba(240,90,90,0.28); } .settings-panel.dirty .sp-btn.restart { animation: pulse 1.4s ease-in-out infinite; } @keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(138,180,248,0.4); } 50% { box-shadow: 0 0 0 5px rgba(138,180,248,0); } }