/* Core-Debt/style.css */
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #050a14;
  color: #eee;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  user-select: none;
}

#world {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;
}

#ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* START MENU STYLES */
#start-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 10, 20, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 200;
  pointer-events: auto;
  backdrop-filter: blur(5px);
}

.title-main {
  font-size: 80px;
  font-weight: 900;
  letter-spacing: 10px;
  color: #48dbfb;
  text-shadow: 0 0 30px rgba(72, 219, 251, 0.4);
  margin-bottom: 0;
}

.subtitle {
  font-size: 18px;
  color: #aaa;
  margin-bottom: 50px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: bold;
}

.btn-start {
  background: transparent;
  border: 2px solid #48dbfb;
  color: #48dbfb;
  padding: 15px 50px;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 4px;
  margin-bottom: 20px;
}

.btn-start:hover {
  background: #48dbfb;
  color: #000;
  box-shadow: 0 0 20px #48dbfb;
}

.dev-controls {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-cheat {
  background: #111;
  border: 1px solid #444;
  color: #666;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.2s;
  text-transform: uppercase;
  font-family: monospace;
}

.btn-cheat:hover {
  border-color: #48dbfb;
  color: #48dbfb;
}

.btn-god {
  border-color: #f1c40f;
  color: #f1c40f;
}

.btn-god:hover {
  background: #f1c40f;
  color: #000;
}

.github-link {
  margin-top: 40px;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.github-link:hover {
  opacity: 1;
}

.github-link svg {
  fill: #fff;
  width: 30px;
  height: 30px;
}

/* HUD STYLES */
#hud-top {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
  pointer-events: auto;
}

.stat-box {
  background: rgba(20, 30, 40, 0.9);
  border: 1px solid #446;
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* MISSION PANEL */
#mission-panel {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 10, 0.95);
  border: 2px solid #d63031;
  padding: 10px 25px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0 20px rgba(214, 48, 49, 0.2);
  pointer-events: auto;
  transition: all 0.3s;
}

.panic-mode {
  animation: pulse-red 0.5s infinite alternate;
  border-color: #ff0000 !important;
}

@keyframes pulse-red {
  from {
    box-shadow: 0 0 10px red;
  }

  to {
    box-shadow: 0 0 30px red;
  }
}

.ready-mode {
  border-color: #48dbfb !important;
  box-shadow: 0 0 30px rgba(72, 219, 251, 0.5) !important;
  animation: pulse-blue 1s infinite alternate;
}

@keyframes pulse-blue {
  from {
    transform: translateX(-50%) scale(1);
  }

  to {
    transform: translateX(-50%) scale(1.05);
  }
}

.ready-mode #mission-desc {
  color: #48dbfb;
}

#mission-title {
  color: #888;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#mission-desc {
  font-size: 16px;
  font-weight: bold;
  margin: 2px 0;
}

#mission-timer {
  font-size: 20px;
  color: #ff7675;
  font-family: monospace;
}

/* BOSS UI */
#boss-ui-container {
  position: absolute;
  top: 150px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  pointer-events: none;
  z-index: 50;
}

#boss-title {
  text-align: center;
  color: #f00;
  font-weight: bold;
  font-size: 20px;
  text-shadow: 0 0 5px #000;
  margin-bottom: 4px;
  letter-spacing: 2px;
}

#boss-hp-bar {
  width: 400px;
  height: 20px;
  background: #300;
  border: 2px solid #f00;
  border-radius: 4px;
  position: relative;
  margin-bottom: 4px;
  box-shadow: 0 0 15px #f00;
}

#boss-hp-fill {
  width: 100%;
  height: 100%;
  background: #f00;
  transition: width 0.1s;
}

.hp-marker {
  position: absolute;
  top: 0;
  height: 100%;
  width: 2px;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.boss-timer-container {
  width: 400px;
  height: 8px;
  position: relative;
}

#boss-timer-bar {
  width: 100%;
  height: 100%;
  background: #002;
  border: 1px solid #00f;
  border-radius: 2px;
  position: absolute;
}

#boss-timer-fill {
  width: 100%;
  height: 100%;
  background: #3498db;
  transition: width 0.1s linear;
}

#boss-minigame-bar {
  width: 100%;
  height: 100%;
  background: #220;
  border: 1px solid #f39c12;
  border-radius: 2px;
  position: absolute;
  display: none;
  z-index: 5;
}

#boss-minigame-fill {
  width: 100%;
  height: 100%;
  background: #f1c40f;
  transition: width 0.1s linear;
}

/* MINIGAME INSTRUCTIONS */
#minigame-text-overlay {
  position: absolute;
  top: 350px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  display: none;
  pointer-events: none;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#minigame-instruction {
  color: #f1c40f;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.9);
  padding: 10px 20px;
  border-radius: 4px;
  border: 2px solid #f1c40f;
  margin-top: 20px;
  order: 2;
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.3);
}

#minigame-word {
  font-family: monospace;
  font-size: 30px;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.9);
  padding: 10px 20px;
  border-radius: 6px;
  border: 2px solid #f1c40f;
  color: #fff;
  display: inline-block;
  margin-top: 10px;
  order: 3;
}

#countdown-display {
  font-size: 100px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 30px #f1c40f;
  margin-top: 0;
  animation: pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  order: 1;
}

@keyframes pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.char-done {
  color: #48dbfb;
}

.char-pending {
  color: #7f8c8d;
}

/* INVENTORY */
#inventory-panel {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #444;
  padding: 15px;
  border-radius: 6px;
  pointer-events: auto;
}

.inv-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  min-width: 140px;
  font-size: 14px;
}

.cap-warning {
  color: #e17055;
  font-size: 12px;
  margin-top: 5px;
  text-align: center;
  display: none;
}

#xp-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 20px;
  background: #111;
  border: 2px solid #333;
  border-radius: 10px;
  overflow: hidden;
  pointer-events: auto;
}

#xp-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #48dbfb, #a29bfe);
  transition: width 0.2s;
}

#xp-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 12px;
  line-height: 20px;
  text-shadow: 1px 1px 2px black;
}

#trash-can {
  position: absolute;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: rgba(20, 10, 10, 0.9);
  border: 2px solid #e17055;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#trash-can:hover {
  transform: scale(1.1);
  background: #331111;
}

#trash-tooltip {
  position: absolute;
  bottom: 100px;
  right: 30px;
  background: #111;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  display: none;
  color: #e17055;
}

/* SAVE BUTTON (New) */
#btn-save {
  position: absolute;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: rgba(10, 20, 10, 0.9);
  border: 2px solid #27ae60;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

#btn-save:hover {
  transform: scale(1.1);
  background: #112211;
  box-shadow: 0 0 15px #27ae60;
}

#save-tooltip {
  position: absolute;
  bottom: 100px;
  left: 30px;
  background: #111;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  display: none;
  color: #27ae60;
  border: 1px solid #27ae60;
  pointer-events: none;
}

/* MODALS */
#modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  z-index: 100;
  display: none;
  backdrop-filter: blur(5px);
}

#upgrade-container {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}

.card {
  background: #1e272e;
  border: 2px solid #555;
  width: 220px;
  height: 320px;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: all 0.1s ease-out;
  text-align: center;
  position: relative;
  overflow: hidden;
  opacity: 0.9;
  transform: scale(1.0);
}

.card.active-target {
  opacity: 1;
  transform: scale(1.1);
  border-color: #fff;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.4);
  animation: card-shake 0.15s infinite;
}

@keyframes card-shake {
  0% {
    transform: scale(1.1) rotate(0deg);
  }

  25% {
    transform: scale(1.1) rotate(1deg);
  }

  50% {
    transform: scale(1.1) rotate(0deg);
  }

  75% {
    transform: scale(1.1) rotate(-1deg);
  }

  100% {
    transform: scale(1.1) rotate(0deg);
  }
}

#typing-display {
  font-family: 'Courier New', monospace;
  font-size: 30px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #333;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 40px;
  border-radius: 8px;
  border: 1px solid #555;
  min-width: 300px;
  text-align: center;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.typed-part {
  color: #48dbfb;
  text-shadow: 0 0 10px #48dbfb;
}

.pending-part {
  color: #888;
}

.cursor {
  animation: blink 1s infinite;
  color: #48dbfb;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.rarity-tag {
  font-size: 14px;
  text-transform: uppercase;
  font-weight: bold;
  margin-top: 10px;
}

#message-box {
  background: #111;
  border: 2px solid #48dbfb;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  display: none;
  box-shadow: 0 0 50px rgba(72, 219, 251, 0.2);
}

button {
  background: #48dbfb;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #050a14;
}

button:hover {
  background: #00a8cc;
  box-shadow: 0 0 15px #00a8cc;
}

/* LORE SCREEN STYLES (NEW) */
#lore-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #1a2a3a 0%, #050a14 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 250;
  padding: 40px;
  box-sizing: border-box;
}

.lore-container {
  max-width: 800px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #48dbfb;
  padding: 50px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 0 50px rgba(72, 219, 251, 0.2);
  animation: fadeIn 1.5s ease-out;
}

.lore-title {
  font-size: 36px;
  color: #48dbfb;
  margin-bottom: 30px;
  letter-spacing: 5px;
  text-shadow: 0 0 10px #48dbfb;
}

.lore-text {
  font-size: 18px;
  line-height: 1.8;
  color: #ccc;
  margin-bottom: 40px;
  text-align: justify;
}

.lore-text strong {
  color: #fff;
  text-shadow: 0 0 5px #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
