:root{
  --bg1:#0b0f1a; --bg2:#0d1326;
  --glass:#0f172aCC; --border:#1f2a44; --text:#e6ecff; --muted:#94a3b8;
  --brand:#22d3ee; --brand2:#8b5cf6; --brand3:#00ff87;
  --ok:#22c55e; --err:#ef4444;
  --shadow: 0 10px 35px rgba(0,0,0,.45);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family:'Inter',system-ui,Segoe UI,Roboto,Arial,sans-serif; color:var(--text);
  background:
    radial-gradient(1200px 800px at 0% 0%, #0a1f3a 0%, transparent 60%),
    radial-gradient(900px 700px at 100% 0%, #1a0b3a 0%, transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  overflow-x:hidden;
}

/* animated grid */
.grid{
  position:fixed; inset:0; pointer-events:none; opacity:.22;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 42px 42px;
  animation: drift 26s linear infinite;
}
@keyframes drift { from{background-position:0 0} to{background-position:420px 420px} }

/* orbs */
.orb{ position:fixed; border-radius:50%; filter:blur(32px); opacity:.28; pointer-events:none; }
.o1{ width:380px; height:380px; left:-120px; top:-80px;
  background: radial-gradient(circle at 30% 30%, var(--brand), transparent 60%);}
.o2{ width:420px; height:420px; right:-140px; top:10%;
  background: radial-gradient(circle at 60% 40%, var(--brand2), transparent 60%);}
.o3{ width:360px; height:360px; left:10%; bottom:-120px;
  background: radial-gradient(circle at 50% 50%, var(--brand3), transparent 60%);}

.wrap{ min-height:100dvh; display:grid; place-items:center; padding:40px 16px; }

/* shell */
.auth{
  width:100%; max-width: 980px; min-height: 560px; position:relative; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16,24,40,.75), rgba(10,16,32,.75));
  border:1px solid var(--border); box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.02) inset;
  display:grid; grid-template-columns: 1fr 1fr; overflow:hidden;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.auth::before{
  content:""; position:absolute; inset:-2px; z-index:0;
  background: conic-gradient(from 180deg at 50% 50%, rgba(34,211,238,.35), rgba(139,92,246,.28), rgba(0,255,135,.22), rgba(34,211,238,.35));
  filter:blur(22px); opacity:.35;
}
.side, .pane{ position:relative; z-index:1; }

/* left info */
.side{
  padding:36px 28px; display:flex; flex-direction:column; justify-content:space-between; border-right:1px solid var(--border);
  background: linear-gradient(180deg, rgba(8,12,28,.6), rgba(8,12,28,.2));
}
.brand{ display:flex; align-items:center; gap:12px; }
.badge {
  width:48px; height:48px; border-radius:14px;
  display:grid; place-items:center;
  background: radial-gradient(circle at 30% 30%, #0ea5e9, transparent 65%), rgba(2,6,23,.6);
  border:1px solid #153057;
  box-shadow: inset 0 0 22px rgba(34,211,238,.22), 0 8px 24px rgba(0,0,0,.35);
  overflow: hidden; /* so the logo doesn't overflow rounded corners */
}

.badge-logo {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

.powered-by {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  opacity: 0.85;
}

.powered-by img {
  height: 18px; /* adjust if needed */
  width: auto;
  display: inline-block;
  vertical-align: middle;
}


.brand h1{
  margin:0; font-size:22px; font-weight:800; letter-spacing:.2px;
  background: linear-gradient(90deg,#e6f7ff,#b9c0ff 45%,#a7ffe0);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.pitch{ margin:18px 0; color:var(--muted); line-height:1.6; }
.bullets{ display:grid; gap:10px; color:#cfe0ff; }
.bullets i{ color: var(--brand3); }

/* spinning card + particles */
.illustr{
  margin-top:18px; border:1px solid var(--border); border-radius:14px; overflow:hidden;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(34,211,238,.08), transparent 60%),
    radial-gradient(120% 120% at 100% 0%, rgba(139,92,246,.08), transparent 60%),
    rgba(7,12,28,.4);
  min-height: 190px; display:grid; place-items:center;
}
.spin-wrap{
  position:relative; width: 280px; height: 160px; perspective: 900px;
  filter: drop-shadow(0 10px 30px rgba(34,211,238,.15));
  will-change: transform;
}
.spin-card{
  width: 100%; height: 100%;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(34,211,238,.25), rgba(139,92,246,.15) 40%, rgba(0,255,135,.18)),
    linear-gradient(180deg, rgba(12,20,40,.9), rgba(8,12,28,.9));
  border: 1px solid rgba(167, 243, 208, .15);
  transform-style: preserve-3d;
  animation: spin 18s linear infinite;
  position: relative; overflow: hidden;
}
.spin-card::after{
  content:""; position:absolute; inset:-40%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.12), transparent 55%);
  transform: translateZ(30px);
}
@keyframes spin{
  0%   { transform: rotateY(0deg) rotateX(0deg); }
  50%  { transform: rotateY(180deg) rotateX(6deg); }
  100% { transform: rotateY(360deg) rotateX(0deg); }
}
.chip{
  position:absolute; left:16px; top:16px; width:36px; height:26px; border-radius:6px;
  background: linear-gradient(135deg,#ffe29f,#ffa99f);
  box-shadow: inset 0 0 6px rgba(0,0,0,.3);
  transform: translateZ(24px);
}
.logo{
  position:absolute; right:16px; bottom:12px; font-weight:900; letter-spacing:.6px; font-size:18px;
  background: linear-gradient(90deg,#e6f7ff,#b9c0ff 45%,#a7ffe0);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  transform: translateZ(24px);
}
/* tiny particles */
.p{ position:absolute; width:8px; height:8px; border-radius:50%; filter:blur(1px); opacity:.7; }
.p1{ background:#22d3ee; left:-10px; top:20%; animation: float1 12s linear infinite; }
.p2{ background:#8b5cf6; right:-10px; top:40%; animation: float2 16s linear infinite; }
.p3{ background:#00ff87; left:40%; bottom:-10px; animation: float3 14s linear infinite; }
@keyframes float1{ from{ transform: translateX(0) } to{ transform: translateX(360px) } }
@keyframes float2{ from{ transform: translateX(0) } to{ transform: translateX(-360px) } }
@keyframes float3{ from{ transform: translateY(0) } to{ transform: translateY(-220px) } }

/* pane + slider */
.pane{
  overflow:hidden; position:relative;
  min-height: 560px;    /* mobile visibility fix */
}
.slider{
  position:absolute; inset:0; display:flex; width:200%;
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.mode-signup .slider{ transform: translateX(-50%); }

.panel{
  width:50%; padding:34px 28px; display:flex; flex-direction:column; gap:16px;
}
.title{ font-size:26px; font-weight:800; margin:2px 0 6px; }
.sub{ color:var(--muted); font-size:13.5px; margin-top:-6px; }

.alert{
  padding:12px 14px; border-radius:12px; font-size:14px; border:1px solid;
  display:flex; gap:10px; align-items:flex-start;
}
.alert.error{ background: rgba(239,68,68,.12); border-color:#3f1212; color:#fee2e2; }
.alert.success{ background: rgba(34,197,94,.12); border-color:#14532d; color:#dcfce7; }

.field{
  position:relative; background: rgba(2,6,23,.55); border:1px solid var(--border);
  border-radius:12px; padding:12px 14px; display:flex; align-items:center; gap:10px;
}
.field input{
  flex:1; background:transparent; border:none; outline:none; color:var(--text);
  font-size:15px; letter-spacing:.2px;
}
.toggle{ cursor:pointer; color:#9fb4e4; }
.toggle:hover{ color:#cfe0ff; }

.row-actions{ display:flex; align-items:center; justify-content:space-between; margin-top:2px; }
.link{ color:#b3c5ff; text-decoration:none; font-weight:600; }
.link:hover{ text-decoration:underline; }

.btn{
  margin-top:6px; border:none; outline:none; cursor:pointer; width:100%;
  padding:14px 18px; border-radius:12px; font-weight:800; font-size:15px; letter-spacing:.3px; color:#05101e;
  background: linear-gradient(90deg, var(--brand), var(--brand2) 50%, var(--brand3));
  box-shadow: 0 8px 22px rgba(34,211,238,.22), 0 2px 6px rgba(0,0,0,.25);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover{ transform: translateY(-1px); filter:saturate(1.05); }

.switch{ margin-top:10px; text-align:center; color:var(--muted); font-size:14px; }
.switch button{
  background:transparent; border:none; color:#cfe0ff; font-weight:700; cursor:pointer;
}
.switch button:hover{ text-decoration:underline; }

/* modal */
.modal{
  position:fixed; inset:0; display:none; align-items:center; justify-content:center;
  padding:24px; z-index:5; background: rgba(3,7,18,.7);
}
.modal.show{ display:flex; }
.modal-card{
  width:100%; max-width:520px; border-radius:16px;
  background: linear-gradient(180deg, rgba(16,24,40,.92), rgba(10,16,32,.92));
  border:1px solid var(--border); box-shadow: var(--shadow);
  padding:22px 22px 20px;
}
.modal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.modal-title{ font-size:20px; font-weight:800; }
.close{ background:transparent; border:none; color:#bcd1ff; cursor:pointer; font-size:20px; }

.card-logo{
  position:absolute; left:16px; top:14px;
  height:28px; width:auto;
  transform: translateZ(24px);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
  opacity:.95;
}


/* responsive */
@media (max-width: 980px){
  .auth{ grid-template-columns: 1fr; }
  .side{
    display:block; border-right:0; border-bottom:1px solid var(--border);
    padding:22px 18px 12px;
  }
  .illustr{ min-height: 170px; }
  .panel{ padding:26px 18px; }
  .modal-card{ padding:18px; }
  .pane{ min-height: 560px; }
}
@media (max-width: 480px){
  .pane{ min-height: 520px; }
  .title{ font-size:24px; }
}

/* reduce motion preference */
@media (prefers-reduced-motion: reduce){
  .grid, .spin-card, .p1, .p2, .p3 { animation: none !important; }
}
