/* PostPilot — CSS Principal */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  height: 64px;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.nav { display: flex; align-items: center; gap: 32px; }

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s;
}

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

.nav-buttons { display: flex; align-items: center; gap: 12px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}

.btn-ghost:hover { background: var(--gray-100); }

.btn-full { width: 100%; }

/* Hero */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  text-align: center;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 20px;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto 40px;
}

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

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat .label {
  font-size: 14px;
  color: var(--gray-500);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--gray-600);
}

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: all 0.3s;
}

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

.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.card-icon.purple { background: #ede9fe; }
.card-icon.blue { background: #dbeafe; }
.card-icon.green { background: #dcfce7; }
.card-icon.orange { background: #ffedd5; }
.card-icon.pink { background: #fce7f3; }
.card-icon.yellow { background: #fef9c3; }

.card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.card p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Grid */
.grid {
  display: grid;
  gap: 24px;
}

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

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .nav { display: none; }
  .hero-buttons { flex-direction: column; }
}

/* Pricing */
.pricing-card {
  background: white;
  border-radius: 16px;
  padding: 40px 32px;
  border: 2px solid var(--gray-200);
  text-align: center;
  position: relative;
  transition: all 0.3s;
}

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

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.pricing-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 48px;
  font-weight: 800;
  color: var(--dark);
  margin: 16px 0;
}

.pricing-card .price span {
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-500);
}

.pricing-card ul {
  text-align: left;
  margin: 24px 0;
}

.pricing-card ul li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-card ul li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer h4 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  transition: color 0.2s;
}

.footer a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* Forms */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.2s;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.form-input::placeholder { color: var(--gray-400); }

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gray-50), var(--white));
  padding: 24px;
}

.auth-card {
  background: white;
  border-radius: 16px;
  padding: 48px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
  text-align: center;
}

.auth-card p {
  text-align: center;
  color: var(--gray-600);
  margin-bottom: 32px;
  font-size: 14px;
}

.auth-card .btn { width: 100%; margin-top: 8px; }

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--gray-600);
}

.auth-footer a { color: var(--primary); font-weight: 600; }

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: var(--radius);
  color: white;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--gray-500); }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

.hidden { display: none !important; }
