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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --bg: #0f172a;
  --bg-light: #1e293b;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--primary); }

/* Nav */
.main-nav {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-btn {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background 0.2s;
}
.nav-btn:hover { background: var(--primary-dark) !important; }
.nav-btn-secondary {
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--bg-light); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* Hero Section (marketing) */
.hero {
  text-align: center;
  padding: 100px 24px 80px;
  max-width: 900px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-header p { color: var(--text-muted); font-size: 1.1rem; }

/* Grid */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Feature cards */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}
.feature-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.feature-card .icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Pricing */
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}
.pricing-card.featured {
  border-color: var(--primary);
  transform: scale(1.05);
}
.pricing-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.pricing-card .price {
  font-size: 3rem;
  font-weight: 800;
  margin: 16px 0;
}
.pricing-card .price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.pricing-card ul { list-style: none; margin: 24px 0; text-align: left; }
.pricing-card ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.pricing-card ul li::before { content: '✓ '; color: var(--success); font-weight: 700; }

/* Auth pages */
.auth-container {
  max-width: 440px;
  margin: 60px auto;
  padding: 0 24px;
}
.auth-container h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}
.auth-container .subtitle {
  color: var(--text-muted);
  margin-bottom: 32px;
}
.auth-container .card { padding: 32px; }
.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.alert-error { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.alert-success { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }

/* Footer */
.main-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 48px 24px 24px;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-brand p { color: var(--text-muted); margin-top: 8px; font-size: 0.9rem; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Template preview cards */
.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.3s;
}
.template-card:hover, .template-card.selected { border-color: var(--primary); transform: translateY(-2px); }
.template-card .preview {
  height: 160px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
}
.template-card .info { padding: 16px; }
.template-card .info h4 { margin-bottom: 4px; }
.template-card .info p { color: var(--text-muted); font-size: 0.85rem; }

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero { padding: 60px 16px 48px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1.05rem; margin-bottom: 28px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .section { padding: 48px 16px; }
  .section-header { margin-bottom: 32px; }
  .section-header h2 { font-size: 1.6rem; }

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

  .feature-card { padding: 24px; }
  .feature-card:hover { transform: none; }

  .pricing-card { padding: 28px 20px; }
  .pricing-card.featured { transform: none; }
  .pricing-card .price { font-size: 2.4rem; }

  .auth-container { margin: 32px auto; }
  .auth-container h1 { font-size: 1.6rem; }
  .auth-container .card { padding: 20px; }

  .btn-lg { padding: 14px 24px; font-size: 1rem; }

  .main-footer { margin-top: 48px; padding: 32px 16px 16px; }
  .footer-container { flex-direction: column; gap: 20px; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-container { padding: 0 16px; }
  .section { padding: 36px 12px; }
  .card { padding: 16px; }
}
