*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --gold: #f5c842; --gold-light: #ffe680; --gold-dark: #c9961a;
  --purple: #7c3aed; --purple-light: #a78bfa; --purple-dim: rgba(124,58,237,.18);
  --bg-deep: #080612;
  --glass-bg: rgba(255,255,255,.07); --glass-bg-h: rgba(255,255,255,.11);
  --glass-border: rgba(255,255,255,.14); --glass-shine: rgba(255,255,255,.22);
  --text-bright: #fff; --text-soft: rgba(255,255,255,.6); --text-dim: rgba(255,255,255,.35);
  --radius: 32px; --radius-sm: 20px; --radius-xs: 12px;
}
html, body {
  min-height: 100vh; font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--bg-deep); color: var(--text-bright); overflow-x: hidden;
}

/* ── Background ── */
.bg-scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: orbFloat 14s ease-in-out infinite; }
.orb-1 { width:520px;height:520px;background:radial-gradient(circle,#7c3aed,#4f1fcf);top:-120px;left:-100px;animation-delay:0s; }
.orb-2 { width:420px;height:420px;background:radial-gradient(circle,#f5c842,#c9961a);bottom:-100px;right:-80px;animation-delay:-5s; }
.orb-3 { width:320px;height:320px;background:radial-gradient(circle,#a78bfa,#7c3aed);top:40%;left:55%;animation-delay:-9s; }
@keyframes orbFloat { 0%,100%{transform:translateY(0) scale(1)} 50%{transform:translateY(-40px) scale(1.06)} }
.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
                    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size: 60px 60px;
}
.star-field { position: absolute; inset: 0; }
.star {
  position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff;
  animation: twinkle var(--d,3s) var(--delay,0s) ease-in-out infinite; opacity: 0;
}
@keyframes twinkle { 0%,100%{opacity:0} 50%{opacity:var(--op,.6)} }

/* ── Layout ── */
.page {
  position: relative; z-index: 1; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; padding: 24px 16px;
}

/* ── Auth card ── */
.auth-card {
  width: 100%; max-width: 420px;
  background: radial-gradient(ellipse at 30% 0%,rgba(124,58,237,.18),transparent 60%),
              radial-gradient(ellipse at 70% 100%,rgba(245,200,66,.10),transparent 60%),
              rgba(255,255,255,.065);
  backdrop-filter: blur(40px) saturate(180%) brightness(1.08);
  -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.08);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 2px 0 rgba(255,255,255,.18) inset,
    0 40px 80px rgba(0,0,0,.55),
    0 0 60px rgba(124,58,237,.12);
  overflow: hidden;
  animation: slideUp .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes slideUp { from{opacity:0;transform:translateY(40px) scale(.95)} to{opacity:1;transform:none} }

/* ── Auth header ── */
.auth-header {
  padding: 32px 28px 24px; text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.crown-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
  background: radial-gradient(circle at 40% 30%,rgba(255,255,255,.18),rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 0 24px rgba(124,58,237,.35);
}
.crown-icon i { font-size: 1.6rem; color: var(--gold); filter: drop-shadow(0 2px 8px rgba(245,200,66,.7)); }
.auth-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -.3px; margin-bottom: 6px; }
.auth-sub   { font-size: .85rem; color: var(--text-soft); }

/* ── Form ── */
.auth-form { padding: 24px 28px 8px; }
.field-label {
  font-size: .8rem; font-weight: 600; color: var(--text-soft);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.field-label i { color: var(--purple-light); font-size: .75rem; }
.input-wrap { position: relative; margin-bottom: 16px; }
.input-wrap input {
  width: 100%; padding: 13px 16px 13px 44px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06); border: 1px solid var(--glass-border);
  color: var(--text-bright); font-family: 'Be Vietnam Pro', sans-serif; font-size: .9rem;
  outline: none; transition: border-color .3s, box-shadow .3s;
  box-shadow: 0 2px 0 rgba(255,255,255,.06) inset, 0 4px 16px rgba(0,0,0,.2);
}
.input-wrap input::placeholder { color: var(--text-dim); }
.input-wrap input:focus {
  border-color: rgba(167,139,250,.55);
  box-shadow: 0 0 0 3px rgba(124,58,237,.2), 0 2px 0 rgba(255,255,255,.06) inset;
}
.input-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: .82rem; pointer-events: none; transition: color .3s;
}
.input-wrap input:focus ~ .input-icon { color: var(--purple-light); }

/* ── Buttons ── */
.btn-cta {
  width: 100%; padding: 13px; border: none; border-radius: 50px; cursor: pointer;
  background: radial-gradient(ellipse at 50% 0%,rgba(255,255,255,.22),transparent 60%),
              linear-gradient(135deg,#7c3aed,#a855f7 60%,#7c3aed);
  border: 1px solid rgba(167,139,250,.3); color: rgba(255,255,255,.95);
  font-family: 'Be Vietnam Pro', sans-serif; font-size: .92rem; font-weight: 700;
  box-shadow: 0 2px 0 rgba(255,255,255,.18) inset, 0 8px 24px rgba(124,58,237,.4);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden;
  margin-top: 4px;
}
.btn-cta::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent);
  transform: skewX(-20deg); animation: shine 3s ease-in-out infinite;
}
@keyframes shine { 0%,100%{left:-100%} 50%{left:140%} }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 2px 0 rgba(255,255,255,.18) inset, 0 14px 32px rgba(124,58,237,.55); }
.btn-cta:disabled { opacity: .5; cursor: not-allowed; }

/* ── Alert ── */
.alert-error {
  margin: 0 28px 16px; padding: 10px 16px; border-radius: 12px;
  background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.25);
  color: #f87171; font-size: .82rem; display: flex; align-items: center; gap: 8px;
}

/* ── Auth switch ── */
.auth-switch {
  text-align: center; padding: 16px 28px 24px;
  font-size: .82rem; color: var(--text-soft);
}
.auth-switch a { color: var(--purple-light); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { color: var(--gold); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .auth-card { backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
  .orb-3 { display: none; }
  .star:nth-child(odd) { display: none; }
}
@media (max-width: 480px) {
  .orb-2 { display: none; }
  .bg-grid { display: none; }
}
.input-group-prefix {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--glass-border);
  border-radius: 16px; overflow: hidden;
  margin-bottom: 6px;
  transition: box-shadow .3s, border-color .3s;
}
.input-group-prefix:focus-within {
  border-color: rgba(167,139,250,.55);
  box-shadow: 0 0 0 3px rgba(124,58,237,.2);
}
.prefix-badge {
  padding: 13px 12px 13px 16px;
  background: rgba(124,58,237,.15);
  color: var(--purple-light);
  font-size: .88rem; font-weight: 700;
  border-right: 1px solid var(--glass-border);
  white-space: nowrap; flex-shrink: 0;
}
.input-group-prefix .input-wrap input {
  background: transparent; border: none;
  border-radius: 0; box-shadow: none;
  padding-left: 14px;
}
.input-group-prefix .input-wrap input:focus {
  box-shadow: none; border: none;
}
.input-group-prefix .input-icon { left: 8px; }
.hint-text {
  font-size: .76rem; color: var(--text-dim);
  margin-bottom: 4px; padding-left: 4px;
}
.hint-text strong { color: var(--purple-light); }
