/* Global Reset & Base */
:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-header: 'Outfit', sans-serif;
  
  /* Color Palette (HSL based for rich control) */
  --bg-primary: #06070a; /* Darker space black */
  --bg-secondary: #0b0d13;
  --bg-glass: rgba(11, 13, 20, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  
  --color-primary: #6366f1; /* Indigo */
  --color-primary-glow: rgba(99, 102, 241, 0.25);
  --color-secondary: #a855f7; /* Purple */
  --color-secondary-glow: rgba(168, 85, 247, 0.25);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
  
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Background Glow Effects */
.glow-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
  mix-blend-mode: screen;
}

.glow-1 {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation: pulseGlow 12s infinite alternate ease-in-out;
}

.glow-2 {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--color-secondary) 0%, transparent 70%);
  bottom: 10%;
  left: -10%;
  animation: pulseGlow2 16s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  50% { transform: translate(3% , -3%) scale(1.08); opacity: 0.5; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
}

@keyframes pulseGlow2 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  50% { transform: translate(-4% , 4%) scale(1.12); opacity: 0.5; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  border-bottom: 1px solid var(--border-glass);
  background-color: rgba(11, 12, 16, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 38px;
  object-fit: contain;
}

.logo-icon {
  font-size: 26px;
  animation: float 4s ease-in-out infinite;
}

.logo-text {
  font-family: var(--font-header);
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-main) 30%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 12px;
  margin-left: 4px;
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s ease;
}

nav a:hover {
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  outline: none;
}

.btn-outline {
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.03);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px var(--color-primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Hero Section */
.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 80px;
  flex: 1;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.badge {
  align-self: flex-start;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.hero-text h1 {
  font-family: var(--font-header);
  font-size: 54px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
}

.hero-text h1 span {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
}

/* Features list inside hero */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
}

.feat-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.feat-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.feat-item p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Auth Card */
.auth-card-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--bg-glass);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.auth-tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.4s ease;
}

.auth-form h2 {
  font-family: var(--font-header);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: -15px;
  margin-bottom: 5px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.form-group input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 15px;
  outline: none;
  transition: all 0.25s ease;
}

.form-group input:focus {
  border-color: var(--color-primary);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.form-tip {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.form-tip b {
  color: var(--color-secondary);
}

/* Alert Message Box */
.alert-box {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.4;
  animation: shake 0.3s ease;
}

.alert-box.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-box.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-glass);
  background: #08090d;
  padding: 30px 0;
  margin-top: auto;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--text-main);
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.toast::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  animation: progress 4s linear forwards;
}

.toast.success::after { background-color: var(--success); }
.toast.error::after { background-color: var(--error); }
.toast.warning::after { background-color: var(--warning); }

.toast-icon {
  font-size: 18px;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes progress {
  from { width: 100%; }
  to { width: 0%; }
}

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

/* Utility classes */
.hide { display: none !important; }

/* Centered Auth Page layout styles */
body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background-color: var(--bg-primary);
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.5s ease;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-logo .logo-img {
  height: 44px;
  object-fit: contain;
}

.auth-logo .logo-text {
  font-family: var(--font-header);
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-main) 30%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.auth-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Toast container override for mobile */
@media (max-width: 480px) {
  .toast-container {
    right: 16px;
    left: 16px;
    bottom: 16px;
  }
  .toast {
    min-width: 0;
    width: 100%;
  }
  .auth-card {
    padding: 24px 20px;
    border-radius: 16px;
  }
  .auth-form h2 {
    font-size: 20px;
  }
  .form-group input {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
  }
}
