/* ══════════════════════════════════════════════════════════════════
   FoxEdu – Redirect Page  │  Premium Dark Design
   ══════════════════════════════════════════════════════════════════ */

:root {
  --purple:      #491f7e;
  --purple-2:    #6f34d7;
  --purple-deep: #1a0a33;
  --orange:      #ff7a00;
  --orange-hot:  #ff5c00;
  --green:       #25d366;
  --green-glow:  rgba(37, 211, 102, 0.25);
  --white:       #ffffff;
  --muted:       rgba(255,255,255,0.5);
  --glass:       rgba(255,255,255,0.04);
  --glass-border:rgba(255,255,255,0.08);
  --radius-md:   20px;
  --radius-lg:   32px;
  --radius-pill: 999px;
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--purple-deep);
  color: var(--white);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── Background Effects ─── */
.bg-glow {
  position: fixed;
  top: -30%;
  left: -20%;
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111,52,215,0.2) 0%, transparent 65%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: glow-drift 14s ease-in-out infinite alternate;
}

.bg-glow-2 {
  top: auto;
  bottom: -30%;
  left: auto;
  right: -20%;
  background: radial-gradient(circle, rgba(37,211,102,0.12) 0%, transparent 65%);
  animation-delay: -7s;
  animation-direction: alternate-reverse;
}

@keyframes glow-drift {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(40px,-30px) scale(1.15); }
}

/* ─── Particles ─── */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0%   { opacity: 0; transform: translateY(100vh) scale(0); }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* ─── Main Layout ─── */
.redirect-page {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
}

/* ─── Card ─── */
.redirect-card {
  display: grid;
  width: min(520px, 100%);
  justify-items: center;
  padding: clamp(36px, 7vw, 64px) clamp(28px, 5vw, 48px);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  box-shadow:
    0 32px 80px rgba(0,0,0,0.35),
    0 0 80px rgba(111,52,215,0.1);
  text-align: center;
  animation: card-rise 0.8s var(--ease-out) both;
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Brand ─── */
.brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 36px;
  font-family: "Sora", sans-serif;
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  animation: card-rise 0.8s 0.1s var(--ease-out) both;
}

.brand-fox { color: var(--orange); }
.brand-edu { color: var(--white); }

/* ─── Icon with Rings ─── */
.icon-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 28px;
  display: grid;
  place-items: center;
  animation: card-rise 0.8s 0.15s var(--ease-out) both;
}

.redirect-icon {
  position: relative;
  z-index: 2;
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 38px;
  box-shadow:
    0 16px 40px var(--green-glow),
    0 0 40px var(--green-glow);
  animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {
  0%,100% { box-shadow: 0 16px 40px var(--green-glow), 0 0 40px var(--green-glow); transform: scale(1); }
  50%     { box-shadow: 0 20px 50px rgba(37,211,102,0.35), 0 0 60px rgba(37,211,102,0.2); transform: scale(1.06); }
}

.icon-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(37,211,102,0.2);
  animation: ring-expand 2.5s ease-out infinite;
}

.icon-ring-2 {
  animation-delay: 1.25s;
}

@keyframes ring-expand {
  0%   { opacity: 0.6; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* ─── Title ─── */
h1 {
  max-width: 420px;
  margin: 0;
  color: var(--white);
  font-family: "Sora", sans-serif;
  font-size: clamp(24px, 5.5vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  animation: card-rise 0.8s 0.2s var(--ease-out) both;
}

/* ─── Progress Bar ─── */
.progress-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(400px, 100%);
  margin: 30px 0 20px;
  animation: card-rise 0.8s 0.3s var(--ease-out) both;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
}

.progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--purple-2), var(--green));
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left center;
  animation: fill-progress 5s cubic-bezier(0.4, 0, 0.2, 1) forwards, shimmer 1.5s ease-in-out infinite;
}

@keyframes fill-progress {
  to { transform: scaleX(1); }
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.progress-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: glow-slide 2s ease-in-out infinite;
}

@keyframes glow-slide {
  0%   { transform: translateX(-60px); }
  100% { transform: translateX(400px); }
}

.progress-percent {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* ─── Subtitle ─── */
.redirect-sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  animation: card-rise 0.8s 0.35s var(--ease-out) both;
}

/* ─── Steps ─── */
.redirect-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 28px;
  animation: card-rise 0.8s 0.4s var(--ease-out) both;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  opacity: 0.35;
  transition: all 0.5s var(--ease-out);
}

.step.active {
  opacity: 1;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}

.step.done {
  opacity: 1;
}

.step.done .step-icon {
  color: var(--green);
}

.step-icon {
  font-size: 18px;
  color: rgba(255,255,255,0.2);
  transition: color 0.5s ease;
  flex-shrink: 0;
}

.step.active .step-icon {
  color: var(--orange);
  animation: step-pulse 1.2s ease-in-out infinite;
}

@keyframes step-pulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.15); }
}

.step-text {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-align: left;
}

.step.active .step-text {
  color: var(--white);
}

.step.done .step-text {
  color: rgba(255,255,255,0.7);
}

/* ─── Secure Note ─── */
.secure-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  animation: card-rise 0.8s 0.5s var(--ease-out) both;
}

.secure-note i {
  font-size: 14px;
  color: var(--green);
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .redirect-page {
    padding: 18px;
  }

  .redirect-card {
    padding: clamp(28px, 6vw, 44px) clamp(20px, 4vw, 32px);
    border-radius: var(--radius-md);
  }

  .icon-wrapper {
    width: 86px;
    height: 86px;
  }

  .redirect-icon {
    width: 68px;
    height: 68px;
    font-size: 32px;
  }

  .redirect-steps {
    max-width: none;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 28px;
  }

  h1 {
    font-size: clamp(22px, 6vw, 28px);
  }

  .step {
    padding: 10px 12px;
  }

  .step-text {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .particle { display: none; }
}

/* ─── Fallback Button ─── */
.fallback-container {
  display: none;
  width: 100%;
  max-width: 320px;
  margin-top: 10px;
  margin-bottom: 24px;
}

.fallback-container.show {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: card-rise 0.6s var(--ease-out) both;
}

.fallback-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.button-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background: var(--green);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 24px var(--green-glow);
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
}

.button-fallback:hover {
  background: #1fbd59;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(37,211,102,0.35);
}

.button-fallback i {
  font-size: 18px;
}
