/* ═══════════════════════════════════════════════════════════
   Crypto-Monster Login — Tech-Noir Glassmorphism v2
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #05070d;
  --fg: #e8eef7;
  --fg-dim: #8a93a8;
  --fg-faint: #4a5163;
  --cyan: #00d4ff;
  --cyan-glow: rgba(0, 212, 255, 0.45);
  --cyan-soft: rgba(0, 212, 255, 0.12);
  --lime: #84ff00;
  --lime-glow: rgba(132, 255, 0, 0.5);
  --crimson: #ff3060;
  --crimson-soft: rgba(255, 48, 96, 0.15);

  --glass-bg: rgba(15, 22, 35, 0.55);
  --glass-bg-soft: rgba(15, 22, 35, 0.4);
  --glass-border: rgba(0, 212, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.06);

  --input-bg: rgba(8, 12, 22, 0.85);
  --input-border: rgba(255, 255, 255, 0.08);

  --font-display: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --radius-tile: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-display);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* AURORA */
.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora__layer { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; will-change: transform; }
.aurora__layer--1 { width: 60vmax; height: 60vmax; top: -20vmax; left: -10vmax; background: radial-gradient(circle at 50% 50%, #00d4ff 0%, transparent 60%); animation: float-1 28s ease-in-out infinite; }
.aurora__layer--2 { width: 55vmax; height: 55vmax; bottom: -25vmax; right: -15vmax; background: radial-gradient(circle at 50% 50%, #1aa1ff 0%, transparent 60%); opacity: 0.4; animation: float-2 32s ease-in-out infinite; }
.aurora__layer--3 { width: 45vmax; height: 45vmax; top: 30vh; right: -10vmax; background: radial-gradient(circle at 50% 50%, #00ffaa 0%, transparent 65%); opacity: 0.18; animation: float-3 36s ease-in-out infinite; }
@keyframes float-1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8vw,12vh) scale(1.15); } }
@keyframes float-2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-10vw,-8vh) scale(1.1); } }
@keyframes float-3 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(-5vw,4vh) scale(1.2); } 66% { transform: translate(6vw,-6vh) scale(0.9); } }

.aurora__noise {
  position: absolute; inset: -50%; width: 200%; height: 200%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.18; mix-blend-mode: overlay;
}
.aurora__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(5,7,13,0.85) 100%),
              linear-gradient(180deg, rgba(5,7,13,0.4) 0%, transparent 25%, transparent 75%, rgba(5,7,13,0.6) 100%);
}

/* BRAND STRIP */
.brand-strip {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; max-width: 1200px; margin: 0 auto;
}
.brand-mark { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-weight: 700; font-size: 13px; letter-spacing: 0.18em; }
.brand-mark__icon { font-size: 22px; color: var(--cyan); filter: drop-shadow(0 0 12px var(--cyan-glow)); }
.brand-mark__sep { color: var(--cyan); margin: 0 2px; }

.status-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--glass-bg); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.15em;
  color: var(--fg-dim);
}
.status-pill__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime-glow); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

/* LAYOUT */
.layout {
  position: relative; z-index: 1;
  min-height: calc(100dvh - 130px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 24px 16px;
}

/* GLASS CARD */
.card {
  position: relative; width: 100%; max-width: 460px;
  border-radius: var(--radius); background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px var(--glass-highlight) inset;
  animation: card-enter 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card::before { content: ''; position: absolute; inset: 0; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 30%); pointer-events: none; }
@keyframes card-enter { 0% { opacity: 0; transform: translateY(20px) scale(0.98); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.card.is-shaking, form.is-shaking { animation: shake 0.45s cubic-bezier(0.36,0.07,0.19,0.97); }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }

.card__inner { position: relative; padding: 36px 32px 28px; }
.card__head { margin-bottom: 26px; }
.card__eyebrow { margin: 0 0 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.22em; color: var(--cyan); text-transform: uppercase; }
.card__title { margin: 0 0 6px; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); }
.card__subtitle { margin: 0; font-size: 13px; color: var(--fg-dim); line-height: 1.4; }
.card__foot { margin: 22px 0 0; text-align: center; font-size: 13px; color: var(--fg-dim); }

/* ALERT */
.alert { display: flex; gap: 12px; padding: 14px 16px; margin-bottom: 22px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.4; }
.alert--error { background: var(--crimson-soft); border: 1px solid rgba(255,48,96,0.3); color: #ffb0c1; }
.alert__icon { flex-shrink: 0; margin-top: 1px; color: var(--crimson); }
.alert__msg { margin: 0; font-weight: 500; color: #ffd0db; }
.alert__sub { margin: 4px 0 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; opacity: 0.75; }

/* ═══════════════════════════════════════════════════════════
   FIELDS — robust against browser autofill
   ═══════════════════════════════════════════════════════════ */
.field { display: block; margin-bottom: 18px; }
.field__label { display: block; margin-bottom: 7px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; color: var(--fg-dim); text-transform: uppercase; }

.field__wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  overflow: hidden;
}
.field__wrap:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-soft);
}

.field__icon { position: absolute; left: 14px; color: var(--fg-faint); pointer-events: none; transition: color 0.2s; z-index: 2; }
.field__wrap:focus-within .field__icon { color: var(--cyan); }

.field__input {
  flex: 1;
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  background: transparent !important;
  border: none;
  color: var(--fg) !important;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  outline: none;
}
.field__input::placeholder { color: var(--fg-faint); }

/* The autofill killer — nuclear option */
.field__input:-webkit-autofill,
.field__input:-webkit-autofill:hover,
.field__input:-webkit-autofill:focus,
.field__input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--fg) !important;
  -webkit-box-shadow: 0 0 0 100px var(--input-bg) inset !important;
  box-shadow: 0 0 0 100px var(--input-bg) inset !important;
  caret-color: var(--cyan) !important;
  transition: background-color 99999s ease-in-out 0s;
  -webkit-transition: background-color 99999s ease-in-out 0s;
  background-clip: content-box !important;
}

.field__toggle { background: none; border: none; padding: 0 14px; height: 48px; cursor: pointer; color: var(--fg-faint); display: flex; align-items: center; transition: color 0.2s; z-index: 2; position: relative; }
.field__toggle:hover { color: var(--cyan); }

/* CHECKBOX */
.checkbox { display: flex; align-items: center; gap: 10px; margin: 18px 0 24px; font-size: 13px; color: var(--fg-dim); cursor: pointer; user-select: none; }
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox__box { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 5px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1); color: var(--bg); transition: all 0.2s; }
.checkbox__box svg { opacity: 0; transform: scale(0.5); transition: all 0.2s; }
.checkbox input:checked + .checkbox__box { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan-soft); }
.checkbox input:checked + .checkbox__box svg { opacity: 1; transform: scale(1); }
.checkbox input:focus-visible + .checkbox__box { box-shadow: 0 0 0 3px var(--cyan-soft); }

/* SUBMIT BUTTON */
.btn-submit {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 52px; padding: 0 24px;
  background: linear-gradient(180deg, #00d4ff 0%, #00a8cc 100%); color: #000814;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
  cursor: pointer; overflow: hidden;
  box-shadow: 0 8px 24px -8px var(--cyan-glow), 0 0 0 1px rgba(255,255,255,0.1) inset;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 32px -8px var(--cyan-glow), 0 0 0 1px rgba(255,255,255,0.15) inset; }
.btn-submit:active:not(:disabled) { transform: translateY(0); }
.btn-submit:disabled { cursor: wait; }
.btn-submit__text { position: relative; z-index: 2; }
.btn-submit__arrow { position: relative; z-index: 2; transition: transform 0.2s; }
.btn-submit:hover:not(:disabled) .btn-submit__arrow { transform: translateX(3px); }
.btn-submit__pulse { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, var(--lime) 50%, transparent 100%); transform: translateX(-100%); opacity: 0; }
.btn-submit.is-pending .btn-submit__pulse { opacity: 0.7; animation: pulse-sweep 1.2s linear infinite; }
.btn-submit.is-pending .btn-submit__text::after { content: '...'; animation: dots 1s steps(3, end) infinite; }
@keyframes pulse-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes dots { 0%,20% { content: ''; } 40% { content: '.'; } 60% { content: '..'; } 80%,100% { content: '...'; } }

/* ═══════════════════════════════════════════════════════════
   POWERED BY — improved tile size & full-color logos
   ═══════════════════════════════════════════════════════════ */

.powered-card {
  width: 100%; max-width: 460px;
  border-radius: var(--radius);
  background: var(--glass-bg-soft);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 15px 45px -15px rgba(0,0,0,0.5);
  padding: 22px 24px 24px;
  animation: card-enter 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-delay: 0.15s;
  animation-fill-mode: both;
}

.powered-card__head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.powered-card__divider {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
}
.powered-card__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.32em; color: var(--cyan);
  text-transform: uppercase;
}

.powered-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  list-style: none; margin: 0; padding: 0;
}

.tile a {
  display: flex; align-items: center; justify-content: center;
  height: 72px;
  padding: 10px;
  border-radius: var(--radius-tile);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.tile a::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.06) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.25s;
}
.tile a:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.5);
}
.tile a:hover::before { opacity: 1; }

.tile svg {
  width: 100%;
  height: auto;
  max-height: 44px;
  display: block;
  position: relative;
  z-index: 1;
  opacity: 0.78;
  filter: saturate(0.7);
  transition: all 0.25s;
}
.tile a:hover svg {
  opacity: 1;
  filter: saturate(1.1) drop-shadow(0 0 8px currentColor);
  transform: scale(1.06);
}

/* LEGAL */
.legal {
  position: relative; z-index: 2;
  display: flex; justify-content: center; align-items: center; gap: 12px;
  padding: 18px 16px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 400; letter-spacing: 0.15em;
  color: var(--fg-faint); text-transform: uppercase;
}
.legal__sep { opacity: 0.5; }

/* LINKS */
.link { color: var(--cyan); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.link:hover { border-bottom-color: var(--cyan); }
.link--muted { color: var(--fg); border-bottom-color: rgba(255,255,255,0.2); }

/* RESPONSIVE */
@media (max-width: 480px) {
  .brand-strip { padding: 16px 18px; }
  .status-pill { font-size: 9px; padding: 5px 10px; }
  .card__inner { padding: 28px 22px 22px; }
  .card__title { font-size: 26px; }
  .powered-card { padding: 18px 18px 20px; }
  .powered-grid { gap: 8px; }
  .tile a { height: 60px; padding: 8px; }
  .tile svg { max-height: 36px; }
}
@media (max-width: 360px) {
  .card__inner { padding: 24px 18px 20px; }
  .powered-card { padding: 14px 14px 16px; }
  .tile a { height: 52px; }
  .tile svg { max-height: 30px; }
}
@media (min-width: 1024px) {
  .layout { gap: 32px; }
  .card, .powered-card { max-width: 480px; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora__layer, .status-pill__dot, .btn-submit.is-pending .btn-submit__pulse, .card, .powered-card { animation: none !important; }
  * { transition-duration: 0.01ms !important; }
}
