/* Auth Esports Theme */
body.auth-page {
  background: #050505;
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden;
  touch-action: manipulation;
  will-change: auto;
}

/* Auth Container */
.auth-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #050505 0%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transform: translateZ(0);
  will-change: auto;
}

/* Auth Panel */
.auth-form-container {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid rgba(57,255,20,0.25);
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.3);
  padding: 2.5rem !important;
  width: 100%;
  max-width: 450px;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  will-change: auto;
}

.auth-form-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.05) 0%, transparent 70%);
  animation: rotateGradient 15s linear infinite;
  will-change: transform;
  transform: translateZ(0);
}

/* Logo */
.auth-form-container img {
  height: 70px;
  width: auto;
  object-fit: contain;
  box-shadow: 0 0 26px #39FF14;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  transform: translateZ(0);
  will-change: auto;
}

/* Headings */
.auth-form-container h4 {
  color: #EDEDED;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
  transform: translateZ(0);
}

.auth-form-container .text-muted {
  color: #9CA3AF !important;
  margin-bottom: 1.5rem;
  transform: translateZ(0);
}

/* Form Labels */
.form-label {
  color: #9CA3AF;
  font-weight: 500;
  margin-bottom: 0.5rem;
  transform: translateZ(0);
}

/* Input Groups */
.input-group {
  margin-bottom: 1.5rem;
  transform: translateZ(0);
  will-change: auto;
}

.form-control, .form-select {
  background: #050505;
  border: 1px solid rgba(57,255,20,0.35);
  color: #EDEDED;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: auto;
  min-height: 44px;
}

.form-control:focus, .form-select:focus {
  background: #0a0a0a;
  border-color: #39FF14;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.5);
  color: #EDEDED;
  outline: none;
}

.form-control:disabled, .form-control[readonly] {
  background: rgba(10,10,10,0.5);
  color: #9CA3AF;
}

.input-group-text {
  background: rgba(57,255,20,0.1);
  border: 1px solid rgba(57,255,20,0.35);
  color: #39FF14;
  border-radius: 12px 0 0 12px;
  border-right: none;
  transform: translateZ(0);
}

.input-group .form-control {
  border-left: none;
  border-radius: 0 12px 12px 0;
}

/* Password Toggle Button */
.btn-outline-secondary {
  background: rgba(57,255,20,0.1);
  border: 1px solid rgba(57,255,20,0.35);
  color: #39FF14;
  border-radius: 0 12px 12px 0;
  border-left: none;
  min-width: 44px;
  min-height: 44px;
  transform: translateZ(0);
  will-change: auto;
}

.btn-outline-secondary:hover {
  background: rgba(57,255,20,0.2);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

/* Checkboxes */
.form-check-input {
  background-color: #050505;
  border: 1px solid rgba(57,255,20,0.35);
  transform: translateZ(0);
}

.form-check-input:checked {
  background-color: #39FF14;
  border-color: #39FF14;
}

.form-check-label {
  color: #9CA3AF;
  transform: translateZ(0);
}

/* Links */
a {
  color: #39FF14;
  text-decoration: none;
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: auto;
}

a:hover {
  color: #00FF7F;
  text-decoration: underline;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(90deg, #00FF7F, #39FF14, #00FFBF);
  border: none;
  color: #000;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.4);
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  min-height: 44px;
  animation: pulseGlow 2s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(57, 255, 20, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: linear-gradient(90deg, #008040, #1ce00b, #008060);
  box-shadow: none;
  color: rgba(0,0,0,0.5);
}

.btn-link {
  color: #39FF14;
  text-decoration: none;
  font-weight: 500;
}

.btn-link:hover {
  color: #00FF7F;
  text-decoration: underline;
}

/* Error Messages */
.alert-danger {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #FF4444;
  border-radius: 12px;
  transform: translateZ(0);
}

/* Auth Image Side (for larger screens) */
.auth-image {
  background: linear-gradient(rgba(5,5,5,0.7), rgba(5,5,5,0.7)),
              url('https://images.unsplash.com/photo-1542751371-adc38448a05e') center/cover !important;
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(0);
}

.welcome-text {
  position: relative;
  color: white;
  text-align: center;
  width: 80%;
  z-index: 2;
  transform: translateZ(0);
}

.welcome-text h2 {
  font-weight: 700;
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
  margin-bottom: 1rem;
  transform: translateZ(0);
}

.welcome-text p {
  font-size: 1.1rem;
  opacity: 0.9;
  transform: translateZ(0);
}

/* Toggle Tabs */
.auth-toggle {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.5rem;
  transform: translateZ(0);
}

.toggle-tab {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #9CA3AF;
  font-weight: 500;
  transform: translateZ(0);
  will-change: auto;
}

.toggle-tab.active {
  background: linear-gradient(90deg, #00FF7F, #39FF14, #00FFBF);
  color: #000;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.4);
}

/* Social Login Buttons */
.social-login {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  transform: translateZ(0);
}

.social-btn {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(57,255,20,0.25);
  color: #39FF14;
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  transform: translateZ(0);
  will-change: auto;
  min-height: 44px;
}

.social-btn:hover {
  background: rgba(57,255,20,0.1);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
  transform: translateY(-2px);
}

.social-btn i {
  font-size: 1.2rem;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  transform: translateZ(0);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(57,255,20,0.25);
  transform: translateZ(0);
}

.auth-divider span {
  padding: 0 1rem;
  color: #9CA3AF;
  font-size: 0.9rem;
  transform: translateZ(0);
}

/* Animations */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.4);
  }
  50% {
    box-shadow: 0 0 26px rgba(57, 255, 20, 0.7);
  }
  100% {
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.4);
  }
}

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

/* Mobile Optimization */
@media (max-width: 768px) {
  .auth-form-container {
    padding: 1.5rem !important;
    border-radius: 20px;
    max-width: 100%;
    width: 90%;
  }
  
  .auth-form-container img {
    height: 60px;
    box-shadow: 0 0 18px #39FF14;
  }
  
  .auth-form-container h4 {
    font-size: 1.5rem;
  }
  
  .form-control, .form-select {
    padding: 0.75rem;
    min-height: 44px;
  }
  
  .input-group-text,
  .btn-outline-secondary {
    min-height: 44px;
    min-width: 44px;
  }
  
  .btn-primary {
    width: 100%;
    margin-bottom: 0.5rem;
    min-height: 44px;
  }
  
  .social-login {
    flex-direction: column;
  }
  
  .auth-image {
    display: none;
  }
  
  .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .btn-primary {
    animation: none;
  }
  
  .auth-form-container::before {
    animation: none;
  }
  
  .stat-box {
    animation: none;
  }
}