/*
  COUNTDOWN APP STYLES
  Upload this file with index.html and script.js into Hostinger public_html.
*/

/* ------------------------------
   Theme variables
   Values are also set from script.js
--------------------------------- */
:root {
  --background-color: #060a12;
  --text-color: #f5f7ff;
  --muted-color: rgba(245, 247, 255, 0.58);
  --panel-color: rgba(255, 255, 255, 0.045);
  --border-color: rgba(255, 255, 255, 0.1);
  --glow-color: rgba(117, 214, 255, 0.42);
}

/* ------------------------------
   Base layout
--------------------------------- */
* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background-color);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text-color);
  background:
    radial-gradient(circle at 50% 40%, rgba(46, 130, 180, 0.14), transparent 42%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.018), transparent 45%),
    var(--background-color);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.countdown-app {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.5vw, 24px);
  padding: clamp(20px, 4vw, 56px);
}

.countdown-card {
  width: min(100%, 1040px);
  padding: clamp(28px, 5vw, 64px);
  text-align: center;
  background: var(--panel-color);
  border: 1px solid var(--border-color);
  border-radius: clamp(24px, 4vw, 42px);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ------------------------------
   Event title
--------------------------------- */
.event-title {
  margin: 0 0 clamp(10px, 2vw, 16px);
  color: var(--text-color);
  font-size: clamp(1.7rem, 4.5vw, 3.3rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

/* ------------------------------
   Headline
--------------------------------- */
.headline {
  margin: 0 0 clamp(20px, 4vw, 36px);
  color: var(--muted-color);
  font-size: clamp(0.72rem, 1.4vw, 0.95rem);
  font-weight: 700;
  letter-spacing: clamp(0.16em, 0.7vw, 0.34em);
  line-height: 1.5;
}

/* ------------------------------
   Main day count
--------------------------------- */
.main-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-number {
  display: block;
  max-width: 100%;
  color: var(--day-count-color, #ef4444);
  font-size: clamp(6.5rem, 25vw, 17rem);
  font-weight: 750;
  letter-spacing: -0.075em;
  line-height: 0.82;
  text-indent: -0.075em;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.08),
    0 0 52px var(--glow-color);
  font-variant-numeric: tabular-nums;
  transition:
    color 500ms ease,
    opacity 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
}

.main-number.days-red {
  --day-count-color: #ef4444;
}

.main-number.days-yellow {
  --day-count-color: #facc15;
}

.main-number.days-green {
  --day-count-color: #22c55e;
}

.main-label {
  margin-top: clamp(22px, 4vw, 34px);
  color: var(--muted-color);
  font-size: clamp(0.72rem, 1.7vw, 1rem);
  font-weight: 750;
  letter-spacing: clamp(0.18em, 0.7vw, 0.4em);
}

/* ------------------------------
   Detailed digital countdown
--------------------------------- */
.digital-countdown {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: clamp(8px, 2.1vw, 26px);
  width: min(100%, 760px);
  margin: clamp(34px, 6vw, 62px) auto 0;
  padding: clamp(18px, 3.5vw, 30px);
  border: 1px solid var(--border-color);
  border-radius: clamp(18px, 3vw, 28px);
  background: rgba(0, 0, 0, 0.18);
  box-shadow:
    0 0 42px rgba(82, 184, 255, 0.08),
    inset 0 0 30px rgba(82, 184, 255, 0.025);
}

.time-unit {
  min-width: 0;
}

.time-value,
.separator {
  display: block;
  color: var(--text-color);
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
  font-size: clamp(1.7rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 18px var(--glow-color);
  font-variant-numeric: tabular-nums;
}

.time-value {
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    filter 140ms ease;
}

.separator {
  color: rgba(245, 247, 255, 0.35);
  animation: separator-glow 2s ease-in-out infinite;
}

.time-label {
  display: block;
  margin-top: clamp(10px, 1.8vw, 15px);
  overflow: hidden;
  color: var(--muted-color);
  font-size: clamp(0.48rem, 1.3vw, 0.72rem);
  font-weight: 700;
  letter-spacing: clamp(0.08em, 0.35vw, 0.2em);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Added briefly by JavaScript whenever a number changes */
.number-changing {
  opacity: 0.58;
  transform: translateY(-3px) scale(0.985);
  filter: blur(0.5px);
}

/* ------------------------------
   Completion state
--------------------------------- */
.completion-message {
  padding: clamp(34px, 8vw, 80px) 0;
  color: var(--text-color);
  font-size: clamp(2.3rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.12),
    0 0 56px var(--glow-color);
  animation: completion-arrival 700ms ease both;
}

/* ------------------------------
   Subtle animations
--------------------------------- */
@keyframes separator-glow {
  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 0.8;
  }
}

@keyframes completion-arrival {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

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

/* Respect visitors who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------
   Footer note
--------------------------------- */
.page-footer {
  margin: 0;
  color: rgba(245, 247, 255, 0.42);
  font-size: clamp(0.68rem, 1.4vw, 0.82rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.5;
  text-align: center;
}

/* ------------------------------
   Tablet adjustments
--------------------------------- */
@media (max-width: 720px) {
  .countdown-card {
    padding-inline: clamp(20px, 5vw, 34px);
  }

  .digital-countdown {
    gap: clamp(4px, 1.7vw, 12px);
  }
}

/* ------------------------------
   Phone adjustments
--------------------------------- */
@media (max-width: 520px) {
  .countdown-app {
    padding: 14px;
  }

  .countdown-card {
    padding: 30px 16px;
    border-radius: 24px;
  }

  .digital-countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 18px 10px;
  }

  .separator {
    display: none;
  }

  .time-value {
    font-size: clamp(1.42rem, 8vw, 2.15rem);
  }

  .time-label {
    font-size: clamp(0.4rem, 2.2vw, 0.58rem);
    letter-spacing: 0.06em;
  }
}

/* Extra-small phones */
@media (max-width: 360px) {
  .countdown-card {
    padding-inline: 10px;
  }

  .digital-countdown {
    gap: 4px;
    padding-inline: 6px;
  }

  .time-label {
    letter-spacing: 0;
  }
}
