/* ===================== */
/* GALLERY STYLES       */
/* ===================== */

:root {
  --bg-dark: #1A002E;
  --bg-card: #240041;
  --accent: #00E0FF;
  --text-light: #FFFFFF;
  --btn-primary: #A500FF;
  --transition: all 0.3s ease;
}

/* Base Layout */
.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
}

.gallery-container h1 {
  color: var(--accent);
  text-align: center;
  margin-bottom: 2rem;
}

/* Filter Controls */
.gallery-filter {
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-filter select {
  background: var(--bg-card);
  color: var(--text-light);
  border: 2px solid var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-filter select:hover {
  border-color: var(--btn-primary);
}

/* Masonry Grid Layout */
.gallery-grid {
  columns: 4;
  column-gap: 1rem;
  margin-bottom: 3rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: var(--transition);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition);
  cursor: pointer;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.03);
}

.gallery-caption {
  padding: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-light);
  background: rgba(0,0,0,0.7);
}

/* Lightbox Styles */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.lightbox-image {
  max-height: 80vh;
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.lightbox-caption {
  color: white;
  margin-top: 1rem;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.5);
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  color: var(--accent);
  transform: scale(1.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: var(--btn-primary);
}

.lightbox-nav.prev {
  left: 2rem;
}

.lightbox-nav.next {
  right: 2rem;
}

/* Empty State */
.no-images {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.no-images p {
  color: var(--accent);
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  background: var(--btn-primary);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  text-decoration: none;
  transition: var(--transition);
}

.btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  margin-top: 2rem;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--text-light);
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .gallery-grid { columns: 3; }
}

@media (max-width: 768px) {
  .gallery-grid { columns: 2; }
  .lightbox-nav { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .gallery-grid { columns: 1; }
  .gallery-container { padding: 1rem; }
  .lightbox-close { top: 1rem; right: 1rem; }
  .lightbox-nav { width: 35px; height: 35px; }
}