/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1a1a2e;
  background: #faf9f7;
  line-height: 1.6;
}
a { color: #c0392b; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.3; }
h2 { font-size: 1.8rem; text-align: center; margin-bottom: 0.5rem; color: #1a1a2e; }
.section-sub { text-align: center; color: #666; margin-bottom: 2rem; }

/* ===== Header ===== */
.site-header {
  background: white;
  border-bottom: 1px solid #eee;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 20px; height: 56px;
}
.logo { font-size: 1.3rem; font-weight: 700; color: #c0392b !important; text-decoration: none !important; }
.site-header nav a {
  margin-left: 1.5rem; color: #555; font-size: 0.9rem; font-weight: 500;
}
.site-header nav a.active, .site-header nav a:hover { color: #c0392b; text-decoration: none; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #fff5f0 0%, #fff0e6 50%, #ffe8d6 100%);
  padding: 4rem 0 3rem; text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 0.8rem; }
.hero-sub { font-size: 1.15rem; color: #555; max-width: 600px; margin: 0 auto 1.5rem; }
.hero-stats { display: flex; justify-content: center; gap: 2rem; margin-top: 1.5rem; font-size: 0.9rem; color: #666; }
.btn-primary {
  display: inline-block;
  background: #c0392b; color: white !important;
  padding: 0.85rem 2rem; border-radius: 8px;
  font-size: 1.1rem; font-weight: 600; border: none; cursor: pointer;
  transition: background 0.2s; text-decoration: none !important;
}
.btn-primary:hover { background: #a93226; }
.btn-secondary {
  display: inline-block;
  background: #f0f0f0; color: #333 !important;
  padding: 0.7rem 1.5rem; border-radius: 8px;
  font-size: 0.95rem; font-weight: 500; border: 1px solid #ddd; cursor: pointer;
  transition: background 0.2s; text-decoration: none !important;
}
.btn-secondary:hover { background: #e0e0e0; }

/* ===== Features ===== */
.features { padding: 4rem 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.feature-card {
  background: white; border-radius: 12px; padding: 1.8rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-align: center;
}
.feature-icon { font-size: 2.2rem; margin-bottom: 0.8rem; }
.feature-card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.feature-card p { color: #666; font-size: 0.9rem; }

/* ===== Templates Preview ===== */
.templates-preview { padding: 4rem 0; background: white; }
.template-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem; margin-top: 2rem;
}
.template-card {
  background: #faf9f7; border-radius: 12px; padding: 2rem 1rem;
  text-align: center; border: 2px solid transparent; cursor: pointer;
  transition: all 0.2s;
}
.template-card:hover { border-color: #c0392b; }
.template-card.active { border-color: #c0392b; background: #fff5f0; }
.template-card .preview-box {
  width: 100%; aspect-ratio: 3/4; max-width: 180px; margin: 0 auto 0.8rem;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #888; border: 1px solid #eee;
}

/* ===== Editor ===== */
.editor-section { padding: 4rem 0; background: #f5f3f0; }
.editor-layout {
  display: grid; grid-template-columns: 340px 1fr; gap: 2rem; align-items: start;
}
.editor-sidebar { background: white; border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #555; margin-bottom: 0.3rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.6rem; border: 1px solid #ddd; border-radius: 6px;
  font-size: 0.9rem; font-family: inherit; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #c0392b; }
.template-selector, .color-selector { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.template-btn {
  padding: 0.4rem 0.8rem; border-radius: 6px; font-size: 0.8rem;
  border: 1px solid #ddd; background: white; cursor: pointer; transition: all 0.2s;
}
.template-btn.active { background: #c0392b; color: white; border-color: #c0392b; }
.color-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; transition: all 0.2s;
}
.color-btn.active { border-color: #c0392b; transform: scale(1.15); }
.editor-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.2rem; }

/* Recipe Card Preview */
.editor-preview {
  background: white; border-radius: 12px; padding: 2rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex; justify-content: center;
}
.recipe-card {
  width: 100%; max-width: 400px; border-radius: 12px;
  padding: 1.5rem; font-family: 'Georgia', 'Times New Roman', serif;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1); transition: all 0.3s;
}
.card-header { text-align: center; margin-bottom: 1rem; }
.card-title { font-size: 1.5rem; color: #1a1a2e; margin-bottom: 0.2rem; }
.card-author { font-size: 0.85rem; color: #888; font-style: italic; }
.card-meta {
  display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem;
  font-size: 0.8rem; color: #666; flex-wrap: wrap;
}
.card-section { margin-bottom: 1rem; }
.card-section h4, .card-section .section-title { font-size: 1rem; color: #c0392b; margin-bottom: 0.4rem; border-bottom: 1px solid #eee; padding-bottom: 0.3rem; }
.card-section ul, .card-section ol { padding-left: 1.2rem; font-size: 0.85rem; color: #444; }
.card-section li { margin-bottom: 0.25rem; }

/* ===== Extractor Page ===== */
.extractor-section { padding: 3rem 0 4rem; }
.extractor-card {
  max-width: 650px; margin: 2rem auto; background: white;
  border-radius: 12px; padding: 2rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.extractor-card .input-group {
  display: flex; gap: 0.5rem;
}
.extractor-card input[type="url"] {
  flex: 1; padding: 0.7rem 1rem; border: 2px solid #ddd; border-radius: 8px;
  font-size: 0.95rem; transition: border-color 0.2s;
}
.extractor-card input[type="url"]:focus { border-color: #c0392b; outline: none; }
.extractor-status { margin-top: 1rem; padding: 1rem; border-radius: 8px; display: none; }
.extractor-status.loading { display: block; background: #fff8e1; color: #795548; }
.extractor-status.error { display: block; background: #ffebee; color: #c62828; }
.extractor-status.success { display: block; background: #e8f5e9; color: #2e7d32; }
.extractor-result { margin-top: 2rem; }

/* ===== Content Section ===== */
.content-section { padding: 4rem 0; background: #fff; }
.content-section .container { max-width: 750px; }
.content-section p { font-size: 1rem; color: #444; line-height: 1.8; margin-bottom: 1.2rem; }
.content-section h2 { margin-bottom: 1.2rem; }
.content-section h3 { font-size: 1.2rem; color: #1a1a2e; margin: 1.5rem 0 0.8rem; }
.content-section ul, .content-section ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.content-section li { font-size: 0.95rem; color: #444; line-height: 1.7; margin-bottom: 0.5rem; }
.content-section strong { color: #1a1a2e; }

/* ===== FAQ ===== */
.faq { padding: 4rem 0; background: white; }
.faq-list { max-width: 700px; margin: 2rem auto 0; }
.faq-item { padding: 1.2rem 0; border-bottom: 1px solid #eee; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1.05rem; color: #1a1a2e; margin-bottom: 0.4rem; }
.faq-item p { font-size: 0.9rem; color: #666; }

/* ===== Footer ===== */
.site-footer { background: #1a1a2e; color: #ccc; padding: 1.5rem 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.footer-inner a { color: #e0a89a !important; }
.footer-inner nav a { margin-left: 1rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-stats { flex-direction: column; gap: 0.4rem; align-items: center; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-sidebar { order: 2; }
  .editor-preview { order: 1; }
  .extractor-card .input-group { flex-direction: column; }
  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
