/* Advanced Auth Page Enhancements */

/* ========================================
   1. FLOATING LABELS
======================================== */
.form-group {
  position: relative;
  margin-bottom: 24px;
}

.form-group.float-label {
  position: relative;
}

.form-group.float-label input,
.form-group.float-label textarea {
  padding-top: 20px;
  padding-bottom: 8px;
}

.form-group.float-label label {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  transition: all 0.3s ease;
  pointer-events: none;
  color: #94a3b8;
  font-size: 15px;
  background: transparent;
}

.form-group.float-label input:focus + label,
.form-group.float-label input:not(:placeholder-shown) + label,
.form-group.float-label textarea:focus + label,
.form-group.float-label textarea:not(:placeholder-shown) + label,
.form-group.float-label input.has-value + label {
  top: 8px;
  font-size: 12px;
  color: var(--primary);
  transform: translateY(0);
}

/* ========================================
   2. PASSWORD STRENGTH INDICATOR
======================================== */
.password-strength-wrapper {
  position: relative;
}

.password-strength-meter {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: all 0.3s ease;
}

.password-strength-meter.active {
  opacity: 1;
  transform: scaleX(1);
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.password-strength-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

.password-strength-bar.weak {
  width: 33%;
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.password-strength-bar.medium {
  width: 66%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.password-strength-bar.strong {
  width: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
}

.password-strength-text {
  font-size: 12px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

.password-strength-text.active {
  opacity: 1;
  transform: translateY(0);
}

.password-strength-text.weak {
  color: #ef4444;
}

.password-strength-text.medium {
  color: #f59e0b;
}

.password-strength-text.strong {
  color: #10b981;
}

.password-tips {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-size: 13px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.password-tips.active {
  opacity: 1;
  max-height: 200px;
}

.password-tips ul {
  margin: 0;
  padding: 0 0 0 20px;
  list-style: none;
}

.password-tips li {
  margin: 6px 0;
  position: relative;
  color: #64748b;
  transition: color 0.3s ease;
}

.password-tips li::before {
  content: '○';
  position: absolute;
  right: -20px;
  color: #cbd5e1;
  transition: all 0.3s ease;
}

.password-tips li.valid {
  color: #10b981;
}

.password-tips li.valid::before {
  content: '✓';
  color: #10b981;
  font-weight: bold;
}

/* ========================================
   3. ENHANCED INPUT ANIMATIONS
======================================== */
.form-input {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.form-input.success {
  border-color: #10b981;
  background: #f0fdf4;
}

.form-input.error {
  border-color: #ef4444;
  background: #fef2f2;
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  transition: all 0.3s ease;
  pointer-events: none;
}

.form-input:focus ~ .input-icon {
  color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.input-success-icon,
.input-error-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-input.success ~ .input-success-icon {
  transform: translateY(-50%) scale(1);
  opacity: 1;
  color: #10b981;
}

.form-input.error ~ .input-error-icon {
  transform: translateY(-50%) scale(1);
  opacity: 1;
  color: #ef4444;
}

/* ========================================
   4. SHOW/HIDE PASSWORD TOGGLE
======================================== */
.password-toggle {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  background: #f1f5f9;
  color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.password-toggle i {
  transition: all 0.3s ease;
}

.password-toggle.active i {
  transform: rotateY(180deg);
}

/* ========================================
   5. INLINE VALIDATION MESSAGES
======================================== */
.validation-message {
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-10px);
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.validation-message.active {
  opacity: 1;
  transform: translateY(0);
  max-height: 100px;
}

.validation-message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.validation-message.success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.validation-message i {
  font-size: 16px;
}

/* ========================================
   6. SOCIAL LOGIN ENHANCEMENTS
======================================== */
.social-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.social-btn:active::before {
  width: 300px;
  height: 300px;
}

.social-btn.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(24, 119, 242, 0.3);
}

.social-btn.google:hover {
  background: #ea4335;
  border-color: #ea4335;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(234, 67, 53, 0.3);
}

.social-btn.apple:hover {
  background: #000000;
  border-color: #000000;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.social-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.social-btn .btn-text {
  transition: opacity 0.3s ease;
}

.social-btn.loading .btn-text {
  opacity: 0;
}

.social-btn-spinner {
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-btn.loading .social-btn-spinner {
  opacity: 1;
}

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

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

/* ========================================
   7. SUBMIT BUTTON LOADING STATES
======================================== */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after {
  width: 400px;
  height: 400px;
}

.btn-primary.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-primary .btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.3s ease;
}

.btn-primary.loading .btn-content {
  opacity: 0;
}

.btn-loader {
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary.loading .btn-loader {
  opacity: 1;
}

.btn-loader-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-primary.success {
  background: #10b981;
  border-color: #10b981;
}

.btn-primary.success::before {
  content: '✓';
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%) scale(0);
  font-size: 24px;
  color: white;
  animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes successPop {
  to {
    transform: translate(50%, -50%) scale(1);
  }
}

/* ========================================
   8. ENHANCED CHECKBOX (REMEMBER ME)
======================================== */
.custom-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

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

.checkbox-box {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  margin-left: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: white;
}

.custom-checkbox:hover .checkbox-box {
  border-color: var(--primary);
  transform: scale(1.1);
}

.custom-checkbox input:checked ~ .checkbox-box {
  background: var(--primary);
  border-color: var(--primary);
  animation: checkboxPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkboxPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.checkbox-box::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 6px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-checkbox input:checked ~ .checkbox-box::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-label {
  margin-right: 8px;
  color: #475569;
  transition: color 0.3s ease;
}

.custom-checkbox:hover .checkbox-label {
  color: var(--primary);
}

/* ========================================
   9. AUTOFILL DETECTION STYLING
======================================== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: #1e293b;
  -webkit-box-shadow: 0 0 0 1000px #f0f9ff inset;
  transition: background-color 5000s ease-in-out 0s;
  border: 2px solid #bfdbfe;
}

/* ========================================
   10. KEYBOARD NAVIGATION HINTS
======================================== */
.keyboard-hint {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.key {
  display: inline-block;
  padding: 2px 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: #475569;
}

.form-input:focus ~ .keyboard-hint {
  color: var(--primary);
}

/* ========================================
   11. GLASSMORPHISM EFFECTS
======================================== */
.auth-form.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-visual.glass {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.1) 0%,
    rgba(6, 182, 212, 0.1) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ========================================
   12. ANIMATED GRADIENTS
======================================== */
.animated-gradient {
  background: linear-gradient(
    -45deg,
    rgba(37, 99, 235, 0.05),
    rgba(139, 92, 246, 0.05),
    rgba(236, 72, 153, 0.05),
    rgba(251, 146, 60, 0.05)
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

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

/* ========================================
   13. FOCUS RING IMPROVEMENTS
======================================== */
*:focus {
  outline: none;
}

.form-input:focus-visible,
.btn:focus-visible,
.social-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ========================================
   14. SMOOTH TRANSITIONS
======================================== */
.smooth-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   15. DARK MODE SUPPORT - DISABLED
======================================== */
/* body.dark-mode .password-tips {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .validation-message.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

body.dark-mode .validation-message.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

body.dark-mode .checkbox-box {
  background: #1e293b;
  border-color: #475569;
}

body.dark-mode .key {
  background: #1e293b;
  border-color: #475569;
  color: #cbd5e1;
}

body.dark-mode input:-webkit-autofill {
  -webkit-text-fill-color: #e2e8f0;
  -webkit-box-shadow: 0 0 0 1000px #1e293b inset;
  border-color: #3b82f6;
} */
