/* ══════════════════════════════════════════════════════════════════
   AUTH.CSS — the centred-card look shared by the two "get in" pages:
     login.html  (log in / create account)
     demo.html   (the demo-password gate in front of everything)
   Both use the same ids (#login-card, #login-title, #login-error, ...) so
   this one file styles both. Load it AFTER styles/common.css (which holds
   the palette, fonts and reset it uses).
   ══════════════════════════════════════════════════════════════════ */

/* (The box-sizing/margin/padding reset is in styles/common.css.) */
/* The centring and the background go on <body> only. (They used to be on
   `html, body` together: <html> then centred <body> as a narrow column the
   width of the card, and both drew the gradient — a visible lighter band
   behind the card.) <html> just fills the window in the same base colour. */
html {
  height: 100%;
  background: var(--bg-canvas);
}
body {
  min-height: 100%;
  /* A soft radial "spotlight" gradient behind the login card, rather
     than a flat background color — brightest at the center, fading
     toward the edges. */
  background: radial-gradient(circle at 50% 40%, #3a5a7b 0%, var(--bg-canvas) 60%, #16283a 100%);
  color: var(--text-primary);
  font-family: var(--ff-body);
  font-size: 13px;
  /* Centers #login-card both horizontally and vertically in the
     viewport, regardless of window size. */
  display: flex;
  align-items: center;
  justify-content: center;
}

#login-card {
  width: 340px;
  background: var(--bg-panel);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 50px rgba(0,0,0,0.5);
  padding: 34px 30px 28px;
}

#login-title {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 4px;
}

#login-subtitle {
  font-size: 11px;
  text-align: center;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 26px;
}

.field-group {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-family: var(--ff-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--ff-body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.field-input::placeholder { color: var(--text-muted); }
.field-input:focus {
  border-color: var(--border-gold);
  background: rgba(0,0,0,0.45);
}

/* Error banner shown by login.js's showError() when a login attempt
   fails. Hidden by default — the .visible class (toggled from JS)
   is what actually reveals it. */
#login-error {
  display: none;
  font-size: 11px;
  color: var(--error);
  background: rgba(200,90,75,0.1);
  border: 1px solid rgba(200,90,75,0.35);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 16px;
}
#login-error.visible { display: block; }

/* A friendly (not-an-error) message in the same spot, e.g. "Account
   created". Shown by login.js's showNotice(). */
#login-notice {
  display: none;
  font-size: 11px;
  color: var(--gold-bright);
  background: rgba(200,168,75,0.08);
  border: 1px solid rgba(200,168,75,0.3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 16px;
}
#login-notice.visible { display: block; }

/* (The [hidden] rule that keeps the form not showing really hidden is in
   styles/common.css.) */

/* A small hint under a field (e.g. about the faction choices). */
.field-hint {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-muted);
}
select.field-input option { background: var(--bg-panel); color: var(--text-primary); }

/* The card's main button: "Log In" / "Create Account" on login.html,
   "Enter" on demo.html. */
#login-btn, #signup-btn, #demo-btn {
  width: 100%;
  padding: 11px;
  font-family: var(--ff-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg-panel);
  background: var(--gold);
  border: 1px solid var(--gold-bright);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
#login-btn:hover, #signup-btn:hover, #demo-btn:hover { background: var(--gold-bright); }
/* Applied by login.js's setLoading() while a request is in flight,
   so the player can't double-submit a form. */
#login-btn:disabled, #signup-btn:disabled, #demo-btn:disabled {
  opacity: 0.6;
  cursor: default;
  background: var(--gold-dim);
}
