/* LEVANT register — dark fantasy, gold on near-black (matches the LEVANT launcher palette) */
:root {
  color-scheme: dark;
  --bg: #0a0806;
  --panel: rgba(14, 11, 8, 0.84);
  --panel-edge: rgba(212, 175, 55, 0.28);
  --gold: #d4af37;
  --gold-light: #f3dc8a;
  --gold-deep: #9a7a1c;
  --text: #f4ede0;
  --dim: #b3a892;
  --input: rgba(8, 6, 4, 0.72);
  --line: rgba(212, 175, 55, 0.22);
  --err: #ff8a80;
  --ok: #4ade80;
  --warn: #fbbf24;
  --radius: 14px;
  --font-body: 'Cairo', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --font-display: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
}
:root[dir='rtl'] { --font-heading: 'Cairo', var(--font-body); }
:root[dir='ltr'] { --font-heading: var(--font-display); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  overflow-x: hidden;
}
.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(10, 8, 6, 0.55) 0%, rgba(10, 8, 6, 0.86) 45%, var(--bg) 100%),
    url('/assets/bg.webp') center top / cover no-repeat;
}
a { color: var(--gold-light); text-underline-offset: 3px; }
a:hover { color: #fff3c4; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--gold); color: #120d05; padding: 8px 14px; border-radius: 8px; z-index: 10; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; max-width: 1100px; width: 100%; margin: 0 auto; }
.brand img { display: block; width: 120px; height: auto; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.7)); }
.lang {
  font: 600 14px/1 var(--font-body); color: var(--gold-light); background: rgba(10, 8, 6, 0.6);
  border: 1px solid var(--panel-edge); border-radius: 999px; padding: 10px 16px; cursor: pointer; min-height: 40px;
}
.lang:hover { border-color: var(--gold); background: rgba(212, 175, 55, 0.1); }

.wrap { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 32px; }
.card {
  position: relative; background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius);
  padding: 28px 22px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(243, 220, 138, 0.08);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(160deg, rgba(243, 220, 138, 0.55), transparent 35%, transparent 65%, rgba(212, 175, 55, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.kicker { margin: 0; color: var(--gold); font: 600 13px/1.4 var(--font-body); letter-spacing: 0.18em; text-transform: uppercase; text-align: center; }
:root[dir='rtl'] .kicker { letter-spacing: 0; font-size: 15px; }
h1 {
  margin: 6px 0 8px; text-align: center; font: 700 clamp(26px, 6vw, 34px)/1.25 var(--font-heading);
  background: linear-gradient(180deg, #fff6d6 0%, var(--gold-light) 40%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h1:focus { outline: none; }
.lead { margin: 0 auto; max-width: 42ch; text-align: center; color: var(--dim); }
.rule { display: flex; justify-content: center; margin: 18px 0 20px; }
.rule span { width: 70%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); position: relative; }
.rule span::after { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; background: #d9534f; border: 1px solid var(--gold-light); transform: translate(-50%, -50%) rotate(45deg); box-shadow: 0 0 10px rgba(217, 83, 79, 0.8); }

.field { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
label small { color: var(--dim); font-weight: 400; }
input[type='text'], input[type='password'], input[type='email'] {
  width: 100%; min-height: 48px; padding: 11px 14px; font: 500 16px/1.4 var(--font-body);
  color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover { border-color: rgba(212, 175, 55, 0.45); }
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22); }
input[aria-invalid='true'] { border-color: var(--err); }
input[aria-invalid='true']:focus { box-shadow: 0 0 0 3px rgba(255, 138, 128, 0.22); }
.hint { margin: 6px 0 0; color: var(--dim); font-size: 13.5px; line-height: 1.55; }
.hint.center { text-align: center; }
.err { margin: 6px 0 0; color: var(--err); font-size: 14px; font-weight: 600; }
.err:empty { display: none; }

/* the password box is always left-to-right (ASCII), so the toggle sits on the right in both languages */
.pw { position: relative; direction: ltr; }
.pw input { padding-right: 84px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 36px; min-width: 64px; padding: 4px 10px; border-radius: 8px; cursor: pointer;
  font: 600 13px/1 var(--font-body); color: var(--gold-light); background: rgba(212, 175, 55, 0.08); border: 1px solid var(--line);
}
.eye:hover { background: rgba(212, 175, 55, 0.18); }
:root[dir='rtl'] .eye { direction: rtl; }

.meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13.5px; color: var(--dim); }
.bars { display: flex; gap: 4px; }
.bars i { width: 34px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); transition: background 0.2s; }
.meter[data-score='1'] .bars i:nth-child(-n + 1) { background: var(--err); }
.meter[data-score='2'] .bars i:nth-child(-n + 2) { background: var(--warn); }
.meter[data-score='3'] .bars i:nth-child(-n + 3) { background: #a3d65c; }
.meter[data-score='4'] .bars i { background: var(--ok); }
.meter b { color: var(--text); font-weight: 600; }

.check { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.check input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--gold); cursor: pointer; }
.check label { font-weight: 400; margin: 0; cursor: pointer; }
.check .err { grid-column: 1 / -1; }

.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.captcha { display: flex; flex-direction: column; align-items: center; min-height: 74px; margin: 6px 0 14px; }
.captcha .hint:empty, .captcha .hint[hidden] { display: none; }

.status { min-height: 0; margin-bottom: 12px; padding: 0; border-radius: 10px; font-weight: 600; text-align: center; }
.status:not(:empty) { padding: 12px 14px; background: rgba(255, 138, 128, 0.1); border: 1px solid rgba(255, 138, 128, 0.4); color: var(--err); }

.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px;
  padding: 12px 20px; border: 1px solid #f7e7a6; border-radius: 12px; cursor: pointer; text-decoration: none;
  font: 700 18px/1 var(--font-heading); letter-spacing: 0.04em; color: #1c1406;
  background: linear-gradient(180deg, #f8e7a1 0%, var(--gold) 52%, var(--gold-deep) 100%);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
.cta:hover { filter: brightness(1.06); box-shadow: 0 12px 36px rgba(212, 175, 55, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.6); color: #1c1406; }
.cta:active { transform: translateY(1px); }
.cta[disabled] { cursor: progress; filter: saturate(0.6) brightness(0.85); }
.cta.small { width: auto; min-height: 46px; font-size: 16px; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(28, 20, 6, 0.3); border-top-color: #1c1406; animation: spin 0.8s linear infinite; }
.cta[aria-busy='true'] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.done { text-align: center; }
.seal {
  width: 72px; height: 72px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 50%;
  font-size: 34px; color: #1c1406; background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 60%, var(--gold-deep));
  box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.15), 0 0 40px rgba(212, 175, 55, 0.45);
}
.acct { font: 700 24px/1.3 'Cinzel', monospace; color: var(--gold-light); margin: 4px 0 12px; word-break: break-all; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; }
.ghost { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 18px; border: 1px solid var(--panel-edge); border-radius: 12px; text-decoration: none; font-weight: 600; }
.ghost:hover { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); }
.link { background: none; border: 0; color: var(--dim); text-decoration: underline; cursor: pointer; font: 600 14px var(--font-body); min-height: 44px; padding: 0 8px; }

.foot { text-align: center; color: var(--dim); font-size: 13.5px; padding: 8px 16px 28px; }
.foot p { margin: 4px 0; }
.foot .copy { opacity: 0.7; }
.foot .official { color: var(--text, #f3e9d2); font-weight: 600; }
.noscript { text-align: center; color: var(--warn); padding: 12px 16px; }

@media (min-width: 600px) {
  .card { padding: 36px 40px 32px; }
  .brand img { width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .cta, .card { border: 1px solid CanvasText; }
  h1 { color: CanvasText; background: none; }
}

/* terms page */
.terms h2 { color: var(--gold-light); font: 700 19px/1.4 var(--font-heading); margin: 22px 0 6px; }
.terms ol, .terms ul { padding-inline-start: 22px; margin: 6px 0; }
.terms li { margin: 4px 0; }
.terms section[hidden] { display: none; }
.back { display: inline-block; margin-top: 20px; }
