:root{
  --bg-1:#f4f6fb;
  --bg-2:#eef2f9;
  --card:#ffffff;
  --line:#e4e8f0;
  --line-strong:#d7ddea;

  --text:#1f2937;
  --muted:#667085;
  --muted-2:#98a2b3;

  --primary:#7c3aed;
  --primary-2:#8b5cf6;
  --primary-soft:rgba(124,58,237,.12);

  --success:#157f5b;
  --danger:#c0392b;

  --shadow-lg:0 20px 50px rgba(15, 23, 42, 0.08);
  --shadow-md:0 10px 24px rgba(15, 23, 42, 0.06);

  --radius-xl:28px;
  --radius-lg:18px;
  --radius-md:14px;

  --maxw:920px;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:"Inter", "proxima-nova", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, #ffffff 0%, transparent 30%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  line-height:1.6;
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  display:block;
  max-width:100%;
}

button,
input,
select{
  font:inherit;
}

.site-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* TOPBAR */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  background:rgba(8, 12, 20, 0.9);
  border-bottom:1px solid rgba(255,255,255,.08);
}

.topbar-inner{
  width:min(1200px, calc(100% - 32px));
  margin:0 auto;
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.brand img{
  width:150px;
  height:auto;
}

.topnav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.topnav a{
  color:#fff;
  opacity:.94;
  font-size:15px;
  padding:10px 12px;
  border-radius:12px;
  transition:.18s ease;
}

.topnav a:hover{
  background:rgba(255,255,255,.08);
  opacity:1;
}

.nav-btn.ghost{
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.08);
}

.mobile-auth-link{
  display:none;
}

/* PAGE */
.page{
  flex:1;
  padding:48px 16px 80px;
}

.hero{
  width:min(var(--maxw), 100%);
  margin:0 auto 28px;
  text-align:center;
}

.hero-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  margin-bottom:14px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  box-shadow:var(--shadow-md);
}

.hero h1{
  margin:0 0 10px;
  font-size:clamp(34px, 5vw, 54px);
  line-height:1.1;
  letter-spacing:-.02em;
}

.hero p{
  max-width:720px;
  margin:0 auto;
  color:var(--muted);
  font-size:18px;
}

.form-wrap{
  width:min(var(--maxw), 100%);
  margin:0 auto;
}

.form-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow-lg);
  overflow:hidden;
}

.form-head{
  padding:34px 34px 24px;
  border-bottom:1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(124,58,237,.03) 0%, rgba(124,58,237,0) 100%),
    #fff;
}

.eyebrow{
  margin:0 0 8px;
  color:var(--primary);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.form-head h2{
  margin:0 0 8px;
  font-size:30px;
  line-height:1.2;
}

.lead{
  margin:0;
  color:var(--muted);
  max-width:720px;
}

#registerForm{
  padding:0 34px 30px;
}

.form-section{
  padding:26px 0;
  border-bottom:1px solid var(--line);
}

.form-section:last-of-type{
  border-bottom:none;
}

.form-section h3{
  margin:0 0 18px;
  font-size:20px;
  line-height:1.3;
}

.field{
  margin-bottom:16px;
}

.field:last-child{
  margin-bottom:0;
}

label{
  display:block;
  margin-bottom:8px;
  font-size:14px;
  font-weight:700;
  color:#344054;
}

input,
select{
  width:100%;
  min-height:54px;
  padding:14px 16px;
  border-radius:var(--radius-md);
  border:1px solid var(--line-strong);
  background:#fcfdff;
  color:var(--text);
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input::placeholder{
  color:var(--muted-2);
}

input:focus,
select:focus{
  border-color:var(--primary-2);
  box-shadow:0 0 0 4px var(--primary-soft);
  background:#fff;
}

/* SWITCH */
.reg-type-switch{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.switch-card{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:18px;
  border:1px solid var(--line-strong);
  border-radius:18px;
  background:#fbfcff;
  cursor:pointer;
  transition:.18s ease;
}

.switch-card:hover{
  border-color:#bcc6d8;
  transform:translateY(-1px);
  box-shadow:var(--shadow-md);
}

.switch-card input{
  width:auto;
  min-height:auto;
  margin-top:3px;
  padding:0;
  accent-color:var(--primary);
  box-shadow:none;
}

.switch-card strong{
  display:block;
  font-size:16px;
  margin-bottom:2px;
}

.switch-card span{
  display:block;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

/* PASSWORD */
.pw-wrap{
  position:relative;
}

.pw-wrap input{
  padding-right:54px;
}

.pw-toggle{
  position:absolute;
  top:50%;
  right:10px;
  transform:translateY(-50%);
  width:38px;
  height:38px;
  border:none;
  border-radius:12px;
  background:#f3f5fa;
  color:#667085;
  cursor:pointer;
  transition:.18s ease;
}

.pw-toggle:hover{
  background:#e9eef7;
}

/* SUBMIT */
.submit-area{
  padding-top:26px;
}

.submit-btn{
  width:100%;
  min-height:56px;
  border:none;
  border-radius:16px;
  background:linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color:#fff;
  font-size:15px;
  font-weight:800;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow:0 14px 26px rgba(124,58,237,.22);
  transition:transform .18s ease, opacity .18s ease;
}

.submit-btn:hover{
  transform:translateY(-1px);
}

.submit-btn:disabled{
  opacity:.7;
  cursor:not-allowed;
}

.status{
  margin-top:12px;
  font-size:14px;
  min-height:22px;
}

.status.ok{
  color:var(--success);
}

.status.err{
  color:var(--danger);
}

.hidden{
  display:none !important;
}

/* FOOTER */
.footer{
  background:rgba(8, 12, 20, 0.9);
  color:#fff;
  padding:22px 16px;
}

.footer-inner{
  width:min(1200px, 100%);
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.footer-links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.footer a{
  opacity:.9;
}

.footer a:hover{
  opacity:1;
  text-decoration:underline;
}

/* RESPONSIVE */
@media (max-width: 860px){
  .topbar-inner{
    position:relative;
  }

  .topnav{
    gap:6px;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:2px;
    -webkit-overflow-scrolling:touch;
  }

  .topnav::-webkit-scrollbar{
    display:none;
  }

  .topnav a{
    min-height:40px;
    white-space:nowrap;
    font-size:14px;
    padding:8px 10px;
  }

  .topnav .nav-btn{
    display:none;
  }

  .mobile-auth-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    position:absolute;
    top:14px;
    right:0;
    z-index:2;
    min-height:36px;
    font-size:12px;
    padding:7px 9px;
    opacity:1;
    color:#ffffff !important;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.22);
    border-radius:12px;
    box-shadow:none;
    font-weight:900;
    text-decoration:none;
  }

  .mobile-auth-link:hover{
    background:rgba(255,255,255,.14);
    color:#ffffff !important;
  }

  .form-head{
    padding:26px 22px 20px;
  }

  #registerForm{
    padding:0 22px 24px;
  }
}

@media (max-width: 680px){
  .topbar-inner{
    width:min(1200px, calc(100% - 24px));
  }

  .topbar-inner{
    min-height:auto;
    padding:14px 0;
    flex-direction:column;
    align-items:flex-start;
  }

  .brand img{
    width:132px;
  }

  .topnav{
    width:100%;
  }

  .hero p{
    font-size:16px;
  }

  .page{
    padding:38px 12px 64px;
  }

  .form-card{
    border-radius:20px;
  }

  .form-head h2{
    font-size:26px;
  }

  .form-section h3{
    font-size:18px;
  }

  .reg-type-switch{
    grid-template-columns:1fr;
  }

  input{
    font-size:16px;
  }

  .switch-card{
    padding:15px;
  }
}

@media (max-width: 360px){
  .brand img{
    width:92px;
  }

  .mobile-auth-link{
    min-height:34px;
    max-width:104px;
    font-size:10.5px;
    padding:6px 7px;
  }
}

.checkbox-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:6px;
  cursor:pointer;
}

.checkbox-row input[type="checkbox"]{
  width:18px;
  height:18px;
  min-height:18px;
  margin:3px 0 0;
  padding:0;
  flex:0 0 18px;
  accent-color:var(--primary);
  box-shadow:none;
}

.checkbox-row span{
  display:block;
  margin:0;
  font-size:14px;
  line-height:1.6;
  font-weight:400;
  color:var(--text);
}
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.success-overlay.hidden {
  display: none;
}

.success-checkmark {
  text-align: center;
  animation: successPop 0.45s ease-out forwards;
}

.check-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #22c55e;
  color: white;
  font-size: 78px;
  line-height: 120px;
  font-weight: 700;
  margin: 0 auto 18px;
  box-shadow: 0 20px 50px rgba(34, 197, 94, 0.35);
  animation: checkPulse 0.8s ease-out;
}

.success-text {
  font-size: 22px;
  font-weight: 700;
  color: #14532d;
}

@keyframes successPop {
  from {
    transform: scale(0.65);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes checkPulse {
  0% {
    transform: scale(0.4);
  }
  60% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}
