/* Vaporwave Dungeon - Styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0a1a2e 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  overflow: hidden;
}

h1 {
  color: #ff6ec7;
  text-shadow: 0 0 10px #ff6ec7, 0 0 20px #7b68ee, 0 0 30px #00ffff;
  margin-bottom: 10px;
  font-size: 1.8rem;
  letter-spacing: 0.3em;
}

#info {
  color: #00ffff;
  margin-bottom: 10px;
  text-shadow: 0 0 5px #00ffff;
  font-size: 0.8rem;
}

#gameContainer {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

canvas {
  border: 3px solid #ff6ec7;
  box-shadow: 0 0 20px #ff6ec7, 0 0 40px #7b68ee, inset 0 0 20px rgba(255,110,199,0.1);
  image-rendering: pixelated;
}

/* Sidebar */
#sidebar {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel {
  background: rgba(10, 10, 30, 0.9);
  border: 2px solid #7b68ee;
  padding: 10px;
  box-shadow: 0 0 10px rgba(123, 104, 238, 0.5);
}

.panel h3 {
  color: #ff6ec7;
  text-shadow: 0 0 5px #ff6ec7;
  margin-bottom: 8px;
  font-size: 0.9rem;
  border-bottom: 1px solid #7b68ee;
  padding-bottom: 4px;
}

/* Stats */
.stat-row {
  display: flex;
  justify-content: space-between;
  color: #00ffff;
  font-size: 0.75rem;
  margin: 4px 0;
}

.stat-label { color: #7b68ee; }
.stat-value { color: #00ffff; text-shadow: 0 0 3px #00ffff; }

.hp-bar, .xp-bar {
  height: 12px;
  background: #1a1a3a;
  border: 1px solid #7b68ee;
  margin: 4px 0;
  position: relative;
}

.hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6ec7, #ff4a9e);
  transition: width 0.3s;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #7b68ee);
  transition: width 0.3s;
}

.bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.65rem;
  color: white;
  text-shadow: 1px 1px 1px black;
}

/* Equipment Slots */
#equipped {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #7b68ee;
}

.equip-slot {
  flex: 1;
  min-width: 0;
  background: rgba(0,0,0,0.3);
  border: 1px solid #7b68ee;
  padding: 4px 2px;
  text-align: center;
  font-size: 0.6rem;
  overflow: hidden;
}

.equip-slot .slot-label { color: #7b68ee; display: block; margin-bottom: 2px; }
.equip-slot .slot-item { 
  color: #ff6ec7; 
  font-size: 0.55rem; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}
.equip-slot.empty .slot-item { color: #555; }

/* Inventory */
#inventory {
  max-height: 140px;
  overflow-y: auto;
}

.inv-item {
  color: #00ffff;
  font-size: 0.7rem;
  padding: 4px 6px;
  margin: 2px 0;
  background: rgba(0, 255, 255, 0.1);
  border-left: 3px solid #00ffff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  transition: all 0.15s;
}

.inv-item:hover { background: rgba(0, 255, 255, 0.25); transform: translateX(2px); }
.inv-item.selected { background: rgba(255, 170, 0, 0.2); border-left-color: #ffaa00; }
.inv-item.equipped { border-left-color: #ff6ec7; background: rgba(255, 110, 199, 0.15); }
.inv-item .item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-item .item-stats { font-size: 0.55rem; color: #7b68ee; margin-left: 4px; }

.inv-item .item-key { 
  background: rgba(123, 104, 238, 0.3); 
  color: #00ffff; 
  padding: 1px 4px; 
  border-radius: 2px; 
  font-size: 0.55rem;
  margin-right: 4px;
}

/* Tooltips */
.tooltip {
  display: none;
  position: absolute;
  left: 105%;
  top: 0;
  background: rgba(10, 10, 30, 0.98);
  border: 2px solid #7b68ee;
  padding: 8px;
  min-width: 160px;
  z-index: 100;
  box-shadow: 0 0 15px rgba(123, 104, 238, 0.5);
}

.inv-item:hover .tooltip { display: block; }
.tooltip .tt-name { font-size: 0.8rem; margin-bottom: 4px; border-bottom: 1px solid #7b68ee; padding-bottom: 3px; }
.tooltip .tt-type { font-size: 0.6rem; color: #7b68ee; margin-bottom: 6px; }
.tooltip .tt-stat { font-size: 0.65rem; color: #00ffff; margin: 2px 0; }
.tooltip .tt-stat span { color: #ff6ec7; }
.tooltip .tt-desc { font-size: 0.6rem; color: #888; margin-top: 6px; font-style: italic; }
.tooltip .tt-hint { font-size: 0.55rem; color: #555; margin-top: 6px; border-top: 1px solid #333; padding-top: 4px; }

/* Combat Log */
#combatLog {
  max-height: 120px;
  overflow-y: auto;
  font-size: 0.65rem;
}

.log-entry {
  color: #aaa;
  margin: 2px 0;
  padding: 2px;
  border-bottom: 1px solid rgba(123, 104, 238, 0.2);
}

.log-damage { color: #ff6ec7; }
.log-heal { color: #00ff88; }
.log-loot { color: #ffaa00; }
.log-kill { color: #ff4a4a; }
.log-levelup { color: #00ffff; text-shadow: 0 0 5px #00ffff; }

#controls {
  color: #7b68ee;
  margin-top: 10px;
  text-align: center;
  text-shadow: 0 0 5px #7b68ee;
  font-size: 0.8rem;
}

/* Item Rarity Colors */
.item-common { color: #aaaaaa; }
.item-uncommon { color: #00ff88; }
.item-rare { color: #00aaff; }
.item-epic { color: #aa00ff; }
.item-legendary { color: #ffaa00; text-shadow: 0 0 3px #ffaa00; }
