/* Glassmorphic Futuristic Authentication Pages */

:root {
  --primary-glow: rgba(135, 0, 255, 0.7);
  --secondary-glow: rgba(0, 255, 234, 0.7);
  --glass-bg: rgba(16, 20, 33, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --accent-color: #00eeff;
  --auth-bg: linear-gradient(135deg, #0f1a2c 0%, #141823 100%);
}

/* Body styling for auth pages */
.login-page, .register-page, .forgot-password-page, .reset-password-page {
  background: var(--auth-bg);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Add animated background */
.login-page::before, .register-page::before, .forgot-password-page::before, .reset-password-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 15% 50%, rgba(135, 0, 255, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(0, 255, 234, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 30%);
  z-index: 0;
  pointer-events: none;
  animation: float-bg 20s ease-in-out infinite;
}

@keyframes float-bg {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-10px, -10px) rotate(1deg); }
  66% { transform: translate(10px, -5px) rotate(-1deg); }
}

/* Logo styling */
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
  z-index: 2;
  position: relative;
}

/* Remember Me checkbox styling */
.auth-remember-me {
  display: flex;
  align-items: center;
  margin: 1rem 0;
  gap: 8px;
}

.auth-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--glass-border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-checkbox:checked {
  background: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 238, 255, 0.3);
}

.auth-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-size: 12px;
  font-weight: bold;
}

.auth-checkbox-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox-label:hover {
  color: rgba(255, 255, 255, 0.95);
}

.logo-image {
  max-width: 150px;
  height: auto;
  filter: 
    drop-shadow(0 0 10px rgba(0, 238, 255, 0.6))
    drop-shadow(0 0 20px rgba(0, 238, 255, 0.4))
    drop-shadow(0 0 30px rgba(0, 238, 255, 0.2));
  animation: logo-glow 2.5s ease-in-out infinite alternate;
}

@keyframes logo-glow {
  0% {
    filter: 
      drop-shadow(0 0 10px rgba(0, 238, 255, 0.6))
      drop-shadow(0 0 20px rgba(0, 238, 255, 0.4))
      drop-shadow(0 0 30px rgba(0, 238, 255, 0.2));
    transform: scale(1);
  }
  100% {
    filter: 
      drop-shadow(0 0 20px rgba(0, 238, 255, 0.8))
      drop-shadow(0 0 40px rgba(0, 238, 255, 0.6))
      drop-shadow(0 0 60px rgba(0, 238, 255, 0.4));
    transform: scale(1.05);
  }
}

/* Main card styling */
.auth-card {
  background: rgba(16, 20, 33, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 238, 255, 0.2);
  border-radius: 20px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 238, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  z-index: 2;
}

/* Header styling */
.auth-header {
  background: linear-gradient(135deg, rgba(16, 20, 33, 0.9) 0%, rgba(25, 30, 45, 0.9) 100%);
  border-bottom: 1px solid rgba(0, 238, 255, 0.2);
  padding: 2rem;
  text-align: center;
  position: relative;
}

.auth-header h3 {
  color: white;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 0 20px rgba(0, 238, 255, 0.3);
  font-size: 1.5rem;
}

.auth-header i.fas.fa-tooth {
  color: var(--accent-color);
  filter: drop-shadow(0 0 10px rgba(0, 238, 255, 0.6));
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 238, 255, 0.6)); }
  50% { filter: drop-shadow(0 0 20px rgba(0, 238, 255, 0.9)); }
}

/* Body styling */
.auth-body {
  padding: 2rem 3rem;
  position: relative;
}

/* Form styling */
.auth-form {
  position: relative;
  z-index: 1;
}

/* Label styling */
.auth-label {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.9rem;
}

.auth-label i {
  color: var(--accent-color);
  margin-right: 0.5rem;
  width: 16px;
  text-align: center;
}

/* Input styling */
.auth-input {
  background: rgba(25, 30, 45, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 238, 255, 0.3);
  border-radius: 12px;
  color: white;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(0, 238, 255, 0.3);
  background: rgba(25, 30, 45, 0.9);
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Button styling */
.auth-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  border: none;
  border-radius: 12px;
  color: white;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 
    0 4px 15px rgba(139, 92, 246, 0.3),
    0 0 20px rgba(139, 92, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.auth-btn:hover {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  box-shadow: 
    0 6px 20px rgba(139, 92, 246, 0.4),
    0 0 30px rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.auth-btn:active {
  transform: translateY(0);
}

/* Links styling */
.auth-links {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-links p {
  margin: 0.5rem 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.auth-links a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.auth-links a:hover {
  color: white;
  text-shadow: 0 0 10px rgba(0, 238, 255, 0.6);
}

.auth-support {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-bottom: 1rem !important;
}

/* Alert styling */
.auth-alert {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 8px;
  color: #fca5a5;
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-alert.alert-success {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.auth-alert.alert-info {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* Error text styling */
.auth-error {
  color: #fca5a5;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Form group spacing */
.auth-form-group {
  margin-bottom: 1.5rem;
}

/* Two-column layout for register form */
.register-page .auth-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.register-page .auth-form-group:last-of-type,
.register-page .auth-form .auth-btn {
  grid-column: 1 / -1;
}

/* Container adjustments */
.auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .register-page .auth-form {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .register-page .auth-form-group:last-of-type,
  .register-page .auth-form .auth-btn {
    grid-column: 1;
  }
}

@media (max-width: 576px) {
  .auth-card {
    margin: 1rem;
    max-width: none;
  }
  
  .auth-header, .auth-body {
    padding: 1.5rem;
  }
  
  .auth-header h3 {
    font-size: 1.25rem;
  }
}

/* Loading state for buttons */
.auth-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-btn:disabled:hover {
  transform: none;
}
/* Small screen optimizations for iPhone SE and 13 Mini */
@media (max-height: 700px) {
  .auth-container {
    justify-content: flex-start;
    padding: 1.5rem 1rem;
    min-height: auto;
  }
  
  .auth-logo {
    margin-bottom: 1rem;
  }
  
  .logo-image {
    max-width: 100px;
  }
  
  .auth-header {
    padding: 1.25rem 1.5rem;
  }
  
  .auth-header h3 {
    font-size: 1.15rem;
  }
  
  .auth-body {
    padding: 1.25rem 1.5rem;
  }
  
  .auth-form-group {
    margin-bottom: 1rem;
  }
  
  .auth-input {
    padding: 0.7rem 0.875rem;
    font-size: 0.95rem;
  }
  
  .auth-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .auth-links {
    margin-top: 1rem;
  }
  
  .auth-links p {
    margin: 0.4rem 0;
    font-size: 0.85rem;
  }
  
  .auth-support {
    margin-bottom: 0.75rem !important;
  }
}

/* Extra compact mode for very small screens (iPhone SE landscape or very short viewports) */
@media (max-height: 600px) {
  .auth-container {
    padding: 1rem 0.75rem;
  }
  
  .auth-logo {
    margin-bottom: 0.75rem;
  }
  
  .logo-image {
    max-width: 80px;
  }
  
  .auth-header {
    padding: 1rem 1.25rem;
  }
  
  .auth-header h3 {
    font-size: 1rem;
  }
  
  .auth-body {
    padding: 1rem 1.25rem;
  }
  
  .auth-form-group {
    margin-bottom: 0.75rem;
  }
  
  .auth-input {
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .auth-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .auth-links {
    margin-top: 0.75rem;
  }
  
  .auth-links p {
    margin: 0.3rem 0;
    font-size: 0.8rem;
  }
  
  .auth-support {
    margin-bottom: 0.5rem !important;
  }
  
  .auth-label {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
  }
}
