* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  font-family: "Julius Sans One", sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-btn {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #000000 0%, #cacaca 100%);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.filter-controls {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

#filterSelect {
  padding: 0.8rem 1.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

#filterSelect:focus {
  border-color: #363636;
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 124, 126, 0.2);
}

#brightnessSlider {
  width: 150px;
  -webkit-appearance: none;
  appearance: unset;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  outline: none;
}

#brightnessSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #4a4c53;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

#brightnessSlider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  background: white;
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-size: 1.1rem;
  font-weight: 500;
}

.gallery-item:hover .caption {
  transform: translateY(0);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal img {
  max-width: 90%;
  max-height: 90vh;
  margin: auto;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 40px;
  color: rgb(0, 0, 0);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(255, 255, 255);
  border-radius: 50%;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.856);
  transform: rotate(90deg);
}

.modal-caption {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  font-size: 1.3rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 1rem 2rem;
  border-radius: 30px;
  backdrop-filter: blur(5px);
  max-width: 80%;
}

@media (max-width: 768px) {
  .gallery-controls {
    flex-direction: column;
    padding: 1rem;
  }

  .filter-controls {
    flex-direction: column;
    width: 100%;
  }

  #brightnessSlider {
    width: 100%;
  }

  .image-gallery {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }

  h1 {
    font-size: 2rem;
  }
}
