/* ===== General Reset ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #000;
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
}

/* ===== Map Canvas ===== */
#map-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #111;
}

#game-board {
  background-color: #222;
  border: 2px solid #555;
  image-rendering: pixelated;
}

/* ===== Battle Screen ===== */
#battle-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, #222 0%, #000 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  z-index: 10;
}

#battle-screen.hidden {
  display: none;
}

#battle-ui {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Enemy Info Section */
#battle-enemy-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

#enemy-sprite {
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin-bottom: 10px;
}

#enemy-name {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

/* HP Bar */
.hp-bar {
  width: 200px;
  height: 20px;
  background: #444;
  border: 1px solid #888;
  border-radius: 5px;
  overflow: hidden;
}

.hp-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(to right, #c00, #f44);
  transition: width 0.3s ease-in-out;
}

/* Party Status */
#party-status {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.party-member {
  text-align: center;
}

.party-member img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.member-hp,
.member-mp {
  width: 100px;
  height: 10px;
  margin: 4px auto;
  background: #333;
  border: 1px solid #555;
  border-radius: 3px;
  position: relative;
}

.hp-inner {
  background: #d00;
  height: 100%;
  width: 100%;
}

.mp-inner {
  background: #06c;
  height: 100%;
  width: 100%;
}

/* Battle Options */
#battle-options {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#option-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
}

#option-buttons button,
#sub-options button {
  padding: 8px 14px;
  font-size: 1rem;
  background: #333;
  color: #fff;
  border: 1px solid #888;
  border-radius: 5px;
  cursor: pointer;
}

#option-buttons button:hover,
#sub-options button:hover {
  background: #555;
}

#sub-options {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 5px;
}

#sub-options.hidden {
  display: none;
}

/* Battle Log */
#battle-log {
  height: 100px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #666;
  padding: 10px;
  font-size: 0.9rem;
  color: #eee;
  border-radius: 4px;
}

/* Animated log messages */
.battle-message {
  animation: fadeInUp 0.3s ease-in-out;
  margin-bottom: 5px;
}

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

/* Debug Button */
.debug-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 12px;
  font-size: 0.85rem;
  background: #800;
  color: #fff;
  border: 1px solid #c00;
  border-radius: 3px;
  cursor: pointer;
  z-index: 20;
}

