body {
  font-family: "Poppins", sans-serif;
  background-color: #0e0e0e;
  color: #eee;
  margin: 0;
  padding: 0;
}

header, footer {
  text-align: center;
  padding: 1.5em;
  background: #1a1a1a;
  box-shadow: 0 0 10px #000;
}

main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5em;
  padding: 2em;
}

.character {
  background: #181818;
  border-radius: 1em;
  padding: 1em;
  box-shadow: 0 0 10px #000;
  transition: transform 0.2s, box-shadow 0.2s;
}

.character:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px #444;
}

.character img {
  width: 100%;
  border-radius: 0.5em;
  object-fit: cover;
}

.character h2 {
  color: #90caf9;
  margin-top: 0.5em;
}

ul {
  list-style: none;
  padding: 0;
}

/* === MODAL STYLES === */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #111;
  margin: 5% auto;
  padding: 2em;
  border-radius: 1em;
  max-width: 700px;
  color: #eee;
  position: relative;
  box-shadow: 0 0 15px #000;
  animation: fadeIn 0.3s ease;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5em;
  cursor: pointer;
  color: #bbb;
}

.close:hover {
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Optional colored stat bars */
.stat {
  margin: 0.5em 0;
}
.stat-label {
  font-weight: bold;
}
.bar {
  height: 10px;
  background: #333;
  border-radius: 5px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: #90caf9;
  width: 0;
  transition: width 0.8s ease;
}

.ability {
  position: relative;
  display: inline-block;
  margin: 5px;
  cursor: help;
  color: #7fa1ff;
  font-weight: 600;
  list-style: none;
}

.tooltip {
  visibility: hidden;
  opacity: 0;
  width: 220px;
  background: #1a1a1a;
  color: #fff;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.25s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #1a1a1a transparent transparent transparent;
}

.ability:hover .tooltip {
  visibility: visible;
  opacity: 1;
}
