:root {
  --bg-1: #040310;
  --bg-2: #120826;
  --bg-3: #2a0f46;
  --text: #f6f4ff;
  --muted: #c6b7d8;
  --accent: #ad4dff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(173, 77, 255, 0.18), transparent 62%),
    radial-gradient(1000px 560px at 50% 115%, rgba(103, 39, 180, 0.24), transparent 68%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 52%, var(--bg-3));
}

.redirect-stage {
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  padding: 20px;
}

.glow {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(65px);
  z-index: -2;
  animation: pulse 3.4s ease-in-out infinite;
}

.glow-a {
  width: 560px;
  height: 560px;
  top: -180px;
  left: -140px;
  background: rgba(149, 62, 241, 0.24);
}

.glow-b {
  width: 640px;
  height: 640px;
  right: -210px;
  bottom: -220px;
  background: rgba(90, 40, 170, 0.22);
  animation-delay: 0.8s;
}

.stars {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(2px 2px at 11% 23%, rgba(255, 255, 255, 0.45), transparent 70%),
    radial-gradient(2px 2px at 25% 68%, rgba(255, 255, 255, 0.3), transparent 70%),
    radial-gradient(1.7px 1.7px at 57% 31%, rgba(255, 255, 255, 0.35), transparent 70%),
    radial-gradient(2px 2px at 80% 19%, rgba(255, 255, 255, 0.4), transparent 70%),
    radial-gradient(1.8px 1.8px at 90% 74%, rgba(255, 255, 255, 0.3), transparent 70%);
  animation: drift 18s linear infinite alternate;
}

.redirect-card {
  width: min(560px, 92vw);
  text-align: center;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(24, 14, 44, 0.72), rgba(12, 9, 26, 0.66));
  border: 1px solid rgba(199, 166, 255, 0.26);
  box-shadow:
    0 22px 48px rgba(4, 2, 14, 0.56),
    inset 0 0 22px rgba(165, 90, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 34px clamp(18px, 4vw, 34px) 30px;
}

.logo {
  width: clamp(120px, 22vw, 178px);
  margin-bottom: 8px;
  filter: drop-shadow(0 0 20px rgba(175, 88, 255, 0.3));
}

.redirect-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.2;
}

.redirect-card p {
  margin: 0;
  color: var(--muted);
}

#countdown {
  color: #f9f6ff;
  font-weight: 700;
}

.progress-track {
  margin: 20px auto 0;
  width: min(330px, 85%);
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(194, 162, 255, 0.18);
}

.progress-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b165ff, #d8a3ff);
  transform-origin: left center;
  transform: scaleX(0);
  animation: fill 5s linear forwards;
}

@keyframes fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-16px, 14px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.82;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .stars,
  .glow {
    animation: none;
  }
}
