/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(233, 229, 229, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 100%;
  max-height: 100vh;
  position: relative;
  box-shadow: 0 0 30px rgba(238, 12, 238, 0.6);
}

.lightbox-img {
  max-width: 100%;
  max-height: 100vh;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(216, 110, 216, 0.6);
}

.lightbox-caption {
  color: rgb(184, 12, 184);
  text-align: center;
  margin-top: 15px;
  font-size: 1.2rem;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  color: rgb(207, 37, 212);
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
  transition: transform 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  transform: scale(1.2);
}

.lightbox-close {
  top: 20px;
  right: 30px;
}

.lightbox-prev {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

/* Page transitions */
.page {
  display: none;
  animation: fadeIn 0.5s ease forwards;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Enhancements for dark mode */
.dark .lightbox-caption {
  color: #cf42b8;
}

/* Other custom styles */
.gradient-text {
  background: linear-gradient(90deg, #8b5cf6, #ad4c7d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Sakura animation */
.sakura {
  position: absolute;
  background: #c657d4;
  border-radius: 50% 50% 50% 0;
  animation: fall linear infinite;
  z-index: 0;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
  }
}

/* Page layout */
.page-content {
  min-height: calc(100vh - 4rem);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* Navigation active state */
.nav-link.active {
  color: #e45cf6;
  font-weight: 600;
}

/* Fixed toggle button */
.dark-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60; /* Increased to be above navigation */
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: rgba(31, 30, 30, 0.8);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-in-out;
  transition: all 0.3s ease;
}

.dark-toggle:hover {
  transform: scale(1.1);
  background-color: rgba(15, 15, 15, 0.9);
}

.dark .dark-toggle {
  background-color: rgba(31, 41, 55, 0.8);
}

.dark .dark-toggle:hover {
  background-color: rgba(31, 41, 55, 0.9);
}

.dark-toggle i {
  font-size: 1.25rem;
  color: #4b5563;
  transition: color 0.3s ease;
}

.dark .dark-toggle i {
  color: #ac1c98;
}

/* Character thumbnail active state */
.character-thumbnail.active {
  box-shadow: 0 0 0 3px #a73a86;
  transform: translateY(-3px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 50px;
}

::-webkit-scrollbar-track {
  background: #f014f0;
}

::-webkit-scrollbar-thumb {
  background: #9514af;
  border-radius: 5px;
}

.dark ::-webkit-scrollbar-track {
  background: #a11696;
}

.dark ::-webkit-scrollbar-thumb {
  background: #be1394;
}

/* Triptych panel enhancements */
.triptych-panel {
  height: 800px;
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(155, 12, 160, 0.1),
    0 10px 10px -5px rgba(22, 22, 22, 0.747);
  transition: all 0.3s ease;
}

.triptych-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -12px rgba(17, 17, 17, 0.712);
}

.triptych-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.triptych-panel:hover .triptych-img {
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .triptych-panel {
    height: 500px; /* Slightly smaller on tablets */
  }
}

@media (max-width: 640px) {
  .triptych-panel {
    height: 400px; /* Smaller on mobile */
  }
}

/* Debugging styles */
.debug-info {
  position: fixed;
  top: 70px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  border-radius: 5px;
  z-index: 100;
  font-size: 12px;
}
.gradient-text {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.badge-pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox-content {
  max-width: 90%;
  max-height: 90%;
}
.lightbox-content img {
  max-height: 80vh;
  max-width: 90vw;
  border: 3px solid #fff;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}
.lightbox-caption {
  color: white;
  text-align: center;
  font-size: 1.2rem;
  margin-top: 15px;
  max-width: 80%;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  transition: 0.3s;
}
.lightbox-close:hover {
  color: #d10b6e;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  transform: translateY(-50%);
}
.lightbox-nav button {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 40px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}
.lightbox-nav button:hover {
  background: rgba(139, 92, 246, 0.7);
}

/* Gallery item animation */
.gallery-item {
  transition: all 0.3s ease;
}
.gallery-item:hover {
  transform: scale(1.05);
  z-index: 10;
}
.gradient-text {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.badge-pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
}

/* Character Page Styles */
.character-thumbnail:hover {
  transform: translateY(-5px);
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  padding: 2rem;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
}

.lightbox-caption {
  color: white;
  text-align: center;
  margin-top: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}
