/* Authentication Pages Styling */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #fff;
  background: transparent;
  overflow: hidden;
}

/* Main container */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}

/* Auth card */
.auth-card {
  background: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 0;
  width: 100%;
  max-width: 450px;
  text-align: center;
  position: relative;
  z-index: 2;
  border: 1px solid #333;
  overflow: hidden;
}

/* Auth header */
.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #333;
  background: #252525;
  border-radius: 12px 12px 0 0;
}

.auth-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 24px;
  font-weight: 600;
}

/* Close button */
.close-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: #333;
  color: #fff;
  transform: scale(1.1);
}

/* Auth body */
.auth-body {
  padding: 30px;
}

/* Form styling */
.auth-form {
  text-align: left;
  padding: 0;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #e0e0e0;
  font-weight: 400;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
}

.form-group input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #555;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #3a3a3a;
  color: #fff;
  position: relative;
}

.form-group input:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.form-group input:valid {
  border-color: #4a90e2;
}

.form-group input::placeholder {
  color: #999;
}

/* Input icons */
.form-group.with-icon {
  position: relative;
}

.form-group.with-icon input {
  padding-left: 50px;
}

.form-group.with-icon::before {
  content: attr(data-icon);
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  z-index: 1;
}

/* Button styling */
.auth-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 24px;
  text-transform: none;
  letter-spacing: 0;
  position: relative;
}

.auth-btn:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-btn:active {
  transform: translateY(0);
  background: linear-gradient(135deg, #4e5bc6 0%, #5e377e 100%);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Links */
.auth-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.3s ease;
}

.auth-link:hover {
  color: #5a6fd8;
  text-decoration: underline;
}

/* Auth footer */
.auth-footer {
  text-align: center;
  color: #ccc;
  font-size: 14px;
}

/* Messages */
.error-message, .success-message {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
  display: none;
  animation: slideIn 0.3s ease;
}

.error-message {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border-left: 4px solid #e74c3c;
}

.success-message {
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
  border-left: 4px solid #27ae60;
}

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

/* Password strength indicator */
.password-strength {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.strength-weak { 
  color: #e74c3c;
}

.strength-medium { 
  color: #f39c12;
}

.strength-strong { 
  color: #27ae60;
}

/* Terms checkbox */
.terms-checkbox {
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(74, 144, 226, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(74, 144, 226, 0.2);
}

.terms-checkbox input {
  width: auto;
  margin-right: 12px;
  margin-top: 3px;
  transform: scale(1.2);
}

.terms-checkbox label {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #ccc;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

/* Loading state */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top: 2px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 480px) {
  .auth-container {
    padding: 15px;
  }
  
  .auth-card {
    max-width: 100%;
  }
  
  .auth-body {
    padding: 20px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .auth-card {
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
  }
  
  .auth-title {
    color: #fff;
  }
  
  .form-group label {
    color: #ccc;
  }
  
  .form-group input {
    background: rgba(50, 50, 50, 0.9);
    border-color: #555;
    color: #fff;
  }
  
  .terms-checkbox {
    background: rgba(102, 126, 234, 0.1);
  }
  
  .terms-checkbox label {
    color: #ccc;
  }
}

/* Focus accessibility */
.auth-btn:focus,
.form-group input:focus,
.auth-link:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .auth-card {
    border: 2px solid #000;
  }
  
  .form-group input {
    border-width: 3px;
  }
  
  .auth-btn {
    border: 2px solid #000;
  }
}