:root{
  /* Light (default): light gray + light purple (no vanilla white) */
  --page0:#e9e7f4;
  --page1:#f1effa;

  --text:#141420;
  --muted: rgba(20,20,32,.65);

  --shellStroke: rgba(20,20,32,.10);
  --shellBg: rgba(255,255,255,.34);        /* not pure white */
  --shellShadow: 0 26px 75px rgba(18, 12, 30, .18);

  --panelBg: rgba(255,255,255,.40);        /* not pure white */
  --panelStroke: rgba(20,20,32,.10);

  --inputBg: rgba(20,20,32,.06);
  --inputStroke: rgba(20,20,32,.12);
  --placeholder: rgba(20,20,32,.45);

  --accentA: rgba(167,139,250,.95);
  --accentB: rgba(196,181,253,.90);

  --chipBg: rgba(124, 58, 237, .10);
  --chipStroke: rgba(124, 58, 237, .22);

  --btnBg: rgba(20,20,32,.92);
  --btnText: rgba(245,245,255,.95);

  --arc: rgba(20,20,32,.10);
  --arcV: rgba(124,58,237,.20);

  --dot: rgba(124, 58, 237, 1);
}

html[data-theme="dark"]{
  --page0:#000;
  --page1:#0b0b12;

  --text:#fff;
  --muted: rgba(255,255,255,.65);

  --shellStroke: rgba(255,255,255,.10);
  --shellBg: rgba(255,255,255,.06);
  --shellShadow: 0 30px 90px rgba(0,0,0,.60);

  --panelBg: rgba(0,0,0,.55);
  --panelStroke: rgba(255,255,255,.10);

  --inputBg: rgba(255,255,255,.06);
  --inputStroke: rgba(255,255,255,.12);
  --placeholder: rgba(255,255,255,.40);

  --accentA: rgba(167,139,250,.95);
  --accentB: rgba(196,181,253,.85);

  --chipBg: rgba(167,139,250,.12);
  --chipStroke: rgba(167,139,250,.24);

  --btnBg: rgba(255,255,255,.92);
  --btnText: rgba(0,0,0,.92);

  --arc: rgba(255,255,255,.10);
  --arcV: rgba(167,139,250,.22);

  --dot: rgba(167,139,250,1);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 30% 30%, rgba(167,139,250,.22), transparent 60%),
    radial-gradient(700px 500px at 80% 65%, rgba(196,181,253,.18), transparent 62%),
    linear-gradient(180deg, var(--page1), var(--page0));
}

.frame {
  min-height: 100dvh; /* dynamic viewport height (fixes iOS issues) */
  padding: 28px;
  display: grid;
  place-items: center;
}

.shell {
  position: relative;
  width: min(1120px, 100%);
  min-height: 700px;
  border-radius: 34px;
  border: 1px solid var(--shellStroke);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  box-shadow: var(--shellShadow);
  overflow: hidden;
}

/* Inner surface */
.shell::before{
  content:"";
  position:absolute; inset:-2px;
  border-radius: 36px;
  background:
    radial-gradient(1000px 700px at 35% 40%, rgba(167,139,250,.22), transparent 60%),
    radial-gradient(900px 700px at 75% 70%, rgba(196,181,253,.14), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.10));
  z-index:0;
}

/* Glow blob */
.blob{
  position:absolute;
  width:740px; height:540px;
  left:-150px; top:-120px;
  background: radial-gradient(circle at 35% 35%, rgba(167,139,250,.65), rgba(167,139,250,.18) 50%, rgba(167,139,250,0) 75%);
  filter: blur(6px);
  opacity: .9;
  z-index:1;
}

/* Arc lines */
.arcs{
  position:absolute; inset:0;
  z-index:1;
  pointer-events:none;
  opacity:.65;
  mix-blend-mode: multiply;
}

.arcs path{
  stroke: var(--arc);
  stroke-width: 1.2;
  fill: none;
}
.arcs path.violet{ stroke: var(--arcV); }

/* Topbar */
.topbar{
  position:absolute;
  inset: 20px 22px auto 22px;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}

@media (max-width: 920px) {
  .topbar {
    position: relative;
    margin-bottom: 20px;
  }
}
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: .2px;
}
.dot{
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 22px rgba(167,139,250,.55);
}

/* Theme toggle */
.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  color: var(--text);
  cursor:pointer;
  backdrop-filter: blur(8px);
}
.theme-toggle__icon{ font-size: 14px; line-height:1; }
.theme-toggle__text{ font-size: 12px; font-weight: 650; }

/* Main grid */
.content{
  position:relative;
  z-index:2;
  height:100%;
  display:grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 24px;
  padding: 90px 34px 34px;
}

/* Hero */
.hero{
  position:relative;
  border-radius: 28px;
  border: 1px solid var(--panelStroke);
  background: var(--shellBg);
  overflow:hidden;
  min-height: 470px;
}
.hero-inner{
  padding: 26px;
}
.hero h1{
  margin:0;
  font-size: clamp(26px, 3.0vw, 44px);
  line-height: 1.06;
  letter-spacing: -.02em;
}
.hero .accent{
  color: rgba(124,58,237,.95);
  text-shadow: 0 0 28px rgba(167,139,250,.25);
}
.subtitle{
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 56ch;
}

/* Steps (keeps your structure, improved) */
.steps{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.step{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 16px;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.06);
}
html[data-theme="dark"] .step{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
}
.step span{
  width: 28px; height: 28px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  font-weight: 700;
  background: rgba(124,58,237,.16);
  border: 1px solid rgba(124,58,237,.20);
  color: rgba(124,58,237,.95);
}
.step.active{
  background: rgba(124,58,237,.14);
  border-color: rgba(124,58,237,.18);
}

/* Scroll indicator */
.scroll-indicator{
  display:none;
  position:absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  z-index: 5;
}
.scroll-indicator svg{
  width: 32px;
  height: 32px;
  fill: rgba(124,58,237,.85);
  filter: drop-shadow(0 10px 18px rgba(124,58,237,.18));
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* Right panel */
.panel{
  border-radius: 28px;
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  box-shadow: var(--shellShadow);
  padding: 22px;
  display:flex;
  flex-direction:column;
  gap: 16px;
  min-height: 470px;
  backdrop-filter: blur(10px);
  scroll-margin-top: 70px;
}


.panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
}
.panel h2{
  margin: 2px 0 0;
  font-size: 18px;
  letter-spacing: -.01em;
}
.panel-sub{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.chip{
  font-size:12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--chipStroke);
  background: var(--chipBg);
  white-space:nowrap;
}

/* OAuth */
.oauth-buttons{
  display:flex;
  gap: 10px;
}
.oauth{
  flex:1;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--panelStroke);
  background: rgba(255,255,255,.10);
  color: var(--text);
  cursor:pointer;
}
html[data-theme="dark"] .oauth{
  background: rgba(255,255,255,.06);
}

/* Divider */
.divider{
  position:relative;
  text-align:center;
  margin: 6px 0;
}
.divider span{
  display:inline-block;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  background: transparent;
}
.divider::before{
  content:"";
  position:absolute;
  left:0; right:0;
  top: 50%;
  height:1px;
  background: var(--panelStroke);
  z-index:-1;
}

/* Form */
.form{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.row{
  display:flex;
  gap: 12px;
}
.field{
  display:flex;
  flex-direction:column;
  gap: 8px;
  width:100%;
}
label{
  font-size: 12px;
  color: var(--muted);
}
input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--inputStroke);
  background: var(--inputBg);
  color: var(--text);
  outline:none;
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
input::placeholder{ color: var(--placeholder); }
input:focus{
  border-color: rgba(124,58,237,.35);
  box-shadow: 0 0 0 4px rgba(124,58,237,.12);
}

.password-wrap{
  display:flex;
  gap: 10px;
  align-items:center;
}
.password-wrap input{ flex:1; }

.pw-toggle{
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--inputStroke);
  background: rgba(255,255,255,.10);
  color: var(--text);
  cursor:pointer;
  font-weight: 650;
  font-size: 12px;
}
html[data-theme="dark"] .pw-toggle{ background: rgba(255,255,255,.06); }

.hint{
  font-size: 12px;
  color: var(--muted);
}

/* Primary CTA */
.primary-btn{
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(90deg, var(--accentA), var(--accentB));
  color: rgba(15, 12, 22, .92);
  font-weight: 750;
  cursor:pointer;
  box-shadow: 0 18px 40px rgba(124,58,237,.16);
}
.primary-btn:active{ transform: translateY(1px); }

.response{
  margin: 6px 0 0;
  min-height: 18px;
  font-size: 12px;
  color: var(--muted);
}

.login-link{
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.login-link a{
  color: rgba(124,58,237,.95);
  text-decoration:none;
}
.login-link a:hover{ text-decoration: underline; }

.fineprint{
  margin-top:auto;
  font-size: 12px;
  color: var(--muted);
}
.fineprint a{
  color: rgba(124,58,237,.95);
  text-decoration:none;
}
.fineprint a:hover{ text-decoration:underline; }

/* Responsive */
@media (max-width: 920px) {

  body {
    overflow-x: hidden;
  }

  .frame {
    padding: 12px;
  }

  .shell {
    height: auto;
    min-height: auto;
    border-radius: 24px;
  }

  .content {
    grid-template-columns: 1fr;
    padding: 70px 12px 25px;
  }

  .hero {
    min-height: auto;
  }

}

@media (max-width: 768px){
  .scroll-indicator{ display:block; }
  .row{ flex-direction:column; }
}