/* auth.css — shared styling for the themed continuous-MMO auth pages
   (play-login.php, play-register.php). Matches play.php's dark/gold identity. */

:root {
  --pl-bg:      #0b0c10;
  --pl-bg-2:    #12151c;
  --pl-panel:   #161a22;
  --pl-border:  #2a2f3a;
  --pl-gold:    #c08b2f;
  --pl-gold-lt: #f3e2b0;
  --pl-emerald: #49a477;
  --pl-amber:   #f1a64c;
  --pl-text:    #e8e6df;
  --pl-muted:   #9aa0ab;
  --pl-head:    Georgia, 'Times New Roman', serif;
  --pl-body:    system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

.pl-auth-body {
  margin: 0; min-height: 100vh;
  font-family: var(--pl-body); color: var(--pl-text);
  background:
    radial-gradient(1100px 480px at 80% -10%, rgba(192,139,47,0.16), transparent 60%),
    linear-gradient(160deg, var(--pl-bg-2), var(--pl-bg));
}

.pl-auth-shell {
  display: grid; grid-template-columns: 1.05fr 1fr;
  min-height: 100vh; max-width: 1180px; margin: 0 auto;
}

/* ---------- Aside (pitch / news) ---------- */
.pl-auth-aside {
  position: relative; overflow: hidden;
  padding: 56px 52px; display: flex; flex-direction: column;
  border-right: 1px solid var(--pl-border);
}
.pl-auth-aside::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("../img/screenshots/chsh_iso.webp");
  background-size: cover; background-position: center;
  opacity: 0.07; mix-blend-mode: luminosity;
}
.pl-auth-aside > * { position: relative; z-index: 1; }

.pl-auth-brand {
  display: inline-flex; align-items: center; gap: 13px;
  font-family: var(--pl-head); font-size: 22px; font-weight: 700;
  letter-spacing: 1px; color: var(--pl-gold-lt); text-decoration: none; margin-bottom: 44px;
}
.pl-auth-brand > span span { color: var(--pl-gold); }
.pl-auth-logo {
  width: 52px; height: 52px; display: block; flex: 0 0 auto;
  border-radius: 10px; object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5));
}

.pl-auth-aside h1 {
  font-family: var(--pl-head); font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08; color: #fff; margin: 0 0 20px;
}
.pl-auth-aside h1 em { color: var(--pl-gold-lt); font-style: italic; }
.pl-auth-aside > p { color: var(--pl-text); font-size: 16px; line-height: 1.6; max-width: 380px; }

.pl-auth-points { list-style: none; padding: 0; margin: 26px 0 0; }
.pl-auth-points li {
  position: relative; padding-left: 26px; margin-bottom: 12px;
  color: var(--pl-muted); font-size: 15px;
}
.pl-auth-points li::before { content: "◆"; position: absolute; left: 0; color: var(--pl-gold); font-size: 11px; top: 2px; }

/* ---------- Community / social row ---------- */
.pl-auth-social { margin-top: 26px; }
.pl-auth-social-label {
  display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--pl-muted); margin-bottom: 10px;
}
.pl-auth-social-row { display: flex; gap: 10px; }
.pl-auth-social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 9px;
  background: var(--pl-panel); border: 1px solid var(--pl-border);
  transition: border-color .12s ease, transform .12s ease;
}
.pl-auth-social-row a:hover { border-color: var(--pl-gold); transform: translateY(-1px); }
.pl-auth-social-row img { width: 20px; height: 20px; display: block; object-fit: contain; }

.pl-auth-back {
  margin-top: auto; padding-top: 28px;
  color: var(--pl-muted); text-decoration: none; font-size: 14px;
}
.pl-auth-back:hover { color: var(--pl-gold-lt); }

/* ---------- Legal footer (Impressum / Privacy) — mirrors play.php ---------- */
.pl-auth-footer {
  width: 100%; border-top: 1px solid var(--pl-border); background: var(--pl-bg);
  padding: 18px 28px; text-align: center; color: var(--pl-muted); font-size: 13px;
}
.pl-auth-footer a { color: var(--pl-muted); text-decoration: none; margin: 0 10px; }
.pl-auth-footer a:hover { color: var(--pl-gold-lt); }

/* ---------- News list (login page) ---------- */
.pl-auth-news-intro { color: var(--pl-muted); font-size: 14px; margin-top: -8px; }
.pl-news-list { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.pl-news-item {
  background: rgba(22,26,34,0.7); border: 1px solid var(--pl-border);
  border-left: 3px solid var(--pl-gold); border-radius: 8px; padding: 14px 16px;
}
.pl-news-date {
  display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--pl-gold); font-weight: 700; margin-bottom: 6px;
}
.pl-news-item p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--pl-text); }
.pl-news-more { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--pl-gold-lt); text-decoration: none; }
.pl-news-more:hover { text-decoration: underline; }

/* ---------- Known defects (login page) ---------- */
.pl-defects-kicker {
  font-family: var(--pl-head); font-size: 22px; color: #fff;
  margin: 32px 0 10px; line-height: 1.2;
}
.pl-defects-list { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.pl-defect-item {
  background: rgba(22,26,34,0.7); border: 1px solid var(--pl-border);
  border-left: 3px solid var(--pl-amber); border-radius: 8px; padding: 14px 16px;
}
.pl-defect-item.pl-defect-major { border-left-color: #f3b6ad; }
.pl-defect-title {
  display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--pl-amber); font-weight: 700; margin-bottom: 6px;
}
.pl-defect-item.pl-defect-major .pl-defect-title { color: #f3b6ad; }
.pl-defect-item p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--pl-text); }

/* ---------- Main (form) ---------- */
.pl-auth-main {
  display: flex; align-items: center; justify-content: center; padding: 48px 40px;
}
.pl-auth-card { width: 100%; max-width: 420px; }
.pl-auth-card h2 {
  font-family: var(--pl-head); font-size: 30px; color: #fff; margin: 0 0 6px;
}
.pl-auth-sub { color: var(--pl-muted); font-size: 15px; margin: 0 0 26px; }
.pl-auth-sub a, .pl-auth-notice a, .pl-news-more { color: var(--pl-gold-lt); }
.pl-auth-sub a:hover { text-decoration: underline; }

/* ---------- Form ---------- */
.pl-auth-form { display: flex; flex-direction: column; gap: 16px; }
.pl-auth-form label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.pl-auth-form label span { color: var(--pl-text); font-weight: 600; }
.pl-auth-form label small { color: var(--pl-muted); font-weight: 400; }
.pl-auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pl-auth-row label { gap: 7px; }

.pl-auth-form input {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: var(--pl-body);
  color: #fff; background: var(--pl-bg-2);
  border: 1px solid var(--pl-border); border-radius: 8px; outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.pl-auth-form input::placeholder { color: #5f6672; }
.pl-auth-form input:focus {
  border-color: var(--pl-gold);
  box-shadow: 0 0 0 3px rgba(192,139,47,0.18);
}

.pl-auth-btn {
  margin-top: 6px; padding: 14px 22px; cursor: pointer;
  font-family: var(--pl-body); font-size: 16px; font-weight: 700; letter-spacing: .4px;
  color: #1a1206; border: 1px solid #e6c878; border-radius: 8px;
  background: linear-gradient(180deg, #d49a3a, #a9741f);
  box-shadow: 0 4px 14px rgba(192,139,47,0.28);
  transition: transform .12s ease, box-shadow .12s ease;
}
.pl-auth-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(192,139,47,0.42); }
.pl-auth-fineprint { color: var(--pl-muted); font-size: 12px; line-height: 1.5; margin: 4px 0 0; }

/* ---------- Notices / errors ---------- */
.pl-auth-errors { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.pl-auth-error {
  background: rgba(180,60,50,0.12); border: 1px solid rgba(200,80,70,0.45);
  color: #f3b6ad; padding: 10px 13px; border-radius: 7px; font-size: 14px;
}
.pl-auth-error-detail { margin-top: 6px; color: #e8cfa0; opacity: 0.95; }
/* Maintenance notice card (login closed): hazard stripe + calm copy. */
.pl-maint {
  border: 1px solid rgba(200,80,70,0.45); border-radius: 10px; overflow: hidden;
  margin-bottom: 20px; background: rgba(180,60,50,0.08);
}
.pl-maint-stripe {
  height: 6px;
  background: repeating-linear-gradient(45deg, #c08b2f 0 14px, #14161c 14px 28px);
}
.pl-maint-body { padding: 16px 18px; text-align: center; }
.pl-maint-body h3 {
  margin: 0 0 8px; font-family: Georgia, serif; font-size: 18px;
  color: var(--pl-gold-lt, #f3e2b0);
}
.pl-maint-reason { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #f3b6ad; }
.pl-maint-eta    { margin: 0 0 8px; font-size: 13px; color: #e8cfa0; }
.pl-maint-note   { margin: 0; font-size: 13px; color: #9aa0ab; line-height: 1.5; }
.pl-maint-kicked { margin: 10px 0 0; font-size: 13px; color: #f3b6ad;
  border-top: 1px solid rgba(200,80,70,0.3); padding-top: 10px; }
.pl-auth-notice {
  background: rgba(192,139,47,0.10); border: 1px solid rgba(192,139,47,0.4);
  color: var(--pl-gold-lt); padding: 12px 14px; border-radius: 7px; font-size: 14px;
  line-height: 1.5; margin-bottom: 20px;
}
.pl-auth-notice.pl-auth-ok {
  background: rgba(73,164,119,0.12); border-color: rgba(73,164,119,0.45); color: #bfe9d3;
}

/* ---------- #230 — waitlist offered when registration is invite-only ---------- */
.pl-reg-waitlist { margin-top: 4px; }
.pl-reg-waitlist h3 {
  margin: 0 0 4px; font-family: Georgia, 'Times New Roman', serif;
  color: var(--pl-gold-lt); font-size: 18px;
}
.pl-reg-wl-sub { margin: 0 0 14px; color: var(--pl-muted); font-size: 14px; line-height: 1.5; }
.pl-reg-wl-form { display: flex; flex-direction: column; gap: 10px; }
.pl-reg-wl-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.pl-reg-wl-row input[type="email"] {
  flex: 1 1 220px; min-width: 0; padding: 12px 14px; font-size: 15px; font-family: var(--pl-body);
  color: #fff; background: var(--pl-bg-2);
  border: 1px solid var(--pl-border); border-radius: 8px; outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.pl-reg-wl-row input[type="email"]::placeholder { color: #5f6672; }
.pl-reg-wl-row input[type="email"]:focus {
  border-color: var(--pl-gold); box-shadow: 0 0 0 3px rgba(192,139,47,0.18);
}
.pl-reg-wl-row .pl-auth-btn { flex: 0 0 auto; width: auto; white-space: nowrap; }
.pl-reg-wl-flash:empty { display: none; }
.pl-reg-wl-flash .pl-flash { margin: 0 0 12px; padding: 11px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.pl-reg-wl-flash .pl-flash.ok  { background: rgba(73,164,119,0.14); border: 1px solid rgba(73,164,119,0.5); color: #bfe9d3; }
.pl-reg-wl-flash .pl-flash.err { background: rgba(214,90,90,0.16);  border: 1px solid rgba(214,90,90,0.55); color: #f4c0c0; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .pl-auth-shell { grid-template-columns: 1fr; }
  .pl-auth-aside { border-right: none; border-bottom: 1px solid var(--pl-border); padding: 40px 32px; }
  .pl-auth-back { display: none; }
  .pl-auth-main { padding: 36px 28px; }
}

/* ---- "Invited by" banner (Friends of Ours referral #114) ----------------- */
/* Sits at the top of the left aside, above the headline, when a ?ref= resolves
   to a real inviter. Warm gold card; never disrupts the signup flow. */
.pl-invited-by {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
  padding: 14px 16px;
  max-width: 400px;
  background: linear-gradient(180deg, rgba(192,139,47,0.16), rgba(192,139,47,0.06));
  border: 1px solid var(--pl-gold);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}
.pl-invited-avatar {
  width: 48px; height: 48px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pl-gold);
  background: var(--pl-panel);
}
.pl-invited-avatar--blank {
  display: flex; align-items: center; justify-content: center;
  color: var(--pl-gold); font-size: 22px; line-height: 1;
}
.pl-invited-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pl-invited-who {
  font-family: var(--pl-body);
  font-size: 14px; color: var(--pl-text);
}
.pl-invited-who strong { color: var(--pl-gold-lt); font-weight: 700; }
.pl-invited-lore {
  font-family: var(--pl-head);
  font-style: italic;
  font-size: 13px; line-height: 1.4;
  color: var(--pl-muted);
}

/* ---------- Language chooser (shared by play-login.php / play-register.php) ----------
   Mirrors the .pl-lang widget on play.php so the auth pages carry the same
   gold/dark switcher. Fixed top-right, above the shell, on every viewport. */
.pl-lang {
  position: fixed; top: 18px; right: 20px; z-index: 120;
}
.pl-lang-btn {
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  background: var(--pl-panel); color: var(--pl-text);
  border: 1px solid var(--pl-border); border-radius: 7px; padding: 8px 12px;
  font-size: 14px; font-family: var(--pl-body);
  transition: border-color .12s ease;
}
.pl-lang-btn:hover { border-color: var(--pl-gold); }
.pl-lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); display: none;
  min-width: 168px; background: var(--pl-panel); border: 1px solid var(--pl-border);
  border-radius: 10px; padding: 6px; box-shadow: 0 14px 34px rgba(0,0,0,0.5);
}
.pl-lang.open .pl-lang-menu { display: block; }
.pl-lang-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer;
  background: transparent; color: var(--pl-text); border: 0; border-radius: 7px;
  padding: 9px 11px; font-size: 14px; font-family: var(--pl-body); text-align: left;
}
.pl-lang-menu button:hover { background: var(--pl-bg-2); }
.pl-lang-menu button.active { color: var(--pl-gold-lt); }
.pl-lang-menu button.active::after { content: "\2713"; margin-left: auto; color: var(--pl-gold); }
