.duck-redirect {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 208, 7, 0.35), transparent 24%),
    radial-gradient(circle at 82% 78%, rgba(99, 197, 225, 0.45), transparent 28%),
    rgba(4, 48, 82, 0.68);
  font-family: Arial, Helvetica, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.duck-redirect.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.duck-redirect__card {
  position: relative;
  width: min(92vw, 560px);
  overflow: hidden;
  border: 4px solid #ffd007;
  border-radius: 8px;
  background: #ffffff;
  color: #043052;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  transform: translateY(24px) scale(0.96);
  animation: duck-card-in 520ms cubic-bezier(.2, .9, .2, 1.2) forwards;
}

.duck-redirect__waves {
  position: relative;
  height: 70px;
  overflow: hidden;
  background:
    radial-gradient(34px 18px at 28px 1px, transparent 27px, rgba(255, 255, 255, 0.42) 28px, rgba(255, 255, 255, 0.42) 32px, transparent 33px),
    radial-gradient(42px 21px at 40px -2px, transparent 31px, #8bdaf0 32px),
    radial-gradient(42px 21px at 111px -1px, transparent 31px, #489ed7 32px),
    linear-gradient(180deg, #98e4f5 0%, #55c0dc 100%);
  background-size: 142px 70px, 142px 70px, 142px 70px, auto;
  animation: duck-waves 3.2s linear infinite;
}

.duck-redirect__waves::before,
.duck-redirect__waves::after {
  content: "";
  position: absolute;
  left: -20%;
  width: 140%;
  pointer-events: none;
}

.duck-redirect__waves::before {
  top: 10px;
  height: 38px;
  background:
    radial-gradient(8px 8px at 18% 22px, rgba(255, 255, 255, 0.75) 0 42%, transparent 46%),
    radial-gradient(5px 5px at 38% 12px, rgba(255, 255, 255, 0.62) 0 42%, transparent 46%),
    radial-gradient(7px 7px at 69% 26px, rgba(255, 255, 255, 0.7) 0 42%, transparent 46%),
    radial-gradient(5px 5px at 88% 14px, rgba(255, 255, 255, 0.58) 0 42%, transparent 46%);
  animation: duck-bubbles 4.4s ease-in-out infinite;
}

.duck-redirect__waves::after {
  bottom: -18px;
  height: 52px;
  background:
    radial-gradient(54px 26px at 45px 0, transparent 36px, rgba(4, 104, 174, 0.36) 37px, rgba(4, 104, 174, 0.36) 43px, transparent 44px),
    radial-gradient(54px 26px at 138px 0, transparent 36px, rgba(255, 255, 255, 0.36) 37px, rgba(255, 255, 255, 0.36) 42px, transparent 43px);
  background-size: 184px 52px;
  animation: duck-swell 5s linear infinite;
}

.duck-redirect__body {
  position: relative;
  padding: 28px 30px 30px;
  text-align: center;
}

.duck-redirect__duck {
  width: 132px;
  height: 100px;
  margin: -88px auto 12px;
  filter: drop-shadow(0 8px 0 rgba(4, 104, 174, 0.14));
  animation: duck-bob 1.75s ease-in-out infinite;
}

.duck-redirect__duck svg {
  display: block;
  width: 100%;
  height: 100%;
}

.duck-redirect__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eaf8fd;
  color: #0468ae;
  font-size: 13px;
  font-weight: 700;
}

.duck-redirect h2 {
  margin: 14px 0 10px;
  color: #0468ae;
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.duck-redirect p {
  max-width: 430px;
  margin: 0 auto 22px;
  color: #25465d;
  font-size: 17px;
  line-height: 1.48;
}

.duck-redirect__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.duck-redirect__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 6px;
  background: #ffd007;
  color: #043052;
  box-shadow: 0 4px 0 #d1a800;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.duck-redirect__button:hover,
.duck-redirect__button:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #d1a800;
}

.duck-redirect__count {
  margin-top: 16px;
  color: #5c7180;
  font-size: 14px;
}

@keyframes duck-card-in {
  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes duck-waves {
  to {
    background-position: 142px 0, 142px 0, -142px 0, 0 0;
  }
}

@keyframes duck-swell {
  to {
    background-position: 184px 0, -184px 0;
  }
}

@keyframes duck-bubbles {
  0%, 100% {
    transform: translateY(2px);
    opacity: .85;
  }
  50% {
    transform: translateY(-7px);
    opacity: .45;
  }
}

@keyframes duck-bob {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-9px) rotate(3deg);
  }
}

@media (max-width: 420px) {
  .duck-redirect__body {
    padding: 24px 18px 26px;
  }

  .duck-redirect p {
    font-size: 16px;
  }

  .duck-redirect__button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .duck-redirect,
  .duck-redirect__card,
  .duck-redirect__waves,
  .duck-redirect__waves::before,
  .duck-redirect__waves::after,
  .duck-redirect__duck,
  .duck-redirect__button {
    animation: none;
    transition: none;
  }
}
