/* CSS Variables & Global Resets */
:root {
  --bg-primary: #0a0c10;
  --bg-glass: rgba(15, 23, 42, 0.4);
  --bg-glass-heavy: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --primary-color: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --accent-color: #8b5cf6;
  --gradient-brand: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
  font-family: 'Rubik', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .logo-text {
  font-family: 'Outfit', sans-serif;
}

/* Background Meshes */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
}

.blob {
  position: absolute;
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
  animation: float 20s infinite alternate;
}

.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: rgba(59, 130, 246, 0.3); }
.blob-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: rgba(139, 92, 246, 0.2); animation-delay: -5s; }
.blob-3 { top: 40%; left: 50%; width: 40vw; height: 40vw; background: rgba(236, 72, 153, 0.2); animation-delay: -10s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, -50px) scale(1.1); }
}

/* Glass Utilities */
.glass {
  background: var(--bg-glass);
  /* backdrop-filter: blur(16px); */
  /* -webkit-backdrop-filter: blur(16px); */
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-heavy {
  background: var(--bg-glass-heavy);
  /* backdrop-filter: blur(24px); */
  /* -webkit-backdrop-filter: blur(24px); */
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Typography */
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Buttons */
button {
  cursor: pointer;
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  border-radius: 12px;
  transition: var(--transition-bounce);
  border: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary-glow {
  background: var(--gradient-brand);
  color: white;
  padding: 12px 24px;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary-glow:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  padding: 12px 24px;
  border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-glass {
  background: rgba(255,255,255,0.1);
  color: white;
  padding: 12px 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-glass:hover {
  background: rgba(255,255,255,0.2);
}

.large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.full-width {
  width: 100%;
}

.btn-google {
  background: white;
  color: #333;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-google img {
  width: 20px;
  height: 20px;
}

/* Navbar */
.premium-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 100;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-img {
  height: 55px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 0 8px rgba(59,130,246,0.4));
}

@media (max-width: 768px) {
  .nav-logo-img {
    height: 40px;
    max-width: 130px;
  }
  .premium-nav { height: 60px; }
  .hero-section { padding-top: 80px; }
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  gap: 12px;
}

/* Hero Section */
.hero-section {
  padding-top: 100px;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
}

.hero-content {
  text-align: center;
  max-width: 800px;
}

.badge-pill {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.pulse { animation: pulse 2s infinite; }

.hero-title {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Search Widget */
.search-widget {
  margin-top: 60px;
  padding: 32px;
  border-radius: 24px;
  width: 100%;
  max-width: 900px;
  position: relative;
}

.widget-badge {
  position: absolute;
  top: -12px;
  right: 32px;
  background: linear-gradient(135deg, #10b981, #059669);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.search-widget h3 {
  margin-bottom: 24px;
  font-size: 1.5rem;
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: flex-end;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.input-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.select-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.select-wrapper select, .input-group input {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 14px 16px 14px 40px; /* Padding right for icon in RTL */
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Rubik', sans-serif;
  appearance: none;
  transition: var(--transition-fast);
}

.input-group input {
  padding: 14px 16px;
}

.select-wrapper select:focus, .input-group input:focus {
  border-color: var(--primary-color);
  outline: none;
  background: rgba(0,0,0,0.5);
}

.btn-search {
  background: var(--primary-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  font-size: 1.2rem;
  margin-bottom: 16px; /* Align with inputs */
}

/* Auth Overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  /* backdrop-filter: blur(8px); */
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s;
}

.auth-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.auth-modal {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border-radius: 24px;
  position: relative;
  transform: scale(1) translateY(0);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-overlay.hidden .auth-modal {
  transform: scale(0.9) translateY(20px);
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 8px;
}

.close-btn:hover {
  color: white;
}

.auth-view {
  display: flex;
  flex-direction: column;
}

.auth-view.hidden {
  display: none;
}

.auth-view h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.auth-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--glass-border);
}

.divider span {
  padding: 0 10px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.auth-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
}

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  transition: var(--transition-fast);
}

.step.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 15px var(--primary-glow);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--glass-border);
  margin: 0 8px;
}

.step-content.hidden {
  display: none;
}

.step-content h3 {
  margin-bottom: 16px;
}

.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.btn-row { display: flex; gap: 12px; }

/* Utilities */
small { color: var(--text-secondary); font-size: 0.8rem; }

/* Responsive / Mobile */
@media (max-width: 768px) {
  .desktop-only { display: none; }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .search-grid {
    grid-template-columns: 1fr;
  }
  
  .btn-search {
    width: 100%;
  }
  
  .search-widget {
    padding: 24px;
    margin-top: 40px;
  }
  
  .widget-badge {
    right: 24px;
  }
}
