:root {
  color-scheme: dark;
  --page: #08080d;
  --surface: rgba(20, 18, 31, 0.84);
  --surface-soft: rgba(255, 255, 255, 0.055);
  --text: #f8f7fc;
  --muted: #aaa7b8;
  --brand: #a78bfa;
  --brand-strong: #7c3aed;
  --line: rgba(255, 255, 255, 0.11);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.smartlink-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(22px, 5vw, 52px);
  background:
    radial-gradient(circle at 50% -12%, rgba(139, 92, 246, 0.22), transparent 48%),
    linear-gradient(165deg, #0b0912 0%, #07070b 58%, #0a0810 100%);
}

.smartlink-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at center, #000, transparent 76%);
  mask-image: radial-gradient(circle at center, #000, transparent 76%);
}

.ambient {
  position: absolute;
  z-index: -1;
  width: min(72vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
}

.ambient-one {
  inset-block-start: -34%;
  inset-inline-start: -18%;
  background: #8b5cf6;
}

.ambient-two {
  inset-block-end: -42%;
  inset-inline-end: -16%;
  background: #4f46e5;
}

.redirect-card {
  width: 100%;
  max-width: 440px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(28px, 6vw, 42px);
  background: linear-gradient(155deg, rgba(30, 27, 43, 0.92), var(--surface));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  backdrop-filter: blur(28px) saturate(145%);
  text-align: center;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-inline: auto;
  font-size: 23px;
  font-weight: 820;
  letter-spacing: -0.035em;
}

.brand-lockup img {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 17px;
  box-shadow: 0 14px 34px rgba(91, 33, 182, 0.34);
}

.redirect-mark {
  position: relative;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 32px auto 22px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
}

.redirect-mark-glow {
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: inherit;
  animation: soft-pulse 1.8s ease-out infinite;
}

.redirect-mark svg,
.redirect-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.status {
  margin: 0 0 9px;
  color: #d8ccff;
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.015em;
}

h1 {
  margin: 0;
  font-size: clamp(31px, 8vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  overflow-wrap: break-word;
}

.slogan {
  max-width: 330px;
  margin: 15px auto 0;
  color: #c4c1ce;
  font-size: 16px;
  line-height: 1.55;
}

.progress {
  height: 5px;
  margin: 29px 0 28px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.6);
  animation: progress-flow 1.35s ease-in-out infinite;
}

.fallback {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 20px;
  background: var(--surface-soft);
}

.fallback p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.redirect-button {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #9f7aea, var(--brand-strong));
  color: #fff;
  box-shadow: 0 14px 34px rgba(91, 33, 182, 0.27);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.redirect-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(91, 33, 182, 0.38);
}

.redirect-button:focus-visible {
  outline: 3px solid rgba(167, 139, 250, 0.5);
  outline-offset: 3px;
}

.redirect-button svg {
  width: 19px;
  height: 19px;
}

[dir="rtl"] .redirect-button svg,
[dir="rtl"] .redirect-mark svg {
  transform: scaleX(-1);
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 19px 0 0;
  color: #817e8e;
  font-size: 11px;
  line-height: 1.4;
}

.privacy-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.noscript-card {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  width: min(90vw, 360px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: #17141f;
  text-align: center;
}

.noscript-card strong,
.noscript-card a {
  display: block;
}

.noscript-card a {
  margin-block-start: 16px;
  color: #c4b5fd;
}

@keyframes progress-flow {
  0% { transform: translateX(-110%); }
  55% { transform: translateX(120%); }
  100% { transform: translateX(250%); }
}

@keyframes soft-pulse {
  0% { opacity: 0.55; transform: scale(0.9); }
  70%, 100% { opacity: 0; transform: scale(1.35); }
}

@media (max-width: 520px) {
  .smartlink-shell {
    padding: 16px;
  }

  .redirect-card {
    width: calc(100vw - 32px);
    border-radius: 27px;
    padding: 28px 22px 24px;
  }

  .redirect-mark {
    margin-block-start: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .redirect-mark-glow,
  .progress span {
    animation: none;
  }

  .progress span {
    width: 100%;
  }

  .redirect-button {
    transition: none;
  }
}
