:root {
  --beige: #fdf6ee;
  --blue-dark: #2a4d69;
  --blue-light: #4a90e2;
  --button-bg: #5e8aa2;
  --button-bg-hover: #3e6379;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

/* index.html */
body.page-index {
  background: var(--beige);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.message {
  max-width: 600px;
  font-size: 1.5rem;
  color: var(--blue-dark);
  margin-bottom: 2rem;
}

.photos {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.photos img {
  width: 180px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  font-size: 1.2rem;
  background-color: var(--button-bg);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
  text-decoration: none;
}

.open-btn:hover {
  background-color: var(--button-bg-hover);
}

.open-btn:focus-visible {
  outline: 3px solid rgba(74, 144, 226, 0.8);
  outline-offset: 3px;
}

/* carebox.html */
body.page-carebox {
  background: radial-gradient(circle at center, #fdf6ee 0%, #dee8f0 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.carebox-container {
  position: relative;
  width: 80%;
  max-width: 700px;
}

.carebox-img {
  width: 100%;
  display: block;
}

.item {
  position: absolute;
  width: 12%;
  transform: translateY(30px) scale(0.9);
  opacity: 0;
  animation: popUp 0.6s ease-out forwards;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    filter 0.3s ease;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

.item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.item:focus-visible {
  outline: 3px solid rgba(74, 144, 226, 0.8);
  outline-offset: 3px;
}

.item.active {
  filter: brightness(1.2);
  z-index: 12;
}

/* Default (laptop) item positions */
#item-goku {
  top: 22%;
  left: 15%;
  z-index: 2;
}
#item-lindt {
  top: 22%;
  left: 42%;
  z-index: 2;
}
#item-cookie {
  top: 22%;
  left: 68%;
  z-index: 2;
}

#item-tea {
  top: 43%;
  left: 15%;
  z-index: 2;
}
#item-ramen {
  top: 43%;
  left: 42%;
  z-index: 2;
}
#item-blanket {
  top: 43%;
  left: 68%;
  z-index: 2;
}

#item-card {
  top: 63%;
  left: 15%;
  z-index: 2;
}
#item-roses {
  top: 63%;
  left: 42%;
  z-index: 2;
}
#item-tissues {
  top: 63%;
  left: 68%;
  z-index: 2;
}

@media (max-width: 600px) {
  .item {
    width: 20%;
  }

  .carebox-container {
    padding: 0 10px;
  }

  #item-goku {
    top: 10%;
    left: 10%;
  }
  #item-lindt {
    top: 10%;
    left: 40%;
  }
  #item-cookie {
    top: 10%;
    left: 70%;
  }

  #item-tea {
    top: 30%;
    left: 10%;
  }
  #item-ramen {
    top: 30%;
    left: 40%;
  }
  #item-blanket {
    top: 30%;
    left: 70%;
  }

  #item-card {
    top: 55%;
    left: 15%;
  }
  #item-roses {
    top: 55%;
    left: 55%;
  }
  #item-tissues {
    top: 75%;
    left: 35%;
  }
}

/* Popup overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.popup-overlay.active {
  visibility: visible;
  opacity: 1;
}

.popup {
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: min(520px, 90vw);
  width: 100%;
  z-index: 11;
}

.popup h2 {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-weight: 600;
}

.popup p {
  margin: 5px 0 15px;
}

.popup button {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.popup button:hover {
  background: var(--blue-light);
}

.popup button:focus-visible {
  outline: 3px solid rgba(74, 144, 226, 0.8);
  outline-offset: 3px;
}

@keyframes popUp {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Animation delays per item */
#item-goku {
  animation-delay: 0.1s;
}
#item-lindt {
  animation-delay: 0.2s;
}
#item-cookie {
  animation-delay: 0.3s;
}
#item-tea {
  animation-delay: 0.4s;
}
#item-ramen {
  animation-delay: 0.5s;
}
#item-blanket {
  animation-delay: 0.6s;
}
#item-card {
  animation-delay: 0.7s;
}
#item-roses {
  animation-delay: 0.8s;
}
#item-tissues {
  animation-delay: 0.9s;
}
