/* Base and Variables */
:root {
  --primary-color: #4f46e5;
  --secondary-color: #818cf8;
  --bg-gradient: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  --text-main: #1f2937;
  --text-light: #6b7280;
  --card-bg: rgba(255, 255, 255, 0.9);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.fade-in { animation: fadeIn 0.8s ease-out forwards; }
.slide-up { animation: slideUp 0.6s ease-out forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Header */
.sticky-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  transition: var(--transition);
}

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

/* Main Content */
main {
  flex: 1;
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1rem;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 800px;
  margin: 0 auto 2rem;
}

/* CTA Button */
.cta-button {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 1.25rem 3rem;
  border-radius: 50px;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.6); /* Button hover glow */
  background: var(--secondary-color);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.5);
}

.card:hover {
  transform: translateY(-5px) scale(1.02); /* Hover scale */
  box-shadow: var(--shadow-hover); /* Card hover shadow */
}

/* Grid Layouts */
.features-grid, .tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Tool Section */
.tool-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 900px) {
  .tool-container {
    grid-template-columns: 2fr 1fr;
  }
}

.textarea-wrapper textarea {
  width: 100%;
  height: 400px;
  padding: 1.5rem;
  border: 2px solid #e5e7eb;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  resize: vertical;
  transition: var(--transition);
  font-family: inherit;
  background: rgba(255,255,255,0.8);
}

.textarea-wrapper textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  background: #fff;
}

.editor-toolbar {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-secondary {
  background: white;
  color: var(--text-main);
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Stats panel */
.stats-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-box {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.6);
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.keyword-density-card {
  grid-column: span 2;
  margin-top: 1rem;
  text-align: left;
}

.keyword-density-card h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-main);
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.keyword-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.keyword-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dash #f3f4f6;
  font-size: 0.95rem;
}

.progress-bar-container {
  width: 100px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-bar {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
}

/* Forms */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Content Sections */
.content-section {
  max-width: 800px;
  margin: 3rem auto;
  background: var(--card-bg);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,255,255,0.7);
}

.seo-content {
  margin-top: 4rem;
}

.content-section h1, .seo-content h2, .faq-item h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.content-section h2, .seo-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.content-section p, .seo-content p {
  margin-bottom: 1.5rem;
  color: var(--text-main);
  font-size: 1.05rem;
}

.content-section ul, .seo-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.content-section li, .seo-content li {
  margin-bottom: 0.5rem;
}

/* FAQs */
.faq-section {
  max-width: 800px;
  margin: 4rem auto;
}

.faq-item {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.faq-item:hover {
  transform: translateX(5px);
  border-left: 4px solid var(--primary-color);
}

/* Footer */
footer {
  background: white;
  padding: 3rem 1rem 1rem;
  margin-top: auto;
  border-top: 1px solid #e5e7eb;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h3 {
  margin-bottom: 1rem;
  color: var(--text-main);
  font-weight: 700;
}

.footer-column ul {
  list-style: none;
}

.footer-column a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
  padding: 0.25rem 0;
}

.footer-column a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #f3f4f6;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .sticky-header { padding: 1rem; }
  .nav-links { display: none; /* simple mobile */ }
  .stats-panel { grid-template-columns: 1fr; }
  .keyword-density-card { grid-column: span 1; }
  .content-section { padding: 2rem 1rem; }
  .cta-button { width: 100%; text-align: center; }
}
