/* ─────────────────────────────────────────────
   MANIAC TOWER — UI Elements
   ───────────────────────────────────────────── */

/* ── Name Entry Overlay ────────────────────── */
#name-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 10, 0.96);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  gap: 24px;

  opacity: 0;
  transition: opacity 0.4s ease;
}

#name-overlay.visible { opacity: 1; }

.name-overlay-title {
  font-family: var(--font-game);
  font-size: 22px;
  color: #5566ff;
  text-shadow: 0 0 20px rgba(85, 102, 255, 0.6);
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { text-shadow: 0 0 20px rgba(85,102,255,0.4); }
  to   { text-shadow: 0 0 35px rgba(85,102,255,0.9), 0 0 60px rgba(85,102,255,0.3); }
}

.name-overlay-sub {
  font-family: var(--font-game);
  font-size: 8px;
  color: rgba(150, 150, 220, 0.7);
  letter-spacing: 2px;
  text-align: center;
  line-height: 2;
  max-width: 400px;
}

.name-overlay-prompt {
  font-family: var(--font-game);
  font-size: 9px;
  color: #ffcc44;
  letter-spacing: 1px;
}

#name-input {
  font-family: var(--font-game);
  font-size: 13px;
  color: #d0d0ff;
  background: rgba(10, 10, 40, 0.9);
  border: 2px solid #3a3a8a;
  border-radius: 2px;
  padding: 10px 16px;
  width: 280px;
  text-align: center;
  outline: none;
  letter-spacing: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#name-input:focus {
  border-color: #5566ff;
  box-shadow: 0 0 12px rgba(85, 102, 255, 0.4);
}

#name-input::placeholder {
  color: rgba(100, 100, 160, 0.5);
  font-size: 10px;
}

#name-confirm {
  font-family: var(--font-game);
  font-size: 10px;
  color: #000;
  background: #5566ff;
  border: none;
  padding: 10px 28px;
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: 2px;
  transition: background 0.15s, box-shadow 0.15s;
}

#name-confirm:hover {
  background: #7788ff;
  box-shadow: 0 0 16px rgba(85,102,255,0.6);
}

/* ── Character Parade ──────────────────────── */
#name-parade {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 48px;
  overflow-x: auto;
  max-width: 92vw;
  padding: 10px 28px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 102, 255, 0.3) transparent;
}

#name-parade::-webkit-scrollbar { height: 3px; }
#name-parade::-webkit-scrollbar-thumb { background: rgba(85, 102, 255, 0.3); }

.parade-char {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  cursor: default;
}

.parade-char-label {
  font-family: var(--font-game);
  font-size: 6px;
  color: rgba(180, 180, 255, 0.65);
  letter-spacing: 1px;
  white-space: nowrap;
}

.parade-char-sprite {
  position: relative;
  height: 44px;
  display: flex;
  align-items: flex-end;
  overflow: visible;
}

@keyframes paradeFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-4px); }
}

.parade-char .sprite-inner {
  animation: paradeFloat 2.4s ease-in-out infinite;
}
.parade-char:nth-child(2n)  .sprite-inner { animation-delay: -0.6s; }
.parade-char:nth-child(3n)  .sprite-inner { animation-delay: -1.2s; }
.parade-char:nth-child(4n)  .sprite-inner { animation-delay: -1.8s; }
.parade-char:nth-child(5n)  .sprite-inner { animation-delay: -0.3s; }
.parade-char:nth-child(7n)  .sprite-inner { animation-delay: -2.1s; }

/* Zombie glow in parade */
.parade-char-sprite .sprite-body[style*="1a2a0a"] {
  box-shadow: 0 0 6px rgba(60, 160, 40, 0.4);
}

.name-overlay-skip {
  font-family: var(--font-game);
  font-size: 7px;
  color: rgba(100, 100, 160, 0.5);
  letter-spacing: 1px;
  cursor: pointer;
}

/* ── Elevator Panel ────────────────────────── */
#elev-panel {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) translateX(120%);
  width: 110px;
  background: rgba(4, 10, 20, 0.97);
  border: 2px solid rgba(100, 200, 255, 0.4);
  border-radius: 4px;
  padding: 10px 8px;
  z-index: 200;
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: 0 0 20px rgba(100, 200, 255, 0.15);
}

#elev-panel.visible {
  transform: translateY(-50%) translateX(0);
}

.elev-panel-title {
  font-family: var(--font-game);
  font-size: 7px;
  color: rgba(100, 200, 255, 0.7);
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(100, 200, 255, 0.2);
}

#elev-floor-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 340px;
  overflow-y: auto;
}

#elev-floor-list::-webkit-scrollbar {
  width: 3px;
}
#elev-floor-list::-webkit-scrollbar-track { background: transparent; }
#elev-floor-list::-webkit-scrollbar-thumb { background: rgba(100,200,255,0.3); }

.elev-floor-btn {
  font-family: var(--font-game);
  font-size: 7px;
  color: rgba(150, 220, 255, 0.8);
  background: rgba(10, 20, 40, 0.8);
  border: 1px solid rgba(80, 160, 200, 0.3);
  padding: 5px 6px;
  cursor: pointer;
  text-align: left;
  border-radius: 2px;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  letter-spacing: 1px;
}

.elev-floor-btn:hover {
  background: rgba(30, 60, 100, 0.8);
  border-color: rgba(100, 200, 255, 0.7);
  color: #fff;
}

.elev-floor-btn.current {
  color: #ffcc44;
  border-color: rgba(255, 200, 60, 0.5);
  background: rgba(40, 30, 5, 0.6);
}

.elev-floor-btn.locked {
  color: rgba(100, 100, 140, 0.5);
  cursor: not-allowed;
  border-color: rgba(60, 60, 100, 0.2);
}

.elev-floor-btn.locked::after {
  content: ' 🔒';
  font-size: 6px;
}

/* ── Interaction Hint ──────────────────────── */
#interact-hint {
  position: fixed;
  bottom: 165px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-game);
  font-size: 8px;
  color: rgba(200, 200, 255, 0.8);
  background: rgba(4, 4, 20, 0.85);
  border: 1px solid rgba(100, 100, 200, 0.4);
  padding: 5px 12px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 100;
  letter-spacing: 1px;

  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}

#interact-hint.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── HUD (floor indicator, player name) ─────── */
#hud {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.hud-item {
  font-family: var(--font-game);
  font-size: 8px;
  color: rgba(150, 150, 220, 0.7);
  letter-spacing: 1px;
  background: rgba(4, 4, 20, 0.6);
  padding: 4px 8px;
  border: 1px solid rgba(80, 80, 160, 0.3);
  border-radius: 2px;
}

#hud-name { color: #ffcc44; }

/* ── Controls Hint (bottom right) ─────────────*/
#controls-hint {
  position: fixed;
  bottom: 165px;
  right: 14px;
  font-family: var(--font-game);
  font-size: 7px;
  color: rgba(100, 100, 160, 0.5);
  line-height: 2;
  letter-spacing: 1px;
  text-align: right;
  pointer-events: none;
  z-index: 100;
}

/* ── Start Grafik im Name Overlay ─────────── */
.name-overlay-startgrafik {
  width: min(420px, 88vw);
  border-radius: 12px;
  opacity: 0.92;
  filter: drop-shadow(0 0 28px rgba(85, 102, 255, 0.45));
  animation: startGrafik 3s ease-in-out infinite alternate;
}

@keyframes startGrafik {
  from { filter: drop-shadow(0 0 18px rgba(85,102,255,0.3)); opacity: 0.88; }
  to   { filter: drop-shadow(0 0 40px rgba(85,102,255,0.65)); opacity: 1; }
}

/* ── Game Title Logo (top right) ──────────── */
#title-mark {
  position: fixed;
  top: 10px;
  right: 12px;
  pointer-events: none;
  z-index: 100;
}

#title-mark-logo {
  height: 48px;
  width: auto;
  opacity: 0.55;
  filter: drop-shadow(0 0 8px rgba(85,102,255,0.4));
  transition: opacity 0.3s;
}

#title-mark-logo:hover {
  opacity: 0.85;
}
