/* Custom 8-bit elements for game components */

/* Hide the pixelated stat boxes at the top of the main page */
.stat-boxes-preview,
.hero-stats,
body.pixel-theme .hero-stats .stat-block {
  display: none !important;
}

/* Hero container */
.hero-container {
  padding: 30px;
  position: relative;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin-top: 20px;
  margin-bottom: 40px;
  border: 1px solid #333;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero-chad {
  image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.3));
  max-width: 180px;
  transform: scale(1.2);
  border-radius: 8px;
}

/* Character Classes Row */
.character-classes-container {
  margin: 20px auto 40px;
  max-width: 100%;
  overflow-x: auto;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 10px 0;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
}

.character-icons-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.character-icon {
  text-align: center;
  width: 80px;
  padding: 5px;
  transition: transform 0.2s ease;
}

.character-icon:hover {
  transform: scale(1.1);
}

.character-icon img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  border: 2px solid #000;
  background: #222;
  padding: 2px;
  border-radius: 4px;
}

.character-icon .class-name {
  font-size: 0.6rem;
  margin-top: 5px;
  color: #ffffff;
  font-family: 'Press Start 2P', cursive;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Section divider */
.section-divider {
  position: relative;
  text-align: center;
  margin: 30px 0;
}

.section-divider:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #333;
  z-index: -1;
}

.section-divider .section-title {
  display: inline-block;
  background-color: #121212;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Main title enhancements */
.main-title {
  font-size: 3.5rem;
  color: #00ff00;
  text-shadow: 4px 4px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  font-family: 'Press Start 2P', cursive;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 4px 4px 0 #000, 0 0 10px #00ff00;
  }
  to {
    text-shadow: 4px 4px 0 #000, 0 0 20px #00ff00, 0 0 30px #00ff00;
  }
}

/* Header container for special effects */
.text-center.mb-4 {
  padding: 20px;
  position: relative;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  margin-top: 20px;
}

/* 8-bit style pixel borders */
.pixel-border {
  position: relative;
  padding: 15px;
  background-color: #2a2a2a;
  /* Default border is now handled by mechanic class or fallback */
  /* border: 5px solid #000; */
  /* box-shadow: 6px 6px 0 #000; */
}

.pixel-border::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(to right, #000 5px, transparent 5px) 0 0,
    linear-gradient(to right, #000 5px, transparent 5px) 0 100%,
    linear-gradient(to left, #000 5px, transparent 5px) 100% 0,
    linear-gradient(to left, #000 5px, transparent 5px) 100% 100%,
    linear-gradient(to bottom, #000 5px, transparent 5px) 0 0,
    linear-gradient(to bottom, #000 5px, transparent 5px) 100% 0,
    linear-gradient(to top, #000 5px, transparent 5px) 0 100%,
    linear-gradient(to top, #000 5px, transparent 5px) 100% 100%;
  background-repeat: no-repeat;
  background-size: 25px 25px;
  pointer-events: none;
}

/* Stat blocks styling */
.chad-stats {
  margin: 0 auto 30px;
  max-width: 1000px;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.stat-block {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  background-color: #1a1a1a;
  border: 3px solid #000;
  padding: 0;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.7);
  margin-bottom: 15px;
}

.stat-header {
  background-color: #444;
  padding: 10px;
  text-align: center;
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: white;
  border-bottom: 3px solid #000;
}

.stat-content {
  display: flex;
  padding: 20px 15px;
}

.stat-icon {
  font-size: 2rem;
  margin-right: 15px;
  color: #ffcc00;
}

.stat-desc {
  flex: 1;
  color: #ddd;
  font-size: 0.75rem;
  line-height: 1.6;
}

/* Custom stat headers */
.stat-block.clout .stat-header {
  background-color: #1e90ff;
}

.stat-block.roast .stat-header {
  background-color: #ff4500;
}

.stat-block.resistance .stat-header {
  background-color: #9370db;
}

.stat-block.drip .stat-header {
  background-color: #32cd32;
}

/* Pixel art avatars */
.pixel-art-frame {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 5px solid #000;
  background-color: #333;
  padding: 6px;
  box-shadow: 6px 6px 0px #000;
}

/* 8-bit styled health bar */
.pixel-health-bar {
  height: 30px;
  background-color: #111;
  border: 5px solid #000;
  position: relative;
  margin: 15px 0;
}

.pixel-health-inner {
  height: 20px;
  background-color: #00ff00;
  transition: width 0.3s ease;
}

.pixel-health-low {
  background-color: #ff0000;
}

.pixel-health-med {
  background-color: #ffff00;
}

/* Pixelated character class badges */
.pixel-badge {
  display: inline-block;
  padding: 4px 8px;
  border: 2px solid #000;
  background-color: #343a40; /* Default background */
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8em;
  text-align: center;
  box-shadow: 3px 3px 0 #000;
  margin-bottom: 10px;
  text-shadow: 2px 2px 0 #000; /* Add default text shadow */
}

/* REMOVE old specific badge colors to avoid conflicts */
/* .pixel-badge.sigma { background-color: #6a0dad; text-shadow: 2px 2px 0 #000; } */
/* .pixel-badge.alpha { background-color: #b80000; text-shadow: 2px 2px 0 #000; } */
/* .pixel-badge.gigachad { background-color: #00a86b; text-shadow: 2px 2px 0 #000; } */
/* .pixel-badge.crypto { background-color: #ffa500; text-shadow: 2px 2px 0 #000; } */
/* .pixel-badge.ratio { background-color: #1e90ff; text-shadow: 2px 2px 0 #000; } */
/* .pixel-badge.meme { background-color: #8a2be2; text-shadow: 2px 2px 0 #000; } */

/* ADD Mechanic-based BADGE colors */
.pixel-badge.mechanic-damage-boost { background-color: #b80000; } /* Red */
.pixel-badge.mechanic-stat-boost { background-color: #007bff; } /* Blue */
.pixel-badge.mechanic-crit-boost { background-color: #00a86b; } /* Green */
.pixel-badge.mechanic-double-strike { background-color: #ff69b4; } /* Pink */
.pixel-badge.mechanic-counter-attack { background-color: #ffa500; } /* Orange */
.pixel-badge.mechanic-damage-reduction { background-color: #a9a9a9; } /* Dark Gray */
.pixel-badge.mechanic-random { background-color: #8a2be2; } /* BlueViolet */
.pixel-badge.mechanic-default { background-color: #343a40; } /* Default Dark */

/* Mechanic-based CARD BORDER colors */
.card.mechanic-damage-boost { border: 7px solid #b80000; box-shadow: 6px 6px 0 #b80000; }
.card.mechanic-stat-boost { border: 7px solid #007bff; box-shadow: 6px 6px 0 #007bff; }
.card.mechanic-crit-boost { border: 7px solid #00a86b; box-shadow: 6px 6px 0 #00a86b; }
.card.mechanic-double-strike { border: 7px solid #ff69b4; box-shadow: 6px 6px 0 #ff69b4; }
.card.mechanic-counter-attack { border: 7px solid #ffa500; box-shadow: 6px 6px 0 #ffa500; }
.card.mechanic-damage-reduction { border: 7px solid #a9a9a9; box-shadow: 6px 6px 0 #a9a9a9; }
.card.mechanic-random { border: 7px solid #8a2be2; box-shadow: 6px 6px 0 #8a2be2; }
.card.mechanic-default { border: 7px solid #343a40; box-shadow: 6px 6px 0 #343a40; } /* Default if needed */

/* 8-bit style coin display */
.pixel-coin {
  display: inline-flex;
  align-items: center;
  font-family: 'Press Start 2P', cursive;
  color: #ffff00;
  text-shadow: 1px 1px 0 #000;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.pixel-coin::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #ffaa00;
  border: 2px solid #000;
  border-radius: 50%;
  margin-right: 10px;
  box-shadow: inset -2px -2px 0px rgba(0,0,0,0.3);
}

/* 8-bit speech bubbles */
.pixel-speech {
  background-color: #fff;
  border: 4px solid #000;
  padding: 16px;
  position: relative;
  margin: 20px 0;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  color: #000;
  line-height: 1.8;
  box-shadow: 4px 4px 0 #000;
}

.pixel-speech::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 16px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid #000;
}

/* 8-bit battle effects */
.pixel-effect {
  position: absolute;
  pointer-events: none;
  z-index: 100;
}

.pixel-hit {
  font-family: 'Press Start 2P', cursive;
  color: #ff0000;
  font-size: 1.2rem;
  animation: hit-animation 0.5s forwards;
  text-shadow: 2px 2px 0 #000;
}

@keyframes hit-animation {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Pixelated damage numbers */
.pixel-damage {
  position: absolute;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  color: #ff0000;
  text-shadow: 2px 2px 0 #000;
  animation: damage-float 1s forwards;
}

@keyframes damage-float {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-30px);
    opacity: 0;
  }
}

/* 8-bit inventory slots */
.pixel-inventory-slot {
  width: 64px;
  height: 64px;
  background-color: #333;
  border: 4px solid #000;
  display: inline-block;
  margin: 6px;
  position: relative;
  box-shadow: 3px 3px 0 #000;
}

.pixel-inventory-slot.empty {
  background-image:
    linear-gradient(45deg, transparent 45%, #555 45%, #555 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, #555 45%, #555 55%, transparent 55%);
}

.pixel-inventory-item {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* 8-bit form elements */
.pixel-checkbox {
  appearance: none;
  width: 28px;
  height: 28px;
  background-color: #000;
  border: 4px solid #fff;
  position: relative;
  cursor: pointer;
}

.pixel-checkbox:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: #00ff00;
}

/* 8-bit select dropdown */
.pixel-select {
  appearance: none;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  background-color: #000;
  color: #00ff00;
  border: 4px solid #00ff00;
  padding: 10px 32px 10px 16px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect x="4" y="6" width="8" height="2" fill="%2300ff00"/><rect x="6" y="8" width="4" height="2" fill="%2300ff00"/><rect x="8" y="10" width="2" height="2" fill="%2300ff00"/></svg>');
  background-position: right 8px center;
  background-repeat: no-repeat;
  cursor: pointer;
  text-shadow: 1px 1px 0 #000;
}

/* 8-bit radio buttons */
.pixel-radio {
  appearance: none;
  width: 28px;
  height: 28px;
  background-color: #000;
  border: 4px solid #fff;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}

.pixel-radio:checked::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  background-color: #00ff00;
  border-radius: 50%;
}

/* 8-bit experience bar */
.pixel-xp-bar {
  height: 24px;
  background-color: #111;
  border: 4px solid #000;
  position: relative;
  margin: 12px 0;
  box-shadow: 2px 2px 0 #000;
}

.pixel-xp-fill {
  height: 16px;
  background-color: #00ffff;
  background-image: linear-gradient(
    90deg,
    #00ffff,
    #00ffff 5px,
    #0088ff 5px,
    #0088ff 10px
  );
  background-size: 10px 10px;
  transition: width 0.5s ease;
}

/* Large inventory slot for main inventory */
.pixel-inventory-slot-large {
  width: 120px;
  height: 96px;
  background: #222;
  border: 4px solid #000;
  box-shadow: 3px 3px 0 #000;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: transform 0.15s, box-shadow 0.15s;
}
.pixel-inventory-slot-large:hover {
  transform: scale(1.07);
  box-shadow: 0 0 12px 2px #00ff00, 3px 3px 0 #000;
  z-index: 2;
}

.pixel-inventory-slot-large img.pixel-inventory-item {
  width: 90%;
  height: 90%;
  object-fit: contain;
  image-rendering: pixelated;
}

.pixel-inventory-info {
  background: rgba(0,0,0,0.7);
  border-radius: 4px;
  margin-top: 4px;
  padding: 4px 2px 2px 2px;
  box-shadow: 1px 1px 0 #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  width: 120px;
}
.pixel-inventory-info .pixel-font {
  font-size: 0.8rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 2px;
  text-align: center;
  line-height: 1;
  word-wrap: break-word;
  max-width: 100%;
}
.pixel-inventory-info .badge {
  font-size: 0.7rem;
  font-weight: bold;
  margin: 2px 0;
}
.pixel-inventory-info .item-stats {
  font-size: 0.7rem;
  color: #0f0;
  font-family: 'Press Start 2P', monospace;
  margin-top: 2px;
  text-shadow: 1px 1px 0 #000;
  text-align: center;
  line-height: 1.2;
}
