@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;700;900&display=swap');

:root {
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --accent: #ff4d6d;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background-image: linear-gradient(135deg,
      rgba(0, 0, 0, 0.6) 0%,
      rgba(0, 0, 0, 0.4) 100%),
    url('../images/bg.jpeg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  text-align: center;
  padding: 2rem;
  width: 90%;
  max-width: 1200px;
  position: relative;
  z-index: 10;
}

/* Glassmorphism Card */
.countdown-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem 2rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  transition: all 0.5s ease;
}

.title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
}

.next-year-highlight {
  color: var(--accent);
  background: -webkit-linear-gradient(#fff, #ff4d6d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.time-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  transition: transform 0.2s ease;
  /* For heartbeat */
}

/* Heartbeat Animation */
.heartbeat .time-unit {
  animation: pulse 1s infinite;
  color: var(--accent);
  border: 1px solid rgba(255, 77, 109, 0.5);
  box-shadow: 0 0 20px rgba(255, 77, 109, 0.3);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  border-radius: 16px;
  min-width: 120px;
  transition: transform 0.3s ease, background 0.3s;
}

.time-unit:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
}

.number {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.label {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
}

/* Quotes */
.quote-container {
  margin-top: 2rem;
  height: 60px;
  /* Fixed height to prevent layout shift */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.quote-container.visible {
  opacity: 1;
}

.quote-text {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-primary);
  max-width: 600px;
}

/* Final Countdown Overlay */
#final-countdown {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40vw;
  /* Massive text */
  font-weight: 900;
  color: white;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

#final-countdown.hidden {
  display: none;
}

#final-countdown.animate {
  animation: zoomFade 1s linear infinite;
}

@keyframes zoomFade {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Celebration Overlay */
#celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
}

#celebration.hidden {
  display: none;
}

#fireworks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.celebration-content {
  position: relative;
  z-index: 201;
  text-align: center;
}

.celebration-year {
  font-size: 25vw;
  line-height: 1;
  background: linear-gradient(to right, #f8b500, #fceabb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(248, 181, 0, 0.5));
  animation: float 3s ease-in-out infinite;
}

.celebration-text {
  font-size: 5vw;
  color: white;
  letter-spacing: 10px;
  font-weight: 300;
  margin-top: -2vw;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Small Screens */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
    width: 95%;
  }

  .countdown-card {
    padding: 2rem 1rem;
    gap: 1.5rem;
  }

  .title {
    font-size: 1.8rem;
    /* Smaller title */
    margin-bottom: 0.5rem;
  }

  .time-container {
    gap: 0.8rem;
  }

  .time-unit {
    min-width: 70px;
    /* Even smaller width */
    padding: 0.8rem;
    flex: 1 1 40%;
    /* Allow 2 per row nicely */
  }

  .number {
    font-size: 2.2rem;
  }

  .label {
    font-size: 0.7rem;
  }

  .quote-text {
    font-size: 1rem;
  }

  /* Adjust huge overlays */
  #final-countdown {
    font-size: 50vw;
    /* Keep it big but relative */
  }

  .celebration-year {
    font-size: 20vw;
  }

  .celebration-text {
    font-size: 8vw;
    letter-spacing: 4px;
    margin-top: 1rem;
  }
}

/* Extra Small Screens */
@media (max-width: 350px) {
  .time-unit {
    min-width: 60px;
    padding: 0.5rem;
  }

  .number {
    font-size: 1.8rem;
  }
}