:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #10b981;
  --dark: #0f172a;
  --light: #f8fafc;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --white: #ffffff;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.5rem;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--dark); }
h1 { font-size: 3rem; margin-bottom: 1.5rem; }
h2 { font-size: 2.25rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
p { margin-bottom: 1.25rem; color: var(--gray); font-size: 1.125rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
}
.btn-primary { background-color: var(--primary); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary { background-color: var(--white); color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background-color: var(--primary); color: var(--white); }
.btn-block { width: 100%; }

/* Navigation */
.header {
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-menu { display: flex; gap: 2rem; align-items: center; }
.nav-item a { font-weight: 500; color: var(--gray); transition: color 0.2s; }
.nav-item a:hover, .nav-item a.active { color: var(--primary); }
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  border-bottom: 1px solid var(--gray-light);
}
.hero h1 {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 900px;
  margin: 0 auto 1.5rem;
}
.hero p { max-width: 800px; margin: 0 auto 2.5rem; font-size: 1.25rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; }

/* Sections */
.section { padding: 5rem 0; }
.section-alt { background-color: var(--white); }
.section-title { text-align: center; margin-bottom: 3rem; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  border: 1px solid var(--gray-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 3rem; color: var(--primary); margin-bottom: 1.5rem; display: inline-block; }

/* Tool Interface */
.tool-container {
  max-width: 900px;
  margin: -4rem auto 4rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 3rem;
  position: relative;
  z-index: 10;
  border: 1px solid var(--gray-light);
}
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--dark); }
.form-control {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--light);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: var(--white);
}
textarea.form-control { resize: vertical; min-height: 120px; }

/* Output Area */
.output-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-light);
  display: none;
}
.output-area.active { display: block; animation: fadeIn 0.5s ease; }
.output-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.char-counter { font-weight: 600; font-size: 0.875rem; padding: 0.25rem 0.75rem; border-radius: 99px; background: var(--light); }
.char-counter.good { color: var(--success); background: #dcfce7; }
.char-counter.warn { color: var(--warning); background: #fef3c7; }
.char-counter.error { color: var(--danger); background: #fee2e2; }
.result-box {
  background: var(--light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-light);
  font-size: 1.125rem;
  color: var(--dark);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gray-light); padding: 1.5rem 0; }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--dark);
}
.faq-answer { display: none; padding-top: 1rem; color: var(--gray); }
.faq-item.active .faq-answer { display: block; animation: fadeIn 0.3s ease; }
.faq-icon { transition: transform 0.3s; }
.faq-item.active .faq-icon { transform: rotate(45deg); }

/* Blog */
.blog-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-light);
  transition: transform 0.3s, box-shadow 0.3s;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.blog-content { padding: 2rem; }
.blog-meta { font-size: 0.875rem; color: var(--gray); margin-bottom: 1rem; }
.blog-title { font-size: 1.5rem; margin-bottom: 1rem; }
.blog-title a { transition: color 0.2s; }
.blog-title a:hover { color: var(--primary); }

/* Article */
.article-header { padding: 4rem 0; text-align: center; background: var(--white); border-bottom: 1px solid var(--gray-light); }
.article-meta { color: var(--gray); margin-top: 1rem; }
.article-content { max-width: 800px; margin: 0 auto; padding: 4rem 1.5rem; background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-top: -2rem; position: relative; z-index: 10; border: 1px solid var(--gray-light); }
.article-content h2 { margin-top: 3rem; }
.article-content h3 { margin-top: 2rem; }
.article-content ul, .article-content ol { margin-left: 2rem; margin-bottom: 1.5rem; }
.article-content li { margin-bottom: 0.5rem; font-size: 1.125rem; color: var(--gray); }

/* Footer */
.footer { background-color: var(--dark); color: var(--light); padding: 5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-brand h2 { color: var(--white); }
.footer-brand p { color: #94a3b8; max-width: 400px; }
.footer-links h3 { color: var(--white); margin-bottom: 1.5rem; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #94a3b8; transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { padding-top: 2rem; border-top: 1px solid #334155; display: flex; justify-content: space-between; align-items: center; color: #94a3b8; font-size: 0.875rem; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 5rem;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--gray-light);
  }
  .nav-menu.active { display: flex; }
  .hero h1 { font-size: 2.25rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .hero-buttons { flex-direction: column; }
}
