/* Nexilo Auth Theme */
:root {
  --color-bg: #0D0D1A;
  --color-accent: #FF0033; /* tuned to Nexilo logo red */
  --accent-rgb: 255, 0, 51; /* RGB for dynamic glows */
  --glow-outer: 0.45; /* outer glow alpha */
  --glow-inner: 0.28; /* inner glow alpha */
  --color-text: #F5F5F5;
  --color-glass: rgba(255, 255, 255, 0.06);
  --color-border: rgba(255, 255, 255, 0.12);
  --color-muted: rgba(245, 245, 245, 0.7);
  --shadow-neon: 0 0 24px rgba(var(--accent-rgb), var(--glow-outer)), 0 0 48px rgba(var(--accent-rgb), var(--glow-inner));
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  color: var(--color-text);
  background: radial-gradient(1200px 800px at 0% 0%, rgba(255,0,51,0.08), transparent 60%),
              radial-gradient(1200px 800px at 100% 100%, rgba(255,0,51,0.08), transparent 60%),
              linear-gradient(135deg, #0A0A14 0%, #0D0D1A 40%, #0A0A14 100%);
  overflow-x: hidden;
}

/* Animated background gradient overlay */
.bg-animated {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at 20% 30%, rgba(255,0,51,0.08), transparent 35%),
              radial-gradient(circle at 80% 70%, rgba(255,0,51,0.08), transparent 35%);
  animation: bgShift 18s ease-in-out infinite alternate;
}
@keyframes bgShift {
  0% { filter: hue-rotate(0deg) saturate(100%); transform: scale(1); }
  100% { filter: hue-rotate(-10deg) saturate(110%); transform: scale(1.05); }
}

/* Floating particles */
.particles { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.particle {
  position: absolute;
  width: 6px; height: 6px;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.0) 70%);
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.35));
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  from { transform: translateY(0) translateZ(0); opacity: 0; }
  10% { opacity: 0.6; }
  to { transform: translateY(-120vh) translateZ(0); opacity: 0; }
}

/* Layout */
.wrapper { min-height: 100%; display: grid; place-items: center; padding: clamp(16px, 3vw, 32px); }
.auth-card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  backdrop-filter: blur(14px) saturate(125%);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.06);
  transform: translateY(12px);
  opacity: 0;
  animation: slideIn 700ms cubic-bezier(.2,.8,.25,1) forwards 200ms;
}
@keyframes slideIn {
  from { transform: translateY(24px) scale(0.99); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.brand { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 18px; }
.brand img { height: 40px; filter: drop-shadow(0 2px 10px rgba(255,0,51,0.35)); }
.brand .tagline { color: var(--color-muted); font-size: 0.95rem; letter-spacing: 0.3px; }

.form-panel {
  display: grid; gap: 14px; align-content: start;
}
.form {
  display: grid; gap: 14px;
}
.field { display: grid; gap: 8px; }
.label { font-size: 0.9rem; color: var(--color-muted); }
.input {
  appearance: none;
  width: 100%;
  padding: 14px 14px 14px 42px;
  color: var(--color-text);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--color-border);
  border-radius: 12px;
  outline: none;
  transition: box-shadow 200ms ease, border-color 200ms ease, transform 150ms ease;
}
.input:focus {
  border-color: rgba(var(--accent-rgb), 0.65);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18), var(--shadow-neon);
}
.input::placeholder { color: rgba(245,245,245,0.45); }
.input-icon { position: absolute; inset-inline-start: 12px; inset-block-start: 50%; transform: translateY(-50%); color: rgba(245,245,245,0.6); }
.input-wrap { position: relative; }

.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link { color: #fff; opacity: 0.8; text-decoration: none; transition: opacity 150ms ease; }
.link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

.btn {
  appearance: none;
  border: 0;
  padding: 12px 18px;
  color: #0d0d12;
  background: radial-gradient(150% 140% at 50% 0%, #FF3A55 0%, var(--color-accent) 35%, #C20024 100%);
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), var(--glow-outer)), inset 0 0 0 1px rgba(255,255,255,0.15);
  transform: translateZ(0);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 12px 30px rgba(var(--accent-rgb), 0.55), inset 0 0 0 1px rgba(255,255,255,0.2); }
.btn:active { transform: translateY(0); }

.terms { display: flex; gap: 10px; align-items: flex-start; color: var(--color-muted); font-size: 0.9rem; }
.checkbox { accent-color: var(--color-accent); width: 18px; height: 18px; margin-top: 2px; }

/* 3D Scene */
.scene {
  position: relative;
  perspective: 1000px;
  transform-style: preserve-3d;
  display: grid; place-items: center; overflow: visible;
}

.card3d {
  width: min(400px, 100%);
  aspect-ratio: 1.58/1;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06) inset;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCard 12s ease-in-out infinite alternate;
}
.card3d::before {
  content: '';
  position: absolute; inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 0deg at 50% 50%, rgba(var(--accent-rgb), 0.0), rgba(var(--accent-rgb), 0.35), rgba(var(--accent-rgb), 0.0) 40%);
  filter: blur(18px);
  transform: translateZ(-1px);
}
.card3d .chip { position: absolute; top: 18px; left: 18px; width: 44px; height: 32px; border-radius: 6px; background: linear-gradient(180deg, #e6c66a, #b08a21); box-shadow: 0 2px 10px rgba(0,0,0,0.25); transform: translateZ(30px); }
.card3d .brand { position: absolute; right: 18px; bottom: 16px; gap: 6px; transform: translateZ(40px); }
.card3d .brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--color-accent); filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.7)); }
.card3d .number { position: absolute; bottom: 56px; left: 18px; letter-spacing: 3px; font-weight: 600; transform: translateZ(35px); text-shadow: 0 0 10px rgba(255,255,255,0.15); }

@keyframes rotateCard {
  0% { transform: rotateY(-18deg) rotateX(8deg); }
  100% { transform: rotateY(18deg) rotateX(-6deg); }
}

.coin {
  position: absolute; width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd8a8, #f8a100);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  animation: floatCoin 6s ease-in-out infinite;
}
.coin:nth-child(2) { width: 16px; height: 16px; animation-duration: 7s; animation-delay: -1s; filter: brightness(1.1); }
.coin:nth-child(3) { width: 20px; height: 20px; animation-duration: 5.5s; animation-delay: -2s; filter: brightness(0.95); }
@keyframes floatCoin {
  0%,100% { transform: translateY(-8px); }
  50% { transform: translateY(8px); }
}

/* Holographic shimmer after reveal */
.holo { position: relative; }
.holo::after {
  content: '';
  position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.12) 40%, transparent 60%);
  transform: translateX(-100%);
  animation: shimmer 1600ms ease 600ms forwards;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* Preloader */
.preloader { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(13,13,26,0.94); z-index: 50; }
.spinner {
  width: 64px; height: 64px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.12);
  border-top-color: var(--color-accent);
  animation: spin 900ms linear infinite, glow 1200ms ease-in-out infinite alternate;
}
/* High-contrast / reduced glow variant */
.a11y-lowglow {
  --glow-outer: 0.25;
  --glow-inner: 0.12;
}

@media (prefers-contrast: more) {
  :root { --glow-outer: 0.28; --glow-inner: 0.14; }
  .input { border-color: rgba(255,255,255,0.18); }
  .input:focus { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.22); }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .bg-animated { animation: none !important; }
  .particle { animation: none !important; }
  .auth-card { animation: none !important; opacity: 1 !important; transform: none !important; }
  .card3d { animation: none !important; }
  .coin { animation: none !important; }
  .holo::after { animation: none !important; }
  .spinner { animation: spin 1.2s linear infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow { from { box-shadow: 0 0 0 rgba(255,0,51,0.0); } to { box-shadow: 0 0 32px rgba(255,0,51,0.4); } }

/* Reveal on view */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Typographic accents */
.title { font-family: 'Orbitron', 'Poppins', 'Inter', sans-serif; font-weight: 800; letter-spacing: 0.4px; }
.subtitle { color: var(--color-muted); }

/* Responsive */
@media (max-width: 900px) {
  .auth-card { grid-template-columns: 1fr; }
  .scene { order: -1; margin-bottom: 10px; }
}

@media (max-width: 480px) {
  .btn { width: 100%; }
  .actions { flex-direction: column; align-items: stretch; }
}


