body {
  background-color: #000;
  /* Dark theme */
  font-family: Arial, sans-serif;
  color: white;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  font-family: cursive;
  font-size: 3rem;
  margin-top: 20px;
  color: antiquewhite;
}

h2 {
  font-size: 1rem;
  font-style: italic;
  margin-top: -10px;
  margin-bottom: 30px;
  color: #ccc;
}

.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 80%;
  max-width: 900px;
  margin-bottom: 40px;
}

.box {
  background-color: #222;
  /* Default dark box */
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  text-decoration: none;
  color: white;
}

/* Theme colors for variety */
.box:nth-child(3n+1) {
  background-color: #FFB84D;
}

.box:nth-child(3n+2) {
  background-color: #3AAFA9;
}

.box:nth-child(3n+3) {
  background-color: #FF6F61;
}

/* Hover effect */
.box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
  border: 1px solid white;
  cursor: pointer;
}

/* Hover with lighter shades */
.box:nth-child(3n+1):hover {
  background-color: #FFD699;
}

.box:nth-child(3n+2):hover {
  background-color: #6ED6D1;
}

.box:nth-child(3n+3):hover {
  background-color: #FF9F91;
}

.info-text {
  text-align: center;
  font-size: 1rem;
  color: #c0e7f2;
  margin-top: 20px;
  font-weight: 500;
  font-family: sans-serif;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: #ffcc00;
  color: black;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 1rem;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  z-index: 100; /* keep it above other elements */
}

.back-button:hover {
  background-color: #e6b800;
}

/* ----------------------------
   Responsive Design
-----------------------------*/

/* Tablets (≤ 992px) */
@media (max-width: 992px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
    width: 90%;
  }

  h1 {
    font-size: 2.6rem;
  }

  h2 {
    font-size: 0.9rem;
  }
}

/* Mobiles (≤ 768px) */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    width: 95%;
  }

  h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
  }

  h2 {
    font-size: 0.85rem;
    margin-bottom: 25px;
  }

  .box {
    font-size: 0.95rem;
    padding: 15px;
  }

  .info-text {
    font-size: 0.95rem;
  }

  .back-button {
    padding: 6px 12px;
    font-size: 0.9rem;
    top: 15px;
    left: 15px;
  }
}

/* Small Phones (≤ 480px) */
@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 0.8rem;
    margin-bottom: 20px;
  }

  .box {
    font-size: 0.9rem;
    padding: 12px;
  }

  .info-text {
    font-size: 0.9rem;
  }

  .back-button {
    padding: 5px 10px;
    font-size: 0.8rem;
    top: 10px;
    left: 10px;
  }
}
