/* Shared styles for the account pages (register, login, verify, account).
   Tokens match index.html so both themes look the same as the landing page. */
:root {
  --bg: #f6f9ff; --bg2: #ffffff; --panel: #ffffff; --panel2: #f1f5fc; --line: #dfe6f2;
  --ink: #142033; --mut: #5b6880; --faint: #8b97ad;
  --sky-a: #2b6fe0; --sky-b: #4fb3ff; --sky-c: #a9dcff;
  --grass: #5cc43c; --grass-d: #3e9b25; --grass-top: #86e05f; --dirt: #a36a3d; --dirt-d: #84532e;
  --gold: #ffc531; --gold-d: #f29b0c; --gold-ink: #3b2300; --gold-shadow: #b86d00;
  --accent: #2b6fe0; --ok: #1f9a54; --soon: #c07a00; --bad: #d93c43;
  --shadow: 0 10px 30px rgba(20, 32, 51, .10); --shadow-lg: 0 24px 60px rgba(20, 32, 51, .16);
  --hero-ink: #ffffff; --star: transparent; --field: #ffffff;
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --bg2: #0e1428; --panel: #131a31; --panel2: #18213d; --line: #243052;
    --ink: #eef2fb; --mut: #a3aec8; --faint: #6f7b99;
    --sky-a: #070b1a; --sky-b: #16204a; --sky-c: #2b3a78;
    --grass: #3f9a2c; --grass-d: #2b7420; --grass-top: #5cbf40; --dirt: #6f4628; --dirt-d: #55351e;
    --accent: #7db4ff; --ok: #45d394; --soon: #f0b429; --bad: #ff7b80;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
    --star: rgba(255, 255, 255, .85); --field: #0e1428;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020; --bg2: #0e1428; --panel: #131a31; --panel2: #18213d; --line: #243052;
  --ink: #eef2fb; --mut: #a3aec8; --faint: #6f7b99;
  --sky-a: #070b1a; --sky-b: #16204a; --sky-c: #2b3a78;
  --grass: #3f9a2c; --grass-d: #2b7420; --grass-top: #5cbf40; --dirt: #6f4628; --dirt-d: #55351e;
  --accent: #7db4ff; --ok: #45d394; --soon: #f0b429; --bad: #ff7b80;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
  --star: rgba(255, 255, 255, .85); --field: #0e1428;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 500 16px/1.6 Nunito, system-ui, sans-serif; transition: background .3s, color .3s; overflow-x: hidden; }
h1, h2, h3, .display { font-family: 'Lilita One', Nunito, sans-serif; font-weight: 400; letter-spacing: .3px; }
a { color: var(--accent); font-weight: 800; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

/* top bar: always on the sky, like the landing hero */
.top { position: relative; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: 'Lilita One'; font-weight: 400; font-size: 21px;
  color: var(--hero-ink); text-shadow: 0 2px 0 rgba(0,0,0,.25); min-width: 0; white-space: nowrap; }
.brand-mark { flex: none; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(180deg, var(--gold), var(--gold-d));
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); display: grid; place-items: center; }
.brand-mark i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--gold-ink); position: relative; }
.brand-mark i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #e64b3c; }
.brand b { color: var(--gold); font-weight: 400; }
.top .links { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.top .links a { white-space: nowrap; text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 10px; color: var(--hero-ink); opacity: .92; }
.top .links a:hover { opacity: 1; background: rgba(255,255,255,.14); }
.theme-btn { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(255,255,255,.18); color: var(--hero-ink); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}

/* sky + ground behind the card */
.sky { position: relative; color: var(--hero-ink);
  background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 70%, var(--sky-c) 100%); transition: background .4s; }
.stars { position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(1.5px 1.5px at 12% 18%, var(--star), transparent 60%), radial-gradient(1.5px 1.5px at 32% 8%, var(--star), transparent 60%),
    radial-gradient(1px 1px at 48% 26%, var(--star), transparent 60%), radial-gradient(2px 2px at 66% 12%, var(--star), transparent 60%),
    radial-gradient(1px 1px at 78% 30%, var(--star), transparent 60%), radial-gradient(1.5px 1.5px at 90% 14%, var(--star), transparent 60%); }
.ground { height: 46px; background: linear-gradient(180deg, var(--grass-top) 0 10px, var(--grass) 10px 30px, var(--dirt) 30px 100%); position: relative; }
.ground::before { content: ""; position: absolute; inset: 10px 0 16px; background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(0,0,0,.08) 46px 48px); }
.sky-head { position: relative; padding: 18px 0 72px; text-align: center; }
.sky-head h1 { margin: 0; font-size: clamp(34px, 6vw, 52px); line-height: 1.02; text-shadow: 0 4px 0 rgba(0,0,0,.22); }
.sky-head p { margin: 10px auto 0; max-width: 520px; opacity: .95; font-size: 18px; }

main { flex: 1; }
.card-wrap { position: relative; z-index: 3; margin: -64px auto 0; padding: 0 16px 64px; width: 100%; max-width: 480px; }
.card-wrap.wide { max-width: 880px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg); }
.card + .card { margin-top: 16px; }
.card h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.1; }
.card .muted, .muted { color: var(--mut); }
.card-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--mut); text-align: center; font-size: 15px; }
.card-foot .sep { margin: 0 8px; color: var(--faint); }

/* form */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 800; font-size: 15px; }
.form label small { font-weight: 600; color: var(--faint); font-size: 13px; }
.form input { width: 100%; font: 600 16px Nunito, system-ui, sans-serif; color: var(--ink); background: var(--field); border: 2px solid var(--line);
  border-radius: 14px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
.form input:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.form input[aria-invalid="true"] { border-color: var(--bad); }
.field-err { color: var(--bad); font-size: 13px; font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; font-family: 'Lilita One'; font-weight: 400;
  font-size: 20px; padding: 13px 24px; border-radius: 16px; color: var(--gold-ink); background: linear-gradient(180deg, var(--gold), var(--gold-d));
  box-shadow: 0 5px 0 var(--gold-shadow), 0 12px 24px rgba(0,0,0,.14); transition: transform .08s, box-shadow .08s; border: 0; cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gold-shadow); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.btn.block { width: 100%; margin-top: 4px; }
.btn.sm { font-size: 17px; padding: 9px 18px; border-radius: 13px; box-shadow: 0 4px 0 var(--gold-shadow); }
.btn.soft { background: var(--panel2); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.soft:active { box-shadow: inset 0 0 0 2px var(--line); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: var(--accent); cursor: pointer; text-decoration: underline; }
.link-btn[disabled] { opacity: .6; cursor: progress; }

/* messages */
.msg { border-radius: 14px; padding: 12px 14px; font-weight: 700; font-size: 15px; }
.msg.err { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.msg.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.msg.info { color: var(--ink); background: var(--panel2); border: 1px solid var(--line); font-weight: 600; }
.msg p { margin: 0; }
.msg p + p, .msg p + .actions, .msg .actions { margin-top: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }

.dev-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  border: 2px dashed color-mix(in srgb, var(--soon) 55%, transparent); background: color-mix(in srgb, var(--soon) 8%, transparent); }
.dev-link span { color: var(--mut); font-size: 13px; font-weight: 700; }

/* big status icon (verify / check email) */
.status { text-align: center; }
.status .orb { width: 72px; height: 72px; margin: 4px auto 14px; border-radius: 22px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #5ba8ff, #2b6fe0); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); }
.status .orb svg { width: 34px; height: 34px; }
.status .orb.ok { background: linear-gradient(180deg, var(--grass-top), var(--grass-d)); }
.status .orb.bad { background: linear-gradient(180deg, #ff8a8f, #d93c43); }
.status .orb.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status p { margin: 6px 0 0; }
.status .btn { margin-top: 20px; }

/* account dashboard */
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.acct-grid > .card { margin: 0; }
.acct-grid .full { grid-column: 1 / -1; }
.who { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar { flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-family: 'Lilita One'; font-size: 26px;
  color: var(--gold-ink); background: linear-gradient(180deg, var(--gold), var(--gold-d)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.who .grow { flex: 1 1 180px; min-width: 0; }
.who h2 { overflow-wrap: anywhere; }
.who .email { color: var(--mut); font-weight: 700; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.badge.warn { color: var(--soon); background: color-mix(in srgb, var(--soon) 14%, transparent); }
.eyebrow { display: inline-block; font-weight: 900; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--mut); font-weight: 700; }
.kv b { font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 8px; }
.tile { background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; padding: 12px; min-width: 0; }
.tile b { display: block; font-family: 'Lilita One'; font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; }
.tile span { color: var(--mut); font-weight: 800; font-size: 13px; }
.tile.trophies b { color: var(--gold-d); } .tile.gems b { color: #c04fd8; } .tile.gold b { color: var(--soon); }
:root[data-theme="dark"] .tile.gems b { color: #e08cff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile.gems b { color: #e08cff; } }
.empty-game { display: flex; gap: 14px; align-items: flex-start; padding: 16px; margin-top: 12px; border-radius: 16px; background: var(--panel2); border: 1px dashed var(--line); }
.empty-game .ico { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #ffd46b, #f29b0c); box-shadow: inset 0 -4px 0 rgba(0,0,0,.14); }
.empty-game .ico svg { width: 22px; height: 22px; }
.empty-game p { margin: 0; }

.steps { display: grid; gap: 12px; counter-reset: s; margin-top: 14px; }
.step { display: flex; gap: 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.step::before { counter-increment: s; content: counter(s); flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-family: 'Lilita One'; font-size: 20px; color: #fff; background: linear-gradient(180deg, var(--grass-top), var(--grass-d)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.step h3 { margin: 0 0 2px; font-size: 19px; }
.step p { margin: 0; color: var(--mut); }
.step.done::before { content: "✓"; }

.skeleton { height: 14px; border-radius: 8px; background: var(--panel2); margin: 10px 0; animation: shimmer 1.2s ease-in-out infinite; }
@keyframes shimmer { 50% { opacity: .5; } }

footer { background: var(--bg2); border-top: 1px solid var(--line); color: var(--mut); padding: 24px 0; font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--mut); }

@media (max-width: 720px) {
  .acct-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .top .links a.hide-sm { display: none; }
  .top .links a { padding: 8px 10px; }
  .brand { font-size: 18px; }
  .top .brand b { display: none; }
  .card { padding: 22px 18px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles .tile.trophies { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 480px) {
  .who { gap: 12px; }
  .who .grow { flex-basis: calc(100% - 74px); }
  .who #logout { margin-left: auto; }
}
