
 /* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* ===== GLOBAL ===== */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  background: radial-gradient(circle at center, #1b0024 0%, #05000a 45%, #000000 100%);
  color: #f7e9ff;
  font-family: "VT323", monospace;
  overflow: hidden;
}

/* Soft drifting paradise */
#scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 40px;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(8px); }
}

/* ===== HUD / METERS ===== */
#hud {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  z-index: 30;
  font-size: 18px;
}
.meter {
  min-width: 160px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 0 10px rgba(255,255,255,0.2);
}
.meter span {
  display: block;
}

/* Boss HP bar */
#bossHPBar {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 14px;
  border-radius: 999px;
  border: 1px solid #ff4b4b;
  background: rgba(0,0,0,0.8);
  overflow: hidden;
  box-shadow: 0 0 14px rgba(255,0,0,0.6);
  z-index: 29;
}
#bossHPFill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff4b4b, #ffb3b3);
  transition: width 0.3s ease-out;
}

/* ===== SPRITES ===== */
#sprites {
  display: flex;
  gap: 40px;
  align-items: flex-end;
  margin-bottom: 10px;
  z-index: 5; /* ABOVE boss */
}
.sprite {
  width: 260px;
  filter: drop-shadow(0 0 12px #ffb3ff);
  transition: filter 0.3s, opacity 0.3s;
  position: relative;
  z-index: 5; /* ENSURES THEY ARE ABOVE THE BOSS */
}
.sprite.corrupted {
  filter: drop-shadow(0 0 20px #ff3b3b) hue-rotate(40deg);
}

/* ===== BOSS BEHIND THEM ===== */
#bossSprite {
  position: fixed;
  top: -4%;
  left: 50%;
  transform: translateX(-50%);
  height: 520px;
  opacity: 0.45;
  filter: drop-shadow(0 0 40px #ff4b4b);
  z-index: 1; /* BELOW ELARWYTH + CAELIMAR */
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
  animation: bossLoom 12s ease-in-out infinite alternate;
}

@keyframes bossLoom {
  0%   { transform: translateX(-50%) translateY(0px) scale(1); }
  50%  { transform: translateX(-50%) translateY(-12px) scale(1.04); }
  100% { transform: translateX(-50%) translateY(6px) scale(0.98); }
}

/* ===== DIALOGUE BOX ===== */
#dialogueBox {
  width: 80%;
  max-width: 900px;
  background: rgba(0,0,0,0.8);
  border: 2px solid #ffb3ff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 0 20px #ffb3ff;
  font-size: 20px;
  line-height: 1.5;
  z-index: 10;
}
#nameplate {
  font-weight: bold;
  color: #ffb3ff;
  letter-spacing: 2px;
  margin-bottom: 6px;
  font-size: 22px;
}
#text {
  min-height: 90px;
  white-space: pre-wrap;
}
#nextBtn {
  margin-top: 10px;
  padding: 4px 18px;
  border-radius: 999px;
  border: 1px solid #ffb3ff;
  background: transparent;
  color: #ffb3ff;
  cursor: pointer;
  font-size: 18px;
  transition: 0.2s;
}
#nextBtn:hover {
  background: #ffb3ff;
  color: #1b0024;
}

/* ===== FINAL CHOICES ===== */
.choiceBtn {
  margin-top: 12px;
  margin-right: 8px;
  padding: 6px 22px;
  border-radius: 999px;
  border: 1px solid #ffb3ff;
  background: transparent;
  color: #ffb3ff;
  cursor: pointer;
  font-size: 18px;
  transition: 0.2s;
  display: inline-block;
}
.choiceBtn:hover {
  background: #ffb3ff;
  color: #1b0024;
}

/* ===== GLITCH OVERLAY ===== */
#glitch {
  position: fixed;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  background: repeating-linear-gradient(
    to right,
    rgba(255,0,0,0.18),
    rgba(255,0,0,0.18) 1px,
    transparent 1px,
    transparent 4px
  );
  z-index: 40;
  transition: opacity 0.4s;
}

/* ===== OMORI-STYLE JRPG MENU (CORRUPTED RED) ===== */
#battleMenu {
  position: fixed;
  bottom: 18px;
  left: 18px;
  width: 260px;
  background: rgba(0,0,0,0.95);
  border: 2px solid #ff3b3b;
  box-shadow: 0 0 16px rgba(255,0,0,0.7);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 20px;
  color: #ffffff;
  z-index: 25;
  display: none;
}
.menuTitle {
  font-size: 18px;
  color: #ffb3b3;
  margin-bottom: 4px;
}
.menuOption {
  padding: 2px 4px;
  margin: 2px 0;
  cursor: pointer;
}
.menuOption.selected {
  background: #ff3b3b;
  color: #000000;
  box-shadow: 0 0 8px rgba(255,0,0,0.8);
}

/* ===== UTILITY ===== */
.hidden {
  display: none !important;
}
