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

html {
  min-height: 100%;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  background: linear-gradient(
    135deg,
    rgba(255, 209, 220, 1),
    rgba(255, 236, 179, 1),
    rgba(195, 240, 202, 1)
  );
}

body {
  display: flex;
  justify-content: center;
  height: 100vh;
}

@media (min-width: 769px) {
  body {
    align-items: center;
  }
}

h1 {
  font-size: 36px;
  color: rgba(231, 84, 128, 1);
  text-align: center;
  margin-top: 20px;
  text-shadow: 2px 2px rgba(255, 255, 255, 0.7);
}

.grid-container {
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 236, 179, 1) 0,
    rgba(255, 236, 179, 1) 10px,
    rgba(249, 249, 249, 1) 10px,
    rgba(249, 249, 249, 1) 20px
  );
  border-radius: 20px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(4, 1fr);
  margin: 20px 0;
  padding: 20px;
  width: 100%;
}

@media (max-width: 767px) {
  .grid-container {
    padding: 15px;
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  background-color: rgba(255, 255, 255, 1);
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
  border: 5px solid rgba(255, 228, 225, 1);
}

.grid-item:hover {
  transform: translateY(-10px) scale(1.05);
}

.grid-item:hover .jellybean {
  transform: translateY(-10px) rotate(-5deg);
  box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.3);
}

.jellybean {
  width: 80px;
  height: 40px;
  background: linear-gradient(
    145deg,
    var(--bean-color) 40%,
    rgba(255, 255, 255, 1) 100%
  );
  border-radius: 50px 50px 20px 20px / 30px 30px 10px 10px;
  margin-bottom: 15px;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  transform: rotate(-10deg);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.jellybean::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 10px;
  width: 25px;
  height: 15px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  filter: blur(2px);
}

.color-swatch {
  width: 100%;
  height: 20px;
  margin-top: 10px;
  border-radius: 10px;
  background-color: var(--bean-color);
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.item-name {
  margin-top: 10px;
  font-size: 16px;
  color: rgba(231, 84, 128, 1);
  font-weight: bold;
  letter-spacing: 1px;
}

.item-message {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  background-color: rgba(255, 228, 225, 1);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  color: rgba(68, 68, 68, 1);
  text-align: center;
  display: none;
  z-index: 10;
}

.item-message::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px;
  border-style: solid;
  border-color: rgba(255, 228, 225, 1) transparent transparent transparent;
}

.item-message.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

footer {
  background-color: rgba(255, 228, 225, 1);
  width: 100%;
  text-align: center;
  padding: 10px;
  margin-top: auto;
}

footer p {
  font-size: 14px;
  color: rgba(68, 68, 68, 1);
}

footer a {
  color: rgba(231, 84, 128, 1);
  text-decoration: none;
  margin: 0 5px;
}

footer a:hover {
  text-decoration: underline;
}
