body {
  font-family: 'helvetica neue', helvetica, arial, sans-serif;
  font-size: 16px;
  padding: 0;
  margin: 0;
  background: #f8f9fa;
}

header {
  text-align: center;
  background: white;
  padding: 12px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

header img.logo {
  max-height: 70px;
  cursor: pointer;
  will-change: transform;
}

header img.logo:hover {
  transform: scale(1.05);
}

strong {
  font-weight: 600;
  line-height: 1.5em;
}

.type {
  display: inline-block;
  height: 30px;
  width: 30px;
  margin: 10px;
  background-repeat: no-repeat;
  background-size: 500% 400%;
}
.type.electric { background-position: 100% 0; }
.type.fire { background-position: 25% 33%; }
.type.water { background-position: 63% 100%; }
.type.grass { background-position: 100% 33%; }
.type.fighting { background-position: 0 33%; }

.row {
  display: block;
  min-height: 50px;
}

.instructions {
  text-align: center;
  padding: 12px 0;
  background: white;
}

.instructions p {
  font-size: 1.6em;
  margin: 0;
  color: #333;
  font-weight: 500;
}

/* --- Character Selection --- */
.characters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  padding: 12px;
  max-height: 380px;
  overflow-y: scroll;
  overflow-x: hidden;
  background: white;
  border-bottom: 1px solid #e0e0e0;
  will-change: scroll-position;
}

.characters::-webkit-scrollbar {
  width: 8px;
}

.characters::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.characters::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

.characters::-webkit-scrollbar-thumb:hover {
  background: #888;
}

.characters.hidden {
  visibility: hidden;
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  gap: 0;
  max-height: 0;
  overflow: hidden;
}

.char-container {
  text-align: center;
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
}

.char-container:active {
  transform: scale(0.98);
}

.char-container img {
  max-height: 60px;
  max-width: 70px;
  margin: 0 auto 4px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.char-container h2 {
  text-transform: capitalize;
  font-size: 0.75em;
  font-weight: 600;
  margin: 0;
  color: #000000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.char-container:hover {
  background: #fff;
  border-color: #4CAF50;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- Battle Stadium --- */
.stadium {
  background-color: #7DCD79;
  background-image: url("music/Game Boy Advance - Pokemon Ruby _ Sapphire - Battle Effects - Battle Arenas.png");
  background-repeat: no-repeat;
  background-size: 400% 400%;
  background-position: 0% 0%;
  image-rendering: pixelated;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

.stadium.bg-1  { background-position: 0% 0%; }
.stadium.bg-2  { background-position: 0% 0%; }
.stadium.bg-3  { background-position: 0% 0%; }
.stadium.bg-4  { background-position: 0% 0%; }

.stadium.bg-5  { background-position: 0% 0%; }
.stadium.bg-6  { background-position: 0% 0%; }
.stadium.bg-7  { background-position: 0% 0%; }
.stadium.bg-8  { background-position: 0% 0%; }

.stadium.bg-9  { background-position: 0% 0%; }
.stadium.bg-10 { background-position: 0% 0%; }
.stadium.bg-11 { background-position: 0% 0%; }
.stadium.bg-12 { background-position: 0% 0%; }

.stadium.bg-13 { background-position: 0% 0%; }
.stadium.bg-14 { background-position: 0% 0%; }
.stadium.bg-15 { background-position: 0% 0%; }
.stadium.bg-16 { background-position: 0% 0%; }

.stadium .enemy, 
.stadium .hero {
  display: block;
  box-sizing: border-box;
}

/* Ik ga er vanuit dat je JavaScript een .char element toevoegt in .enemy en .hero */
.stadium .char {
  height: 175px;
  position: relative;
}

.stadium .char > * {
  position: absolute;
  text-transform: capitalize;
}

.stadium .char img {
  height: 150px;
  bottom: 0; /* Zorgt dat de Pokémon op de grond staan */
}
/* health bar*/
.stadium .char .data {
  background: #b1b1b1;
  width: 20vw;
  padding: 15px 2%;
  box-sizing: border-box;
  top: 25px;
  border-radius: 8px;
  font: bold 1.2em 'helvetica neue', helvetica, arial, sans-serif;
  
  
}

.stadium .char .data progress {
  width: 100%;
}

.stadium .char .data p {
  text-align: right;
  margin: 5px 0 0 0;
}

/* --- Posities in het stadion --- */
.stadium .enemy img { right: 20vw; bottom: -55px; }
.stadium .enemy .data { left: 15vw; }

.stadium .hero img { left: 20vw; }
.stadium .hero .data { right: 15vw; }

/* --- Attacks Menu --- */
.attack-list {
  display: flex;
  flex-wrap: wrap;
  background: #FFFAFA;
  transition: opacity 0.3s ease;
  text-transform: capitalize;
  list-style: none; /* Verwijdert de bolletjes van de <ul> */
  padding: 0;
  margin: 0;
}

.attack-list.disabled {
  opacity: 0.5;
  position: relative;
  z-index: -1;
  cursor: not-allowed;
}

.attack-list li {
  width: 50%;
  text-align: center;
  padding: 25px 0;
  box-sizing: border-box;
  border: 1px solid #666;
  cursor: pointer;
  transition: background 0.3s ease;
  font: bold 1.2em 'helvetica neue', helvetica, arial, sans-serif;
}

/* Dit geldt voor alle type-iconen in de log */
.instructions img {
    width: 20px;
    height: 20px;
    vertical-align: middle; /* Zorgt dat het icoon mooi op de tekstlijn staat */
    margin-right: 5px;
}

.attack-list li:hover {
  background: #EEE;
}

/* --- Modal (Pop-up) --- */
.modal-out {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: rgba(33, 33, 33, 0.8);
  z-index: 900;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-in {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 500px);
  max-height: 80vh;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translate(-50%, -40%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

.modal-in header {
  position: relative;
  min-height: 40px;
  text-align: center;
  padding: 15px 3%;
  box-sizing: border-box;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}

.modal-in header h1 {
  font-size: 1.6em;
  margin: 0;
  color: #333;
}

.modal-in .close {
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 1.8em;
  line-height: 1;
  color: #999;
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.modal-in .close:hover {
  background: #f0f0f0;
  color: #333;
}

.modal-in section {
  box-sizing: border-box;
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  background: white;
}

/* Respond to reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}