* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #102038;
}

.hidden {
  display: none !important;
}

#menu-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(24, 92, 185, 0.92), rgba(10, 22, 48, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.menu-box {
  background: #111b33;
  border: 3px solid #3ea6ff;
  padding: 30px 36px;
  border-radius: 10px;
  text-align: center;
  color: #fff;
  max-width: 540px;
  width: 92%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.fn-badge {
  font-size: 11px;
  letter-spacing: 3px;
  color: #6bd4ff;
  font-weight: bold;
  margin-bottom: 6px;
}

.menu-box h1 {
  font-size: 46px;
  line-height: 0.95;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 4px 0 #1b4f9c;
  margin-bottom: 8px;
}

.menu-box h1 span {
  font-size: 24px;
  color: #ffde3b;
}

.subtitle {
  color: #b8d4ff;
  margin-bottom: 18px;
  font-size: 13px;
}

#player-name {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #3ea6ff;
  background: #0a1122;
  color: #fff;
  border-radius: 6px;
  margin-bottom: 14px;
  text-align: center;
}

#play-btn {
  width: 100%;
  padding: 15px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(180deg, #ffe63b, #f5b800);
  color: #131c31;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 5px 0 #b88200;
}

#play-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.controls-hint {
  margin-top: 18px;
  font-size: 12px;
  color: #d6e6ff;
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px;
  border-radius: 6px;
}

#damage-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  transition: box-shadow 0.2s;
  z-index: 11;
}

#damage-vignette.flash {
  box-shadow: inset 0 0 110px rgba(255, 25, 25, 0.85);
}

#storm-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: rgba(138, 43, 226, 0.16);
  box-shadow: inset 0 0 120px rgba(155, 48, 255, 0.75);
  z-index: 12;
}

#death-banner {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(18, 28, 54, 0.95);
  border: 3px solid #ff4242;
  color: #fff;
  padding: 20px 42px;
  border-radius: 8px;
  text-align: center;
  z-index: 25;
}

#poi-banner {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

#interact-prompt {
  position: fixed;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 24, 46, 0.88);
  border: 2px solid #ffde3b;
  color: #fff;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 15;
}

#worldmap-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 30, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.map-frame {
  background: #132240;
  border: 3px solid #3ea6ff;
  border-radius: 8px;
  padding: 14px 18px;
  color: #fff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 15px;
}

.map-sub {
  font-size: 11px;
  color: #9ec8ff;
  font-weight: normal;
}

#worldmap-canvas {
  display: block;
  border-radius: 6px;
  border: 2px solid #2b6cb0;
  cursor: crosshair;
  background: #1d6fa5;
}

.map-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  color: #cfe3ff;
}

#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

#crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
}

.ch-dot {
  position: absolute;
  top: 10px; left: 10px;
  width: 4px; height: 4px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 3px #000;
}

.ch-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
}

#hitmarker {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffde3b;
  font-size: 28px;
  font-weight: 900;
  z-index: 15;
}

/* Oben Rechts: Minimap & Stats */
#top-right {
  position: fixed;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

#minimap-wrap {
  background: #0d182e;
  border: 3px solid #3ea6ff;
  border-radius: 8px;
  padding: 2px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
}

#minimap-canvas {
  display: block;
  border-radius: 5px;
}

#stats-pill {
  background: rgba(14, 24, 48, 0.85);
  border: 1px solid #3ea6ff;
  color: #fff;
  padding: 5px 12px;
  border-radius: 6px;
  display: flex;
  gap: 12px;
  font-size: 13px;
}

#killfeed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.kill-item {
  background: rgba(14, 24, 48, 0.8);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  border-right: 3px solid #3ea6ff;
}

/* Scoreboard */
#scoreboard {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(14, 24, 48, 0.95);
  border: 2px solid #3ea6ff;
  border-radius: 8px;
  padding: 20px 26px;
  color: #fff;
  min-width: 440px;
  z-index: 30;
}

#scoreboard h3 {
  text-align: center;
  margin-bottom: 12px;
  color: #ffde3b;
}

#scoreboard table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#scoreboard th, #scoreboard td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid #263d6e;
}

/* Unten Links: Shield & HP Balken */
#bottom-left {
  position: fixed;
  bottom: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 260px;
}

.bar-wrap {
  position: relative;
  height: 24px;
  background: rgba(12, 20, 38, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  transition: width 0.15s;
}

.shield-wrap .bar-fill {
  background: linear-gradient(90deg, #1d8cf8, #4bc6ff);
}

.hp-wrap .bar-fill {
  background: linear-gradient(90deg, #28a745, #5be37d);
}

.bar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-left: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
}

/* Chat */
#chat-box {
  position: fixed;
  bottom: 85px;
  left: 16px;
  width: 320px;
}

#chat-messages {
  max-height: 115px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}

.chat-msg {
  background: rgba(14, 24, 48, 0.72);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

#chat-input {
  width: 100%;
  padding: 8px;
  background: rgba(14, 24, 48, 0.92);
  border: 1px solid #3ea6ff;
  color: #fff;
  border-radius: 4px;
  pointer-events: auto;
}

/* Unten Rechts: Materialien & Inventar */
#bottom-right {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

#mats-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mat-pill {
  background: rgba(14, 24, 48, 0.85);
  border: 1px solid #3ea6ff;
  color: #fff;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 13px;
}

.mode-badge {
  background: #ffde3b;
  color: #111b33;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 5px;
}

.slot-row {
  display: flex;
  gap: 6px;
}

.inv-slot {
  background: rgba(14, 24, 48, 0.85);
  border: 2px solid #2b4a80;
  color: #cfe3ff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  position: relative;
}

.inv-slot span {
  position: absolute;
  top: 2px;
  left: 5px;
  font-size: 10px;
  color: #7eb8ff;
}

.inv-slot em {
  font-style: normal;
  color: #ffde3b;
}

.inv-slot.active {
  border-color: #ffde3b;
  background: rgba(36, 68, 130, 0.95);
  color: #fff;
  transform: translateY(-3px);
}
