@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --secondary: #a855f7;
  --tertiary: #ec4899;
  --light: #ffffff;
  
  --heading-color: #f8fafc;
  --bg-color: #020617;
  --footer-bg: #09090b; 
  --surface: rgba(15, 23, 42, 0.7);
  --surface-hover: rgba(30, 41, 59, 0.9);
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(15, 23, 42, 0.4);
  --nav-bg-scrolled: rgba(15, 23, 42, 0.8);
  --btn-outline-bg: rgba(15, 23, 42, 0.5);
  --auth-bg: rgba(15, 23, 42, 0.8);
  --input-bg: rgba(30, 41, 59, 0.9);
}

.light-mode {
  --heading-color: #0f172a;
  --bg-color: #fafafa;
  --footer-bg: #020617; 
  --surface: rgba(255, 255, 255, 0.7);
  --surface-hover: rgba(255, 255, 255, 0.9);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
  --nav-bg: rgba(255, 255, 255, 0.4);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.8);
  --btn-outline-bg: rgba(255, 255, 255, 0.5);
  --auth-bg: rgba(255, 255, 255, 0.8);
  --input-bg: rgba(255, 255, 255, 0.9);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 3D Background */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Decorative Background Blobs */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -2;
  opacity: 0.5;
  animation: float 20s infinite alternate ease-in-out;
}
.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: rgba(99, 102, 241, 0.3); }
.blob-2 { bottom: -10%; right: -10%; width: 600px; height: 600px; background: rgba(168, 85, 247, 0.2); }
.blob-3 { top: 40%; left: 60%; width: 400px; height: 400px; background: rgba(236, 72, 153, 0.2); }

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

/* Typography */
h1, h2, h3, h4, h5, h6 { color: var(--heading-color); line-height: 1.2; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--tertiary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientFlow 5s ease infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled {
  padding: 1rem 5%;
  background: var(--nav-bg-scrolled);
  box-shadow: var(--glass-shadow);
}

nav .logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--heading-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.5px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.nav-logo-img {
  width: 160px;
  height: 55px;
  object-fit: cover;
  object-position: center;
}

.footer-logo-img {
  width: 180px;
  height: 60px;
  object-fit: cover;
  object-position: center;
}

nav .logo i {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav ul { display: flex; list-style: none; gap: 2.5rem; }

nav ul li a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
  border-radius: 2px;
}

nav ul li a:hover::after, nav ul li a.active::after { width: 100%; }
nav ul li a:hover { color: var(--primary); }

/* Buttons */
.btn {
  padding: 0.875rem 2rem;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn:hover::before { transform: translateX(100%); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--light);
  box-shadow: 0 10px 25px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px var(--primary-glow);
  color: var(--light);
}

.btn-outline {
  background: var(--btn-outline-bg);
  color: var(--primary);
  border: 2px solid var(--primary);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--light);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px var(--primary-glow);
}

/* Sections */
section {
  padding: 8rem 5% 4rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Hero Section with Image */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding-top: 12rem;
  min-height: 100vh;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-tag {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  width: fit-content;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.hero-content h1 {
  font-size: 4.5rem;
  line-height: 1.1;
  letter-spacing: -2px;
  font-weight: 900;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 1.5rem; margin-top: 1rem; }

.hero-image {
  position: relative;
  width: 100%;
}

.hero-image img {
  width: 100%;
  border-radius: 32px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.1), 0 0 0 1px var(--glass-border);
  transition: transform 0.5s ease;
  transform: perspective(1000px) rotateY(-5deg);
}

.hero-image:hover img {
  transform: perspective(1000px) rotateY(0deg);
}

/* Image Feature Grid */
.features { flex-direction: column; justify-content: center; }

.section-title {
  text-align: center;
  margin-bottom: 5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-title h2 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.section-title p { font-size: 1.25rem; color: var(--text-muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
  width: 100%;
}

.card-img {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-img img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card-img:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 30px 60px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  background: var(--surface-hover);
}

.card-img .card-content {
  padding: 0.5rem 1rem 1rem;
}

.card-img h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

.card-img p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Forms & Auth */
.auth-section { display: flex; justify-content: center; align-items: center; min-height: 100vh; }

.auth-container {
  display: flex;
  background: var(--auth-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  width: 100%;
  max-width: 1000px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.auth-image {
  flex: 1;
  background-size: cover;
  background-position: center;
  position: relative;
  display: none;
}

@media (min-width: 768px) {
  .auth-image { display: block; }
}

.auth-form {
  flex: 1;
  padding: 4rem;
}

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--heading-color); font-weight: 600; }
.form-control {
  width: 100%; padding: 1rem 1.25rem; border-radius: 12px;
  border: 2px solid rgba(99, 102, 241, 0.1); background: var(--input-bg); color: var(--text-main);
  font-size: 1.05rem; transition: all 0.3s ease;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }

/* Footer */
footer {
  background: var(--footer-bg);
  color: var(--light);
  padding: 6rem 5% 2rem;
  position: relative;
  z-index: 10;
}

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-col h4 { font-size: 1.35rem; margin-bottom: 2rem; color: var(--light); font-weight: 700; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 1rem; }
.footer-col ul li a { color: #cbd5e1; text-decoration: none; transition: all 0.3s ease; }
.footer-col ul li a:hover { color: var(--secondary); padding-left: 5px; }
.footer-bottom { text-align: center; padding-top: 3rem; border-top: 1px solid rgba(255,255,255,0.1); color: #64748b; }

@media (max-width: 1024px) {
  .hero-content h1 { font-size: 4rem; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-image img { transform: none; }
}
@media (max-width: 768px) {
  nav { padding: 1rem 15px; }
  nav ul { display: none; }
  nav .logo { gap: 0; }
  .nav-logo-img { width: 140px; height: 50px; object-fit: cover; }
  nav > div { gap: 6px !important; flex: 0 0 auto; }
  .btn { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
  .grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .auth-form { padding: 2.5rem; }
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--heading-color);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.theme-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}
