/* PAYLA ENTRY/AUTH - PREMIUM ONBOARDING STYLE */
:root {
  /* Core Brand Palette */
  --obsidian: #0A0A0A;
  --obsidian-secondary: #0F0F0F;
  --rose-gold: #E8B4B8;
  --rose-glow: rgba(232, 180, 184, 0.12);
  --text-primary: #FDFDFD;
  --text-secondary: #B8B8B8;
  --glass-bg: rgba(15, 15, 15, 0.6);
  --glass-border: rgba(232, 180, 184, 0.15);
  
  /* Typography */
  --font-cormorant: 'Cormorant Garamond', serif;
  --font-playfair: 'Playfair Display', serif;
  --font-inter: 'Inter', sans-serif;
  --font-lora: 'Lora', serif;
  --font-mono: 'Courier New', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--obsidian);
  color: var(--text-primary);
  font-family: var(--font-inter);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* === ANIMATED GLITTER BACKGROUND === */
.glitter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(232, 180, 184, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(232, 180, 184, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(232, 180, 184, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
}

/* === GLASS MORPHISM EFFECT === */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

/* === TOPBAR - MOBILE FIRST === */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--rose-glow);
}

/* Logo */
.logo {
  font-family: var(--font-playfair);
  font-weight: 900;
  font-size: 18px;
  color: var(--rose-gold);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  letter-spacing: -0.5px;
}

/* Progress Steps - Auth Flow */
.progress {
  display: none; /* Hidden on mobile by default */
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  padding: 12px 16px;
  border-bottom: 1px solid var(--rose-glow);
  z-index: 999;
}

.progress-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--obsidian);
  border: 1px solid var(--rose-glow);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.step.active span {
  background: var(--rose-gold);
  border-color: var(--rose-gold);
  color: var(--obsidian);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(232, 180, 184, 0.4);
}

.step.completed span {
  background: var(--rose-gold);
  border-color: var(--rose-gold);
  color: var(--obsidian);
}

.step-label {
  font-family: var(--font-inter);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.step.active .step-label {
  color: var(--rose-gold);
}

/* === AUTH CONTAINER - ONBOARDING STYLE === */
.auth-container {
  margin-top: 60px;
  padding: 20px 16px;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.auth-card-container {
  width: 100%;
  max-width: 100%;
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Auth Card as Step Content */
.auth-card {
  display: none;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.auth-card.active {
  display: flex;
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo Section - Updated */
.logo-section {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 24px;
}

.logo-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--rose-gold), #f7c8c8);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--obsidian);
  box-shadow: 0 0 20px rgba(232, 180, 184, 0.3);
  border: 2px solid var(--rose-gold);
}

.logo-text {
  font-family: var(--font-cormorant);
  font-size: 32px;
  font-weight: 700;
  color: var(--rose-gold);
  margin-bottom: 8px;
  line-height: 1.3;
  background: linear-gradient(135deg, var(--text-primary), var(--rose-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-subtitle {
  font-family: var(--font-lora);
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Header Section - Onboarding Style */
.header-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(232, 180, 184, 0.1);
  border: 1px solid var(--rose-glow);
  color: var(--rose-gold);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.back-btn:hover {
  background: rgba(232, 180, 184, 0.2);
  transform: translateX(-2px);
}

.step-title {
  font-family: var(--font-cormorant);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  line-height: 1.3;
}

/* Content Section */
.content-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.content-section.centered {
  text-align: center;
}

.welcome-title {
  font-family: var(--font-cormorant);
  font-size: 32px;
  font-weight: 700;
  color: var(--rose-gold);
  margin-bottom: 8px;
  line-height: 1.3;
}

.welcome-subtitle {
  font-family: var(--font-lora);
  font-size: 16px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

.step-subtitle {
  font-family: var(--font-lora);
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Form Elements - Onboarding Style */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--rose-glow);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-wrapper:focus-within {
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 3px rgba(232, 180, 184, 0.2);
  transform: translateY(-1px);
}

.input-icon {
  padding: 0 16px;
  color: var(--rose-gold);
  font-size: 16px;
  flex-shrink: 0;
}

.toggle-password {
  position: absolute;
  right: 15px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5); /* Matching your glass theme */
  transition: color 0.3s ease;
  z-index: 10;
}

.toggle-password:hover {
  color: #fff;
}

.form-input {
  flex: 1;
  padding: 16px;
  padding-right: 45px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-inter);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  width: 100%;
}

.form-input::placeholder {
  font-family: var(--font-lora);
  font-style: italic;
  color: var(--text-secondary);
}

.form-input:read-only {
  opacity: 0.7;
  cursor: not-allowed;
  background: rgba(232, 180, 184, 0.05);
}

/* Error Messages */
.error-message {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  color: #ef4444;
  font-size: 14px;
  font-weight: 500;
}

.error-message i {
  flex-shrink: 0;
}

/* Buttons - Onboarding Style */
.btn-primary {
  padding: 16px 24px;
  border-radius: 12px;
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--rose-gold);
  color: var(--obsidian);
  box-shadow: 0 6px 20px rgba(232, 180, 184, 0.3);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(232, 180, 184, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  padding: 16px 24px;
  border-radius: 12px;
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--rose-gold);
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--rose-gold);
  width: 100%;
}

.btn-secondary:hover {
  background: rgba(232, 180, 184, 0.1);
  transform: translateY(-1px);
}

.btn-text {
  position: relative;
  z-index: 1;
}

.btn-loader {
  display: none;
  align-items: center;
  justify-content: center;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-arrow {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(2px);
}

/* Icons */
.confirmation-icon, .success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--obsidian);
  position: relative;
  background: linear-gradient(135deg, var(--rose-gold), #f7c8c8);
  box-shadow: 0 0 20px rgba(232, 180, 184, 0.3);
}

.icon-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--rose-glow), transparent 70%);
  opacity: 0.5;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* Instruction Steps */
.instruction-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.instruction-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: rgba(232, 180, 184, 0.05);
  border: 1px solid var(--rose-glow);
  border-radius: 12px;
  text-align: left;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-gold), #f7c8c8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--obsidian);
  flex-shrink: 0;
}

.step-content h4 {
  font-family: var(--font-cormorant);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.step-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Footer Section */
.footer-section {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-text {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}

.helper-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.link {
  color: var(--rose-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.link:hover {
  color: #f7c8c8;
  text-decoration: underline;
}

/* Badges */
.achievement-badge, .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
  justify-content: center;
  margin: 0 auto;
}

.achievement-badge {
  background: var(--rose-gold);
  color: var(--obsidian);
}

.status-badge {
  background: rgba(232, 180, 184, 0.1);
  border: 1px solid var(--rose-glow);
  color: var(--rose-gold);
}

/* === RESPONSIVE DESIGN === */
@media (min-width: 768px) {
  .topbar {
    height: 70px;
    padding: 0 24px;
  }

  .logo {
    font-size: 20px;
  }

  .progress {
    display: flex;
    position: static;
    background: transparent;
    padding: 0;
    border-bottom: none;
    gap: 30px;
  }

  .step {
    gap: 6px;
  }

  .step span {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .step-label {
    font-size: 10px;
  }

  .auth-container {
    margin-top: 70px;
    padding: 30px 24px;
  }

  .auth-card-container {
    border-radius: 24px;
    padding: 32px 28px;
    max-width: 500px;
  }

  .logo-text {
    font-size: 36px;
  }

  .step-title {
    font-size: 32px;
  }
}

@media (min-width: 1024px) {
  .topbar {
    height: 80px;
    padding: 0 32px;
  }

  .logo {
    font-size: 24px;
  }

  .progress {
    gap: 40px;
  }

  .step span {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .step-label {
    font-size: 11px;
  }

  .auth-container {
    padding: 40px 32px;
  }

  .auth-card-container {
    border-radius: 32px;
    padding: 48px 40px;
    max-width: 600px;
  }

  .logo-text {
    font-size: 40px;
  }

  .step-title {
    font-size: 36px;
  }
}

/* Safe Area Insets for Notch Phones */
@supports(padding: max(0px)) {
  .topbar,
  .auth-container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
button:focus-visible, 
input:focus-visible {
  outline: 2px solid var(--rose-gold);
  outline-offset: 2px;
}

/* Prevent zoom on iOS input focus */
@media screen and (max-width: 768px) {
  .form-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn-primary:hover,
  .btn-secondary:hover,
  .back-btn:hover {
    transform: none;
  }
  
  .btn-primary:active,
  .btn-secondary:active,
  .back-btn:active {
    transform: scale(0.95);
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Loading States */
.loading .btn-text {
  opacity: 0;
}

.loading .btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
}