/* ===== Theme Variables ===== */
:root {
  /* Refined color palette with better pink/purple balance */
  --primary-color: #9d4edd;      
  --primary-hover: #7b2cbf;
  --primary-light: rgba(157, 78, 221, 0.25);
  --secondary-color: #3a86ff;    
  --secondary-hover: #0057e7;
  --accent-color: #ff3370;       /* Brighter pink for better balance */
  --accent-hover: #ff0055;       /* New hover state for pink accent */
  --dark-bg: #07071a;            
  --darker-bg: rgba(7, 7, 26, 0.95);
  --text-light: #f8f9fa;
  --text-muted: #b9bcd2;         
  --text-dark: #2c3e50;
  --link-color: #ff3370;         /* Changed link color to pink for balance */
  --border-color: rgba(255, 255, 255, 0.12);
  --input-bg: rgba(30, 30, 51, 0.65);
  --error-color: #ef5350;
  --success-color: #4cc9f0;      
  --disabled-bg: rgba(204, 204, 204, 0.15);
  --disabled-text: #8d9199;
  
  /* Enhanced Gradients - adding more pink components for balance */
  --gradient-primary: linear-gradient(135deg, #9d4edd, #ff3370);
  --gradient-secondary: linear-gradient(135deg, #3a86ff, #9d4edd);
  --gradient-button: linear-gradient(135deg, #ff3370, #9d4edd); /* Changed to pink-purple */
  --gradient-button-hover: linear-gradient(135deg, #ff0055, #8f45e0); /* Enhanced pink-purple */
  --gradient-accent: linear-gradient(135deg, #ff3370, #ff9e00);
  
  /* Cyberpunk/Neon Theme Variables (accessible to login.css) */
  --neon-blue: #2de2e6;
  --neon-purple: #a742f5;
  --neon-pink: #ff2cf0;
  --neon-glow: #7e3ff2;
  --cyber-blue: #05d9e8;
  --cyber-purple: #9e00ff;
  --deep-space: #03012c;
  --space-glow: rgba(126, 63, 242, 0.2);
  
  /* Sizing */
  --container-max-width: 400px;
  --border-radius: 12px;
  --input-radius: 12px;
  --button-radius: 12px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  
  /* Typography */
  --font-family-base: 'Nunito', sans-serif;
  --font-family-decorative: 'Quicksand', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.85rem;
  --font-size-base: 0.95rem;
  --font-size-lg: 1.15rem;
  --font-size-xl: 1.65rem;
}

/* ===== Reset & Base Styles ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  background-color: var(--dark-bg);
  font-size: var(--font-size-base);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: var(--text-light);
}

/* Restore the original cosmic background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    /* Base vignette for depth */
    radial-gradient(ellipse at center, rgba(10, 9, 25, 0.85) 0%, rgba(4, 3, 12, 0.98) 100%),
    
    /* Purple nebula at top left - reduced intensity */
    radial-gradient(circle at 15% 15%, 
      rgba(157, 78, 221, 0.25) 0%, 
      transparent 50%),
    
    /* NEW: Pink glow at bottom right for more dynamic look */
    radial-gradient(circle at 85% 80%, 
      rgba(255, 51, 102, 0.25) 0%, 
      transparent 50%),
    
    /* Subtle blue accent at top right - reduced */
    radial-gradient(circle at 85% 10%, 
      rgba(58, 134, 255, 0.15) 0%, 
      transparent 55%),
    
    /* Simple gradient base */
    linear-gradient(135deg, 
      #030311 0%, 
      #12084d 100%);
  
  pointer-events: none;
  z-index: -2;
}

/* Remove space dust texture for better performance */
body::after {
  display: none;
}

/* ===== Auth Layout ===== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: var(--spacing-xs);
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* Remove overhead pot light effect in favor of side lighting */
.auth-container::before {
  display: none;
}

/* Add a subtle overlay to help blend everything */
.auth-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    rgba(7, 7, 26, 0.1) 70%,
    rgba(7, 7, 26, 0.2) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Replace pot-light-source with side lighting effects */
.pot-light-source {
  display: none;
}

/* Remove light rays */
.light-rays {
  display: none;
}

/* Add dramatic side lighting effect */
.side-lighting {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85; /* Slightly reduced from 0.9 for better blending */
}

/* Primary light source from left side - simplified */
.light-source-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 25% 40%, /* Positioned at top left quadrant */
    rgba(255, 51, 112, 0.28) 0%,
    rgba(255, 51, 112, 0.15) 30%,
    rgba(255, 51, 112, 0.05) 50%,
    transparent 70%
  );
  filter: blur(85px); /* Even more blur for ultra soft edges */
  z-index: 0;
}

/* Secondary light source from right bottom - simplified */
.light-source-right {
  position: absolute;
  top: 0;
  left: 0; 
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 75% 65%, /* Positioned at bottom right quadrant */
    rgba(157, 78, 221, 0.25) 0%,
    rgba(157, 78, 221, 0.12) 30%,
    rgba(157, 78, 221, 0.05) 50%,
    transparent 70%
  );
  filter: blur(85px); /* Even more blur for ultra soft edges */
  z-index: 0;
}

/* Remove the shadow overlay which might be causing lines */
.shadow-overlay {
  display: none;
}

/* Enhanced glassmorphism card with asymmetric lighting */
.auth-card {
  background: rgba(0, 0, 0, 0.75);
  padding: var(--spacing-lg) var(--spacing-md);
  border-radius: var(--border-radius);
  width: 100%;
  max-width: var(--container-max-width);
  text-align: center;
  position: relative;
  /* Updated shadow for asymmetric lighting effect */
  box-shadow: 
    /* Left side is brighter */
    -30px 20px 50px rgba(255, 51, 112, 0.25),
    /* Right side is darker */
    30px 20px 60px rgba(0, 0, 0, 0.6),
    /* Bottom shadow for depth */
    0 30px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  z-index: 1;
}

/* Update the inner light effect for asymmetric lighting */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 40%,
    rgba(0, 0, 0, 0.1) 80%
  );
  pointer-events: none;
  z-index: 2;
  border-radius: var(--border-radius);
}

/* Remove subtle space dust to the auth card for better performance */
.auth-card::after {
  display: none;
}

/* Simplify background splashes - reduce to a single large gradient for each */
.auth-splash {
  position: absolute;
  border-radius: 50%;
  /* Reduce blur radius for better performance */
  filter: blur(30px);
  z-index: -1;
  /* Reduced opacity for less GPU impact */
  opacity: 0.2;
}

.auth-splash-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(157, 78, 221, 0.2) 0%,
    rgba(157, 78, 221, 0.1) 40%,
    rgba(157, 78, 221, 0.05) 60%,
    transparent 80%
  );
  top: -250px;
  left: -150px;
  filter: blur(50px); /* Increased blur */
}

.auth-splash-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(255, 51, 112, 0.2) 0%,
    rgba(255, 51, 112, 0.1) 40%,
    rgba(255, 51, 112, 0.05) 60%,
    transparent 80%
  );
  bottom: -250px;
  right: -150px;
  opacity: 0.25; /* Slightly reduced opacity */
  filter: blur(50px); /* Increased blur */
}

/* Remove one splash for better performance */
.auth-splash-3 {
  display: none;
}

/* ===== Logo & Branding ===== */
.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  position: relative;
  z-index: 5;
}

.logo h1 {
  color: var(--text-light) !important;
  font-family: var(--font-family-decorative) !important;
  font-size: var(--font-size-xl);
  margin: var(--spacing-xs) 0 0;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(126, 87, 194, 0.4);
  font-weight: 700;
}

.logo img {
  width: 70px;
  height: auto;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(126, 87, 194, 0.4));
  border-radius: 4px;
}

.logo img:hover {
  transform: scale(1.05);
}

.title {
  font-family: var(--font-family-decorative);
  color: var(--text-light);
  margin: 0 0 var(--spacing-sm);
  font-size: var(--font-size-xl);
  font-weight: 300;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(92, 107, 192, 0.4);
}

/* ===== Form Elements ===== */
form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: var(--spacing-xs);
}

.input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  width: 100%;
  position: relative;
}

/* Refined input styling */
.input-container input {
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid rgba(126, 87, 194, 0.2);
  border-radius: var(--input-radius);
  background-color: rgba(22, 22, 42, 0.7);
  color: var(--text-light);
  font-size: var(--font-size-base);
  width: 100%;
  max-width: 340px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.15),
    0 1px 2px rgba(126, 87, 194, 0.08);
  height: 2.7rem;
  outline: none;
}

.input-container input::placeholder {
  color: rgba(176, 190, 197, 0.5);
}

.input-container input:focus {
  border-color: rgba(126, 87, 194, 0.6);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.12),
    0 0 0 2px rgba(126, 87, 194, 0.12);
  background-color: rgba(30, 30, 50, 0.9);
}

/* Elegant button styling */
button {
  background: var(--gradient-button);
  color: var(--text-light);
  padding: var(--spacing-xs) var(--spacing-md);
  border: none;
  border-radius: var(--button-radius);
  cursor: pointer;
  font-size: var(--font-size-base);
  font-weight: 600;
  width: 100%;
  max-width: 340px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  margin-top: var(--spacing-sm);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.25),
    0 2px 4px rgba(255, 51, 112, 0.25);  /* Pink glow on buttons */
  letter-spacing: 0.5px;
  height: 2.7rem;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Simple hover effect instead of transform */
button:hover:not([disabled]) {
  background: var(--gradient-button-hover);
  /* Remove transform which triggers layout recalculation */
  transform: none;
}

button:active:not([disabled]) {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Refined highlight effect */
button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0)
  );
}

/* Disabled state styling */
button:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-text);
  box-shadow: none;
  cursor: not-allowed;
}

/* ===== Links & Text ===== */
a {
  color: var(--link-color);  /* Now pink from variable change */
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-weight: 500;
  position: relative;
  display: inline-block;
}

a:hover {
  color: var(--accent-hover);  /* Brighter pink on hover */
  text-shadow: 0 0 8px rgba(255, 51, 112, 0.35);  /* Pink glow */
}

/* Elegant underline effect */
a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, var(--accent-color), transparent);
  transition: width 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

a:hover::after {
  width: 100%;
}

.register-text {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-md);
}

/* Refined checkbox styling */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid rgba(126, 87, 194, 0.4);
  background: var(--input-bg);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-right: 8px;
  transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
  background: var(--accent-color);  /* Pink when checked */
  border-color: var(--accent-color);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(255, 51, 112, 0.15);  /* Pink focus ring */
  outline: none;
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 768px) {
  .auth-card {
    padding: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-md: 1rem;
    --spacing-lg: 1.25rem;
    --font-size-xl: 1.75rem;
  }
  
  .logo img {
    width: 60px;
  }

  .input-container input,
  button {
    height: 2.6rem; /* Consistent height in mobile view */
  }
}

/* Support for reduced motion - extend for all users for performance */
button:hover:not([disabled]),
a:hover {
  transform: none;
}
