:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070512;
  color: #f8f6ff;
  --cyan: #4be8ff;
  --violet: #a87cff;
  --orange: #ff9466;
  --panel: #100d29e8;
  --line: #7664b45c;
  --muted: #b9bfd8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body {
  margin: 0;
  min-width: 20rem;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(#0a0716aa, #080513e8),
    radial-gradient(circle at 12% 8%, #773ad566 0, transparent 28rem),
    radial-gradient(circle at 88% 64%, #00d9ff35 0, transparent 32rem),
    repeating-linear-gradient(90deg, #ffffff05 0 1px, transparent 1px 4rem),
    #070512;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #7ddfff08 3px 4px);
  mix-blend-mode: screen;
}
a { color: var(--cyan); text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
.page-shell { width: min(70rem, calc(100% - 2rem)); margin: 0 auto; }
.masthead {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  transform: rotate(45deg);
  box-shadow: 0 0 1rem #4be8ff55, inset 0 0 .75rem #4be8ff33;
}
.brand strong { display: block; letter-spacing: .18em; }
.brand small { display: block; margin-top: .2rem; color: var(--cyan); font-size: .62rem; letter-spacing: .12em; }
.account-actions { display: flex; gap: .6rem; }
.account-summary { display: flex; align-items: center; gap: 1rem; }
.account-summary strong { color: var(--cyan); font-size: 1.2rem; }
.account-name { color: var(--muted); }
main { padding: clamp(2rem, 5vw, 5rem) 0; }
.hero { max-width: 48rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.kicker { margin: 0 0 .55rem; color: var(--cyan); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(3.3rem, 10vw, 7.5rem); line-height: .88; text-shadow: 0 0 2rem #8f63ff3b; }
h1 span { color: var(--violet); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.lead { max-width: 42rem; color: #d8dbeb; font-size: clamp(1.05rem, 2.4vw, 1.35rem); line-height: 1.6; }
.rate-card {
  display: inline-flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: .8rem 1rem;
  background: #160f37aa;
  border-left: 3px solid var(--violet);
  box-shadow: 0 0 1.6rem #9b6cff24;
}
.rate-card span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.rate-card strong { color: #fff; font-size: 1.25rem; }
.wallet-panel {
  position: relative;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(135deg, #17113ae8, #0b142dea);
  border: 1px solid #9d7bff78;
  border-radius: 1.2rem;
  box-shadow: 0 1.5rem 5rem #0009, 0 0 4rem #7b52e92a, inset 0 1px #ffffff13;
}
.wallet-panel::before {
  content: "";
  position: absolute;
  inset: .45rem;
  border: 1px solid #4be8ff25;
  border-radius: .9rem;
  pointer-events: none;
}
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.secure-label { color: var(--cyan); font-size: .68rem; letter-spacing: .12em; white-space: nowrap; }
.support-context {
  position: relative;
  margin: 0 0 1.5rem;
  padding: 1.15rem;
  background: linear-gradient(90deg, #331945b8, #182c46a8);
  border: 1px solid #ff946681;
  border-radius: .8rem;
}
.support-context p { margin: .2rem 0 .65rem; color: #e5dfef; }
.support-context .support-thanks { color: #ffd4bd; font-weight: 800; font-size: 1.08rem; }
#topup-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, .55fr); gap: 1rem; }
.field { display: grid; align-content: start; gap: .45rem; }
.field-wide { grid-column: 1 / -1; }
label { color: #f0eff8; font-weight: 700; }
.field small, .field-hint { color: var(--muted); line-height: 1.45; }
input, select, textarea {
  width: 100%;
  min-height: 3.15rem;
  padding: .75rem .9rem;
  color: #fff;
  background: #070b1cf0;
  border: 1px solid #59648e;
  border-radius: .62rem;
  box-shadow: inset 0 0 1rem #0007;
}
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
textarea { resize: vertical; }
.quote-output {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: .8rem 1rem;
  background: #091d2a;
  border: 1px solid #4be8ff66;
  border-radius: .62rem;
}
.quote-output span { color: var(--muted); font-size: .8rem; }
.quote-output strong { color: var(--cyan); font-size: 1.5rem; }
.agreement { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; font-weight: 400; color: #d8d9e8; line-height: 1.5; }
.agreement input { width: 1.25rem; min-height: 1.25rem; margin: .15rem 0 0; accent-color: var(--violet); }
.provider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.button, .provider-button {
  min-height: 2.8rem;
  padding: .72rem 1rem;
  color: #fff;
  background: linear-gradient(135deg, #925de9, #496fff);
  border: 1px solid #b496ff;
  border-radius: .6rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 .35rem 1.2rem #5134a45c;
}
.button:hover, .provider-button:hover { filter: brightness(1.13); }
.button-quiet { background: #13132db8; border-color: #626b99; box-shadow: none; }
.provider-button { display: flex; align-items: center; justify-content: space-between; gap: .8rem; text-align: left; }
.provider-button span { font-size: .75rem; font-weight: 500; opacity: .85; }
.provider-button strong { font-size: 1.1rem; }
.provider-tbank { background: linear-gradient(135deg, #584f00, #ffe00040); border-color: #ffe000; }
.provider-robokassa { background: linear-gradient(135deg, #153c62, #158ee44d); border-color: #45b5ff; }
.provider-disabled { filter: saturate(.4); opacity: .68; }
.notice { margin-bottom: 0; color: #ffd283; }
.verification-panel {
  width: min(28rem, 100%);
  min-height: 24rem;
  margin: clamp(1rem, 8vh, 5rem) auto 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.4rem;
  text-align: center;
}
.verification-icon {
  width: clamp(5.5rem, 22vw, 7.5rem);
  color: var(--cyan);
  filter: drop-shadow(0 0 1.2rem #4be8ff66);
}
.verification-icon svg { display: block; width: 100%; }
.verification-icon circle,
.verification-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.verification-icon[data-state="loading"] { animation: verification-pulse 1.2s ease-in-out infinite; }
.verification-error { opacity: 0; }
.verification-icon[data-state="loading"] path { opacity: 0; }
.verification-icon[data-state="error"] { color: #ff9aab; filter: drop-shadow(0 0 1.2rem #ff6f8a55); }
.verification-icon[data-state="error"] .verification-check { opacity: 0; }
.verification-icon[data-state="error"] .verification-error { opacity: 1; }
.verification-status {
  max-width: 22rem;
  min-height: 1.5rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}
.verification-status[data-state="success"] { color: #bff7dc; }
.verification-status[data-state="error"] { color: #ffc0cb; }
@keyframes verification-pulse { 50% { opacity: .48; transform: scale(.97); } }
@media (prefers-reduced-motion: reduce) {
  .verification-icon[data-state="loading"] { animation: none; }
}
.form-result { min-height: 1.4rem; margin: 0; }
.form-result[data-kind="error"] { color: #ff9aab; }
.form-result[data-kind="warning"] { color: #ffd283; }
.form-result[data-kind="success"] { color: #7bf4ba; }
.history-button { margin-top: 1rem; width: 100%; }
.site-footer { padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: #9299b7; font-size: .78rem; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1rem; }
.site-footer a { color: #cfd5ea; }
.modal {
  width: min(32rem, calc(100% - 1.25rem));
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
}
.modal::backdrop { background: #03020ccb; backdrop-filter: blur(8px); }
.modal-card {
  position: relative;
  display: grid;
  gap: .85rem;
  padding: clamp(1.3rem, 4vw, 2rem);
  background: linear-gradient(145deg, #1d1642, #09152c);
  border: 1px solid #9d7bff;
  border-radius: 1rem;
  box-shadow: 0 1.5rem 5rem #000b, 0 0 3rem #7b52e94a;
}
.modal-wide { width: min(52rem, calc(100% - 1.25rem)); }
.modal-close {
  position: absolute;
  top: .7rem;
  right: .7rem;
  width: 2.5rem;
  height: 2.5rem;
  color: #fff;
  background: transparent;
  border: 1px solid #5e6389;
  border-radius: 50%;
  cursor: pointer;
}
.modal-status { min-height: 1.4rem; margin: 0; color: #ffd283; }
.password-requirements {
  padding: .8rem 1rem;
  color: var(--muted);
  background: #090d20b8;
  border: 1px solid #4f5a84;
  border-radius: .65rem;
  line-height: 1.4;
}
.password-requirements strong { color: #f2efff; }
.password-requirements ul { display: grid; gap: .35rem; margin: .55rem 0; padding-left: 1.3rem; }
.password-requirements li::marker { color: #ff9aab; }
.password-requirements li.rule-valid { color: #bff7dc; }
.password-requirements li.rule-valid::marker { color: #62e8ad; }
.password-requirements small { color: #8f98b9; }
.password-warnings { display: grid; gap: .3rem; color: #ffd283; font-size: .85rem; }
.password-match { min-height: 1.2rem; margin: -.35rem 0 0; color: #ff9aab; font-size: .85rem; }
.password-match[data-valid="true"] { color: #62e8ad; }
.registration-agreement { font-size: .9rem; }
.mfa-enrollment { display: grid; gap: .8rem; justify-items: center; }
.mfa-qr { width: min(18rem, 100%); aspect-ratio: 1; padding: .7rem; background: #fff; border-radius: .6rem; image-rendering: pixelated; }
.mfa-enrollment details { width: 100%; color: var(--muted); }
.mfa-enrollment code { display: block; margin-top: .5rem; padding: .7rem; overflow-wrap: anywhere; color: #fff; background: #090d20; border-radius: .4rem; }
.button:disabled, .provider-button:disabled {
  cursor: not-allowed;
  filter: saturate(.35);
  opacity: .5;
  box-shadow: none;
}
.payment-history { display: grid; gap: .7rem; }
.payment-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid #4be8ff45; border-radius: .7rem; }
.payment-row div { display: grid; gap: .25rem; }
.payment-row span { color: var(--muted); font-size: .8rem; }
.payment-row .refund-status { justify-self: end; padding: .55rem .75rem; color: #bff7dc; border: 1px solid #62e8ad80; border-radius: .5rem; }
.refund-controls { display: flex; gap: .5rem; align-items: center; }
.refund-controls input { width: 6rem; }
.payment-status-card { text-align: center; justify-items: center; }
.payment-status-icon {
  width: 4.5rem;
  height: 4.5rem;
  border: .35rem solid #4be8ff3d;
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: payment-status-spin .9s linear infinite;
}
.payment-status-card[data-state="confirmed"] .payment-status-icon,
.payment-status-card[data-state="refunded"] .payment-status-icon {
  display: grid;
  place-items: center;
  color: #bff7dc;
  border-color: #62e8ad;
  animation: none;
}
.payment-status-card[data-state="confirmed"] .payment-status-icon::after,
.payment-status-card[data-state="refunded"] .payment-status-icon::after {
  content: "\2713";
  font-size: 2.5rem;
  font-weight: 900;
}
.payment-status-card[data-state="failed"] .payment-status-icon,
.payment-status-card[data-state="declined"] .payment-status-icon {
  display: grid;
  place-items: center;
  color: #ff9aab;
  border-color: #ff7188;
  animation: none;
}
.payment-status-card[data-state="failed"] .payment-status-icon::after,
.payment-status-card[data-state="declined"] .payment-status-icon::after {
  content: "!";
  font-size: 2.5rem;
  font-weight: 900;
}
.payment-status-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
@keyframes payment-status-spin { to { transform: rotate(360deg); } }
.admin-shell main { display: grid; gap: 1.25rem; }
.admin-hero h1 { font-size: clamp(2.6rem, 8vw, 5.5rem); }
.admin-table { display: grid; gap: .65rem; }
.admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; padding: .9rem 1rem; border: 1px solid #4be8ff45; border-radius: .7rem; background: #091326a8; }
.admin-row div { display: grid; gap: .2rem; }
.admin-row div:nth-child(2) { text-align: right; }
.admin-row span, .admin-row small { color: var(--muted); }
.admin-toolbar, .admin-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.admin-toolbar { margin: .7rem 0 1rem; }
.admin-operation-row { grid-template-columns: minmax(14rem, 1fr) auto minmax(14rem, .8fr); }
.admin-operation-row > small { grid-column: 1 / -1; }
.admin-operation-row .admin-actions { display: flex; justify-content: flex-end; }
.admin-operation-row .admin-actions .button { width: 100%; }
.status-badge { width: fit-content; padding: .18rem .5rem; border: 1px solid #4be8ff55; border-radius: 999px; color: #c9f8ff !important; }
.admin-operation-row[data-state="confirmed"] .status-badge,
.admin-operation-row[data-state="ready"] .status-badge,
.admin-operation-row[data-state="refunded"] .status-badge { border-color: #62e8ad88; color: #bff7dc !important; }
.admin-operation-row[data-state="failed"] .status-badge,
.admin-operation-row[data-state="manual_review"] .status-badge { border-color: #ff718888; color: #ffb3bf !important; }
.admin-operation-row[data-state="provider_pending"] .status-badge,
.admin-operation-row[data-state="requested"] .status-badge { border-color: #ffd75f88; color: #ffe59a !important; }
.operation-error { color: #ff9aab !important; }
.button:disabled { cursor: not-allowed; opacity: .58; }
[aria-busy="true"] .button:disabled { cursor: wait; }
.admin-credit-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.admin-credit-form label { display: grid; gap: .45rem; }

.legal-page { width: min(74rem, calc(100% - 1.25rem)); margin: 0 auto; padding: 1.5rem 0 3rem; }
.legal-shell { background: #eee8dc; padding: clamp(.5rem, 2vw, 1.25rem); border-radius: .6rem; box-shadow: 0 2rem 6rem #000b; transform: rotate(-.15deg); }
.legal-paper { min-height: 70vh; padding: clamp(1.4rem, 5vw, 4rem); color: #181818; background: #fff; font-family: Georgia, "Times New Roman", serif; line-height: 1.62; box-shadow: inset 0 0 3rem #795f2d12; }
.legal-paper h1, .legal-paper h2 { letter-spacing: normal; }
.legal-paper h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; }
.legal-paper h2 { margin-top: 2rem; font-size: 1.35rem; }
.legal-draft { padding: .8rem 1rem; border: 2px solid #a01818; color: #771313; font-family: system-ui, sans-serif; font-weight: 800; }
.legal-note { padding: .85rem 1rem; background: #fff4c7; border-left: 4px solid #9b6a00; }
.decision-card { margin: 1.1rem 0; padding: 1rem; border: 1px solid #777; break-inside: avoid; }
.decision-card h3 { margin: 0 0 .55rem; font-size: 1.05rem; }
.decision-options { display: grid; gap: .3rem; margin: .65rem 0; font-family: system-ui, sans-serif; }
.decision-answer { min-height: 3.8rem; margin-top: .75rem; border-bottom: 1px solid #777; }
.decision-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
.decision-line { min-height: 2.5rem; padding-top: 1rem; border-bottom: 1px solid #333; }
.legal-header, .legal-footer { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; font-family: system-ui, sans-serif; }
.legal-footer { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid #aaa; font-size: .82rem; }
.legal-packet .legal-paper + .legal-paper { margin-top: 1.5rem; }
.legal-header a, .legal-footer a { color: #b9f6ff; font-weight: 750; }
.legal-header a:hover, .legal-footer a:hover { color: #fff; }
.print-view { min-width: 0; color-scheme: light; color: #000; background: #fff; }
.print-view::before { display: none; }
.print-document { width: min(52rem, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0; }
.print-view .legal-paper { min-height: 0; padding: 0; color: #000; box-shadow: none; }
.print-view .legal-draft { color: #000; border-color: #000; }
.print-view .legal-note { color: #000; background: #fff; border: 1px solid #777; }

@media (max-width: 44rem) {
  .page-shell { width: min(100% - 1rem, 42rem); }
  .masthead { align-items: flex-start; padding: .8rem 0; flex-direction: column; }
  .account-actions { width: 100%; }
  .account-summary { flex-wrap: wrap; max-width: 100%; }
  .account-name { min-width: 0; overflow-wrap: anywhere; }
  .account-actions .button { flex: 1; }
  main { padding: 2rem 0; }
  h1 { font-size: clamp(3rem, 18vw, 5.6rem); }
  .section-heading { display: block; }
  .secure-label { display: inline-block; margin-top: .65rem; }
  #topup-form, .provider-grid { grid-template-columns: 1fr; }
  .field, .quote-output { grid-column: 1; }
  .provider-button { min-height: 3.4rem; }
  .payment-row { grid-template-columns: 1fr; }
  .payment-row .refund-status { justify-self: start; }
  .refund-controls { justify-self: start; flex-wrap: wrap; }
  .admin-row, .admin-operation-row, .admin-credit-form { grid-template-columns: 1fr; }
  .admin-row div:nth-child(2) { text-align: left; }
  .admin-operation-row .admin-actions { justify-content: stretch; }
  .decision-meta { grid-template-columns: 1fr; }
  .legal-header, .legal-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .payment-status-icon { animation: none; }
}

@media print {
  :root { color-scheme: light; background: #fff; }
  body { background: #fff !important; }
  body::before, .legal-header, .legal-footer { display: none !important; }
  .legal-page, .legal-shell { width: 100%; margin: 0; padding: 0; background: #fff; box-shadow: none; transform: none; }
  .legal-paper { padding: 0; color: #000; background: #fff; box-shadow: none; font-size: 11pt; }
  .legal-note { border: 1px solid #777; background: #fff; }
  .legal-draft { color: #000; border-color: #000; }
  .print-document { width: 100%; margin: 0; padding: 0; }
  .legal-packet .legal-paper + .legal-paper { margin-top: 0; break-before: page; page-break-before: always; }
  .decision-card { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

.auth-error-popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(90vw, 420px); padding: 24px; background: #20213b; color: #fff;
  border: 1px solid #ef7296; border-radius: 14px; z-index: 10; box-shadow: 0 10px 60px #000a; }

#avatar-dialog{max-width:min(420px,94vw);color:var(--text,#e9f1ff);background:#172641;border:1px solid #5385aa;border-radius:16px;padding:20px}#avatar-dialog::backdrop{background:#000b}.avatar-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.avatar-choices button{font-size:32px}.avatar-choices [aria-pressed=true]{outline:2px solid #65dcef}#account-avatar{font-size:26px}

.bonus-panel {margin-top:24px;}
#bonus-code-form {display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:16px 0;}
#bonus-code-form label {flex-basis:100%;}
#bonus-code {flex:1 1 220px; min-width:0;}
#bonus-code-result {flex-basis:100%;}
