/* AUTHENTICATION SPECIFIC STYLES */
:root {
  --auth-primary: #6c5ce7;
  --auth-primary-dark: #5649c0;
  --auth-secondary: #a29bfe;
  --auth-accent: #fd79a8;
  --auth-danger: #ff7675;
  --auth-success: #00b894;
  
  /* Dark theme */
  --auth-bg-dark: #1a1a2e;
  --auth-card-dark: #16213e;
  --auth-text-dark: #e6e6e6;
  
  /* Light theme */
  --auth-bg-light: #f8f9fa;
  --auth-card-light: #ffffff;
  --auth-text-light: #333333;
  
  /* Current theme */
  --auth-bg: var(--auth-bg-light);
  --auth-card: var(--auth-card-light);
  --auth-text: var(--auth-text-light);
}

.auth-dark-mode {
  --auth-bg: var(--auth-bg-dark);
  --auth-card: var(--auth-card-dark);
  --auth-text: var(--auth-text-dark);
}

/* Auth Container */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--auth-bg);
  overflow: hidden;
  position: relative;
}

/* Particle Animation */
.auth-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--auth-primary), var(--auth-accent));
  opacity: 0;
  animation: float-up 15s infinite;
}

/* Auth Card */
.auth-card {
  background-color: var(--auth-card);
  border-radius: 20px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  padding: 40px;
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(108, 92, 231, 0.1) 50%,
    transparent 100%
  );
  animation: rotate-bg 20s linear infinite;
  z-index: -1;
}

.auth-card-inner {
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

/* Auth Header */
.auth-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.auth-logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--auth-primary);
  margin-bottom: 10px;
  display: inline-block;
  background: linear-gradient(to right, var(--auth-primary), var(--auth-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-title {
  font-size: 1.8rem;
  color: var(--auth-text);
  margin-bottom: 10px;
}

.auth-subtitle {
  color: var(--auth-text);
  opacity: 0.7;
  font-size: 0.95rem;
}

/* Auth Form */
.auth-form .form-group {
  margin-bottom: 25px;
  position: relative;
}

.auth-form .form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--auth-text);
  font-weight: 500;
}

.auth-form .form-control {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid rgba(108, 92, 231, 0.3);
  border-radius: 10px;
  background-color: var(--auth-card);
  color: var(--auth-text);
  font-size: 1rem;
  transition: all 0.3s;
}

.auth-form .form-control:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
  outline: none;
}

.auth-form .form-control::placeholder {
  color: var(--auth-text);
  opacity: 0.5;
}

/* Floating Labels */
.floating-label-group {
  position: relative;
  margin-bottom: 25px;
}

.floating-label {
  position: absolute;
  top: 15px;
  left: 20px;
  color: var(--auth-text);
  opacity: 0.7;
  font-size: 1rem;
  transition: all 0.3s;
  pointer-events: none;
  background-color: var(--auth-card);
  padding: 0 5px;
}

.form-control:focus + .floating-label,
.form-control:not(:placeholder-shown) + .floating-label {
  top: -10px;
  left: 15px;
  font-size: 0.8rem;
  opacity: 1;
  color: var(--auth-primary);
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--auth-text);
  opacity: 0.5;
  transition: all 0.3s;
}

.password-toggle:hover {
  opacity: 1;
  color: var(--auth-primary);
}

/* Auth Buttons */
.auth-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(to right, var(--auth-primary), var(--auth-accent));
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.auth-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.auth-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--auth-accent), var(--auth-primary));
  transition: all 0.4s;
  z-index: -1;
}

.auth-btn:hover::before {
  left: 0;
}

/* Social Login */
.auth-social-divider {
  display: flex;
  align-items: center;
  margin: 30px 0;
  color: var(--auth-text);
  opacity: 0.7;
}

.auth-social-divider::before,
.auth-social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: rgba(108, 92, 231, 0.3);
  margin: 0 10px;
}

.auth-social-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
}

.social-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--auth-card);
  border: 1px solid rgba(108, 92, 231, 0.3);
  color: var(--auth-text);
  font-size: 1.2rem;
  transition: all 0.3s;
}

.social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-btn.google:hover {
  color: #DB4437;
  border-color: #DB4437;
}

.social-btn.facebook:hover {
  color: #4267B2;
  border-color: #4267B2;
}

.social-btn.twitter:hover {
  color: #1DA1F2;
  border-color: #1DA1F2;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  margin-top: 25px;
  color: var(--auth-text);
  opacity: 0.7;
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--auth-primary);
  text-decoration: none;
  transition: all 0.3s;
}

.auth-footer a:hover {
  text-decoration: underline;
  color: var(--auth-accent);
}

/* Theme Toggle */
.auth-theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--auth-text);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
}

/* Error Messages */
.auth-error {
  color: var(--auth-danger);
  background-color: rgba(255, 118, 117, 0.1);
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  animation: shake 0.5s;
}

.auth-success {
  color: var(--auth-success);
  background-color: rgba(0, 184, 148, 0.1);
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* Animations */
@keyframes float-up {
  0% {
    transform: translateY(100vh) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(1.2);
    opacity: 0;
  }
}

@keyframes rotate-bg {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* 3D Flip Effect */
.auth-card.flipped .auth-card-inner {
  transform: rotateY(180deg);
}

.auth-card-front, .auth-card-back {
  backface-visibility: hidden;
}

.auth-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotateY(180deg);
  padding: 40px;
}

/* Responsive */
@media (max-width: 576px) {
  .auth-card {
    padding: 30px 20px;
    margin: 20px;
  }
  
  .auth-logo {
    font-size: 2rem;
  }
  
  .auth-title {
    font-size: 1.5rem;
  }
}