.landing-layout {
  display: flex;
  height: 100vh;
  height: 100dvh;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

/* ========== HERO ========== */
.hero-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
  position: relative;
  overflow-y: auto;
  min-height: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(29,155,240,0.12) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(120,86,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}
[data-theme="light"] .hero-bg { opacity: 0.5; }

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.hero-logo {
  display:flex;
  justify-content:center;
  margin-bottom:28px;
  animation:float 4s ease-in-out infinite;
}
.hero-logo-icon {
  width:160px;
  height:160px;
  display:block;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-tagline { font-size: 34px; font-weight: 800; line-height: 1.15; margin-bottom: 12px; }
.hero-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.5; }

.hero-features { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.hero-feature {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: 14px; transition: all 0.2s;
}
.hero-feature:hover { background: var(--bg-hover); transform: translateX(-3px); }
.hero-feature-icon {
  width: 38px; height: 38px; border-radius: 10px; background: rgba(29,155,240,0.1);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hero-feature-icon svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; stroke-width: 2; }
.hero-feature-text h4 { font-size: 13px; font-weight: 700; margin-bottom: 1px; }
.hero-feature-text p { font-size: 11px; color: var(--text-secondary); }

/* ========== AUTH SECTION ========== */
.auth-section {
  width: 520px;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.auth-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.back-btn {
  position: absolute;
  left: 40px;
  top: 32px;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 50px;
  font-size: 12px; font-weight: 600; color: var(--accent);
  transition: background 0.2s;
  opacity: 0; pointer-events: none;
}
.back-btn.visible { opacity: 1; pointer-events: auto; }
.back-btn:hover { background: rgba(29,155,240,0.1); }
.back-btn svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 2.5; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.theme-toggle:hover { transform: scale(1.08); background: var(--bg-hover); }
.theme-toggle svg { width: 18px; height: 18px; stroke: var(--text-primary); fill: none; stroke-width: 2; }

/* 🎨 NEW: Logo with icon */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.auth-logo-icon {
  width:36px;
  height:36px;
  flex-shrink:0;
  display:block;
}

.auth-logo-text {
  font-size:24px;
  font-weight:800;
  color:var(--text-primary);
  letter-spacing:-0.5px;
  line-height:1;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.auth-tab {
  flex: 1; padding: 9px; text-align: center;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; border-radius: 50px; transition: all 0.2s;
}
.auth-tab.active {
  background: var(--bg-tertiary); color: var(--text-primary);
  font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
[data-theme="light"] .auth-tab.active { background: var(--bg-primary); box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.auth-tab:hover:not(.active) { color: var(--text-primary); background: var(--bg-hover); }

/* Step Indicator */
.step-indicator {
  display: none;
  align-items: center; justify-content: center; gap: 0;
  margin-bottom: 20px; padding: 0 20px; flex-shrink: 0;
}
.step-indicator.visible { display: flex; }
.step-item { display: flex; align-items: center; }
.step-circle {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-secondary); border: 2px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
  transition: all 0.3s ease;
}
.step-item.active .step-circle {
  background: var(--accent); border-color: var(--accent); color: white;
  box-shadow: 0 0 0 3px rgba(29,155,240,0.15); transform: scale(1.05);
}
.step-item.completed .step-circle { background: var(--success); border-color: var(--success); color: white; }
.step-item.completed .step-num { display: none; }
.step-item.completed .step-check { display: block; }
.step-check { display: none; width: 13px; height: 13px; stroke: white; fill: none; stroke-width: 3; }
.step-line { width: 44px; height: 2px; background: var(--border-color); transition: background 0.3s ease; }
.step-line.done { background: var(--success); }
.step-text { font-size: 10px; color: var(--text-secondary); font-weight: 500; margin-top: 4px; text-align: center; width: 50px;}
.step-item.active .step-text { color: var(--accent); font-weight: 700; }
.step-item.completed .step-text { color: var(--success); }

/* 🎯 NEW: Content Area Wrapper */
.auth-content-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 4px;
  position: relative;
}

.forms-wrapper {
  flex: 1;
  min-height: 0;
  position: relative;
}

.forms-wrapper.hidden {
  display: none;
}

.view-section { display: none; animation: fadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.section-subtitle { color: var(--text-secondary); font-size: 12px; margin-bottom: 16px; }

/* Form Elements */
.form-group { margin-bottom: 12px; position: relative; }
.form-label { display: block; font-size: 11px; color: var(--text-secondary); margin-bottom: 5px; font-weight: 500; }
.form-input {
  width: 100%; padding: 9px 12px; background: var(--bg-secondary);
  border: 1px solid var(--border-color); border-radius: 8px;
  font-size: 13px; color: var(--text-primary); transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--accent); background: var(--bg-primary); box-shadow: 0 0 0 1px var(--accent); }
.form-input::placeholder { color: var(--text-secondary); }

.input-icon {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; stroke: var(--text-secondary); fill: none;
  stroke-width: 2; cursor: pointer; transition: stroke 0.2s;
}
.input-icon:hover { stroke: var(--text-primary); }
.form-input-wrap { position: relative; }
.form-input.has-icon { padding-right: 36px; }

.form-error { font-size: 10px; color: var(--danger); margin-top: 3px; display: none; }
.form-error.show { display: block; }

.submit-btn {
  flex: 1;
  padding: 11px; background: var(--accent); color: white;
  border: none; border-radius: 50px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.submit-btn:hover:not(:disabled) { background: var(--accent-hover); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.submit-btn .spinner {
  width: 13px; height: 13px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 🎯 FIX: Buttons row with equal sizing */
.buttons-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.buttons-row .submit-btn {
  flex: 1;
  margin-top: 0;
}

.skip-btn {
  flex: 1;
  padding: 11px 20px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.skip-btn:hover { background: var(--bg-hover); border-color: var(--text-secondary); }

.form-hint { text-align: center; color: var(--text-secondary); font-size: 11px; margin-top: 14px; }
.form-hint a { color: var(--accent); font-weight: 600; }
.form-hint a:hover { text-decoration: underline; }

/* Password Strength */
.password-strength { display: flex; gap: 4px; margin-top: 5px; height: 3px; }
.strength-bar { flex: 1; background: var(--border-color); border-radius: 2px; transition: background 0.3s; }
.strength-bar.active.weak { background: var(--danger); }
.strength-bar.active.medium { background: var(--warning); }
.strength-bar.active.strong { background: var(--success); }
.strength-text { font-size: 10px; margin-top: 3px; color: var(--text-secondary); }

/* Checkbox */
.checkbox-wrap { display: flex; align-items: center; gap: 9px; margin: 10px 0; cursor: pointer; user-select: none; }
.checkbox-custom {
  width: 16px; height: 16px; border: 2px solid var(--border-color); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0;
}
.checkbox-wrap.checked .checkbox-custom { background: var(--accent); border-color: var(--accent); }
.checkbox-custom svg { width: 11px; height: 11px; stroke: white; fill: none; stroke-width: 3; opacity: 0; transition: opacity 0.2s; }
.checkbox-wrap.checked .checkbox-custom svg { opacity: 1; }
.checkbox-label { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }
.checkbox-label a { color: var(--accent); }

/* PIN */
.pin-section {
  display: none; margin-top: 4px; margin-bottom: 10px; padding: 12px;
  background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px;
  animation: fadeIn 0.3s ease;
}
.pin-section.active { display: block; }
.pin-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pin-header svg { width: 14px; height: 14px; stroke: var(--accent); fill: none; stroke-width: 2; }
.pin-header-text h4 { font-size: 12px; font-weight: 700; }
.pin-header-text p { font-size: 10px; color: var(--text-secondary); margin-top: 1px; }
.pin-inputs { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.pin-input {
  width: 44px; height: 42px; text-align: center; font-size: 18px; font-weight: 700;
  background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 8px;
  color: var(--text-primary); transition: all 0.2s; font-family: 'Inter', monospace;
}
.pin-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(29,155,240,0.2); transform: translateY(-1px); }
.pin-input.filled { border-color: var(--accent); background: rgba(29,155,240,0.05); }
.pin-input.error { border-color: var(--danger); animation: shake 0.4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pin-hint { text-align: center; font-size: 10px; color: var(--text-secondary); margin-top: 8px; }

.info-banner {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: rgba(29,155,240,0.08); border: 1px solid rgba(29,155,240,0.2);
  border-radius: 8px; font-size: 10px; color: var(--accent); margin-bottom: 12px; line-height: 1.4;
}
.info-banner svg { width: 14px; height: 14px; flex-shrink: 0; stroke: var(--accent); fill: none; stroke-width: 2; }

.name-row { display: flex; gap: 10px; }
.name-row .form-group { flex: 1; margin-bottom: 0; }

/* Avatar Upload */
.avatar-upload-section {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 18px; margin: 8px 0 12px; background: var(--bg-secondary);
  border: 1px solid var(--border-color); border-radius: 14px;
}
.avatar-preview-circle {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, #1d9bf0, #7856ff);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 36px; cursor: pointer;
  position: relative; overflow: hidden; transition: transform 0.2s;
  border: 3px solid var(--border-color);
}
.avatar-preview-circle:hover { transform: scale(1.03); }
.avatar-preview-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-preview-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  opacity: 0; transition: opacity 0.2s;
}
.avatar-preview-circle:hover .avatar-preview-overlay { opacity: 1; }
.avatar-preview-overlay svg { width: 22px; height: 22px; stroke: white; fill: none; stroke-width: 2; }
.avatar-preview-overlay span { color: white; font-size: 10px; font-weight: 600; }
.avatar-actions { display: flex; gap: 8px; align-items: center; }
.avatar-upload-btn {
  background: var(--accent); color: white; padding: 7px 14px; border-radius: 50px;
  font-weight: 600; font-size: 11px; transition: background 0.2s;
  display: inline-flex; align-items: center; gap: 4px;
}
.avatar-upload-btn:hover { background: var(--accent-hover); }
.avatar-upload-btn svg { width: 13px; height: 13px; stroke: white; fill: none; stroke-width: 2; }
.avatar-remove-btn {
  background: transparent; color: var(--danger); font-size: 11px; font-weight: 600;
  padding: 7px 10px; border-radius: 50px; transition: background 0.2s; display: none;
}
.avatar-remove-btn.visible { display: inline-block; }
.avatar-remove-btn:hover { background: rgba(244,33,46,0.1); }
.avatar-hint { font-size: 11px; color: var(--text-secondary); text-align: center; line-height: 1.4; }

/* Footer */
.auth-footer {
  margin-top: auto;
  padding-top: 12px;
  display: flex; flex-wrap: wrap;
  gap: 3px 10px; font-size: 10px; color: var(--text-secondary);
  flex-shrink: 0; border-top: 1px solid var(--border-color);
}
.auth-footer a { color: var(--text-secondary); text-decoration: none; cursor: pointer; }
.auth-footer a:hover { text-decoration: underline; color: var(--accent); }

/* Toast */
.toast {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--accent); color: white; padding: 10px 20px; border-radius: 8px;
  font-size: 12px; font-weight: 500; z-index: 2000; transition: transform 0.3s ease;
  white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* 🎯 FIX: Success Screen with proper flex layout */
.success-screen {
  display: none;
  text-align: center;
  padding: 20px 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.success-screen.active {
  display: flex;
  animation: fadeIn 0.4s ease;
}
.success-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #00d68f);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }
.success-icon svg { width: 36px; height: 36px; stroke: white; fill: none; stroke-width: 3; }
.success-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, #1d9bf0, #7856ff);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 32px;
  margin-bottom: 14px; border: 3px solid var(--border-color); overflow: hidden;
}
.success-avatar img { width: 100%; height: 100%; object-fit: cover; }
.success-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.success-message { color: var(--text-secondary); font-size: 12px; margin-bottom: 16px; }
.enter-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
  background: var(--accent); color: white; border: none; border-radius: 50px;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.enter-btn:hover { background: var(--accent-hover); }
.username-preview {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: 50px; font-size: 11px; color: var(--accent); margin-bottom: 14px;
}
.username-preview svg { width: 12px; height: 12px; stroke: var(--text-secondary); fill: none; stroke-width: 2; }
.username-preview strong { color: var(--text-primary); font-weight: 700; }

/* Responsive */
@media (max-width: 900px) {
  html, body { overflow-y: auto; }
  .landing-layout { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  .hero-section { padding: 32px 20px; min-height: auto; overflow: visible; }
  .hero-logo { margin-bottom:20px; }
  .hero-logo-icon { width:120px; height:120px; }
  .hero-tagline { font-size: 24px; }
  .hero-subtitle { font-size: 13px; margin-bottom: 18px; }
  .hero-features { display: none; }
  .auth-section { width: 100%; padding: 24px 20px; border-left: none; border-top: 1px solid var(--border-color); overflow: visible; min-height: auto; }
  .auth-content-area { overflow: visible; }
  .section-title { font-size: 20px; }
  .step-text { display: none; }
  .step-line { width: 26px; }
  .back-btn { left: 20px; top: 24px; }
}
@media (max-width: 480px) {
  .hero-section { padding: 24px 16px; }
  .hero-logo { margin-bottom:16px; }
  .hero-logo-icon { width:100px; height:100px; }
  .hero-tagline { font-size: 20px; }
  .auth-section { padding: 20px 16px; }
  .pin-input { width: 40px; height: 38px; font-size: 16px; }
  .pin-inputs { gap: 5px; }
  .name-row { flex-direction: column; gap: 10px; }
  .avatar-preview-circle { width: 86px; height: 86px; font-size: 30px; }
}
</style>
