body {
  font-family: "Segoe UI", sans-serif;
  background: #fffaf0;
  text-align: center;
  padding: 40px 20px;
  color: #333;
  margin: 0;
}

h1 {
  font-size: 32px;
  margin-bottom: 5px;
}

.name {
  font-size: 20px;
  font-weight: bold;
}

.email {
  font-size: 16px;
  color: #555;
  margin-bottom: 40px;
}

/* Giao diện mặc định (desktop) */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  justify-items: center;
}

/* Responsive cho thiết bị có chiều rộng nhỏ hơn 768px */
@media (max-width: 768px) {
  .icon-grid {
    grid-template-columns: 1fr 1fr; /* 2 cột */
    gap: 16px;
    padding: 0 12px;
  }

  .icon-box {
    max-width: 100%;
    padding: 20px 10px;
  }

  .icon-box img.icon {
    width: 80px;
    height: 80px;
  }

  .icon-box span {
    font-size: 16px;
  }
}



/* ✅ Hộp icon cân đối, giới hạn chiều rộng */
.icon-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 2px solid #eee;
  border-radius: 20px;
  padding: 30px 20px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.25s ease, border-color 0.25s;
  position: relative;
  z-index: 0;
  width: 80%;
  max-width: 160px;
  min-height: 180px;
}

.icon-box:hover {
  transform: scale(1.08);
  border-color: #ccc;
  z-index: 10;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* ✅ Gói ảnh + nhún */
.float-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: float 2s ease-in-out infinite;
}

.icon-box img.icon {
  width: 130px;
  height: 130px;
  margin-bottom: 12px;
  object-fit: contain;
  max-width: 100%;
}

.icon-box span {
  font-size: 18px;
  font-weight: 900;
}

/* Nhún lên xuống nhẹ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
.icon-box.delay-0 .float-wrap { animation-delay: 0s; }
.icon-box.delay-1 .float-wrap { animation-delay: 0.3s; }
.icon-box.delay-2 .float-wrap { animation-delay: 0.6s; }
.icon-box.delay-3 .float-wrap { animation-delay: 0.9s; }
.weather-box {
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.8);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 20;
}

.weather-box img {
  width: 28px;
  height: 28px;
}
.event-container {
  position: fixed;
  pointer-events: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.event-wrapper {
  position: absolute;
  will-change: transform;
  transition: transform 2s ease-in-out;
  width: 30px;
  height: 30px;
}

.event-item {
  position: absolute;
  top: -10; /* BẮT BUỘC phải có */
  width: 100%;
  height: 100%;
  animation-name: fall-event, sway-event;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite;
  transform-origin: center;
}

/* Rơi dọc */
@keyframes fall-event {
  0% { top: 0%; opacity: 1; }
  100% { top: 110vh; opacity: 0.6; }
}

/* Lắc trái phải + xoay nhẹ */
@keyframes sway-event {
  0%   { transform: translateX(0px) rotate(0deg); }
  25%  { transform: translateX(-30px) rotate(-15deg); }
  50%  { transform: translateX(0px) rotate(0deg); }
  75%  { transform: translateX(30px) rotate(15deg); }
  100% { transform: translateX(0px) rotate(0deg); }
}

