/* Reset & base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Lato", sans-serif;
  background: linear-gradient(to bottom, #ffecd2, #fcb69f);
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}

/* Header */
h2 {
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 700;
  margin-bottom: 2rem;
  color: #ff6f61;
  text-shadow: 2px 2px #fff3e0;
}

/* Timer container */
.timer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Individual time blocks */
/* Make labels appear under the numbers */
.time-block {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 1rem 1.5rem;
  min-width: 80px;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column; /* <-- stack number above label */
  align-items: center;
}

.time-block:hover {
  transform: scale(1.1);
}

/* Numbers */
.number {
  display: block;
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: bold;
  color: #ff6f61;
}

/* Labels */
.label {
  display: block;
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: #fff;
  margin-top: 0.2rem;
}

/* Vacation image */
.vacation {
  width: 60%;
  max-width: 400px;
  margin-top: 2rem;
  transition: transform 0.5s ease;
}

.vacation:hover {
  transform: scale(1.05) rotate(-2deg);
}

/* Flip animation for numbers */
@keyframes flipAnimation {
  0% { transform: rotateX(0deg); opacity: 1; }
  50% { transform: rotateX(90deg); opacity: 0; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

.flip {
  animation: flipAnimation 0.3s ease-in-out;
  display: inline-block;
}

/* Celebration message */
.celebration {
  font-size: clamp(2rem, 5vw, 4rem);
  color: #ff6f61;
  text-shadow: 2px 2px #fff3e0;
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* Confetti */
.confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  top: -10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotateZ(360deg);
    opacity: 0;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .timer {
    gap: 1rem;
  }
  .time-block {
    min-width: 60px;
    padding: 0.8rem 1rem;
  }
  .vacation {
    width: 80%;
  }
}

@media (max-width: 480px) {
  h2 {
    font-size: clamp(1.5rem, 6vw, 3rem);
  }
  .number {
    font-size: 2rem;
  }
  .label {
    font-size: 1rem;
  }
}