/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Comic Sans MS", "Marker Felt", "Arial Rounded MT Bold", sans-serif;
  background: linear-gradient(to bottom right, #f7fff7, #f0fff0);
  color: #292f36;
  min-height: 100vh;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: #292f36;
}

.container {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header styles */
header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 20px 0;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  color: #ff6b6b;
  font-size: 2.5rem;
  animation: pulse 2s infinite;
}
.logo img {
 width: 80px;
}
.logo h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  background: linear-gradient(to right, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.search-container {
  width: 100%;
  position: relative;
  max-width: 400px;
}

.search-container input {
  width: 100%;
  padding: 12px 15px 12px 40px;
  border-radius: 30px;
  border: 2px solid rgba(78, 205, 196, 0.3);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-container input:focus {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.search-container i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

/* Main content styles */
main {
  padding: 30px 0;
}

.gallery-controls {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.gallery-stats {
  color: #666;
  font-size: 1.1rem;
}

.items-per-page {
  display: flex;
  align-items: center;
  gap: 10px;
}

.items-per-page label {
  color: #666;
}

.items-per-page select {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.items-per-page select:focus {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

/* Image gallery styles */
.image-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-bottom: 40px;
}
.image-box {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.image-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.image-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.image-container {
  position: relative;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-box .image-container img {
  max-height: 500px;
  height: auto;
}

.image-card:hover .image-container img {
  transform: scale(1.1);
}

.image-category {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(255, 209, 102, 0.9);
  color: #292f36;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 20px;
}

.image-info {
  padding: 15px;
}

.image-info h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.image-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.image-id {
  font-size: 0.9rem;
  color: #777;
}

.like-btn {
  color: #ff6b6b;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.like-btn:hover {
  color: #ff4a4a;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  font-size: 6rem;
  color: #ddd;
  margin-bottom: 15px;
}

.empty-state p {
  font-size: 1.2rem;
  color: #777;
  margin-bottom: 20px;
}

/* Pagination styles */
.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.btn-joy {
  background-color: #ffd166;
  color: #292f36;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 30px;
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 1rem;
}

.btn-joy:hover {
  background-color: #ffc842;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.btn-joy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
#paginationNumbers {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 1rem;
}

.page-btn:hover {
  background-color: rgba(255, 107, 107, 0.2);
}

.page-btn.active {
  background-color: #ff6b6b;
  color: white;
  font-weight: bold;
}

.pagination-info {
  font-size: 0.9rem;
  color: #666;
}

/* Footer styles */
footer {
  background-color: #292f36;
  color: white;
  padding: 30px 0;
  margin-top: 60px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo i {
  color: #ffd166;
  font-size: 1.8rem;
}

.footer-logo h2 {
  font-size: 1.4rem;
}

.social-links {
  display: flex;
  gap: 25px;
}

.social-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: #ffd166;
}

.copyright {
  margin-top: 15px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Modal styles */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 900px;
  width: 90%;
  margin: 0 auto;
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: #ffd166;
}

.modal-image {
  max-height: 80vh;
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.modal-caption {
  color: white;
  text-align: center;
  margin-top: 15px;
  font-size: 1.2rem;
}

.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  background-color: #fff;
  border-radius: 50%;
  animation: twinkle 2s infinite alternate;
}

@keyframes twinkle {
  from {
    opacity: 0.3;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.error-number {
  font-size: clamp(8rem, 25vw, 15rem);
  font-weight: bold;
  background: linear-gradient(45deg, #ff6b6b, #ffd166, #4ecdc4, #9381ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  line-height: 1;
  margin: 20px 0;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  margin-bottom: 40px;
}

.btn {
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background-color: #7b2cbf;
  color: white;
  box-shadow: 0 5px 15px rgba(123, 44, 191, 0.3);
}

.btn-primary:hover {
  background-color: #6a26a8;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(123, 44, 191, 0.4);
}

.btn-secondary {
  background-color: white;
  color: #7b2cbf;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background-color: #f8f5ff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.confused-robot {
  max-width: 250px;
  margin: 0 auto 30px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.confused-robot img {
  width: 100%;
  height: auto;
}

.fun-fact {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-top: 40px;
}

.fun-fact h3 {
  color: #7b2cbf;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.floating {
  position: absolute;
  opacity: 0.7;
  animation: floatRandom 15s infinite ease-in-out;
}

@keyframes floatRandom {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-50px) rotate(10deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive styles */
@media (min-width: 576px) {
  .image-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .header-content {
    flex-direction: row;
    justify-content: space-between;
  }

  .gallery-controls {
    flex-direction: row;
  }

  .image-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-content {
    flex-direction: row;
  }

  .copyright {
    margin-top: 30px;
  }
}

@media (min-width: 992px) {
  .image-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}
