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

body {
  font-family: "Poppins", sans-serif;
  background: #121212;
 color: #e5e5e5;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.3s, color 0.3s;
}



section {
  text-align: center;
  background:linear-gradient( rgba(0,0,0, .7), rgba(0,0,0,.7) ), url(https://media.giphy.com/media/v1.Y2lkPWVjZjA1ZTQ3cnR5ZjNzbTd5dTh1NWkwems5M2pjNzY0YjB4NTczb3ZhYWt1eHVzayZlcD12MV9naWZzX3JlbGF0ZWQmY3Q9Zw/26gsuWo5reMMh2Bmo/giphy.gif);
		background-position: center;
		background-size: cover;
  padding: 5rem 1rem;
  margin-top: 5rem;
  border: 5px solid #333;
  width: 30%;
}

section h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

section p {
  color: #666;
}

body.dark section p {
  color: #aaa;
}

#theme-toggle {
  background: #333;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.3s;
}

body.dark #theme-toggle {
  background: #e5e5e5;
  color: #333;
}

#theme-toggle:hover {
  opacity: 0.8;
}

.gallery {
  columns: 4 250px;
  column-gap: 1rem;
  padding: 1rem;
  width: 100%;
  max-width: 1200px;
}

.gallery img {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.gallery-error {
  text-align: center;
  color: #f87171;
  max-width: 32rem;
  margin: 2rem auto;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Loader */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 40vh;
  color: #666;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 5%;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  border-radius: 10px;
}

.close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .gallery {
    columns: 2 150px;
  }
  section{
    width: 90%;
  }
}
