:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --secondary: #10B981;
  --secondary-hover: #059669;
  --bg-color: #F9FAFB;
  --surface: #FFFFFF;
  --text-main: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border-color: #E5E7EB;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: all 0.2s ease-in-out;
}

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

html {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}
.section-light { background-color: var(--surface); }

/* Header */
.header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: var(--text-main);
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  gap: 0.5rem;
}
.btn-primary {
  background-color: var(--primary);
  color: white;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  color: white;
}
.btn-secondary {
  background-color: var(--primary-light);
  color: var(--primary);
}
.btn-secondary:hover {
  background-color: #E0E7FF;
}
.btn-outline {
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: var(--bg-color);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* Hero */
.hero {
  text-align: center;
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--primary-light) 100%);
}
.hero h1 {
  font-size: 3.5rem;
  max-width: 800px;
  margin: 0 auto 1.5rem;
}
.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-icon {
  width: 48px;
  height: 48px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* Tool UI */
.tool-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.tool-sidebar {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  height: fit-content;
}
.tool-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-size: 0.875rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--surface);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
select.form-control { cursor: pointer; }
.advanced-options { margin-top: 1rem; display: none; }
.advanced-options.active { display: block; }
.toggle-advanced {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* Generated Titles */
.title-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}
.title-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}
.title-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
}
.metric {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.metric-good { color: var(--success); }
.metric-warn { color: var(--warning); }
.metric-bad { color: var(--danger); }
.title-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

/* SEO Analysis Panel */
.analysis-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
}
.serp-preview {
  background: white;
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}
.serp-url { color: #202124; font-size: 14px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.serp-title { color: #1a0dab; font-size: 20px; font-weight: 400; line-height: 1.3; text-decoration: none; margin-bottom: 4px; cursor: pointer; }
.serp-title:hover { text-decoration: underline; }
.serp-desc { color: #4d5156; font-size: 14px; line-height: 1.58; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-green { background: #D1FAE5; color: #065F46; }

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}
.blog-card {
  display: flex;
  flex-direction: column;
}
.blog-img {
  width: 100%;
  height: 200px;
  background-color: var(--border-color);
  border-radius: var(--radius-md);
  object-fit: cover;
  margin-bottom: 1rem;
}
.blog-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.article-content {
  max-width: 800px;
  margin: 0 auto;
}
.article-content h2 { margin-top: 2rem; }
.article-content img { max-width: 100%; border-radius: var(--radius-md); margin: 1.5rem 0; }

/* Footer */
.footer {
  background-color: #111827;
  color: #F9FAFB;
  padding: 4rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer h4 {
  color: white;
  margin-bottom: 1.5rem;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 0.75rem;
}
.footer-links a {
  color: #9CA3AF;
}
.footer-links a:hover {
  color: white;
}
.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #9CA3AF;
  font-size: 0.875rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.pb-24 { padding-bottom: 6rem; }
.pb-0 { padding-bottom: 0 !important; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.w-full { width: 100%; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.hidden { display: none !important; }
.text-primary { color: var(--primary); }
.text-white { color: #fff; }
.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }
.bg-primary { background-color: var(--primary); }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-900 { color: #111827; }
.text-blue-100 { color: #dbeafe; }
.text-blue-600 { color: #2563eb; }
.text-blue-800 { color: #1e40af; }
.text-green-500 { color: #10b981; }
.text-green-600 { color: #059669; }
.text-purple-600 { color: #9333ea; }
.text-yellow-400 { color: #fbbf24; }
.text-yellow-600 { color: #d97706; }
.text-red-400 { color: #f87171; }
.text-red-600 { color: #dc2626; }
.text-indigo-100 { color: #e0e7ff; }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-700 { color: #4338ca; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-green-100 { background-color: #d1fae5; }
.bg-green-400 { background-color: #34d399; }
.bg-purple-100 { background-color: #f3e8ff; }
.bg-yellow-100 { background-color: #fef3c7; }
.bg-yellow-400 { background-color: #fbbf24; }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-400 { background-color: #f87171; }
.bg-indigo-100 { background-color: #e0e7ff; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.opacity-5 { opacity: 0.05; }
.opacity-60 { opacity: 0.6; }
.grayscale { filter: grayscale(100%); }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.border { border: 1px solid var(--border-color); }
.border-y { border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-700 { border-color: #374151; }
.relative { position: relative; }
.absolute { position: absolute; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.top-1\/2 { top: 50%; }
.left-0 { left: 0; }
.z-10 { z-index: 10; }
.-z-10 { z-index: -10; }
.-mr-20 { margin-right: -5rem; }
.-mt-20 { margin-top: -5rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-64 { width: 16rem; }
.h-64 { height: 16rem; }
.w-max { width: max-content; }
.flex-shrink-0 { flex-shrink: 0; }
.blur-3xl { filter: blur(64px); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.from-indigo-600 { --tw-gradient-from: #4f46e5; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(79, 70, 229, 0)); }
.to-purple-700 { --tw-gradient-to: #7e22ce; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:text-white:hover { color: #fff; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.italic { font-style: italic; }

/* Custom Additions */
.hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.pattern-bg {
  background-color: var(--bg-color);
  background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
  background-size: 20px 20px;
}

.browser-mockup {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.browser-header {
  background: #f1f5f9;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.browser-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Overrides for Utilities */
@media (min-width: 768px) {
  .md\:flex-row { flex-direction: row; }
}
@media (min-width: 1024px) {
  .lg\:block { display: block !important; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .tool-container { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--border-color);
  }
  .nav-links.show { display: flex; }
  .mobile-menu-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top: 3px solid white;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: none;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.btn-loading .spinner { display: inline-block; }
.btn-loading .btn-text { display: none; }
