/* ==================== 基础样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary-color: #1a73e8;
  --primary-dark: #1557b0;
  --text-dark: #1a1a1a;
  --text-gray: #666;
  --text-light: #999;
  --bg-light: #fafafa;
  --bg-blue: #f8fbff;
  --border-color: #e8e8e8;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
  color: var(--text-dark);
  background: #ffffff;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== 滚动进度条 ==================== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary-color);
  z-index: 9999;
  transition: width 0.1s;
}

/* ==================== 顶部导航 ==================== */
.top-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3em;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
}

.logo .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2em;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 25px;
  align-items: center;
}

.nav-links a {
  color: var(--text-gray);
  text-decoration: none;
  font-size: 0.95em;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.contact-btn {
  background: var(--primary-color);
  color: white !important;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95em;
  transition: all 0.3s;
  white-space: nowrap;
}

.contact-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ==================== Hero 区域 ==================== */
.hero {
  background: linear-gradient(180deg, var(--bg-blue) 0%, #ffffff 100%);
  padding: 60px 20px 50px;
  text-align: center;
}

.hero .author-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.hero .author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2em;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(102,126,234,0.3);
}

.hero .author-info h1 {
  font-size: 2.2em;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-weight: 700;
}

.hero .author-info p {
  font-size: 1.1em;
  color: var(--text-gray);
}

.hero .description {
  max-width: 700px;
  margin: 30px auto;
  font-size: 1.15em;
  color: var(--text-gray);
  line-height: 1.8;
}

.hero .stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-item .number {
  font-size: 2em;
  color: var(--primary-color);
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
}

.stat-item .label {
  color: var(--text-gray);
  font-size: 0.95em;
}

/* ==================== 通用区块样式 ==================== */
.category-section,
.articles-section,
.faq-section,
.price-section,
.contact-section {
  padding: 60px 20px;
}

.category-section {
  background: white;
}

.articles-section {
  background: var(--bg-blue);
}

.faq-section {
  background: white;
}

.price-section {
  background: var(--bg-blue);
}

.contact-section {
  background: white;
  padding-bottom: 100px;
}

.section-title {
  text-align: center;
  font-size: 2.2em;
  color: var(--text-dark);
  margin-bottom: 15px;
  font-weight: 600;
}

.section-subtitle {
  text-align: center;
  font-size: 1.05em;
  color: var(--text-gray);
  margin-bottom: 40px;
}

/* ==================== 知识分类 ==================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.category-card {
  background: var(--bg-light);
  padding: 30px 25px;
  border-radius: 12px;
  transition: all 0.3s;
  cursor: pointer;
  border: 2px solid transparent;
}

.category-card:hover {
  border-color: var(--primary-color);
  background: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.category-card .icon {
  font-size: 2.5em;
  margin-bottom: 15px;
  display: block;
}

.category-card h3 {
  font-size: 1.3em;
  color: var(--text-dark);
  margin-bottom: 12px;
  font-weight: 600;
}

.category-card p {
  color: var(--text-gray);
  line-height: 1.7;
  font-size: 0.95em;
  margin-bottom: 15px;
}

.category-card .article-count {
  color: var(--primary-color);
  font-size: 0.9em;
  font-weight: 500;
}

/* ==================== 热门文章 ==================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: 0 auto;
}

.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.article-card .article-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  color: white;
}

.article-card .article-content {
  padding: 25px;
}

.article-card .article-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 0.85em;
  color: var(--text-light);
  flex-wrap: wrap;
}

.article-card .article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-card h3 {
  font-size: 1.3em;
  color: var(--text-dark);
  margin-bottom: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.article-card .article-excerpt {
  color: var(--text-gray);
  font-size: 0.95em;
  line-height: 1.7;
  margin-bottom: 15px;
}

.article-card .read-more {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ==================== 常见问题 ==================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-light);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s;
}

.faq-question {
  padding: 20px 25px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1.05em;
  user-select: none;
}

.faq-question:hover {
  background: #f0f0f0;
}

.faq-question .icon {
  transition: transform 0.3s;
  color: var(--primary-color);
  font-size: 1.2em;
  flex-shrink: 0;
  margin-left: 15px;
}

.faq-item.active .faq-question .icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
  max-height: 800px;
}

.faq-answer-content {
  padding: 0 25px 20px;
  color: var(--text-gray);
  line-height: 1.8;
}

.faq-answer-content p {
  margin-bottom: 10px;
}

/* ==================== 价格参考 ==================== */
.price-table {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.price-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 2fr;
  border-bottom: 1px solid var(--border-color);
}

.price-row:last-child {
  border-bottom: none;
}

.price-row.header {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
}

.price-cell {
  padding: 18px 15px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95em;
}

.price-cell:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.price-row.header .price-cell:not(:last-child) {
  border-right-color: rgba(255,255,255,0.3);
}

.price-note {
  max-width: 900px;
  margin: 25px auto 0;
  padding: 20px;
  background: white;
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
}

.price-note h4 {
  color: var(--text-dark);
  margin-bottom: 10px;
  font-size: 1.1em;
}

.price-note ul {
  list-style: none;
  color: var(--text-gray);
  font-size: 0.95em;
}

.price-note li {
  padding: 5px 0;
  padding-left: 20px;
  position: relative;
}

.price-note li:before {
  content: "•";
  position: absolute;
  left: 5px;
  color: var(--primary-color);
}

/* ==================== 联系咨询 ==================== */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-light);
  padding: 35px 30px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s;
}

.contact-card:hover {
  background: var(--bg-blue);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.contact-card .icon {
  font-size: 3em;
  margin-bottom: 15px;
  display: block;
}

.contact-card h3 {
  font-size: 1.3em;
  color: var(--text-dark);
  margin-bottom: 12px;
  font-weight: 600;
}

.contact-card .contact-value {
  font-size: 1.1em;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
  word-break: break-all;
}

.contact-card p {
  color: var(--text-gray);
  font-size: 0.9em;
  line-height: 1.6;
}

.copy-btn {
  margin-top: 15px;
  padding: 10px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.3s;
}

.copy-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.copy-btn:active {
  transform: translateY(0);
}

.disclaimer {
  max-width: 700px;
  margin: 40px auto 0;
  padding: 20px;
  background: #fff9e6;
  border-radius: 12px;
  border-left: 4px solid #ffc107;
  font-size: 0.9em;
  color: var(--text-gray);
  line-height: 1.8;
}

/* ==================== 底部 ==================== */
.footer {
  background: var(--text-dark);
  color: var(--text-light);
  padding: 50px 20px 30px;
  text-align: center;
}

.footer .footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer p {
  margin-bottom: 12px;
  font-size: 0.95em;
  line-height: 1.8;
}

.footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.footer .footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.3s;
}

.footer .footer-links a:hover {
  color: white;
}

.footer .copyright {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid #333;
  font-size: 0.85em;
  color: #666;
}

.footer .copyright a {
  color: #888;
  text-decoration: none;
}

.footer .copyright a:hover {
  color: #aaa;
}

/* ==================== 浮动按钮 ==================== */
.floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary-color);
  color: white;
  padding: 16px 32px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(26,115,232,0.4);
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  transition: all 0.3s;
  display: block;
}

.floating-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 28px rgba(26,115,232,0.5);
}

/* ==================== 手机端优化 ==================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero .author-intro {
    flex-direction: column;
    gap: 20px;
  }
  
  .hero .author-info h1 {
    font-size: 1.8em;
  }
  
  .hero .author-info p {
    font-size: 0.95em;
  }
  
  .hero .description {
    font-size: 1em;
  }
  
  .hero .stats {
    gap: 25px;
  }
  
  .stat-item .number {
    font-size: 1.6em;
  }
  
  .section-title {
    font-size: 1.6em;
  }
  
  .category-grid,
  .articles-grid,
  .contact-cards {
    grid-template-columns: 1fr;
  }
  
  .price-row {
    grid-template-columns: 1fr;
  }
  
  .price-cell {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
  }
  
  .price-cell:last-child {
    border-bottom: none;
  }
  
  .faq-question {
    font-size: 0.95em;
    padding: 18px 20px;
  }
  
  .faq-question .icon {
    margin-left: 10px;
  }
  
  .floating-btn {
    bottom: 20px;
    right: 20px;
    padding: 14px 24px;
    font-size: 0.9em;
  }
}

/* ==================== 打印样式 ==================== */
@media print {
  .top-bar,
  .floating-btn,
  .footer {
    display: none;
  }
}

/* ==================== 分类页面样式 ==================== */
.category-page {
  padding: 40px 0 60px;
  min-height: 60vh;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  color: #fff;
}

.category-header .category-icon {
  font-size: 48px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  border-radius: 16px;
}

.category-header .category-info h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.category-header .category-info p {
  font-size: 15px;
  opacity: 0.9;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-gray);
  background: var(--bg-light);
  font-size: 14px;
  transition: all 0.3s;
}

.tab-btn:hover {
  background: var(--primary-color);
  color: #fff;
}

.tab-btn.active {
  background: var(--primary-color);
  color: #fff;
}

.category-page .articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.category-page .article-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s;
}

.category-page .article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-page .article-image {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.category-page .article-content {
  padding: 20px;
}

.category-page .article-meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.category-page .article-meta span {
  margin-right: 15px;
}

.category-page .article-card h3 {
  font-size: 17px;
  margin-bottom: 10px;
  color: var(--text-dark);
  line-height: 1.5;
}

.category-page .article-excerpt {
  font-size: 14px;
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-page .article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.category-page .article-tags .tag {
  padding: 4px 10px;
  font-size: 12px;
  background: var(--bg-light);
  color: var(--text-gray);
  border-radius: 4px;
}

.category-page .read-more {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 500;
}

.category-page .no-articles {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-gray);
  font-size: 16px;
}

@media (max-width: 768px) {
  .category-header {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
  
  .category-header .category-icon {
    width: 64px;
    height: 64px;
    font-size: 32px;
  }
  
  .category-header .category-info h1 {
    font-size: 22px;
  }
  
  .category-tabs {
    justify-content: center;
  }
  
  .category-page .articles-grid {
    grid-template-columns: 1fr;
  }
}