/* AI Influencer Tools - Design System */
/* Light-mode SaaS design system for aiinfluencer.tools */

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

/* ========== Design Tokens ========== */
:root {
  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fc;
  --bg-card: #ffffff;
  --bg-input: #f1f3f9;
  --bg-hero: #f0f4ff;

  /* Text */
  --text-primary: #1a1a2e;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  /* Accent */
  --accent-blue: #3B82F6;
  --accent-blue-hover: #2563EB;
  --accent-violet: #7C3AED;
  --accent-violet-hover: #6D28D9;
  --accent-blue-light: #EFF6FF;

  /* Status */
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  /* Legacy aliases */
  --green: #10B981;
  --red: #EF4444;
  --yellow: #F59E0B;

  /* Border */
  --border: #E5E7EB;
  --border-light: #F3F4F6;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  /* Legacy aliases */
  --radius-card: 16px;
  --radius-btn: 10px;
  --radius-input: 8px;
  --radius-badge: 100px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Font */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* ========== CSS Reset ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

/* ========== Base ========== */
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Typography ========== */
h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-blue-hover);
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-blue);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--bg-secondary);
  padding: var(--space-md);
  border-radius: var(--radius-input);
  overflow-x: auto;
  border: 1px solid var(--border-light);
}

pre code {
  background: none;
  padding: 0;
}

/* ========== Layout ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ========== Card ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: var(--accent-violet);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--accent-violet-hover);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--accent-blue);
  border: 1.5px solid var(--accent-blue);
}

.btn-outline:hover {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ========== Forms ========== */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234b5563' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-group {
  margin-bottom: var(--space-md);
}

/* ========== Badges ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-badge);
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}

.badge-green {
  background: #ECFDF5;
  color: var(--green);
}

.badge-red {
  background: #FEF2F2;
  color: var(--red);
}

.badge-yellow {
  background: #FFFBEB;
  color: #B45309;
}

.badge-violet {
  background: #F5F3FF;
  color: var(--accent-violet);
}

/* ========== Tables ========== */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 14px;
}

tr:nth-child(even) {
  background: var(--bg-secondary);
}

tr:hover {
  background: var(--accent-blue-light);
}

/* ========== Nav ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 0 var(--space-lg);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo .logo-icon {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-sm);
}

.hamburger svg {
  width: 24px;
  height: 24px;
}

/* ========== Footer ========== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: var(--space-2xl) var(--space-lg);
  margin-top: var(--space-3xl);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
  text-decoration: none;
}

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

/* ========== Hero ========== */
.hero {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto var(--space-xl);
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  background: var(--accent-blue-light);
  padding: 6px 16px;
  border-radius: var(--radius-badge);
  margin-bottom: var(--space-lg);
}

/* ========== Pricing Cards ========== */
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--accent-blue), 0 8px 32px rgba(59, 130, 246, 0.15);
}

.pricing-card .plan-name {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.pricing-card .plan-price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.pricing-card .plan-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-card .plan-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.pricing-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-lg);
}

.pricing-card ul li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pricing-card ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
  flex-shrink: 0;
}

.pricing-card.featured ul li::before {
  background: var(--green);
}

.pricing-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 16px;
  border-radius: var(--radius-badge);
}

/* ========== Prompt Field Cards ========== */
.prompt-field {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent-blue);
  border-radius: var(--radius-input);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  box-shadow: var(--shadow-sm);
}

.prompt-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.prompt-field-value {
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* ========== Custom Scrollbar ========== */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  background-clip: padding-box;
  border: 4px solid transparent;
  border-radius: 8px;
  min-height: 40px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #9ca3af;
}

::-webkit-scrollbar-corner {
  background: var(--bg-primary);
}

/* Firefox scrollbar */
* {
  scrollbar-width: auto;
  scrollbar-color: #d1d5db var(--bg-primary);
}

/* ========== Animations ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

/* ========== Utilities ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--accent-blue); }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.pt-1 { padding-top: var(--space-sm); }
.pt-2 { padding-top: var(--space-md); }
.pt-3 { padding-top: var(--space-lg); }

.pb-1 { padding-bottom: var(--space-sm); }
.pb-2 { padding-bottom: var(--space-md); }
.pb-3 { padding-bottom: var(--space-lg); }

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.w-full { width: 100%; }
.rounded { border-radius: var(--radius-card); }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .container { padding: 0 var(--space-md); }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero { padding: var(--space-xl) 0; }

  .btn { width: 100%; }
  .hero-actions { flex-direction: column; align-items: center; }

  /* Mobile nav */
  .nav-links, .nav-actions {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) var(--space-lg);
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open, .nav-actions.open {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .pricing-card {
    padding: var(--space-lg);
  }
}
