/* ============================================================================
   DREAMDRAGON - AUTHENTICATION PAGE STYLES
   ============================================================================ */

/* === AUTH LAYOUT === */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--bg-main);
}

/* === LEFT SIDE - VISUAL === */
.auth-visual {
  position: relative;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(30, 64, 175, 0.8)), 
              url('../images/Lobby.webp') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.8) 0%,
    rgba(30, 64, 175, 0.6) 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
  z-index: 1;
}

.auth-visual-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl);
  max-width: 500px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-main);
}

.auth-logo-dot {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at 30% 30%, var(--accent-neon), var(--accent-purple));
  box-shadow: var(--shadow-neon);
  position: relative;
}

.auth-logo-dot::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent);
}

.auth-logo-text {
  font-family: var(--font-family-pixel);
  font-size: var(--font-size-lg);
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--text-main), var(--accent-neon));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-hero-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-lg);
  color: var(--text-main);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.auth-hero-subtitle {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: rgba(249, 250, 251, 0.9);
  margin-bottom: var(--space-2xl);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.auth-features {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.auth-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
  max-width: 120px;
}

.auth-feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-sm);
}

.auth-feature-text {
  font-size: var(--font-size-sm);
  color: rgba(249, 250, 251, 0.8);
  font-weight: var(--font-weight-medium);
}

/* === RIGHT SIDE - FORM === */
.auth-form-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  background: var(--bg-main);
  position: relative;
}

.auth-form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.1), transparent 60%);
  z-index: 0;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.auth-form-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.auth-form-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  color: var(--text-main);
  background: linear-gradient(135deg, var(--text-main), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-form-subtitle {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  line-height: var(--line-height-relaxed);
}

/* === FORM TABS === */
.auth-tabs {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  padding: var(--space-xs);
  margin-bottom: var(--space-2xl);
  border: 1px solid var(--border-subtle);
}

.auth-tab {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.auth-tab:not(.active):hover {
  background: rgba(124, 58, 237, 0.1);
  color: var(--text-main);
}

/* === FORM CONTENT === */
.auth-form {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-deep);
  position: relative;
  overflow: hidden;
}

.auth-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue), var(--accent-neon));
  background-size: 200% 100%;
  animation: gradient-shift 3s ease infinite;
}

.auth-form-content {
  position: relative;
  z-index: 1;
}

.auth-form-content.hidden {
  display: none;
}

/* === FORM FIELDS === */
.auth-form .form-group {
  margin-bottom: var(--space-lg);
}

.auth-form .form-label {
  margin-bottom: var(--space-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-main);
}

.auth-form .form-input {
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  font-size: var(--font-size-base);
  transition: all var(--transition-fast);
}

.auth-form .form-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  background: var(--bg-main);
}

.auth-form .form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* === SPECIAL INPUTS === */
.minecraft-ign-input {
  position: relative;
}

.minecraft-ign-input::before {
  content: '🎮';
  position: absolute;
  left: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.minecraft-ign-input .form-input {
  padding-left: calc(var(--space-lg) + 30px);
}

.discord-input {
  position: relative;
}

.discord-input::before {
  content: '💬';
  position: absolute;
  left: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.discord-input .form-input {
  padding-left: calc(var(--space-lg) + 30px);
}

/* === PASSWORD STRENGTH === */
.password-strength {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.password-strength-bar {
  height: 4px;
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.password-strength-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-red);
  transition: all var(--transition-fast);
  border-radius: var(--radius-pill);
}

.password-strength-fill.weak { 
  width: 20%; 
  background: var(--accent-red); 
}

.password-strength-fill.fair { 
  width: 40%; 
  background: var(--accent-orange); 
}

.password-strength-fill.good { 
  width: 60%; 
  background: var(--accent-blue); 
}

.password-strength-fill.strong { 
  width: 80%; 
  background: var(--accent-neon); 
}

.password-strength-fill.very-strong { 
  width: 100%; 
  background: var(--accent-neon); 
}

.password-strength-text {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
}

/* === FORM BUTTONS === */
.auth-submit-btn {
  width: 100%;
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: var(--text-main);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.auth-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.4);
}

.auth-submit-btn:hover::before {
  opacity: 1;
}

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

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

/* === ADDITIONAL LINKS === */
.auth-footer {
  text-align: center;
  margin-top: var(--space-xl);
}

.auth-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-fast);
}

.auth-link:hover {
  color: var(--accent-purple);
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: var(--space-xl) 0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider span {
  padding: 0 var(--space-lg);
}

/* === LOADING STATE === */
.auth-form.loading {
  opacity: 0.7;
  pointer-events: none;
}

.auth-form.loading .auth-submit-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid var(--text-main);
  border-radius: var(--radius-pill);
  animation: spin 1s linear infinite;
}

/* === RESPONSIVE === */
@media screen and (max-width: 768px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-form-container {
    padding: var(--space-lg);
  }

  .auth-form {
    padding: var(--space-xl);
  }

  .auth-form-title {
    font-size: var(--font-size-2xl);
  }

  .auth-tabs {
    margin-bottom: var(--space-xl);
  }

  .auth-tab {
    padding: var(--space-md);
    font-size: var(--font-size-sm);
  }
}

@media screen and (max-width: 475px) {
  .auth-form-container {
    padding: var(--space-md);
  }

  .auth-form {
    padding: var(--space-lg);
  }

  .auth-form-title {
    font-size: var(--font-size-xl);
  }

  .auth-hero-title {
    font-size: var(--font-size-2xl);
  }

  .auth-features {
    flex-direction: column;
    gap: var(--space-md);
  }

  .auth-feature {
    max-width: none;
  }

  .auth-feature-icon {
    width: 50px;
    height: 50px;
  }
}

/* === SPECIAL EFFECTS === */
.floating-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(124, 58, 237, 0.6);
  border-radius: 50%;
  animation: float-particle 8s linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* === SUCCESS/ERROR STATES === */
.auth-form.success {
  border-color: var(--accent-neon);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.2);
}

.auth-form.error {
  border-color: var(--accent-red);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* === VALIDATION === */
.form-group.error .form-input {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.success .form-input {
  border-color: var(--accent-neon);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-validation-icon {
  position: absolute;
  right: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: none;
}

.form-group.error .form-validation-icon.error,
.form-group.success .form-validation-icon.success {
  display: block;
}

.form-validation-icon.error {
  color: var(--accent-red);
}

.form-validation-icon.success {
  color: var(--accent-neon);
}
