/* AutoPilot AI — Global Styles */
:root {
  --bg: #0a0f1e;
  --bg2: #0f172a;
  --bg3: #1e293b;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --white: #f8fafc;
  --muted: #94a3b8;
  --border: #1e293b;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(59,130,246,0.10);
  --shadow-lg: 0 8px 48px rgba(59,130,246,0.18);
  --transition: 0.2s ease;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { color: var(--muted); }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cyan); }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 4px 20px rgba(59,130,246,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59,130,246,0.5);
}
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--blue);
}
.btn-secondary:hover { background: rgba(59,130,246,0.1); }
.btn-ghost { background: var(--bg3); color: var(--white); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Cards */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}
.card:hover { border-color: rgba(59,130,246,0.3); box-shadow: var(--shadow); }
.card-glow { box-shadow: var(--shadow-lg); border-color: rgba(59,130,246,0.4); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,15,30,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  flex: 1;
}
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--white); }
.nav-actions { display: flex; gap: 12px; align-items: center; margin-left: auto; }
.nav-hamburger { display: none; background: none; border: none; color: var(--white); cursor: pointer; font-size: 1.4rem; }

/* Section */
.section { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 16px; }
.section-sub { text-align: center; font-size: 1.1rem; color: var(--muted); margin-bottom: 56px; max-width: 600px; margin-left: auto; margin-right: auto; }
.section-tag {
  display: inline-block;
  background: rgba(59,130,246,0.12);
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* Grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 8px; color: var(--white); }
.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.form-control::placeholder { color: var(--muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue { background: rgba(59,130,246,0.15); color: var(--blue); }
.badge-cyan { background: rgba(6,182,212,0.15); color: var(--cyan); }
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-popular { background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Alert */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-info { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: var(--blue); }
.alert-warning { background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.3); color: #fbbf24; }
.alert-danger { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: var(--success); }

/* Tool icon */
.tool-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

/* Output box */
.output-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 200px;
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.7;
  position: relative;
}
.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  height: 200px;
  gap: 12px;
  font-size: 2rem;
}

/* Footer */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 12px; max-width: 280px; }
.footer-col h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--muted); font-size: 0.9rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 0.85rem; }

/* Dashboard layout */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 50;
  overflow-y: auto;
}
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid var(--border); }
.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 4px;
  text-decoration: none;
}
.sidebar-nav-item:hover { background: var(--bg3); color: var(--white); }
.sidebar-nav-item.active { background: rgba(59,130,246,0.12); color: var(--blue); }
.sidebar-nav-item .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid var(--border); }
.app-main { margin-left: 260px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10,15,30,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-title { font-size: 1.1rem; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.credits-pill {
  background: rgba(6,182,212,0.12);
  border: 1px solid rgba(6,182,212,0.3);
  color: var(--cyan);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}
.app-content { padding: 32px; flex: 1; }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--white); }
.stat-sub { font-size: 0.8rem; color: var(--success); margin-top: 4px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pricing-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  position: relative;
  transition: all var(--transition);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.popular {
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
}
.pricing-popular-badge {
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 99px;
  white-space: nowrap;
}
.pricing-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price { font-size: 3rem; font-weight: 800; margin: 16px 0 4px; }
.pricing-price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.pricing-period { color: var(--muted); font-size: 0.85rem; margin-bottom: 24px; }
.pricing-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 12px; }
.pricing-features li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--muted); }
.pricing-features li::before { content: "✓"; color: var(--success); font-weight: 700; flex-shrink: 0; }
.pricing-features li.no::before { content: "✕"; color: var(--danger); }
.pricing-features li.no { opacity: 0.5; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--white);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .chevron { transition: transform var(--transition); flex-shrink: 0; color: var(--muted); }
.faq-q.open .chevron { transform: rotate(180deg); }
.faq-a { color: var(--muted); font-size: 0.95rem; padding-bottom: 20px; display: none; line-height: 1.7; }
.faq-a.open { display: block; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.step { text-align: center; }
.step-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 auto 20px;
}
.step h3 { margin-bottom: 8px; }

/* Toggle */
.toggle-group {
  display: flex;
  background: var(--bg3);
  border-radius: 99px;
  padding: 4px;
  gap: 4px;
  width: fit-content;
}
.toggle-btn {
  padding: 8px 20px;
  border-radius: 99px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.toggle-btn.active { background: var(--blue); color: #fff; }

/* Tool output items */
.name-result {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}
.name-result:hover { border-color: rgba(59,130,246,0.4); }
.name-result .name-text { font-weight: 700; font-size: 1.05rem; }
.name-result .name-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Social post item */
.social-post {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 12px;
}
.social-post-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.social-post-body { color: var(--muted); font-size: 0.95rem; line-height: 1.7; white-space: pre-wrap; }
.social-post-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Comparison table */
.comparison-table { width: 100%; border-collapse: collapse; margin-top: 40px; }
.comparison-table th, .comparison-table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.comparison-table th { background: var(--bg3); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; }
.comparison-table td:first-child { color: var(--white); font-weight: 500; }
.comparison-table .check { color: var(--success); font-weight: 700; }
.comparison-table .cross { color: var(--danger); opacity: 0.5; }

/* Login card */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); background-image: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.12) 0%, transparent 60%); }
.auth-card { width: 100%; max-width: 440px; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 40px; }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-text { font-size: 1.5rem; font-weight: 800; }
.auth-tabs { display: flex; background: var(--bg3); border-radius: var(--radius-sm); padding: 4px; gap: 4px; margin-bottom: 28px; }
.auth-tab { flex: 1; text-align: center; padding: 10px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--muted); font-family: var(--font); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all var(--transition); }
.auth-tab.active { background: var(--bg2); color: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.social-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: transparent; color: var(--white); font-family: var(--font); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all var(--transition); margin-bottom: 12px; }
.social-btn:hover { background: var(--bg3); border-color: var(--blue); }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 0.8rem; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* Responsive */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .grid-3, .grid-2, .pricing-grid, .steps, .grid-5 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .comparison-table { display: block; overflow-x: auto; }
}
