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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  background: linear-gradient(
    180deg,
    #083344 0%,
    #075985 30%,
    #0284c7 60%,
    #d97706 85%,
    #f59e0b 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  padding:
    max(env(safe-area-inset-top), 2rem)
    max(env(safe-area-inset-right), 1.5rem)
    max(env(safe-area-inset-bottom), 2rem)
    max(env(safe-area-inset-left), 1.5rem);
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

/* Animated sun */
.sun {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fde68a, #f59e0b 60%, #d97706);
  box-shadow:
    0 0 40px 15px rgba(251, 191, 36, 0.4),
    0 0 80px 30px rgba(251, 191, 36, 0.2);
  animation: pulse 4s ease-in-out infinite;
  margin-bottom: 1.75rem;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 40px 15px rgba(251,191,36,0.4), 0 0 80px 30px rgba(251,191,36,0.2); }
  50%       { box-shadow: 0 0 55px 20px rgba(251,191,36,0.5), 0 0 100px 40px rgba(251,191,36,0.25); }
}

/* Header */
header {
  margin-bottom: 2.25rem;
}

h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  line-height: 1;
}

.subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 0.6rem;
}

.target-date {
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.95;
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}

/* Countdown grid */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 1rem 0.9rem 0.75rem;
  min-width: 72px;
}

.number {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

.label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.75;
  margin-top: 0.45rem;
  font-weight: 500;
}

.sep {
  font-size: 2rem;
  font-weight: 700;
  padding-top: 0.85rem;
  opacity: 0.5;
  line-height: 1;
}

/* Message */
.message {
  font-size: 1.05rem;
  font-weight: 500;
  opacity: 0.9;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  min-height: 1.6rem;
  letter-spacing: 0.02em;
}

/* Wave decoration */
.waves {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
}

.waves svg {
  display: block;
  width: 100%;
  height: 120px;
}

/* Larger screens */
@media (min-width: 480px) {
  .sun {
    width: 140px;
    height: 140px;
  }

  h1 {
    font-size: 3.5rem;
  }

  .unit {
    min-width: 90px;
    padding: 1.25rem 1.1rem 0.9rem;
  }

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