/* Auth pages (Login & Register) - themed to match homepage dark theme */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Import and override CSS variables for dark theme consistency */
:root {
  /* Colors - consistent with main.css dark theme */
  --primary: 240 100% 65%; /* #6366F1 */
  --primary-dark: 240 84% 58%; /* #4F46E5 */
  --secondary: 270 100% 70%; /* #A855F7 */
  --accent: 330 100% 70%; /* #EC4899 */
  --background: #0f172a;
  --surface: #1e293b;
  --text-primary: 210 20% 98%; /* Light text */
  --text-secondary: 215 20% 65%; /* Muted text */
  --text-muted: 215 16% 47%; /* More muted text */
  --border: 215 28% 25%; /* Dark borders */
  --shadow: 210 40% 8%; /* Shadow color */

  /* Typography */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-heading: "Playfair Display", Georgia, serif;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 hsla(var(--shadow) / 0.05);
  --shadow-md: 0 4px 6px -1px hsla(var(--shadow) / 0.1), 0 2px 4px -1px hsla(var(--shadow) / 0.06);
  --shadow-lg: 0 10px 15px -3px hsla(var(--shadow) / 0.1), 0 4px 6px -2px hsla(var(--shadow) / 0.05);
  --shadow-xl: 0 20px 25px -5px hsla(var(--shadow) / 0.1), 0 10px 10px -5px hsla(var(--shadow) / 0.04);
}

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Ensure body uses dark theme */
body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: hsl(var(--text-primary));
  background: linear-gradient(
    135deg,
    #0f172a 0%,
    #1e293b 50%,
    #334155 100%
  );
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: hsl(var(--text-primary));
}

p {
  color: hsl(var(--text-secondary));
  margin-bottom: 1rem;
}

a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: hsl(var(--primary-dark));
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    #0f172a 0%,
    #1e293b 50%,
    #334155 100%
  );
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    hsla(var(--primary) / 0.1) 0%,
    hsla(var(--secondary) / 0.1) 100%
  );
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 980px;
  background: hsl(var(--surface));
  box-shadow: var(--shadow-xl);
  border-radius: 20px;
  border: 1px solid hsl(var(--border));
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

/* Left / Right panel (accent) */
.auth-aside {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
  color: #fff;
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-aside h2 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 12px 0;
}

.auth-aside p { opacity: .9; margin: 0 0 24px 0; }

.auth-aside .aside-action {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.8);
  padding: 10px 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.auth-aside .aside-action:hover { background: rgba(255,255,255,.15); transform: translateY(-1px); }

/* Form side */
.auth-main {
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-title { 
  font-size: 28px; 
  margin: 0 0 24px 0; 
  color: hsl(var(--text-primary)); 
  font-family: var(--font-heading);
  font-weight: 600;
}

.auth-form { display: grid; gap: 18px; }

.auth-input {
  display: flex;
  align-items: center;
  background: hsl(var(--background));
  border: 2px solid hsl(var(--border));
  border-radius: 12px;
  padding: 14px 16px;
  color: hsl(var(--text-primary));
  transition: var(--transition-normal);
}

.auth-input:focus-within {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsla(var(--primary) / 0.1);
}

.auth-input input {
  outline: none;
  border: none;
  background: transparent;
  width: 100%;
  color: inherit;
  font-size: 15px;
}

.auth-input input::placeholder {
  color: hsl(var(--text-muted));
}

.auth-input i { 
  color: hsl(var(--text-secondary)); 
  margin-left: 12px;
  font-size: 16px;
}

.auth-actions { display: flex; align-items: center; justify-content: space-between; }
.auth-link { color: hsl(var(--primary)); text-decoration: none; font-size: 14px; }
.auth-link:hover { text-decoration: underline; }

.auth-submit {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.auth-submit::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: var(--transition-normal);
}

.auth-submit:hover::before {
  left: 100%;
}

.auth-submit:hover { 
  transform: translateY(-2px); 
  box-shadow: var(--shadow-lg);
}

.auth-social { 
  display: flex; 
  gap: 12px; 
  margin-top: 16px; 
  justify-content: center;
}

.auth-social button {
  width: 48px; 
  height: 48px; 
  border-radius: 12px; 
  border: 2px solid hsl(var(--border));
  background: hsl(var(--background)); 
  cursor: pointer; 
  display: grid; 
  place-items: center;
  transition: var(--transition-normal);
  color: hsl(var(--text-secondary));
  font-size: 18px;
  position: relative;
  overflow: hidden;
}

.auth-social button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
  transition: var(--transition-normal);
  z-index: 1;
}

.auth-social button:hover::before {
  left: 0;
}

.auth-social button i {
  position: relative;
  z-index: 2;
  transition: var(--transition-normal);
}

.auth-social button:hover { 
  border-color: hsl(var(--primary));
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.auth-social button:hover i {
  color: white;
}

/* Responsive */
@media (max-width: 900px) {
  .auth-card { 
    grid-template-columns: 1fr; 
    max-width: 480px;
  }
  
  .auth-aside { 
    order: 2; 
    text-align: center;
    padding: 40px 30px;
  }
  
  .auth-main { 
    order: 1;
    padding: 40px 30px;
  }
  
  .auth-page {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    margin: 0 10px;
  }
  
  .auth-aside,
  .auth-main {
    padding: 30px 24px;
  }
  
  .auth-aside h2 {
    font-size: 28px;
  }
  
  .auth-title {
    font-size: 24px;
  }
  
  .auth-social {
    gap: 8px;
  }
  
  .auth-social button {
    width: 44px;
    height: 44px;
  }
}
