:root {
  color-scheme: dark;
  --bg: #070812;
  --surface: rgba(20, 22, 42, .76);
  --surface-strong: rgba(27, 30, 55, .92);
  --line: rgba(255, 255, 255, .1);
  --line-bright: rgba(139, 92, 246, .42);
  --text: #f7f7ff;
  --muted: #a7acc7;
  --purple: #8b5cf6;
  --blurple: #5865f2;
  --cyan: #22d3ee;
  --green: #34d399;
  --red: #fb7185;
  --shadow: 0 30px 90px rgba(0, 0, 0, .48);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(88, 101, 242, .18), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(34, 211, 238, .11), transparent 26%),
    linear-gradient(145deg, #070812 0%, #0b0d1a 52%, #080916 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
}

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .24;
  animation: drift 16s ease-in-out infinite alternate;
}

.orb-one { width: 360px; height: 360px; left: -130px; top: 15%; background: var(--blurple); }
.orb-two { width: 300px; height: 300px; right: -120px; top: 8%; background: var(--cyan); animation-delay: -5s; }
.orb-three { width: 260px; height: 260px; right: 20%; bottom: -160px; background: var(--purple); animation-delay: -9s; }

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.75);
  box-shadow: 0 0 12px rgba(139,92,246,.9);
  animation: rise var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  place-items: center;
}

.portal {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(390px, 1.18fr);
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(12, 14, 28, .72);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  animation: enter .65s cubic-bezier(.2,.8,.2,1) both;
}

.brand-panel {
  position: relative;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(88,101,242,.22), rgba(139,92,246,.08) 42%, rgba(7,8,18,.18)),
    rgba(14, 16, 34, .68);
}

.brand-panel::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  top: -90px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 30px rgba(255,255,255,.025), 0 0 0 70px rgba(255,255,255,.018);
}

.brand-lockup { position: relative; z-index: 1; }

.logo-frame {
  width: 82px;
  height: 82px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 25px;
  background: rgba(255,255,255,.055);
  box-shadow: 0 18px 44px rgba(0,0,0,.25);
}

.logo-frame img { display: block; width: 100%; height: 100%; border-radius: 19px; }

.eyebrow {
  margin: 28px 0 10px;
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 { margin: 0; max-width: 360px; font-size: clamp(32px, 4vw, 48px); line-height: 1.06; letter-spacing: -.045em; }

.brand-copy { margin: 18px 0 0; max-width: 390px; color: var(--muted); line-height: 1.7; }

.trust-list { position: relative; z-index: 1; display: grid; gap: 14px; margin-top: 54px; }
.trust-item { display: flex; align-items: center; gap: 12px; color: #d7daf0; font-size: 14px; }
.trust-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04); color: #c4b5fd; }

.content-panel { min-height: 620px; padding: 48px; display: flex; flex-direction: column; background: rgba(11, 13, 27, .72); }

.topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.secure-pill { display: inline-flex; align-items: center; gap: 8px; color: #a7f3d0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.secure-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(52,211,153,.1), 0 0 18px rgba(52,211,153,.7); }
.step-count { color: var(--muted); font-size: 13px; }

.progress { margin: 22px 0 46px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.progress-segment { height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.progress-segment::after { content: ""; display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--purple),var(--cyan)); transition: width .5s ease; }
.progress-segment.is-done::after { width: 100%; }

.state { margin: auto 0; animation: state-in .5s ease both; }
.state-mark { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 22px; border: 1px solid var(--line-bright); border-radius: 18px; color: #ddd6fe; background: linear-gradient(145deg,rgba(139,92,246,.22),rgba(88,101,242,.08)); }
.state-mark.success { color: #a7f3d0; border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.1); }
.state-mark.danger { color: #fecdd3; border-color: rgba(251,113,133,.4); background: rgba(251,113,133,.1); }
.state-mark svg { width: 26px; height: 26px; }

h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.15; letter-spacing: -.035em; }
.lead { margin: 14px 0 0; color: var(--muted); line-height: 1.7; }

.code-box { position: relative; margin: 26px 0 16px; padding: 22px 64px 22px 22px; border: 1px solid var(--line-bright); border-radius: 18px; background: rgba(5,6,16,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.code-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.code-value { display: block; color: #fff; font: 750 clamp(24px, 5vw, 34px)/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
.copy-button { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: #d8dbef; background: rgba(255,255,255,.055); cursor: pointer; transition: .2s ease; }
.copy-button:hover { border-color: var(--line-bright); background: rgba(139,92,246,.15); transform: translateY(-50%) scale(1.04); }

.command { margin: 0 0 18px; padding: 13px 15px; overflow-wrap: anywhere; border-left: 2px solid var(--cyan); color: #cdd2f4; background: rgba(34,211,238,.045); font: 13px/1.5 ui-monospace, monospace; }

.countdown { margin: 18px 0 6px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; border: 1px solid rgba(139,92,246,.25); border-radius: 16px; background: rgba(139,92,246,.065); transition: border-color .3s ease, background .3s ease; }
.countdown-ring { position: relative; width: 54px; height: 54px; flex: 0 0 auto; display: grid; place-items: center; }
.countdown-ring svg { position: absolute; inset: 0; width: 54px; height: 54px; transform: rotate(-90deg); }
.countdown-ring circle { fill: none; stroke-width: 3; }
.countdown-track { stroke: rgba(255,255,255,.1); }
.countdown-progress { stroke: var(--purple); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s ease; }
.countdown-ring span { position: relative; font: 750 11px/1 ui-monospace, monospace; color: #ede9fe; }
.countdown-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.countdown-value { display: block; color: #ede9fe; font-size: 15px; }
.countdown.is-urgent { border-color: rgba(251,191,36,.36); background: rgba(251,191,36,.075); }
.countdown.is-urgent .countdown-progress { stroke: #fbbf24; }
.countdown.is-urgent .countdown-value, .countdown.is-urgent .countdown-ring span { color: #fde68a; }
.countdown.is-expired { border-color: rgba(251,113,133,.35); background: rgba(251,113,133,.075); }
.countdown.is-expired .countdown-progress { stroke: var(--red); }
.countdown.is-expired .countdown-value, .countdown.is-expired .countdown-ring span { color: #fecdd3; }

.request-card { margin: 24px 0; padding: 20px; display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.035); }
.avatar { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; color: #ddd6fe; font-weight: 800; background: linear-gradient(145deg,rgba(139,92,246,.3),rgba(88,101,242,.18)); }
.request-name { margin: 0; font-weight: 750; }
.request-server { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 14px; color: #fff; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: linear-gradient(115deg,var(--purple),var(--blurple)); box-shadow: 0 12px 30px rgba(88,101,242,.28); }
.button-primary:hover { box-shadow: 0 16px 38px rgba(88,101,242,.4); }
.button-secondary { border-color: var(--line); background: rgba(255,255,255,.055); }
.button-danger { border-color: rgba(251,113,133,.28); color: #fecdd3; background: rgba(251,113,133,.08); }
.button svg, .copy-button svg { width: 18px; height: 18px; }

.fine-print { margin: 22px 0 0; color: #777e9e; font-size: 12px; line-height: 1.6; }
.footer-note { margin-top: auto; padding-top: 36px; display: flex; justify-content: space-between; gap: 20px; color: #747a97; font-size: 12px; }

.loader { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
.waiting-row { margin-top: 20px; display: flex; align-items: center; gap: 12px; color: #c9ccec; font-size: 13px; }
.reward-result { margin-top: 22px; padding: 15px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; line-height: 1.5; }
.reward-result.success { color: #a7f3d0; border-color: rgba(52,211,153,.28); background: rgba(52,211,153,.075); }
.reward-result.error { color: #fecdd3; border-color: rgba(251,113,133,.28); background: rgba(251,113,133,.075); }
.reward-symbol { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.07); font-weight: 800; }

@keyframes enter { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes state-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translate3d(-3%, -2%, 0) scale(.95); } to { transform: translate3d(8%, 7%, 0) scale(1.1); } }
@keyframes rise { from { transform: translateY(105vh) scale(.7); opacity: 0; } 12% { opacity: .65; } 88% { opacity: .3; } to { transform: translateY(-12vh) scale(1.2); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .page-shell { padding: 20px 0; }
  .portal { grid-template-columns: 1fr; border-radius: 24px; }
  .brand-panel { padding: 30px; border-right: 0; border-bottom: 1px solid var(--line); }
  .logo-frame { width: 64px; height: 64px; border-radius: 20px; }
  .eyebrow { margin-top: 20px; }
  h1 { font-size: 34px; }
  .trust-list { margin-top: 26px; grid-template-columns: repeat(2, 1fr); }
  .content-panel { min-height: 520px; padding: 30px; }
  .progress { margin-bottom: 34px; }
}

@media (max-width: 520px) {
  .page-shell { width: min(100% - 18px, 1120px); padding: 9px 0; }
  .brand-panel, .content-panel { padding: 24px 20px; }
  .brand-copy { font-size: 14px; }
  .trust-list { grid-template-columns: 1fr; gap: 10px; }
  .content-panel { min-height: 540px; }
  .code-value { font-size: 23px; letter-spacing: .1em; }
  .actions, .actions form { width: 100%; }
  .button { width: 100%; }
  .footer-note { flex-direction: column; gap: 6px; }
}

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