/* ═══════════════════════════════════════════════════════════
   NexusAI — Autaur-Inspired Design System
   Dark, minimal, bold typography, Nordic clean
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --black: #0b0b0b;
  --dark: #111111;
  --dark-2: #181818;
  --dark-3: #1e1e1e;
  --white: #f5f5f0;
  --white-soft: #d4d4cc;
  --muted: #7a7a72;
  --accent: #c8ff00;
  --accent-dim: rgba(200,255,0,0.08);
  --accent-glow: rgba(200,255,0,0.15);
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 100px;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--black); }

/* ─── Smoothness ────────────────────────────────────────── */
a, button, input, textarea, .f-card, .p-card, .t-card, .btn, .step, .chat-widget {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ─── Layout ────────────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.section { padding: 140px 0; position: relative; }
.section-alt { background: var(--dark); }

/* ─── Typography ────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
.mega { font-size: clamp(3rem, 6.5vw, 5.5rem); }
.large { font-size: clamp(2rem, 4vw, 3.2rem); }
.medium { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
.accent-text { color: var(--accent); }
.muted-text { color: var(--muted); }
.body-lg { font-size: 1.15rem; color: var(--white-soft); line-height: 1.7; max-width: 540px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: var(--radius-pill);
  background: var(--accent-dim); border: 1px solid rgba(200,255,0,0.15);
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 2px;
  font-family: var(--font-heading);
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; border-radius: var(--radius-pill);
  font-family: var(--font-heading); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.4s var(--ease);
  border: none; text-decoration: none; letter-spacing: -0.01em;
}
.btn-accent {
  background: var(--accent); color: var(--black);
}
.btn-accent:hover { box-shadow: 0 0 40px var(--accent-glow); transform: translateY(-2px); }
.btn-outline {
  background: transparent; color: var(--white);
  border: 1.5px solid var(--border-hover);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-arrow::after { content: '→'; transition: transform 0.3s var(--ease); }
.btn-arrow:hover::after { transform: translateX(4px); }

/* ─── Navbar ────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 24px 0; transition: all 0.4s var(--ease);
}
.navbar.scrolled {
  padding: 14px 0;
  background: rgba(11,11,11,0.88); backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700;
  color: var(--white); text-decoration: none; letter-spacing: -0.04em;
}
.nav-logo em { font-style: normal; color: var(--accent); }
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.88rem;
  font-weight: 500; transition: color 0.3s var(--ease);
  font-family: var(--font-heading);
}
.nav-links a:hover { color: var(--white); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-right .btn { padding: 10px 26px; font-size: 0.85rem; }
.burger { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: 100px; padding-bottom: 80px; position: relative;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: center; }
.hero-content .tag { margin-bottom: 32px; }
.hero h1 { margin-bottom: 28px; }
.hero .body-lg { margin-bottom: 44px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 64px; }
.hero-metrics { display: flex; gap: 56px; }
.metric { display: flex; flex-direction: column; }
.metric-value {
  font-family: var(--font-heading); font-size: 2.4rem; font-weight: 700;
  color: var(--accent); letter-spacing: -0.03em;
}
.metric-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; letter-spacing: 0.5px; }

/* ─── Chat Widget ───────────────────────────────────────── */
.chat-widget {
  background: var(--dark-2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.chat-top {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.chat-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.chat-top-name { font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; }
.chat-top-status { font-size: 0.75rem; color: var(--accent); }
.chat-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; min-height: 340px; }
.msg {
  max-width: 82%; padding: 14px 18px; border-radius: 16px;
  font-size: 0.88rem; line-height: 1.55; animation: fadeUp 0.5s var(--ease);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.msg-bot {
  background: var(--dark-3); border: 1px solid var(--border);
  align-self: flex-start; border-bottom-left-radius: 4px;
  color: var(--white-soft);
}
.msg-user {
  background: var(--accent); color: var(--black); font-weight: 500;
  align-self: flex-end; border-bottom-right-radius: 4px;
}
.typing { display: flex; gap: 5px; padding: 14px 18px; align-self: flex-start; }
.typing span {
  width: 7px; height: 7px; background: var(--muted); border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }
.chat-bottom {
  display: flex; align-items: center; gap: 12px; padding: 16px 22px;
  border-top: 1px solid var(--border);
}
.chat-bottom input {
  flex: 1; background: none; border: none; color: var(--white);
  font-family: var(--font-body); font-size: 0.88rem; outline: none;
}
.chat-bottom input::placeholder { color: var(--muted); }
.chat-send {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); border: none; color: var(--black);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.3s var(--ease); font-size: 1.1rem; font-weight: 700;
}
.chat-send:hover { transform: scale(1.1); box-shadow: 0 0 20px var(--accent-glow); }

/* ─── Features ──────────────────────────────────────────── */
.features-header { max-width: 650px; margin-bottom: 72px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.f-card {
  padding: 40px 32px; border-radius: var(--radius);
  background: var(--dark-2); border: 1px solid var(--border);
  transition: all 0.4s var(--ease); position: relative; overflow: hidden;
}
.f-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform 0.4s var(--ease);
  transform-origin: left;
}
.f-card:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.f-card:hover::after { transform: scaleX(1); }
.f-icon {
  font-size: 2rem; margin-bottom: 24px;
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); border-radius: var(--radius-sm);
}
.f-card h3 {
  font-size: 1.15rem; margin-bottom: 12px; letter-spacing: -0.02em;
}
.f-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.65; }

/* ─── Steps ─────────────────────────────────────────────── */
.steps-header { max-width: 600px; margin-bottom: 72px; }
.steps-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step {
  padding: 36px 28px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--dark);
  transition: all 0.4s var(--ease); text-align: left;
}
.step:hover { border-color: var(--accent); }
.step-num {
  font-family: var(--font-heading); font-size: 3rem; font-weight: 700;
  color: var(--accent); opacity: 0.3; margin-bottom: 20px;
  letter-spacing: -0.04em;
}
.step:hover .step-num { opacity: 1; }
.step h3 { font-size: 1.05rem; margin-bottom: 10px; }
.step p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ─── Pricing ───────────────────────────────────────────── */
.pricing-header { max-width: 550px; margin: 0 auto 72px; text-align: center; }
.pricing-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.p-card {
  padding: 44px 36px; border-radius: var(--radius);
  background: var(--dark-2); border: 1px solid var(--border);
  transition: all 0.4s var(--ease); position: relative;
}
.p-card.highlight {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(200,255,0,0.04) 0%, var(--dark-2) 100%);
}
.p-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--black); padding: 5px 20px;
  border-radius: var(--radius-pill); font-family: var(--font-heading);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
}
.p-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.p-card .p-desc { font-size: 0.82rem; color: var(--muted); margin-bottom: 24px; }
.p-price {
  font-family: var(--font-heading); font-size: 3.2rem; font-weight: 700;
  letter-spacing: -0.04em; margin-bottom: 8px;
}
.p-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.p-interval { font-size: 0.8rem; color: var(--muted); margin-bottom: 32px; }
.p-features { list-style: none; margin-bottom: 36px; }
.p-features li {
  padding: 10px 0; font-size: 0.88rem; color: var(--white-soft);
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.p-features li:last-child { border: none; }
.p-check { color: var(--accent); font-weight: 700; font-size: 1rem; }
.p-card .btn { width: 100%; justify-content: center; }

/* ─── Testimonials ──────────────────────────────────────── */
.test-header { max-width: 500px; margin-bottom: 72px; }
.test-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.t-card {
  padding: 36px 28px; border-radius: var(--radius);
  background: var(--dark-2); border: 1px solid var(--border);
  transition: all 0.4s var(--ease);
}
.t-card:hover { border-color: var(--border-hover); }
.t-stars { color: var(--accent); font-size: 0.85rem; letter-spacing: 3px; margin-bottom: 20px; }
.t-card blockquote {
  font-size: 0.95rem; color: var(--white-soft); line-height: 1.7;
  margin-bottom: 28px; font-style: normal;
}
.t-author { display: flex; align-items: center; gap: 14px; }
.t-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--black);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 0.85rem;
}
.t-info h4 { font-size: 0.9rem; font-weight: 600; }
.t-info span { font-size: 0.78rem; color: var(--muted); }

/* ─── CTA Banner ────────────────────────────────────────── */
.cta { padding: 100px 0; }
.cta-box {
  padding: 80px 64px; border-radius: 24px; text-align: center;
  background: var(--dark-2); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.cta-box::before {
  content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 300px; border-radius: 50%;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.cta-box h2 { position: relative; margin-bottom: 16px; }
.cta-box p { font-size: 1.05rem; color: var(--muted); margin-bottom: 40px; max-width: 460px; margin-left: auto; margin-right: auto; position: relative; }
.cta-box .btn { position: relative; }

/* ─── Footer ────────────────────────────────────────────── */
.footer { padding: 64px 0 32px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: var(--muted); font-size: 0.88rem; margin-top: 14px; max-width: 280px; line-height: 1.6; }
.footer h4 {
  font-family: var(--font-heading); font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin-bottom: 18px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--white-soft); text-decoration: none; font-size: 0.88rem; transition: color 0.3s var(--ease); }
.footer ul a:hover { color: var(--accent); }
.footer-bottom {
  text-align: center; padding-top: 28px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.78rem;
}

/* ─── Scroll Reveal ─────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .chat-widget { max-width: 480px; }
  .features-grid, .test-grid { grid-template-columns: 1fr 1fr; }
  .steps-list { grid-template-columns: 1fr 1fr; }
  .pricing-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 90px 0; }
  .nav-links { display: none; }
  .burger { display: block; }
  .features-grid, .steps-list, .pricing-row, .test-grid { grid-template-columns: 1fr; }
  .hero-metrics { flex-direction: column; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 48px 28px; }
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGES (Login / Register)
   ═══════════════════════════════════════════════════════════ */
.auth-page {
  background: var(--black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--white-soft);
  font-size: 14px;
  font-weight: 500;
}
.form-group input, .form-group textarea {
  width: 100%;
  background: var(--dark);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  transition: all 0.2s var(--ease);
  outline: none;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.btn-full { width: 100%; justify-content: center; margin-top: 10px; }
.auth-links { margin-top: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-links a { text-decoration: none; font-weight: 500; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; }
.alert-error { background: rgba(255, 60, 60, 0.1); border: 1px solid rgba(255, 60, 60, 0.2); color: #ff5555; }
.alert-success { background: var(--accent-glow); border: 1px solid var(--accent-dim); color: var(--accent); }
.help-text { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════ */
.dashboard-page { background: var(--black); min-height: 100vh; }
.dashboard-nav { background: var(--dark-2); border-bottom: 1px solid var(--border); position: fixed; width: 100%; top: 0; z-index: 100; padding: 0 20px; }
.user-email { color: var(--muted); font-size: 14px; margin-right: 20px; }
.dash-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; padding-bottom: 80px; }
.dash-header { margin-bottom: 40px; }
.dash-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 30px;
}
.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.stat-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius);
}
.stat-label { color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 32px; font-weight: 600; color: var(--accent); font-family: var(--font-heading); }

.snippet-box {
  background: var(--dark);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.snippet-box code { color: #88c0d0; font-family: monospace; font-size: 13px; word-break: break-all; }
.color-picker-wrap { display: flex; align-items: center; gap: 12px; }
input[type="color"] {
  -webkit-appearance: none; border: none; width: 44px; height: 44px;
  border-radius: 8px; cursor: pointer; padding: 0; background: none;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 1px solid var(--border); border-radius: 8px; }
.color-hex { color: var(--muted); font-family: monospace; font-size: 14px; text-transform: uppercase; }

.save-status { height: 20px; color: var(--accent); font-size: 14px; font-weight: 500; opacity: 0; transition: opacity 0.3s; margin-top: 10px; }

/* Dashboard Widget Preview */
.preview-card { position: sticky; top: 100px; padding: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding-top: 30px; }
.widget-preview-wrapper { position: relative; width: 100%; height: 500px; background: url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="rgba(255,255,255,0.05)"/></svg>') repeat; border-top: 1px solid var(--border); margin-top: 20px; }
.widget-preview {
  position: absolute; bottom: 80px; right: 20px; width: 300px; height: 400px;
  background: var(--black); border: 1px solid var(--border); border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.widget-header { padding: 16px; background: var(--dark-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.widget-header-left { display: flex; align-items: center; gap: 8px; }
.widget-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--widget-accent); box-shadow: 0 0 10px var(--widget-accent); }
.widget-title { color: var(--text); font-weight: 600; font-size: 14px; }
.widget-close { color: #777; font-size: 20px; line-height: 1; }
.widget-body { flex: 1; padding: 16px; }
.widget-msg { padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; max-width: 85%; }
.widget-msg-bot { background: var(--dark-2); border-bottom-left-radius: 4px; border: 1px solid var(--border); }
.widget-input-area { padding: 12px; background: var(--dark-2); border-top: 1px solid var(--border); display: flex; gap: 8px; }
.widget-input-area input { flex: 1; background: var(--black); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 12px; }
.widget-input-area button { background: var(--widget-accent); width: 32px; height: 32px; border: none; border-radius: 8px; color: var(--black); display: flex; align-items: center; justify-content: center; }
.widget-launcher-preview { position: absolute; bottom: 20px; right: 20px; width: 48px; height: 48px; border-radius: 50%; background: var(--widget-accent); display: flex; align-items: center; justify-content: center; color: var(--black); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.widget-launcher-preview svg { width: 24px; height: 24px; }

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .preview-card { display: none; }
}
