/* Enhanced Gallery Styles for Amazingly Strange */

.enhanced-gallery {
  background: rgba(33, 37, 41, 0.5);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  color: white;
}

.gallery-container {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.gallery-title {
  font-family: 'Amatic SC', cursive;
  font-size: 3rem;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-subtitle {
  font-family: 'Raleway', sans-serif;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.featured-image-container {
  position: relative;
  margin-bottom: 2rem;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.featured-image-container:hover {
  transform: translateY(-5px);
}

.featured-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  transition: opacity 0.3s ease;
  display: block;
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 2rem;
  text-align: left;
}

.image-overlay h3 {
  font-family: 'Amatic SC', cursive;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.image-overlay p {
  font-family: 'Raleway', sans-serif;
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.9;
}

.thumbnail-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.thumbnail-btn {
  border: 3px solid transparent;
  border-radius: 10px;
  padding: 4px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.thumbnail-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.thumbnail-btn.active {
  border-color: #671E75;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(103, 30, 117, 0.3);
}

.thumbnail-btn img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.thumbnail-btn:hover img {
  transform: scale(1.05);
}

.gallery-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.gallery-btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.gallery-btn.primary {
  background: linear-gradient(135deg, #671E75, #981D97);
  color: white;
  box-shadow: 0 4px 15px rgba(103, 30, 117, 0.3);
}

.gallery-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(103, 30, 117, 0.4);
  color: white;
  text-decoration: none;
}

.gallery-btn.secondary {
  background: transparent;
  color: #671E75;
  border-color: #671E75;
}

.gallery-btn.secondary:hover {
  background: #671E75;
  color: white;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .enhanced-gallery {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .gallery-title {
    font-size: 2.5rem;
  }
  
  .gallery-subtitle {
    font-size: 1rem;
  }
  
  .featured-image {
    height: 300px;
  }
  
  .image-overlay {
    padding: 1rem;
  }
  
  .image-overlay h3 {
    font-size: 2rem;
  }
  
  .thumbnail-grid {
    gap: 0.5rem;
  }
  
  .thumbnail-btn img {
    width: 80px;
    height: 60px;
  }
  
  .gallery-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .gallery-btn {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .thumbnail-btn img {
    width: 60px;
    height: 45px;
  }
  
  .gallery-title {
    font-size: 2rem;
  }
  
  .featured-image {
    height: 250px;
  }
}

/* Animation for smooth transitions */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.enhanced-gallery {
  animation: fadeIn 0.6s ease-out;
}

/* Focus styles for accessibility */
.thumbnail-btn:focus {
  outline: 3px solid #47D7AC;
  outline-offset: 2px;
}

.gallery-btn:focus {
  outline: 3px solid #47D7AC;
  outline-offset: 2px;
}

.carousel__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
  transform: translateX(20px);
}

.carousel__slide.active {
  opacity: 1;
  transform: translateX(0);
}

.slide-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.carousel__slide:hover .carousel__img {
  transform: scale(1.05);
}

.slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(103, 30, 117, 0.9));
  color: white;
  padding: 2rem;
  transform: translateY(60%);
  transition: transform 0.3s ease;
}

.carousel__slide:hover .slide-overlay,
.carousel__slide.active .slide-overlay {
  transform: translateY(0);
}

.slide-overlay h4 {
  font-family: 'Amatic SC', cursive;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.slide-overlay p {
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.character-btn {
  background: #FFB81C;
  color: #671E75;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.character-btn:hover {
  background: #F7EA48;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 184, 28, 0.4);
}

.carousel__prev,
.carousel__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #671E75;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel__prev {
  left: 20px;
}

.carousel__next {
  right: 20px;
}

.carousel__prev:hover,
.carousel__next:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel__navigation {
  margin-top: 2rem;
  text-align: center;
}

.carousel__navigation-list {
  display: flex;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.carousel__navigation-button {
  background: transparent;
  border: 2px solid #981D97;
  border-radius: 25px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Raleway', sans-serif;
  color: #981D97;
}

.carousel__navigation-button.active {
  background: #981D97;
  color: white;
}

.carousel__navigation-button:hover {
  background: #671E75;
  color: white;
  transform: translateY(-2px);
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.nav-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.gallery-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.control-btn {
  background: #47D7AC;
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-btn:hover {
  background: #A8D5BA;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(71, 215, 172, 0.3);
}

/* Character Modal Styles */
.character-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: #999;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #671E75;
}

.character-description {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.character-abilities h4,
.character-story h4 {
  color: #671E75;
  font-family: 'Amatic SC', cursive;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.character-abilities ul {
  list-style: none;
  padding: 0;
}

.character-abilities li {
  padding: 0.3rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.character-abilities li:before {
  content: "✨";
  position: absolute;
  left: 0;
}

.character-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}

.cta-btn {
  background: #FFB81C;
  color: #671E75;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Raleway', sans-serif;
}

.cta-btn:hover {
  background: #F7EA48;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 184, 28, 0.4);
}

.secondary-btn {
  background: transparent;
  color: #671E75;
  border: 2px solid #671E75;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Raleway', sans-serif;
}

.secondary-btn:hover {
  background: #671E75;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .enhanced-gallery {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .gallery-header h3 {
    font-size: 2rem;
  }
  
  .carousel__viewport {
    height: 300px;
  }
  
  .carousel__prev,
  .carousel__next {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .carousel__prev {
    left: 10px;
  }
  
  .carousel__next {
    right: 10px;
  }
  
  .carousel__navigation-list {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .nav-label {
    display: none;
  }
  
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .character-actions {
    flex-direction: column;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .carousel__slide,
  .carousel__img,
  .slide-overlay,
  .character-btn,
  .carousel__prev,
  .carousel__next,
  .carousel__navigation-button,
  .control-btn {
    transition: none;
  }
  
  .carousel__slide:hover .carousel__img {
    transform: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .enhanced-gallery {
    background: white;
    border: 2px solid black;
  }
  
  .gallery-header h3 {
    color: black;
    text-shadow: none;
  }
  
  .character-btn,
  .cta-btn {
    background: black;
    color: white;
    border: 2px solid white;
  }
}
