:root {
  --bg-1: #0f1020;
  --bg-2: #191a2e;
  --primary: #7cf0ff;
  --accent: #ffb703;
  --muted: #9aa0b4;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Cantarell, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #eaf6ff;
  background: radial-gradient(
      1200px 800px at 80% -10%,
      #212453 0%,
      transparent 60%
    ),
    radial-gradient(1000px 700px at -10% 110%, #19394d 0%, transparent 60%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  overflow: hidden;
}

/* animated gradient aura */
.bg-animated {
  position: fixed;
  inset: -20vmax;
  background: conic-gradient(
    from 0deg,
    #00d1ff33,
    #fca31133,
    #b5179e33,
    #00d1ff33
  );
  filter: blur(120px) saturate(140%);
  animation: spin 30s linear infinite;
  opacity: 0.45;
  pointer-events: none;
}
@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

/* subtle noise */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend: overlay;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency=".65" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity=".5"/></svg>');
}

/* floating blobs */
.blob {
  position: fixed;
  width: 46vmin;
  height: 46vmin;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.25;
  mix-blend: screen;
  pointer-events: none;
}
.b1 {
  left: 8vw;
  top: 10vh;
  background: radial-gradient(circle at 30% 30%, #4cc9f0, transparent 60%);
  animation: blob 28s ease-in-out infinite;
}
.b2 {
  right: 0;
  bottom: 10vh;
  background: radial-gradient(circle at 60% 40%, #f8961e, transparent 60%);
  animation: blob 34s ease-in-out infinite;
}
.b3 {
  left: 60vw;
  top: 50vh;
  background: radial-gradient(circle at 40% 60%, #f72585, transparent 60%);
  animation: blob 40s ease-in-out infinite;
}
@keyframes blob {
  0% {
    transform: translate(-20vw, -10vh) scale(1);
  }
  33% {
    transform: translate(30vw, 10vh) scale(1.15);
  }
  66% {
    transform: translate(-10vw, 30vh) scale(0.95);
  }
  100% {
    transform: translate(-20vw, -10vh) scale(1);
  }
}

/* huge blurred brand mark */
.brandmark {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(64px, 20vw, 28rem);
  color: #7cf0ff;
  opacity: 0.28;
  filter: blur(6px);
  mix-blend: screen;
  text-align: center;
  padding: 2rem;
}

/* layout */
.wrap {
  position: relative;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 2;
}

.card {
  width: min(960px, 95vw);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass), var(--glass-2));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transform: translateX(-100%);
  animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen {
  0%,
  88% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

.inner {
  padding: 48px clamp(22px, 3vw, 40px) 36px;
  position: relative;
  z-index: 2;
}

/* header */
.badge {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  color: #d7e8ff;
}
.badge svg {
  width: 18px;
  height: 18px;
}

h1.title {
  margin: 14px 0 2px;
  font-size: clamp(34px, 5.5vw, 60px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 100% 55%, 0 55%);
}
.glitch::before {
  left: 2px;
  text-shadow: -2px 0 var(--accent);
  animation: gl1 2s infinite linear alternate;
}
.glitch::after {
  left: -2px;
  top: 1px;
  text-shadow: 2px 0 #00e5ff;
  clip-path: polygon(0 45%, 100% 45%, 100% 100%, 0 100%);
  animation: gl2 2s infinite linear alternate;
}
@keyframes gl1 {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(1px, -1px);
  }
  40% {
    transform: translate(0, 1px);
  }
  60% {
    transform: translate(-1px, 0);
  }
  80% {
    transform: translate(2px, 1px);
  }
  100% {
    transform: translate(0);
  }
}
@keyframes gl2 {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-1px, 1px);
  }
  40% {
    transform: translate(0, -1px);
  }
  60% {
    transform: translate(1px, 0);
  }
  80% {
    transform: translate(-2px, -1px);
  }
  100% {
    transform: translate(0);
  }
}

.subtitle {
  color: var(--muted);
  font-weight: 400;
  font-size: clamp(14px, 1.3vw, 18px);
}

/* progress */
.progress {
  margin: 26px 0 12px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.bar {
  height: 100%;
  width: 18%;
  background: repeating-linear-gradient(
    135deg,
    var(--accent) 0 12px,
    #ffd166 12px 24px
  );
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.4),
    0 6px 18px rgba(0, 0, 0, 0.2);
  transition: width 0.6s ease;
}
.progress small {
  display: block;
  margin-top: 8px;
  color: #bad6ff;
}

/* countdown */
.countdown {
  display: grid;
  grid-auto-flow: column;
  gap: 10px;
  align-items: center;
  margin: 20px 0 10px;
  width: fit-content;
}
.unit {
  display: grid;
  place-items: center;
  padding: 16px 18px;
  min-width: 88px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
}
.unit strong {
  font-size: 28px;
}
.unit span {
  font-size: 12px;
  color: #b9c6de;
}

/* form */
form {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
input[type="email"] {
  flex: 1;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: #eaf6ff;
  outline: none;
  transition: 0.2s border-color, 0.2s background;
}
input[type="email"]::placeholder {
  color: #9fb4d6;
}
input[type="email"]:focus {
  border-color: #7cf0ff;
  background: rgba(0, 0, 0, 0.35);
}
button {
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  color: #0b1020;
  background: linear-gradient(180deg, #7cf0ff, #00d1ff);
  cursor: pointer;
  transition: transform 0.08s ease;
  box-shadow: 0 10px 24px rgba(0, 209, 255, 0.35);
}
button:hover {
  transform: translateY(-1px);
}
button:active {
  transform: translateY(1px);
}

/* footer */
.footer {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 18px clamp(16px, 2vw, 24px);
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mini {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #9db3d8;
  font-size: 14px;
}
.icons {
  display: flex;
  gap: 10px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  opacity: 0.95;
}

/* responsive tweaks */
@media (max-width: 820px) {
  .brandmark {
    font-size: clamp(48px, 22vw, 18rem);
  }
}
@media (max-width: 520px) {
  .unit {
    min-width: 74px;
    padding: 12px 12px;
  }
  .unit strong {
    font-size: 22px;
  }
  .countdown {
    gap: 8px;
  }
  .brandmark {
    font-size: clamp(40px, 28vw, 14rem);
  }
}

/* fun floating construction sign */
.sign {
  position: absolute;
  right: -30px;
  top: -26px;
  transform: rotate(8deg);
  background: linear-gradient(180deg, #ffc43d, #ff9e00);
  color: #231b0e;
  font-weight: 800;
  border: 2px solid #231b0e;
  border-radius: 12px;
  padding: 8px 14px;
  text-transform: uppercase;
  box-shadow: 0 10px 0 #231b0e33, 0 24px 40px rgba(0, 0, 0, 0.3);
  animation: bob 3.6s ease-in-out infinite;
  letter-spacing: 1px;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.35));
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(8deg);
  }
  50% {
    transform: translateY(-8px) rotate(8deg);
  }
}

/* tiny tooltip */
.tip {
  position: fixed;
  left: 14px;
  bottom: 14px;
  font-size: 12px;
  color: #a8c2ff;
  opacity: 0.9;
  z-index: 3;
}

/* canvas for confetti */
canvas#fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* day theme overrides */
body.day {
  color: #0f1426;
  background: linear-gradient(135deg, #f0f4ff, #e6f2ff);
}
body.day .card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.9)
  );
  color: #0f1426;
}
body.day .subtitle {
  color: #3a4766;
}
body.day .progress {
  background: #e9eefb;
}
body.day .bar {
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.7),
    0 6px 18px rgba(0, 0, 0, 0.1);
}
body.day .unit {
  background: #f6f9ff;
  border-color: #e1e8ff;
}
body.day .footer {
  background: #f2f6ff;
  border-color: #e1e8ff;
}
body.day .icons .icon-btn {
  background: #f6f9ff;
}
body.day .mini {
  color: #44557a;
}
body.day .glitch::before {
  text-shadow: -2px 0 #ff7a00;
}
body.day .glitch::after {
  text-shadow: 2px 0 #00a3ff;
}
