/* Vipchat web top-up (/pay/). Mobile first; Vipchat's colours (the app's
   VipColors: canvas, surface, magenta, violet, gold). */
:root {
  --canvas: #0E0620;
  --surface: #1A0B33;
  --sunken: #090314;
  --border: #2E1D52;
  --ink: #FFFFFF;
  --muted: #A895D6;
  --magenta: #FF3D9A;
  --violet: #B84DFF;
  --gold: #FFC83D;
  --gold-deep: #C9731A;
  --on-gold: #4A2A00;
  --alert: #FF3D6E;
  --mint: #3DFFB5;
  --radius: 16px;
  --space: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif;
  min-height: 100vh;
}
a { color: var(--magenta); }
img { max-width: 100%; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--space); border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 22px; }
.brand img { border-radius: 10px; }
.top-end { display: flex; align-items: center; gap: 10px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.lang summary::after { content: "▾"; font-size: 12px; }
.menu ul, .menu-panel {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); margin: 0; padding: 8px;
  list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-width: 160px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
.menu li a { display: block; padding: 8px 10px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.menu li a[aria-current] { color: var(--gold); }
.menu-panel { padding: 12px; display: grid; gap: 10px; min-width: 200px; }
.me-name { margin: 0; display: grid; }
.me-name span { color: var(--muted); font-size: 14px; }
main { max-width: 560px; margin: 0 auto; padding: var(--space); padding-bottom: 48px; display: grid; gap: var(--space); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px var(--space); }
.card h1 { font-size: 22px; margin: 0 0 6px; line-height: 1.25; }
.card h2 { font-size: 18px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.form { display: grid; gap: 10px; }
label { font-weight: 700; }
input[type=text], input:not([type]), input[inputmode] {
  width: 100%; font: inherit; color: var(--ink); background: var(--sunken);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; outline: none;
}
input:focus { border-color: var(--violet); }
.field-with-button { position: relative; }
.field-with-button input { padding-inline-end: 110px; }
.field-with-button .link-button { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); }
.link-button { background: none; border: 0; color: var(--magenta); font: inherit; font-weight: 800; padding: 10px 12px; cursor: pointer; border-radius: 10px; }
.link-button:disabled { color: var(--muted); cursor: default; }
.default-submit { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; padding: 0; margin: -1px; }
.hint { margin: 0; color: var(--muted); font-size: 14px; }
.hint.accent { color: var(--mint); }
.hint.warn { color: var(--gold); }
.primary, .secondary {
  display: block; width: 100%; text-align: center; font: inherit; font-weight: 800; font-size: 17px; cursor: pointer;
  border-radius: 999px; padding: 15px 20px; text-decoration: none; margin-top: 6px;
}
.primary { border: 0; color: #fff; background: linear-gradient(90deg, var(--magenta), var(--violet)); }
.primary:disabled { opacity: .45; cursor: default; }
.secondary { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.secondary.small { font-size: 14px; padding: 8px 14px; margin: 0; }
.alert, .notice { margin: 0; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.alert { background: rgba(255, 61, 110, .14); border: 1px solid var(--alert); color: #FFD3DE; }
.notice { background: rgba(61, 255, 181, .1); border: 1px solid var(--mint); color: #CFFFEA; }
.person { display: flex; align-items: center; gap: 12px; }
.person .who { margin: 0; display: grid; flex: 1; min-width: 0; }
.person .who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.person .who span { color: var(--muted); font-size: 14px; }
.person.big { padding: 12px 0; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: var(--sunken); }
.menu summary .avatar { width: 36px; height: 36px; }
.avatar.placeholder { display: inline-grid; place-items: center; font-weight: 800; color: var(--on-gold); background: var(--gold); }
.chip {
  flex: none; border: 1px solid var(--border); background: rgba(255, 61, 154, .12); color: var(--magenta);
  font: inherit; font-weight: 700; font-size: 14px; padding: 8px 12px; border-radius: 999px; text-decoration: none; cursor: pointer;
}
.account .hint { margin-top: 10px; }
.method-ok { margin: 0; padding: 12px 14px; border: 1px solid var(--violet); border-radius: 12px; font-weight: 700; }
.soon { margin: 0; color: var(--muted); }
.soon strong { color: var(--gold); }
.banner { width: 100%; border-radius: var(--radius); display: block; }
.buy { display: grid; gap: 12px; }
.section { display: flex; align-items: center; gap: 8px; font-size: 19px; margin: 4px 0 0; }
.coin { flex: none; vertical-align: middle; }
.packages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pkg { position: relative; display: block; cursor: pointer; font-weight: 400; }
.pkg input { position: absolute; opacity: 0; pointer-events: none; }
.pkg-body {
  display: grid; justify-items: center; gap: 6px; padding: 16px 10px; text-align: center;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); height: 100%;
}
.pkg input:checked + .pkg-body { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.pkg input:focus-visible + .pkg-body { outline: 2px solid var(--violet); outline-offset: 2px; }
.coins { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.coins b { font-weight: 800; }
.price { color: var(--muted); }
.bonus { width: 100%; background: rgba(255, 200, 61, .12); color: var(--ink); border-radius: 10px; padding: 6px 4px; font-size: 14px; }
.bonus b { color: var(--gold); }
.empty { color: var(--muted); margin: 0; }
.paybar {
  position: sticky; bottom: 0; display: grid; gap: 8px; margin: 0 calc(-1 * var(--space));
  padding: 12px var(--space) calc(10px + env(safe-area-inset-bottom)); background: var(--canvas);
  border-top: 1px solid var(--border); box-shadow: 0 -10px 24px rgba(14, 6, 32, .85);
}
.weekly { margin: 0; text-align: center; color: var(--gold); font-weight: 600; font-size: 14px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--muted); }
.agree input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--magenta); flex: none; }
.agree a { color: var(--magenta); }
.note { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.facts { display: grid; gap: 8px; margin: 0 0 12px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding: 6px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: end; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.order.state-paid h1 { color: var(--mint); }
.order.state-failed h1, .order.state-cancelled h1, .order.state-expired h1 { color: var(--alert); }
.order form { margin: 0; }
@media (min-width: 640px) {
  main { padding-top: 28px; }
  .packages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
