body {
  font-family: Arial, sans-serif;
  background: #666161;
  margin: 0;
  padding: 0;
  color: #333;
}

header {
  background: #333;
  color: #fff;
  padding: 1rem;
  text-align: center;
}

.search-area {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.search-area input {
  padding: 8px;
  width: 200px;
}

.search-area button {
  padding: 8px 12px;
  cursor: pointer;
}

/* Overlay (fundo escuro com desfoque) */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.4);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Menu lateral */
#filterMenu {
  position: fixed;
  top: 0;
  left: -300px; /* escondido inicialmente */
  width: 280px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 10px rgba(0,0,0,0.3);
  padding: 1.5rem 1rem;
  overflow-y: auto;
  z-index: 10;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  transition: left 0.3s ease;
}

/* Quando ativo */
#filterMenu.active {
  left: 0;
}

/* Botão de fechar */
#closeFilters {
  position: absolute;
  top: 1%;
  right: 1%;
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  z-index: 99;
  background:red;
  position: absolute; 
  top: 1;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background 0.2s ease;
}

#closeFilters:hover {
  background: #eee;
}

/* === MODAL === */
#modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.6);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#modalOverlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Container do modal */
#characterModal {
  position: fixed;
  user-select: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #fefefe;
  border-radius: 12px;
  padding: 1.5rem;
  width: 90%;
  z-index: 30;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

#characterModal.active {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

#characterModal .modal-content {
  position: relative;
}

#closeModal {
  position: absolute;
  top: -15px;
  right: -15px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background 0.2s ease;
}
#closeModal:hover {
  background: #eee;
}

/* Carrossel */
#carouselContainer {
  position: relative;
  overflow: hidden;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modalImage {
  -webkit-user-drag: none;
  user-drag: none;
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.carousel-btn {
  background: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: background 0.2s;
}
.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

#prevImage { left: 10px; }
#nextImage { right: 10px; }

#modalDescription {
  text-align: justify;
  color: #555;
  margin-top: 1rem;
  font-size: 0.95em;
}

/* Animações e espaçamento do conteúdo interno */
.categoria-tags {
  margin-bottom: 1.5rem;
}

#filterMenu.hidden {
  display: none;
}
#filterMenu h4 {
  margin-top: 15px;
  margin-bottom: 5px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 3px;
  color: #333;
}

.tag-option {
  font-size: 0.9em;
  display: inline-block;
  margin: 3px 0;
}

#characterList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  background: #666161;
  gap: 20px;
  padding: 1rem;
}

.character-card {
  background: #fefefe;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s ease-in-out; 
}

.character-card:hover{
   transform: scale(1.05);
}

.character-card img {
  width: 100%;
  border-radius: 6px;
}

.character-card h2 {
  margin: 10px 0 5px;
}

.character-card p {
  font-size: 0.9em;
  color: #666;
}

.tag {
  background: #ddd;
  border-radius: 4px;
  padding: 3px 6px;
  margin: 2px;
  display: inline-block;
  font-size: 0.8em;
}

/* === CARROSSEL MODERNO === */
#carouselTrack {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.carousel-image {
  min-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0.4;
  transition: opacity 0.5s ease;
  user-select: none;
  pointer-events: none;
}

.carousel-image.fade-in {
  opacity: 1;
}

.carousel-btn {
  background: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: background 0.2s;
  z-index: 2;
}
.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}
#prevImage { left: 10px; }
#nextImage { right: 10px; }

#indicator {
  position: absolute;
  bottom: 10px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: monospace;
}

/* Fade suave na imagem atual */
@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.fade-in {
  animation: fadeSlide 0.4s ease;
}

