html,
body {
  height: 100%;
  margin: 0;
  font-family: "Lato", sans-serif;
  background-color: #f8f8f8;
  background-image: url("./img/waterColor2.png");
  background-size: cover;
  background-attachment: fixed;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex-grow: 1;
}

main.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Banner */
#home {
  width: 100%;
  height: 250px;
  margin: 20px 0 40px 0;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

#home img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: block;
}

#home img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.6);
}

/* Category Grid */
.category-section {
  padding: 40px 40px;
  text-align: center;
}

.category-section h2 {
  margin-bottom: 20px;
  font-size: 1.8em;
  color: #333;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 80px;
}

@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 700px;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 90vw;
  }
}

.category-item {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: #eee;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.category-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(147, 112, 219, 0.6);
}

.category-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-label {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 0;
  font-size: 0.9em;
  text-align: center;
}

/* About section */
#about {
  background-color: #f3efef;
  background-size: cover;
  padding: 80px 20px 80px 20px;
  text-align: center;
}

#about h2 {
  color: #030303;
  margin-bottom: 30px;
  font-size: 2.2em;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

#about p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(196, 5, 164, 0.1);
  display: inline-block;
}

/* Neon Help Button */
.help-button,
.back-to-top-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #9b59b6;
  color: #fff;
  border: none;
  padding: 0.55rem 1.6rem;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 0 6px #9b59b6, 0 0 12px #9b59b6, 0 0 18px #9b59b6,
    0 0 24px #9b59b6, 0 0 30px #9b59b6;
  animation: neonPulse 3s ease-in-out infinite;
  font-weight: 700;
  letter-spacing: 0.05em;
  z-index: 1000;
}

.help-button:hover,
.back-to-top-button:hover {
  background-color: #8e44ad;
  box-shadow: 0 0 10px #8e44ad, 0 0 20px #8e44ad, 0 0 30px #8e44ad,
    0 0 40px #8e44ad, 0 0 50px #8e44ad;
}

@keyframes neonPulse {
  0%,
  100% {
    box-shadow: 0 0 6px #9b59b6, 0 0 12px #9b59b6, 0 0 18px #9b59b6,
      0 0 24px #9b59b6, 0 0 30px #9b59b6;
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 12px #d39de9, 0 0 24px #d39de9, 0 0 36px #d39de9,
      0 0 48px #d39de9, 0 0 60px #d39de9;
    transform: scale(1.05);
  }
}

/* Help Popup */
.help-popup {
  display: none;
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 320px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  z-index: 1100;
}

.help-popup-header {
  background: #9b59b6;
  color: white;
  padding: 0.75rem;
  font-weight: bold;
  font-size: 1.1rem;
}

.help-popup-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.help-popup-body input,
.help-popup-body textarea {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

.help-popup-body button {
  background: #9b59b6;
  color: white;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
}

.help-popup-body button:hover {
  background-color: #8e44ad;
}

@media (max-width: 768px) {
  #home {
    height: 200px;
    margin: 15px 0 30px 0;
  }
}

@media (max-width: 480px) {
  #home {
    height: 180px;
    margin: 10px 0 20px 0;
  }

  #home img:hover {
    transform: none;
    box-shadow: none;
  }
}
