/* ===== AI写作服务 - 全局样式 ===== */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --accent: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
}

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

/* ===== Header ===== */
.header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--primary); }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a {
  color: var(--gray-600);
  font-size: 15px;
  font-weight: 500;
  transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--primary); }
.nav .btn-primary {
  background: var(--primary);
  color: white !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}
.nav .btn-primary:hover { background: var(--primary-dark); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
}
.hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 16px; }
.hero p { font-size: 18px; opacity: .9; max-width: 600px; margin: 0 auto 32px; }
.hero .btn-white {
  display: inline-block;
  background: white;
  color: var(--primary) !important;
  padding: 14px 36px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  transition: transform .2s;
}
.hero .btn-white:hover { transform: translateY(-2px); }

/* ===== Sections ===== */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 20px;
}
.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--gray-900);
}

/* Service Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.service-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.service-card:hover { box-shadow: var(--shadow-lg); }
.service-card .icon {
  width: 48px; height: 48px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 16px;
}
.service-card h3 { font-size: 18px; margin-bottom: 8px; }
.service-card p { color: var(--gray-500); font-size: 14px; line-height: 1.7; }
.service-card .price {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* ===== Steps ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.step-card {
  text-align: center;
  padding: 24px;
}
.step-card .num {
  width: 40px; height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  margin-bottom: 12px;
}
.step-card h4 { font-size: 16px; margin-bottom: 6px; }
.step-card p { color: var(--gray-500); font-size: 14px; }

/* ===== CTA ===== */
.cta-section {
  background: var(--gray-900);
  color: white;
  text-align: center;
  padding: 64px 20px;
}
.cta-section h2 { font-size: 28px; margin-bottom: 12px; }
.cta-section p { opacity: .8; margin-bottom: 28px; }
.cta-section .btn-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--gray-900) !important;
  padding: 14px 40px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
}

/* ===== Footer ===== */
.footer {
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 40px 20px;
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
}

/* ===== Page: Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.pricing-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 2px solid transparent;
  position: relative;
}
.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.pricing-card .badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.pricing-card h3 { font-size: 18px; margin-bottom: 8px; }
.pricing-card .amount { font-size: 36px; font-weight: 800; color: var(--primary); margin: 12px 0; }
.pricing-card .amount small { font-size: 14px; font-weight: 400; color: var(--gray-500); }
.pricing-card ul { list-style: none; text-align: left; margin: 20px 0; }
.pricing-card ul li { padding: 8px 0; font-size: 14px; color: var(--gray-600); }
.pricing-card ul li::before { content: "✓ "; color: var(--primary); font-weight: 700; }
.pricing-card .btn-order {
  display: block;
  background: var(--primary);
  color: white !important;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
}

/* ===== Page: Cases ===== */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.case-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.case-card .tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.case-card h4 { font-size: 16px; margin-bottom: 6px; }
.case-card p { color: var(--gray-500); font-size: 14px; }
.case-card .feedback {
  margin-top: 12px;
  padding: 12px;
  background: var(--gray-50);
  border-radius: 8px;
  font-style: italic;
  font-size: 13px;
  color: var(--gray-600);
}

/* ===== Page: Order ===== */
.order-form {
  max-width: 640px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--gray-700);
}
.form-group label .required { color: #ef4444; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color .2s;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.submit-btn:hover { background: var(--primary-dark); }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.form-success {
  display: none;
  text-align: center;
  padding: 40px;
}
.form-success .check { font-size: 48px; margin-bottom: 16px; }
.form-success h3 { font-size: 20px; margin-bottom: 8px; }
.form-success p { color: var(--gray-500); }

/* ===== Page: Blog ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.blog-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.blog-card .date { color: var(--gray-400); font-size: 13px; }
.blog-card h3 { font-size: 16px; margin: 8px 0; }
.blog-card p { color: var(--gray-500); font-size: 14px; }

/* ===== 汉堡菜单按钮（手机端显示） ===== */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span {
  display: block; width: 22px; height: 2px; background: var(--gray-700);
  margin: 5px 0; transition: .3s; border-radius: 2px;
}

/* ===== Mobile First 响应式系统 ===== */

/* 手机端 (< 768px) */
@media (max-width: 767px) {
  .header-inner { height: 56px; }
  .logo { font-size: 17px; }

  /* 汉堡菜单 */
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; top: 56px; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--gray-200);
    flex-direction: column; gap: 0; padding: 8px 0;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 14px 20px; font-size: 15px; width: 100%;
    border-bottom: 1px solid var(--gray-100);
  }
  .nav a:last-child { border-bottom: none; }
  .nav a.active { color: var(--primary); background: var(--primary-light); }

  /* 首页 */
  .hero-simple { padding: 40px 16px 24px; }
  .hero-simple h1 { font-size: 24px; }
  .hero-simple p { font-size: 15px; }

  /* 网格：手机端单列 */
  .home-grid { grid-template-columns: 1fr; padding: 0 16px; gap: 12px; }
  .post-card { padding: 16px; }
  .post-card h3 { font-size: 15px; }

  /* 分类导航卡片 */
  .cat-section { padding: 0 16px; }
  .cat-section h2 { font-size: 17px; }
  .cat-section .more { font-size: 13px; }

  /* 联系方式栏 */
  .contact-bar { padding: 32px 16px; }
  .contact-bar p { font-size: 14px; }
  .contact-bar .wechat { font-size: 18px; }

  /* 页脚 */
  .footer { padding: 24px 16px; font-size: 13px; }

  /* 博客列表页 */
  .blog-header { padding: 32px 16px 16px; }
  .blog-header h1 { font-size: 22px; }
  .cat-tabs { gap: 6px; margin: 12px 0 20px; }
  .cat-tabs a { font-size: 13px; padding: 5px 14px; }
  .article-list { padding: 0 16px 32px; }
  .article-item { padding: 16px; margin-bottom: 12px; }
  .article-item h3 { font-size: 15px; }

  /* 文章详情页 */
  .article-detail { padding: 20px 16px 40px; }
  .article-detail h1 { font-size: 20px; }
  .article-detail .content { font-size: 15px; line-height: 1.75; }
  .article-detail .content h2 { font-size: 17px; margin: 24px 0 8px; }
  .article-detail .content h3 { font-size: 15px; }
  .article-detail .content blockquote { padding: 10px 14px; margin: 12px 0; }

  /* 所有表格手机端可滚动 */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; margin: 16px 0; width: 100%; }
table th, table td { border: 1px solid #e2e8f0; padding: 10px 14px; text-align: left; font-size: 14px; line-height: 1.6; }
table th { background: #f8fafc; font-weight: 700; color: #1e293b; }
table td { color: #334155; }
table tr:nth-child(even) td { background: #fafafa; }

  /* 触摸友好：链接和按钮最小触摸区域44px */
  .nav a, .cat-tabs a, .submit-btn, .btn-order, .btn-cta, .btn-white {
    min-height: 44px; display: flex; align-items: center; justify-content: center;
  }
}

/* 平板端 (768-1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .article-detail { padding: 32px 24px 48px; }
  .hero-simple h1 { font-size: 28px; }
}
