:root {
  --primary-teal: #1ECFBD;
  --primary-cyan: #09A5D1;
  --dark-blue: #052754;
  --bg-light: #F8F8F8;
  --text-dark: #052754;
  --text-light: #565656;
  --error-red: #FF6B6B;
  --success-green: #32CD32;
  --card-bg: rgba(255, 255, 255, 0.75);
  --border-glass: rgba(255, 255, 255, 0.4);
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

/* Background animated decorative gradients */
.background-decor {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at 20% 30%, rgba(30, 207, 189, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(9, 165, 209, 0.15) 0%, transparent 40%);
  z-index: -1;
}

@keyframes bgMove {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(2%, 2%) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}

.animate-bg {
  animation: bgMove 12s ease-in-out infinite;
}

.container {
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

/* Glassmorphic card styling */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(5, 39, 84, 0.08), 
              0 1px 3px rgba(5, 39, 84, 0.04);
  padding: 40px 32px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo & Branding */
.logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.logo {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 4px 10px rgba(30, 207, 189, 0.25));
}

.brand-title {
  font-size: 24px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--primary-teal), var(--primary-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* State management for Single Page Flow */
.state-view {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease-out;
}

.state-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Typography elements */
.section-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 28px;
}

.email-highlight {
  color: var(--primary-cyan);
  font-weight: 500;
}

/* Form Styles */
.form-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 16px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid rgba(5, 39, 84, 0.15);
  background-color: rgba(255, 255, 255, 0.6);
  color: var(--text-dark);
  transition: all 0.2s ease;
  outline: none;
}

.password-wrapper input:focus {
  border-color: var(--primary-cyan);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(9, 165, 209, 0.1);
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toggle-password:hover {
  opacity: 1;
}

.eye-icon {
  width: 20px;
  height: 20px;
}

/* Password Strength Indicator */
.strength-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.strength-bar {
  flex-grow: 1;
  height: 4px;
  border-radius: 2px;
  background-color: rgba(5, 39, 84, 0.1);
  position: relative;
  overflow: hidden;
}

.strength-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.strength-text {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  min-width: 60px;
  text-align: right;
}

/* Strength states */
.strength-weak .strength-bar::after { width: 33%; background-color: var(--error-red); }
.strength-weak .strength-text { color: var(--error-red); }

.strength-medium .strength-bar::after { width: 66%; background-color: #FFA500; }
.strength-medium .strength-text { color: #FFA500; }

.strength-strong .strength-bar::after { width: 100%; background-color: var(--success-green); }
.strength-strong .strength-text { color: var(--success-green); }

/* Buttons */
.btn-submit, .btn-action {
  width: 100%;
  height: 52px;
  border-radius: 26px;
  border: none;
  background: linear-gradient(90deg, var(--primary-teal), var(--primary-cyan));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(30, 207, 189, 0.25);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover, .btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(30, 207, 189, 0.35);
}

.btn-submit:active, .btn-action:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  background: #D9D9D9;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-action {
  text-decoration: none;
  margin-top: 16px;
}

/* Loading Spinners */
.spinner-container {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(9, 165, 209, 0.1);
  border-top: 4px solid var(--primary-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 15px;
  color: var(--text-light);
}

/* Banner Alerts */
.error-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 12px;
  color: var(--error-red);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: all 0.2s ease;
}

.error-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* Badges for End States */
.icon-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
}

.success-badge {
  background-color: rgba(50, 205, 50, 0.12);
  color: var(--success-green);
}

.error-badge {
  background-color: rgba(255, 107, 107, 0.12);
  color: var(--error-red);
}

.error-badge-icon {
  width: 36px;
  height: 36px;
}

.success-text, .error-desc-text {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* App redirect section */
.app-redirect-area {
  border-top: 1px solid rgba(5, 39, 84, 0.08);
  padding-top: 24px;
  margin-top: 24px;
}

.hint-text {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

/* Circular checkmark drawing animation */
.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: var(--success-green);
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 3;
  stroke: var(--success-green);
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
  100% { stroke-dashoffset: 0; }
}

@media(max-width: 480px) {
  .glass-card {
    padding: 32px 20px;
    border-radius: 16px;
  }
}
