/* Enhanced Auth CSS - Consistent with Dashboard */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(ellipse at top, #1a1a2e 0%, #16213e 50%, #0f172a 100%);
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Floating Particles */
.floating-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, #64ffda 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
  opacity: 0.3;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
  50% { transform: translateY(-20px) rotate(180deg); opacity: 0.6; }
}

/* Theme Switcher */
.theme-switcher {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.theme-switcher button {
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  color: #64ffda;
}

.theme-switcher button:hover {
  background: rgba(100, 255, 218, 0.2);
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(100, 255, 218, 0.3);
}

/* Back to Home Button */
.back-home {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
}

.btn-back {
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 50px;
  padding: 12px 20px;
  color: #64ffda;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-back:hover {
  background: rgba(100, 255, 218, 0.2);
  transform: translateX(-2px);
  box-shadow: 0 8px 25px rgba(100, 255, 218, 0.3);
}

/* Auth Container */
.auth-container {
  max-width: 450px;
  width: 100%;
  margin: 20px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 25px;
  padding: 40px;
  border: 1px solid rgba(100, 255, 218, 0.2);
  box-shadow: 0 8px 32px rgba(100, 255, 218, 0.1);
  position: relative;
  z-index: 1;
  overflow: hidden;
  animation: slideInUp 0.6s ease-out;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.logo-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 25px;
}

.logo-container {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid rgba(100, 255, 218, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(100, 255, 218, 0.2);
}

.auth-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 15px;
  transition: opacity 0.8s ease-in-out, transform 0.3s ease;
  opacity: 0;
}

.auth-logo:hover {
  transform: scale(1.05);
}

.brand-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 255, 218, 0.1) 0%, transparent 70%);
  animation: pulse-glow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.6; }
}

.auth-title {
  font-size: 2.2rem;
  background: linear-gradient(135deg, #64ffda 0%, #00bcd4 50%, #8a2be2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  font-weight: 300;
}

/* Form Styles */
.auth-form {
  position: relative;
  z-index: 1;
}

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

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #64ffda;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-icon {
  font-size: 1.1rem;
}

.form-group input {
  width: 100%;
  padding: 15px 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-group input:focus {
  outline: none;
  border-color: #64ffda;
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
  background: rgba(15, 23, 42, 0.8);
}

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

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 1.2rem;
  transition: color 0.3s ease;
  padding: 5px;
}

.password-toggle:hover {
  color: #64ffda;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(100, 255, 218, 0.3);
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #64ffda, #00bcd4);
  border-color: #64ffda;
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0f172a;
  font-weight: bold;
  font-size: 12px;
}

.forgot-link {
  color: #64ffda;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

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

/* Buttons */
.btn {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #64ffda, #00bcd4);
  color: #0f172a;
  box-shadow: 0 8px 25px rgba(100, 255, 218, 0.3);
  margin-bottom: 25px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4fd3b8, #0097a7);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(100, 255, 218, 0.4);
}

.btn-secondary {
  background: rgba(100, 255, 218, 0.1);
  color: #64ffda;
  border: 2px solid rgba(100, 255, 218, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(100, 255, 218, 0.2);
  border-color: #64ffda;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(100, 255, 218, 0.2);
}

/* Message Container */
.message-container {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
}

.message-container.show {
  opacity: 1;
  transform: translateY(0);
}

.message-container.error {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff4757;
}

.message-container.success {
  background: rgba(46, 213, 115, 0.1);
  border: 1px solid rgba(46, 213, 115, 0.3);
  color: #2ed573;
}

.message-container.info {
  background: rgba(55, 66, 250, 0.1);
  border: 1px solid rgba(55, 66, 250, 0.3);
  color: #3742fa;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  margin-top: 30px;
  position: relative;
  z-index: 1;
}

.auth-footer p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.register-link {
  color: #64ffda;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.register-link:hover {
  color: #00bcd4;
  text-decoration: underline;
}

.divider {
  margin: 25px 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.3), transparent);
}

.divider span {
  background: rgba(15, 23, 42, 0.8);
  padding: 0 15px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.guest-access {
  margin-top: 20px;
}

/* Security Notice */
.security-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  padding: 15px;
  background: rgba(100, 255, 218, 0.05);
  border: 1px solid rgba(100, 255, 218, 0.2);
  border-radius: 10px;
  position: relative;
  z-index: 1;
}

.security-icon {
  font-size: 1.2rem;
  color: #64ffda;
}

.security-notice p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin: 0;
}

/* Form Validation States */
.form-group.error input {
  border-color: #ff4757;
  box-shadow: 0 0 15px rgba(255, 71, 87, 0.3);
}

.form-group.success input {
  border-color: #2ed573;
  box-shadow: 0 0 15px rgba(46, 213, 115, 0.3);
}

/* Dark Mode Support */
body.dark-mode {
  /* Already in dark mode by default */
}

/* Light Mode Override */
body.light-mode {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #2c3e50;
}

body.light-mode .auth-container {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(100, 255, 218, 0.4);
  color: #2c3e50;
}

body.light-mode .form-group input {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(100, 255, 218, 0.4);
  color: #2c3e50;
}

body.light-mode .form-group input::placeholder {
  color: rgba(44, 62, 80, 0.5);
}

body.light-mode .theme-switcher button,
body.light-mode .btn-back {
  background: rgba(255, 255, 255, 0.9);
  color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-container {
    margin: 10px;
    padding: 30px 25px;
  }

  .auth-title {
    font-size: 1.8rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .back-home,
  .theme-switcher {
    position: absolute;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 25px 20px;
  }

  .auth-title {
    font-size: 1.6rem;
  }

  .logo-container {
    width: 70px;
    height: 70px;
  }

  .auth-logo {
    width: 50px;
    height: 50px;
  }
}