:root {
  --grad-a: #ff6b9d;
  --grad-b: #6c5ce7;
  --grad-c: #ffd93d;
  --card-bg: rgba(255, 255, 255, 0.92);
  --text-main: #2d2440;
  --text-soft: #6b6480;
  --accent: #6c5ce7;
  --transition-speed: 0.6s;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b) 55%, var(--grad-c));
  background-size: 200% 200%;
  animation: drift 12s ease-in-out infinite;
  transition: background var(--transition-speed) ease;
  padding: 24px;
  overflow-x: hidden;
  position: relative;
}

@keyframes drift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  background: white;
  animation: float 14s ease-in-out infinite;
}

.blob-1 { width: 260px; height: 260px; top: -60px; left: -60px; animation-delay: 0s; }
.blob-2 { width: 340px; height: 340px; bottom: -100px; right: -80px; animation-delay: 3s; }
.blob-3 { width: 200px; height: 200px; top: 40%; right: 10%; animation-delay: 6s; }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  50% { transform: translateY(-30px) translateX(20px) scale(1.08); }
}

.card {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  backdrop-filter: blur(6px);
  border-radius: 28px;
  padding: 40px 36px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(30, 20, 60, 0.35);
  animation: pop-in 0.5s ease;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-soft);
}

#event-title {
  margin: 6px 0 2px;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--text-main);
}

.emoji {
  font-size: 2.6rem;
  margin: 0 0 6px;
  line-height: 1;
}

/* Holiday-specific decorative graphics. Hidden by default; a holiday opts
   in by giving #decoration a modifier class (see script.js's
   `decorationClass`). */
.decoration {
  display: none;
  width: 84px;
  height: 50px;
  margin: 0 auto 18px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 10px rgba(30, 20, 60, 0.3);
}

/* A simplified, unofficial American flag: 13 red/white stripes with a
   navy canton dotted to suggest the field of stars. */
.decoration.flag-usa {
  display: block;
  background: repeating-linear-gradient(
    to bottom,
    #B22234 0,
    #B22234 7.69%,
    #ffffff 7.69%,
    #ffffff 15.38%
  );
}

.decoration.flag-usa::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 53.8%;
  background-color: #3C3B6E;
  background-image: radial-gradient(circle, #ffffff 1px, transparent 1.3px);
  background-size: 7px 6px;
  background-position: 2px 2px;
}

/* Easter: a seal/badge with "HE IS RISEN" wrapped around a cross and
   empty tomb, replacing the plain chick-in-egg emoji. */
.decoration.easter-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--grad-c), var(--grad-a));
  box-shadow: 0 6px 16px rgba(30, 20, 60, 0.4), inset 0 0 0 2px rgba(255, 214, 10, 0.55);
  overflow: visible;
}

.easter-seal span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: 0 0;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffd60a;
  text-transform: uppercase;
  white-space: pre;
}

.easter-seal .seal-icon {
  width: 42px;
  height: 42px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
  text-align: left;
}

.controls label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
}

.controls select,
.controls input[type="date"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border-radius: 14px;
  border: 2px solid #e6e1f7;
  background: #fbfaff;
  color: var(--text-main);
  font-family: inherit;
  appearance: auto;
}

.controls select:focus,
.controls input[type="date"]:focus {
  outline: none;
  border-color: var(--accent);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 2px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e6e1f7;
}

.divider span {
  padding: 0 10px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.unit {
  /* Uses the two bookend theme colors (a, c) rather than the lighter/brighter
     middle accent (b), so white countdown digits stay legible in every theme. */
  background: linear-gradient(160deg, var(--grad-a), var(--grad-c));
  border-radius: 16px;
  padding: 14px 4px;
  color: white;
  box-shadow: 0 8px 18px rgba(108, 92, 231, 0.35);
}

.unit .value {
  display: block;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.unit .label {
  display: block;
  margin-top: 6px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.target-date {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.arrived-message {
  margin: 14px 0 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  animation: pop-in 0.4s ease;
}

.ad-slot {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  min-height: 100px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

/* Added by script.js whenever the slot has no real ad content — collapses
   it entirely so no empty placeholder box shows on the live site. */
.ad-slot.is-empty {
  display: none;
}

.ad-slot-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

footer {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

footer a {
  color: white;
  font-weight: 700;
}

@media (max-width: 420px) {
  .card {
    padding: 30px 20px 26px;
    border-radius: 22px;
  }
  .countdown {
    gap: 6px;
  }
}
