/* Login Page - Enhanced Modern Design */

.login-page-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1c3a 0%, #2d3561 25%, #4a5d8a 50%, #2d3561 75%, #1a1c3a 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

/* Subtle background pattern */
.login-page-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(75, 0, 130, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(147, 112, 219, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

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

.login-card {
  background: rgba(22, 27, 54, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

/* Header Section */
.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.logo-container {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #8a2be2 0%, #9370db 50%, #ba55d3 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  box-shadow: 
    0 10px 20px rgba(138, 43, 226, 0.3),
    0 4px 8px rgba(138, 43, 226, 0.2);
  position: relative;
}

.logo-container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #8a2be2, #9370db, #ba55d3);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.7;
}

.login-logo {
  width: 40px;
  height: 40px;
  filter: brightness(0) invert(1);
}

.welcome-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.welcome-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 0 0;
  line-height: 1.4;
}

/* Form Section */
.login-form-container {
  margin-top: 40px;
}

.form-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 30px 0;
  text-align: left;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.login-input {
  padding: 16px 20px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  transition: all 0.3s ease;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.login-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: #8a2be2;
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
}

.login-input:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Checkbox styling */
.form-check-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.form-check-input {
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-check-input:checked {
  background: #8a2be2;
  border-color: #8a2be2;
}

.form-check-input:checked::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.form-check-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  user-select: none;
}

/* Login Button */
.login-button {
  background: linear-gradient(135deg, #4c6ef5 0%, #8a2be2 50%, #9c27b0 100%);
  border: none;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  text-transform: none;
  box-shadow: 
    0 8px 20px rgba(138, 43, 226, 0.3),
    0 4px 8px rgba(138, 43, 226, 0.2);
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 24px rgba(138, 43, 226, 0.4),
    0 6px 12px rgba(138, 43, 226, 0.3);
}

.login-button:active {
  transform: translateY(0);
}

.login-button i {
  font-size: 1rem;
}

/* Links Section */
.login-links {
  margin-top: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.register-link,
.forgot-link {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.register-link a,
.forgot-link a {
  color: #8a2be2;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.register-link a:hover,
.forgot-link a:hover {
  color: #9370db;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .login-page-container {
    padding: 15px;
  }
  
  .login-card {
    padding: 30px 25px;
    border-radius: 16px;
  }
  
  .welcome-title {
    font-size: 1.8rem;
  }
  
  .welcome-subtitle {
    font-size: 1rem;
  }
  
  .form-title {
    font-size: 1.5rem;
  }
  
  .logo-container {
    width: 70px;
    height: 70px;
  }
  
  .login-logo {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 25px 20px;
  }
  
  .welcome-title {
    font-size: 1.6rem;
  }
  
  .login-input {
    padding: 14px 16px;
  }
  
  .login-button {
    padding: 14px 20px;
    font-size: 1rem;
  }
}

/* Focus states for accessibility */
.login-input:focus,
.login-button:focus,
.form-check-input:focus {
  outline: 2px solid #8a2be2;
  outline-offset: 2px;
}

/* Remove autofill yellow background */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.08) inset;
  -webkit-text-fill-color: #ffffff;
}

/* Registration Page Specific Styles */
.register-card {
  max-width: 520px;
}

.register-form {
  gap: 18px;
}

/* Error Messages */
.error-message {
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-top: 5px;
  display: block;
}

/* Captcha Section */
.captcha-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.captcha-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.captcha-icon {
  color: #e91e63;
  font-size: 1.2rem;
}

.captcha-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.captcha-problem {
  font-size: 1.1rem;
  color: #8a2be2;
  font-weight: 600;
  margin: 12px 0;
  padding: 8px 12px;
  background: rgba(138, 43, 226, 0.1);
  border-radius: 8px;
  border-left: 3px solid #8a2be2;
}

.captcha-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.captcha-input {
  max-width: 150px;
  flex-shrink: 0;
}

.captcha-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  white-space: nowrap;
}

.captcha-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin: 10px 0 0 0;
  line-height: 1.4;
}

/* Register Button */
.register-button {
  background: linear-gradient(135deg, #8a2be2 0%, #9370db 50%, #ba55d3 100%);
  margin-top: 20px;
}

.register-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 24px rgba(138, 43, 226, 0.4),
    0 6px 12px rgba(138, 43, 226, 0.3);
}

/* Username field styling for register */
.register-form .form-group:first-child .login-input {
  background: rgba(255, 255, 255, 0.06);
}

/* Responsive adjustments for registration */
@media (max-width: 768px) {
  .register-card {
    max-width: 100%;
  }
  
  .captcha-section {
    padding: 15px;
  }
  
  .captcha-input-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .captcha-input {
    max-width: 100%;
  }
  
  .captcha-hint {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .captcha-section {
    padding: 12px;
  }
  
  .captcha-problem {
    font-size: 1rem;
    padding: 6px 10px;
  }
}