/* ============================================================
   earncash - Modern High-End Auth Styles (auth.css)
   Glassmorphism, Ambient Glow, Interactive Micro-interactions
   ============================================================ */

/* --- Ambient Background Glow --- */
.auth-page {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 60px;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}

.auth-page-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.auth-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  animation: orbFloat 14s ease-in-out infinite alternate;
}

.auth-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  top: -100px;
  left: 20%;
  animation-delay: 0s;
}

.auth-glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  bottom: -80px;
  right: 18%;
  animation-delay: -5s;
}

.auth-glow-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
  top: 40%;
  left: 55%;
  animation-delay: -9s;
  opacity: 0.18;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 20px) scale(1.08); }
  100% { transform: translate(-25px, -15px) scale(0.95); }
}

/* --- Auth Box Container --- */
.auth-container {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
  animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-box {
  position: relative;
  width: 100%;
  background: rgba(18, 18, 26, 0.78);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 36px;
  box-shadow:
    0 24px 60px -12px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 50px -10px rgba(124, 58, 237, 0.15);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-box:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow:
    0 28px 70px -12px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(124, 58, 237, 0.2),
    0 0 60px -5px rgba(124, 58, 237, 0.25);
}

/* Glowing top accent strip */
.auth-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #06b6d4, #a855f7, #ec4899);
  background-size: 200% 100%;
  animation: borderShine 6s linear infinite;
}

@keyframes borderShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* --- Auth Header --- */
.auth-header {
  text-align: center;
  margin-bottom: 28px;
  position: relative;
}

.auth-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #c084fc;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-bottom: 16px;
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.2);
}

.auth-pill-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #a855f7;
}

.auth-header h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 40%, #d8b4fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-header p {
  color: var(--gray);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.5;
}

/* --- Social Auth Options --- */
.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  background: rgba(26, 26, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-social:hover {
  background: rgba(36, 36, 52, 0.95);
  border-color: rgba(124, 58, 237, 0.45);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.45), 0 0 15px -3px rgba(124, 58, 237, 0.3);
}

.btn-social:active {
  transform: translateY(0);
}

.btn-social svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Divider --- */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 22px 0;
  color: #64748b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.1) 60%, transparent);
}

.auth-divider span {
  padding: 0 14px;
}

/* --- Form Groups & Input Styling --- */
.form-group {
  margin-bottom: 18px;
  position: relative;
}

.form-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #64748b;
  pointer-events: none;
  transition: color 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon-left svg {
  width: 18px;
  height: 18px;
}

.form-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  background: rgba(22, 22, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  font-size: 0.94rem;
  color: #f8fafc;
  font-family: inherit;
  transition: all 0.25s ease;
  outline: none;
}

.form-input::placeholder {
  color: #475569;
}

.form-input:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(26, 26, 38, 0.85);
}

.form-input:focus {
  border-color: #7c3aed;
  background: rgba(26, 26, 40, 1);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25), 0 0 20px -4px rgba(124, 58, 237, 0.3);
}

.input-wrapper:focus-within .input-icon-left {
  color: #a855f7;
}

/* Password Toggle Icon */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
  color: #c084fc;
  background: rgba(124, 58, 237, 0.12);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle .eye-slash {
  display: none;
}

.password-toggle.is-revealed .eye-open {
  display: none;
}

.password-toggle.is-revealed .eye-slash {
  display: block;
}

/* Errors and Success */
.error-text {
  color: #f87171;
  font-size: 0.78rem;
  margin-top: 6px;
  display: none;
  font-weight: 500;
}

.success-text {
  color: #34d399;
  font-size: 0.78rem;
  margin-top: 6px;
  display: none;
  font-weight: 500;
}

.error-text.show,
.success-text.show {
  display: block;
  animation: fadeInDown 0.2s ease;
}

.form-input.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.form-input.input-success {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15) !important;
}

/* --- Password Strength Meter (Register Page) --- */
.password-strength-wrap {
  margin-top: 8px;
}

.password-strength-bars {
  display: flex;
  gap: 6px;
  height: 4px;
  margin-bottom: 6px;
}

.strength-bar {
  flex: 1;
  height: 100%;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease;
}

.strength-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #64748b;
}

.strength-status {
  font-weight: 600;
  transition: color 0.3s ease;
}

/* Strength level colors */
.strength-weak .strength-bar:nth-child(1) { background: #ef4444; }
.strength-weak .strength-status { color: #ef4444; }

.strength-fair .strength-bar:nth-child(1),
.strength-fair .strength-bar:nth-child(2) { background: #f59e0b; }
.strength-fair .strength-status { color: #f59e0b; }

.strength-good .strength-bar:nth-child(1),
.strength-good .strength-bar:nth-child(2),
.strength-good .strength-bar:nth-child(3) { background: #06b6d4; }
.strength-good .strength-status { color: #06b6d4; }

.strength-strong .strength-bar { background: #22c55e; }
.strength-strong .strength-status { color: #22c55e; }

/* --- Custom Checkbox & Options --- */
.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 24px;
  font-size: 0.85rem;
}

.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #94a3b8;
  font-weight: 500;
  margin: 0;
  user-select: none;
  font-size: 0.86rem;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-visual {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(26, 26, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-visual svg {
  width: 12px;
  height: 12px;
  stroke: #ffffff;
  stroke-width: 2.5;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-checkbox input:checked ~ .checkbox-visual {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-color: #7c3aed;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
}

.custom-checkbox input:checked ~ .checkbox-visual svg {
  opacity: 1;
  transform: scale(1);
}

.custom-checkbox:hover .checkbox-visual {
  border-color: #7c3aed;
}

.forgot-link {
  color: #c084fc;
  font-weight: 600;
  font-size: 0.85rem;
  transition: color 0.2s ease;
  text-decoration: none;
}

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

/* --- Submit Button --- */
.btn-submit-premium {
  width: 100%;
  padding: 14px 24px;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #06b6d4 100%);
  background-size: 200% 200%;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 24px -4px rgba(124, 58, 237, 0.55), 0 0 20px -2px rgba(124, 58, 237, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-submit-premium::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.75s ease;
}

.btn-submit-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -4px rgba(124, 58, 237, 0.75), 0 0 30px 0 rgba(6, 182, 212, 0.4);
  background-position: right center;
}

.btn-submit-premium:hover::after {
  left: 150%;
}

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

.btn-submit-premium svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.btn-submit-premium:hover svg {
  transform: translateX(3px);
}

/* --- Auth Footer --- */
.auth-footer {
  text-align: center;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  color: var(--gray);
}

.auth-footer a {
  color: #c084fc;
  font-weight: 700;
  margin-left: 4px;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* --- Trust Badges Under Card --- */
.auth-trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
  flex-wrap: wrap;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-badge-item svg {
  width: 15px;
  height: 15px;
  color: #a855f7;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 520px) {
  .auth-box {
    padding: 32px 22px;
    border-radius: 20px;
  }
  .auth-social-row {
    grid-template-columns: 1fr;
  }
  .auth-trust-badges {
    gap: 12px;
    font-size: 0.74rem;
  }
}

