* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  min-height: 100vh;
}

.gallery-header {
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content h1 {
  font-size: 1.5rem;
  color: #fff;
}

.back-btn,
.admin-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.back-btn:hover,
.admin-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-link {
  font-size: 0.85rem;
}

.notification-banner {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  padding: 15px 20px;
  text-align: center;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.notification-banner p {
  margin: 0;
  font-size: 0.95rem;
}

.category-bar {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px 20px;
  overflow-x: auto;
}

.category-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#categoryButtons {
  display: contents;
}

.category-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.category-btn.active {
  background: linear-gradient(135deg, #0066cc, #0052a3);
  border-color: #0066cc;
}

.gallery-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.gallery-item-info {
  padding: 15px;
}

.gallery-item-info h3 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.gallery-item-info .category-tag {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 102, 204, 0.2);
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
}

.loading,
.no-images {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 1001;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 20px 15px;
  cursor: pointer;
  border-radius: 5px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
  padding: 10px 30px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

@media (max-width: 768px) {
  .header-content h1 {
    font-size: 1.2rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  
  .gallery-item img {
    height: 140px;
  }
  
  .gallery-item-info {
    padding: 10px;
  }
  
  .gallery-item-info h3 {
    font-size: 0.9rem;
  }
  
  .category-btn {
    padding: 8px 15px;
    font-size: 0.85rem;
  }
  
  .lightbox-prev,
  .lightbox-next {
    font-size: 1.5rem;
    padding: 15px 10px;
  }
}
