/* Gallery Styles - Wundersoul Collection */

.content {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

/* Gallery Controls */
.gallery-controls {
  margin: 2rem 0;
  text-align: center;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  background: var(--card);
  border: 1px solid rgba(176, 176, 176, 0.2);
  color: var(--fg);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  will-change: transform, background-color;
}

.filter-btn:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-btn.active {
  background: var(--pixel-cyan);
  color: var(--bg);
  border-color: var(--pixel-cyan);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(176, 176, 176, 0.1);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  will-change: transform;
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
  border-color: var(--pixel-cyan);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  will-change: transform;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(45, 45, 48, 0.95));
  color: var(--fg);
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  will-change: transform;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pixel-cyan);
  font-family: 'IBM Plex Mono', monospace;
}

.gallery-overlay p {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.4;
}

.category-tag {
  display: inline-block;
  background: var(--pixel-cyan);
  color: var(--bg);
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Gallery Modal */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--card);
  border: 1px solid rgba(176, 176, 176, 0.2);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(45, 45, 48, 0.9);
  border: 1px solid rgba(176, 176, 176, 0.3);
  color: var(--fg);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
}

.modal-close:hover {
  background: var(--pixel-cyan);
  color: var(--bg);
  transform: rotate(90deg);
}

.modal-image {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: var(--bg);
}

.modal-info {
  padding: 1.5rem;
  background: var(--card);
}

.modal-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pixel-cyan);
  font-family: 'IBM Plex Mono', monospace;
}

.modal-info p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
  opacity: 0.9;
}

.modal-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  opacity: 0.7;
}

.modal-category {
  background: var(--pixel-cyan);
  color: var(--bg);
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.nav-btn {
  background: rgba(45, 45, 48, 0.9);
  border: 1px solid rgba(176, 176, 176, 0.3);
  color: var(--fg);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: bold;
}

.nav-btn:hover {
  background: var(--pixel-cyan);
  color: var(--bg);
  transform: scale(1.1);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Filter Animation */
.gallery-item {
  animation: fadeIn 0.6s ease-out;
}

.gallery-item.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Harmonization Overlay */
.harmonization-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(45deg, 
    rgba(0, 0, 0, 0.95) 0%, 
    rgba(20, 0, 20, 0.95) 50%, 
    rgba(0, 0, 0, 0.95) 100%);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: harmonizePulse 3s ease-in-out infinite;
}

.harmonization-content {
  text-align: center;
  max-width: 600px;
  padding: 3rem;
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 12px;
  background: radial-gradient(circle at center, 
    rgba(40, 0, 40, 0.8) 0%, 
    rgba(0, 0, 0, 0.9) 100%);
  box-shadow: 
    0 0 30px rgba(0, 255, 255, 0.2),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.harmonization-symbol {
  font-size: 4rem;
  color: #00ffff;
  margin-bottom: 1.5rem;
  animation: symbolRotate 8s linear infinite;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.harmonization-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.8rem;
  font-weight: 600;
  color: #00ffff;
  margin-bottom: 1.5rem;
  letter-spacing: 0.15em;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.harmonization-message {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  color: #e0e0e0;
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.harmonization-progress {
  margin-top: 2rem;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #00ffff 50%, 
    transparent 100%);
  animation: harmonizeProgress 4s ease-in-out infinite;
}

.progress-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  color: #b0b0b0;
  font-style: italic;
}

@keyframes harmonizePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.95; }
}

@keyframes symbolRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes harmonizeProgress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.harmonization-home-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 2rem;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 6px;
  color: #00ffff;
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.harmonization-home-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  border-color: #00ffff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .content {
    padding: 1rem 0.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-item {
    margin: 0 0.5rem;
  }

  .gallery-item img {
    height: 200px;
  }

  .filter-tabs {
    gap: 0.25rem;
  }

  .filter-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .modal-info {
    padding: 1rem;
  }

  .nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .gallery-overlay,
  .modal-close,
  .nav-btn {
    transition: none;
  }
  
  .gallery-item:hover {
    transform: none;
  }
}

/* GPU acceleration hints */
.gallery-item,
.gallery-overlay,
.modal-content,
.nav-btn,
.modal-close {
  transform: translateZ(0);
}