/* Comic-style Character Showcase */
.character-showcase {
  padding: 15px !important;
  min-height: 520px !important;
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.character-display-container {
  margin-bottom: 10px !important;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-display-area {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-details {
  height: 100%;
  width: 100%;
  display: none;
}

.character-details.active {
  display: block;
}

.character-showcase-grid {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Comic frame for character image */
.comic-frame {
  border: 5px solid white;
  outline: 2px solid black;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
  position: relative;
  transform: rotate(-1deg);
  background-color: white;
  padding: 5px !important;
}

/* Character Large Image Container with comic styling */
.character-large-image-container {
  height: 450px !important;
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

/* Fill the container while maintaining aspect ratio */
.character-large-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Character thumbnails with comic styling */
.character-thumbnails-container {
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 2px dashed rgba(255, 255, 255, 0.4);
  position: relative;
}

.character-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 10px !important;
  justify-content: center;
}

/* Comic button styling for class selection */
.comic-button-frame {
  width: auto;
  height: auto;
  padding: 6px 12px;
  border: 2px solid black;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.7);
  transition: all 0.2s ease;
  cursor: pointer;
  transform: rotate(-1deg);
}

.character-thumb:hover .comic-button-frame {
  transform: translateY(-2px) rotate(0deg);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.8);
}

.character-thumb.active .comic-button-frame {
  transform: translate(1px, 1px) rotate(0deg);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6);
}

/* Class icon and name styling */
.class-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5));
}

.class-name {
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8), -1px -1px 0 #000, 1px -1px 0 #000,
    -1px 1px 0 #000;
  font-family: "Bangers", cursive, var(--heading-font);
  letter-spacing: 1px;
}

/* Comic style fallback message */
.character-fallback {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Bangers", cursive, var(--heading-font);
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 black;
}

.character-fallback h3 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.character-fallback p {
  font-size: 1.5rem;
}

/* Responsive design for tablets */
@media (max-width: 768px) {
  .character-showcase {
    min-height: 480px !important;
    padding: 12px !important;
  }

  .character-large-image-container {
    height: 380px !important;
    width: 95%;
    padding: 4px !important;
  }

  .comic-button-frame {
    padding: 4px 10px;
    border-width: 2px;
  }

  .class-name {
    font-size: 1rem;
  }

  /* Make tabs scrollable horizontally */
  .character-thumbnails {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .character-thumbnails::-webkit-scrollbar {
    height: 4px;
  }

  .character-thumbnails::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
  }
}

/* Responsive design for mobile phones */
@media (max-width: 576px) {
  .character-showcase {
    min-height: auto !important;
    padding: 5px !important;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
  }

  .character-display-container {
    margin-bottom: 5px !important;
  }

  .character-large-image-container {
    height: 190px !important;
    width: 95%;
    padding: 0 !important;
  }

  /* Reduce comic frame thickness on mobile */
  .comic-frame {
    border: 1px solid white;
    outline: 1px solid black;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
  }

  .comic-button-frame {
    padding: 3px 8px;
    border-width: 1px;
    min-width: 70px;
    border-radius: 4px;
  }

  .character-thumbnails-container {
    margin-top: 5px !important;
    padding-top: 5px !important;
  }

  .character-thumbnails {
    gap: 6px !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 3px;
  }

  .class-name {
    font-size: 0.8rem;
  }

  .class-icon {
    display: none;
  }
}
