/* ═══════════════════════════════════════════════════════════
   HEXLAND Online — Auth Page Styles  (Stage 6.2)
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  background: #12101e;
}

.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px 32px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(77,196,245,.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(120,80,220,.18) 0%, transparent 55%),
    #12101e;
}

.auth-wrap {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Logo ─────────────────────────────────────────────────── */
.auth-header {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -140px;
}

.auth-logo {
  height: 480px;
  object-fit: contain;
  filter: drop-shadow(0 4px 24px rgba(100,160,255,.3));
}

/* ── Card ─────────────────────────────────────────────────── */
.auth-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 28px 24px;
  backdrop-filter: blur(6px);
}

/* ── Tabs ─────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 22px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  color: rgba(255,255,255,.45);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.auth-tab.active {
  color: #fff;
  border-bottom-color: #4dc4f5;
}

/* ── Fields ───────────────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field-label {
  color: rgba(255,255,255,.6);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
}

.field-input::placeholder { color: rgba(255,255,255,.3); }
.field-input:focus { border-color: #4dc4f5; }

/* ── Password show/hide wrapper ───────────────────────────── */
.pw-wrap {
  position: relative;
}
.pw-wrap .field-input {
  padding-right: 40px;
}
.pw-toggle {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: rgba(255,255,255,.35);
  display: flex;
  align-items: center;
  transition: color .15s;
}
.pw-toggle:hover { color: rgba(255,255,255,.75); }
.pw-toggle.visible { color: #4dc4f5; }
.pw-eye {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-auth {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter .2s, opacity .2s;
  margin-top: 6px;
}

.btn-auth:disabled { opacity: .5; cursor: not-allowed; }
.btn-auth:not(:disabled):hover { filter: brightness(1.1); }

.btn-login    { background: linear-gradient(135deg, #3878e0, #254fa0); color: #fff; }
.btn-register { background: linear-gradient(135deg, #28b060, #1a7a42); color: #fff; }

/* ── Error / success messages ─────────────────────────────── */
.auth-msg {
  min-height: 22px;
  font-size: .85rem;
  margin-top: 10px;
  text-align: center;
  transition: opacity .3s;
}

.auth-msg.error   { color: #f47070; }
.auth-msg.success { color: #60d090; }

/* ── Verify-pending screen ────────────────────────────────── */
.verify-pending {
  text-align: center;
  padding: 8px 0 4px;
}
.verify-icon  { font-size: 2.6rem; margin-bottom: 10px; }
.verify-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.verify-sub {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  line-height: 1.55;
  margin-bottom: 16px;
}
.verify-sub strong { color: rgba(255,255,255,.9); }
.verify-resend {
  font-size: .82rem;
  color: rgba(255,255,255,.4);
  margin-bottom: 6px;
}
.resend-btn {
  background: none;
  border: none;
  color: #4dc4f5;
  font-size: .82rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.resend-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Welcome message ──────────────────────────────────────── */
.auth-welcome {
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.auth-welcome-cta {
  font-size: .84rem;
  color: rgba(255,255,255,.42);
}
.auth-cta-link {
  background: none;
  border: none;
  color: #4dc4f5;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.auth-cta-link:hover { text-decoration: underline; }

/* ── Back to lobby link ───────────────────────────────────── */
.auth-back-link {
  display: block;
  text-align: center;
  color: rgba(255,255,255,.35);
  font-size: .8rem;
  text-decoration: none;
  margin-top: 4px;
  transition: color .15s;
}
.auth-back-link:hover { color: rgba(255,255,255,.7); }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 540px) {
  .auth-logo    { height: 360px; }
  .auth-header  { margin-bottom: -110px; }
  .auth-card    { padding: 22px 16px; }
}
