* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #111; line-height: 1.6; }

:root {
  --primary: #6c5ce7;
  --primary-dark: #5a4bd1;
  --accent: #00cec9;
  --dark: #1a1a2e;
  --gray: #f8f9fa;
  --text: #333;
  --radius: 12px;
}

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

.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; background: white; border-bottom: 1px solid #eee;
  position: sticky; top: 0; z-index: 100;
}
.navbar .logo { font-size: 24px; font-weight: 800; color: var(--primary); text-decoration: none; }
.navbar .logo span { color: var(--accent); }
.navbar .nav-links { display: flex; gap: 24px; align-items: center; }
.navbar .nav-links a { text-decoration: none; color: var(--text); font-weight: 500; }
.navbar .nav-links a:hover { color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius); font-weight: 600;
  font-size: 16px; cursor: pointer; border: none; text-decoration: none;
  transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: #00b8b3; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-danger { background: #e74c3c; color: white; }

.hero {
  text-align: center; padding: 80px 20px 60px;
  background: linear-gradient(135deg, #f5f0ff 0%, #e8f8f7 100%);
}
.hero h1 { font-size: 48px; font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 20px; color: #666; max-width: 600px; margin: 0 auto 32px; }
.hero .btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.features { padding: 80px 0; }
.features h2 { text-align: center; font-size: 36px; margin-bottom: 48px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.feature-card {
  padding: 32px; border-radius: var(--radius); background: white;
  border: 1px solid #eee; transition: all 0.2s;
}
.feature-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); transform: translateY(-2px); }
.feature-card .icon { font-size: 40px; margin-bottom: 16px; }
.feature-card h3 { font-size: 20px; margin-bottom: 8px; }
.feature-card p { color: #666; }

.examples { padding: 80px 0; background: var(--gray); }
.examples h2 { text-align: center; font-size: 36px; margin-bottom: 48px; }
.examples-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.example-item {
  border-radius: var(--radius); overflow: hidden; background: white;
  border: 1px solid #eee; padding: 16px; text-align: center;
}
.example-item img { width: 100%; border-radius: 8px; }
.example-item p { margin-top: 8px; font-weight: 500; }

.pricing { padding: 80px 0; }
.pricing h2 { text-align: center; font-size: 36px; margin-bottom: 48px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto; }
.pricing-card {
  padding: 40px 32px; border-radius: var(--radius); border: 2px solid #eee;
  text-align: center; transition: all 0.2s; background: white;
}
.pricing-card.featured { border-color: var(--primary); box-shadow: 0 8px 32px rgba(108,92,231,0.15); }
.pricing-card.featured .badge { display: inline-block; background: var(--primary); color: white; padding: 4px 16px; border-radius: 20px; font-size: 14px; margin-bottom: 12px; }
.pricing-card h3 { font-size: 24px; margin-bottom: 8px; }
.pricing-card .price { font-size: 48px; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.pricing-card .price span { font-size: 20px; color: #666; font-weight: 400; }
.pricing-card ul { list-style: none; margin: 24px 0; text-align: left; }
.pricing-card ul li { padding: 8px 0; }
.pricing-card ul li::before { content: '✓ '; color: var(--accent); font-weight: bold; }

.footer { text-align: center; padding: 40px; color: #666; border-top: 1px solid #eee; }

/* Auth pages */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f5f0ff 0%, #e8f8f7 100%);
}
.auth-card {
  background: white; padding: 48px 40px; border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08); width: 100%; max-width: 420px;
}
.auth-card h2 { text-align: center; margin-bottom: 24px; font-size: 28px; }
.auth-card .logo { text-align: center; font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.auth-card .logo span { color: var(--accent); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: 12px 16px; border: 2px solid #ddd; border-radius: 8px;
  font-size: 16px; transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--primary); }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.auth-card .switch-link { text-align: center; margin-top: 16px; color: #666; }
.auth-card .switch-link a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-card .error { color: #e74c3c; font-size: 14px; margin-top: 8px; text-align: center; display: none; }

/* Dashboard */
.dashboard { display: flex; min-height: calc(100vh - 70px); }
.dash-sidebar {
  width: 260px; background: var(--dark); padding: 24px; color: white;
  display: flex; flex-direction: column; gap: 8px;
}
.dash-sidebar a {
  color: rgba(255,255,255,0.7); text-decoration: none; padding: 12px 16px;
  border-radius: 8px; font-weight: 500; transition: all 0.2s;
}
.dash-sidebar a:hover, .dash-sidebar a.active { background: rgba(255,255,255,0.1); color: white; }
.dash-sidebar .user-info { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.dash-sidebar .user-info .name { font-weight: 700; }
.dash-sidebar .user-info .plan { font-size: 13px; color: var(--accent); }
.dash-sidebar .user-info .email { font-size: 13px; color: rgba(255,255,255,0.5); }
.dash-main { flex: 1; padding: 32px; background: var(--gray); }
.dash-main h2 { font-size: 28px; margin-bottom: 24px; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { padding: 24px; background: white; border-radius: var(--radius); border: 1px solid #eee; }
.stat-card .number { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat-card .label { color: #666; font-size: 14px; }
.infographics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.infographic-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  border: 1px solid #eee; transition: all 0.2s;
}
.infographic-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.infographic-card img { width: 100%; height: 200px; object-fit: cover; }
.infographic-card .info { padding: 16px; }
.infographic-card .info h4 { font-size: 14px; margin-bottom: 4px; }
.infographic-card .info p { font-size: 13px; color: #666; }
.infographic-card .info .actions { display: flex; gap: 8px; margin-top: 12px; }
.infographic-card .info .actions .btn { padding: 6px 16px; font-size: 13px; }

/* Generator */
.generator { max-width: 700px; margin: 0 auto; padding: 40px 20px; }
.generator h2 { font-size: 32px; margin-bottom: 8px; }
.generator .subtitle { color: #666; margin-bottom: 32px; }
.generator .mode-tabs { display: flex; gap: 0; margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--primary); }
.generator .mode-tab { flex: 1; padding: 14px; text-align: center; cursor: pointer; font-weight: 600; background: white; border: none; font-size: 16px; transition: all 0.2s; }
.generator .mode-tab.active { background: var(--primary); color: white; }
.generator .mode-tab:not(.active):hover { background: #f5f0ff; }
.generator textarea { width: 100%; padding: 14px; border: 2px solid #ddd; border-radius: 8px; font-size: 16px; resize: vertical; min-height: 120px; font-family: inherit; }
.generator textarea:focus { outline: none; border-color: var(--primary); }
.generator .theme-toggle { display: flex; gap: 12px; margin: 16px 0; }
.generator .theme-btn { flex: 1; padding: 12px; border: 2px solid #ddd; border-radius: 8px; text-align: center; cursor: pointer; font-weight: 500; transition: all 0.2s; background: white; }
.generator .theme-btn.selected { border-color: var(--primary); background: #f5f0ff; }
.generator .theme-btn.light.selected { border-color: #f39c12; background: #fef5e7; }
.generator .theme-btn.dark.selected { border-color: #2c3e50; background: #ecf0f1; }
.generator .result { margin-top: 32px; display: none; }
.generator .result img { width: 100%; border-radius: var(--radius); border: 1px solid #eee; }
.generator .result .actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.loading-spinner {
  display: none; text-align: center; padding: 40px;
}
.loading-spinner .spinner {
  width: 48px; height: 48px; border: 4px solid #eee;
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-spinner p { color: #666; }

/* Steps guide */
.steps { padding: 60px 0; background: white; }
.steps h2 { text-align: center; font-size: 36px; margin-bottom: 48px; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.step-card { text-align: center; padding: 32px; }
.step-card .step-num { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: white; font-size: 24px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.step-card h3 { font-size: 20px; margin-bottom: 8px; }
.step-card p { color: #666; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; padding: 16px 24px;
  border-radius: 8px; color: white; font-weight: 500; z-index: 1000;
  transform: translateY(100px); opacity: 0; transition: all 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #27ae60; }
.toast.error { background: #e74c3c; }

@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .dashboard { flex-direction: column; }
  .dash-sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 12px 16px; }
  .dash-sidebar a { white-space: nowrap; padding: 8px 12px; }
  .dash-main { padding: 16px; }
  .generator { padding: 20px 16px; }
  .pricing-grid { grid-template-columns: 1fr; }
}
