/* ==========================================================================
   AUTH v2 — /login and /register (standalone pages, layout:false; they load
   only this file). The city at night behind (public/images/ui/auth-bg.jpg),
   the logo, one card with Login | Register tabs, the game's features in a
   strip under it. Dark only: the art is a night scene.
   ========================================================================== */
:root {
  --ax-bg: #07090c;
  --ax-card: rgba(12, 14, 18, .9);
  --ax-card-2: rgba(22, 25, 31, .92);
  --ax-line: rgba(255, 255, 255, .1);
  --ax-line-2: rgba(255, 255, 255, .18);
  --ax-text: #eef1f5;
  --ax-text-2: #b7bec9;
  --ax-text-3: #8590a0;
  --ax-blue: #2f8cff;
  --ax-blue-2: #1f5fb4;
  --ax-red: #ff3344;
  --ax-green: #34d26b;
  --ax-ui: 'Oswald', 'Arial Narrow', sans-serif;
  --ax-body: 'Roboto Condensed', 'Arial Narrow', -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
/* The hidden attribute always wins (a class with display: would otherwise beat it). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ax-text); font: 400 15px/1.4 var(--ax-body);
  background: var(--ax-bg) url('/images/ui/auth-bg.jpg') center top / cover no-repeat fixed;
  display: flex; flex-direction: column;
}
/* A dark pool behind the centre column and a floor at the bottom, so the
   card and the strip read over the art without hiding the characters. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 34% 62% at 50% 46%, rgba(5, 6, 9, .72) 0%, rgba(5, 6, 9, .35) 60%, transparent 100%),
    linear-gradient(180deg, rgba(5, 6, 9, .35) 0%, transparent 18%, transparent 62%, rgba(5, 6, 9, .9) 100%);
}
a { color: inherit; }
.ico { width: 1em; height: 1em; flex: none; }

/* ---------- the centre column ---------- */
.ax-main { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; padding: 32px 16px 28px; }
.ax-logo { display: block; width: min(500px, 88vw); margin: 4px 0 18px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .8)); }
.ax-logo img { display: block; width: 100%; height: auto; }

.ax-card {
  width: min(430px, 100%); background: var(--ax-card); border: 1px solid var(--ax-line-2); border-radius: 8px;
  box-shadow: 0 0 0 1px #000, 0 24px 60px -12px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.ax-card--wide { width: min(480px, 100%); }
.ax-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--ax-line); }
.ax-tabs a {
  display: grid; place-items: center; min-height: 52px; position: relative;
  font: 500 19px var(--ax-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--ax-text-3); text-decoration: none;
}
.ax-tabs a:hover { color: var(--ax-text); }
.ax-tabs a[aria-current="page"] { color: var(--ax-blue); }
.ax-tabs a[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ax-blue); box-shadow: 0 0 10px rgba(47, 140, 255, .6); }
.ax-body { padding: 20px 22px 22px; }

.ax-flash { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.ax-flash .ico { width: 18px; height: 18px; margin-top: 1px; }
.ax-flash.error { background: rgba(255, 51, 68, .12); border: 1px solid rgba(255, 51, 68, .35); color: #ffc2c8; }
.ax-flash.success { background: rgba(52, 210, 107, .12); border: 1px solid rgba(52, 210, 107, .35); color: #c4f5d5; }

/* fields: an icon inside the box, like the mock */
.ax-field { margin-bottom: 12px; }
.ax-label { display: block; margin: 0 0 5px; font: 500 13px var(--ax-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ax-text-3); }
.ax-input-wrap { position: relative; display: block; }
.ax-input-wrap > .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ax-text-3); pointer-events: none; }
.ax-input {
  width: 100%; height: 48px; padding: 0 44px 0 42px; border-radius: 6px;
  background: rgba(4, 5, 7, .75); border: 1px solid var(--ax-line-2); color: var(--ax-text);
  font: 400 16px var(--ax-body); outline: none; transition: border-color .15s, box-shadow .15s;
}
.ax-input::placeholder { color: #6c7685; }
.ax-input:focus { border-color: var(--ax-blue); box-shadow: 0 0 0 3px rgba(47, 140, 255, .2); }
.ax-input.is-invalid { border-color: var(--ax-red); }
.ax-peek { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ax-text-3); cursor: pointer; }
.ax-peek:hover { color: var(--ax-text); }
.ax-peek .ico { width: 18px; height: 18px; }
.ax-hint { display: block; margin-top: 5px; font-size: 13px; color: var(--ax-text-3); }
.ax-field-error { display: block; margin-top: 5px; font-size: 13px; color: #ff8a95; }
.ax-strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 7px; }
.ax-strength span { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); }
.ax-strength[data-score="1"] span:nth-child(-n+1) { background: var(--ax-red); }
.ax-strength[data-score="2"] span:nth-child(-n+2) { background: #f0a020; }
.ax-strength[data-score="3"] span:nth-child(-n+3) { background: #b8d23a; }
.ax-strength[data-score="4"] span { background: var(--ax-green); }

.ax-row { display: flex; justify-content: flex-end; margin: -2px 0 14px; }
.ax-link { color: var(--ax-blue); font-size: 14px; text-decoration: none; }
.ax-link:hover { text-decoration: underline; }

.ax-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; border-radius: 6px; cursor: pointer;
  font: 500 19px var(--ax-ui); letter-spacing: .06em; text-transform: uppercase; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, #3a95ff 0%, #2368c6 100%); border: 1px solid #5aa8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 18px -6px rgba(47, 140, 255, .6);
}
.ax-btn:hover { filter: brightness(1.08); }
.ax-btn:disabled { opacity: .7; cursor: default; }
.ax-btn--ghost { background: linear-gradient(180deg, #23262d, #17191e); border-color: var(--ax-line-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); font-size: 17px; }
.ax-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; font: 500 13px var(--ax-ui); letter-spacing: .1em; color: var(--ax-text-3); }
.ax-or::before, .ax-or::after { content: ''; flex: 1; height: 1px; background: var(--ax-line); }
.ax-switch { margin-top: 14px; text-align: center; font-size: 14px; color: var(--ax-text-3); }

/* the provider buttons (partials/oauth-buttons.ejs) */
.oauth-form { margin: 0 0 8px; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; border-radius: 6px; cursor: pointer;
  font: 500 15px var(--ax-body); color: var(--ax-text); background: rgba(4, 5, 7, .7); border: 1px solid var(--ax-line-2);
}
.oauth-btn:hover { border-color: rgba(255, 255, 255, .32); background: rgba(20, 22, 28, .85); }
.oauth-btn--discord .oauth-btn__mark { color: #8c9eff; }

/* register: the side picker */
.ax-side-label { display: block; margin: 4px 0 8px; font: 500 13px var(--ax-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ax-text-3); }
.ax-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ax-side {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 8px 12px; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--ax-line-2); background: rgba(4, 5, 7, .6); text-align: center; transition: border-color .15s, background .15s;
}
.ax-side input { position: absolute; opacity: 0; pointer-events: none; }
.ax-side__icon .ico { width: 30px; height: 30px; }
.ax-side__name { font: 500 18px var(--ax-ui); letter-spacing: .08em; }
.ax-side__desc { font-size: 13px; color: var(--ax-text-3); }
.ax-side--hero .ax-side__icon, .ax-side--hero .ax-side__name { color: #6fb2ff; }
.ax-side--villain .ax-side__icon, .ax-side--villain .ax-side__name { color: #ff6b77; }
.ax-side--hero:has(input:checked) { border-color: var(--ax-blue); background: rgba(47, 140, 255, .16); box-shadow: 0 0 0 1px var(--ax-blue), 0 0 18px -4px rgba(47, 140, 255, .7); }
.ax-side--villain:has(input:checked) { border-color: var(--ax-red); background: rgba(255, 51, 68, .14); box-shadow: 0 0 0 1px var(--ax-red), 0 0 18px -4px rgba(255, 51, 68, .7); }
.ax-side:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 2px; }
.ax-terms { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 16px; font-size: 14px; color: var(--ax-text-2); cursor: pointer; }
.ax-terms input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ax-blue); flex: none; }
.ax-terms a { color: var(--ax-blue); }
.ax-note { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--ax-text-3); }

/* live numbers under the card */
.ax-live { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 14px; font: 500 14px var(--ax-ui); letter-spacing: .04em; color: var(--ax-text-2); text-shadow: 0 1px 3px #000; }
.ax-live i { font-style: normal; }
.ax-live b { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
.ax-live__dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--ax-green); box-shadow: 0 0 8px var(--ax-green); vertical-align: 1px; }

/* ---------- the feature strip ---------- */
.ax-features {
  position: relative; z-index: 1; width: min(1240px, calc(100% - 32px)); margin: 0 auto;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
  background: linear-gradient(180deg, rgba(16, 18, 23, .9), rgba(9, 10, 13, .92)); border: 1px solid var(--ax-line-2); border-radius: 6px;
  box-shadow: 0 0 0 1px #000, 0 16px 40px -10px rgba(0, 0, 0, .9);
}
.ax-feature { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px 14px; text-align: center; }
.ax-feature + .ax-feature { border-left: 1px solid var(--ax-line); }
.ax-feature .ico { width: 40px; height: 40px; color: var(--c); fill: currentColor; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.ax-feature b { margin-top: 6px; font: 500 17px var(--ax-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--c); }
.ax-feature span { font: 500 12px var(--ax-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ax-text-3); }
.ax-motto { position: relative; z-index: 1; margin: 22px 16px 6px; text-align: center; font: 400 17px var(--ax-ui); letter-spacing: .32em; text-transform: uppercase; color: var(--ax-text-2); text-shadow: 0 1px 4px #000; }
.ax-sides-line { position: relative; z-index: 1; margin: 0 0 18px; text-align: center; font: 500 16px var(--ax-ui); letter-spacing: .28em; text-transform: uppercase; }
.ax-sides-line .h { color: #4ea3ff; }
.ax-sides-line .v { color: var(--ax-red); }
.ax-sides-line i { display: inline-block; width: 1px; height: 14px; margin: 0 14px; background: var(--ax-line-2); vertical-align: -1px; }

/* ---------- footer ---------- */
.ax-foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; padding: 12px 16px 18px; }
.ax-foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.ax-foot__links a { font: 500 13px var(--ax-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ax-text-3); text-decoration: none; }
.ax-foot__links a:hover { color: #fff; }
.ax-foot__social { display: flex; gap: 6px; }
.ax-foot__social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--ax-line); background: rgba(8, 9, 12, .6); }
.ax-foot__social img { width: 16px; height: 16px; opacity: .6; filter: grayscale(1) brightness(1.6); }
.ax-foot__social a:hover img { opacity: 1; filter: none; }

/* ---------- phones ---------- */
@media (max-width: 900px) {
  .ax-features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ax-feature:nth-child(5) { border-left: 0; }
  .ax-feature:nth-child(n+5) { border-top: 1px solid var(--ax-line); }
}
@media (max-width: 600px) {
  body { background-attachment: scroll; background-position: 50% top; background-size: auto 100vh; }
  body::before { background: linear-gradient(180deg, rgba(5, 6, 9, .45) 0%, rgba(5, 6, 9, .55) 40%, rgba(5, 6, 9, .9) 100%); }
  .ax-main { padding: 18px 12px 20px; }
  .ax-logo { margin: 4px 0 12px; }
  .ax-body { padding: 16px 14px 18px; }
  .ax-feature { padding: 12px 4px 10px; }
  .ax-feature .ico { width: 30px; height: 30px; }
  .ax-feature b { font-size: 14px; margin-top: 4px; }
  .ax-feature span { display: none; }
  .ax-motto { font-size: 13px; letter-spacing: .2em; }
  .ax-sides-line { font-size: 14px; }
  .ax-foot__social a { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
