/* ============================================
   面膜 - 医美级面膜专业护肤网站
   站点: www.xiufumianmo.cn
   风格: 简洁专业、医疗护肤主题
   ============================================ */

/* CSS 变量定义 */
:root {
  --primary-color: #2c9f8f;
  --primary-light: #e8f6f4;
  --secondary-color: #f5a623;
  --text-dark: #333;
  --text-medium: #666;
  --text-light: #999;
  --bg-white: #fff;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
  --accent-color: #9e9e9e;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 70px;
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s;
}

a:hover {
  color: #238b7d;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   布局容器
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   页头 Header
   ============================================ */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), #3dbfb0);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}

.logo-text span {
  color: var(--primary-color);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--text-medium);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border-radius: 24px;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 180px;
  font-size: 14px;
}

.search-box button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
}

/* ============================================
   主体内容区
   ============================================ */
.main {
  min-height: calc(100vh - var(--header-height) - 200px);
  padding: 40px 0;
}

/* ============================================
   Hero 区域
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
  padding: 60px 0;
  margin-bottom: 40px;
  border-radius: var(--radius-lg);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--primary-color);
}

.hero-desc {
  font-size: 18px;
  color: var(--text-medium);
  margin-bottom: 32px;
}

.hero-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.keyword-tag {
  background: var(--bg-white);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-medium);
  border: 1px solid var(--border-color);
}

.keyword-tag.highlight {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* ============================================
   面包屑导航
   ============================================ */
.breadcrumb {
  background: var(--bg-white);
  padding: 16px 0;
  margin-bottom: 24px;
  border-radius: var(--radius);
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-medium);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb-separator {
  color: var(--border-color);
}

.breadcrumb-current {
  color: var(--text-dark);
  font-weight: 500;
}

/* ============================================
   卡片组件
   ============================================ */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.card-more {
  font-size: 14px;
  color: var(--primary-color);
}

/* ============================================
   分类树形结构
   ============================================ */
.category-tree {
  padding: 8px 0;
}

.tree-item {
  margin-bottom: 8px;
}

.tree-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
}

.tree-header:hover {
  background: var(--primary-light);
}

.tree-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: var(--accent-color);
  font-size: 12px;
}

.tree-icon {
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  margin-right: 12px;
}

.tree-title {
  flex: 1;
  font-weight: 500;
  color: var(--text-dark);
}

.tree-count {
  font-size: 13px;
  color: var(--text-light);
  background: var(--bg-white);
  padding: 2px 10px;
  border-radius: 12px;
}

.tree-children {
  margin-left: 32px;
  margin-top: 8px;
  padding-left: 16px;
  border-left: 2px solid var(--border-color);
}

.tree-child-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius);
  transition: all 0.3s;
}

.tree-child-item:hover {
  background: var(--bg-light);
}

.tree-child-item::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
  margin-right: 12px;
}

.tree-child-title {
  flex: 1;
  color: var(--text-medium);
}

.tree-child-count {
  font-size: 13px;
  color: var(--text-light);
}

/* ============================================
   文章列表
   ============================================ */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.article-item:hover {
  background: var(--primary-light);
  transform: translateX(4px);
}

.article-number {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: #fff;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.article-content {
  flex: 1;
}

.article-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.article-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-light);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   三栏文章布局
   ============================================ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.article-column {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.column-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.column-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.column-icon.recommend {
  background: #e3f2fd;
  color: #1976d2;
}

.column-icon.popular {
  background: #fff3e0;
  color: #f57c00;
}

.column-icon.latest {
  background: #e8f5e9;
  color: #388e3c;
}

.column-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.column-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.column-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  transition: all 0.3s;
}

.column-item:hover {
  background: var(--bg-light);
}

.column-item::before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
}

.column-item a {
  color: var(--text-medium);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.column-item a:hover {
  color: var(--primary-color);
}

/* ============================================
   统计信息
   ============================================ */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
  margin-top: 24px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ============================================
   分类页面内容
   ============================================ */
.category-header {
  background: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.category-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.category-desc {
  color: var(--text-medium);
  font-size: 16px;
}

.category-stats {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.category-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-medium);
}

.category-stat strong {
  color: var(--primary-color);
  font-size: 20px;
}

/* ============================================
   文章详情页
   ============================================ */
.article-header {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.article-page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.4;
}

.article-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-medium);
}

.info-item strong {
  color: var(--text-dark);
}

.info-label {
  color: var(--text-light);
}

.article-body {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  line-height: 1.8;
  color: var(--text-medium);
}

.article-body h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 24px 0 12px;
}

.article-body p {
  margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body a {
  color: var(--primary-color);
  text-decoration: underline;
}

.related-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.related-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.related-item:hover {
  background: var(--primary-light);
}

.related-item::before {
  content: "→";
  color: var(--primary-color);
}

/* ============================================
   404 页面
   ============================================ */
.error-page {
  text-align: center;
  padding: 80px 20px;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 20px;
  opacity: 0.8;
}

.error-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.error-desc {
  font-size: 16px;
  color: var(--text-medium);
  margin-bottom: 32px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: #238b7d;
  color: #fff;
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-medium);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-light);
  color: var(--text-dark);
}

/* ============================================
   页脚 Footer
   ============================================ */
.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-info {
  color: var(--text-light);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-medium);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 992px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 28px;
  }

  .nav {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 0;
    gap: 16px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 16px;
  }

  .search-box {
    order: 2;
  }

  .hero {
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    flex-direction: column;
    gap: 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .article-header,
  .article-body {
    padding: 24px;
  }

  .article-page-title {
    font-size: 24px;
  }

  .error-code {
    font-size: 80px;
  }

  .tree-children {
    margin-left: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .card {
    padding: 16px;
  }

  .keyword-tag {
    font-size: 12px;
    padding: 6px 14px;
  }

  .error-actions {
    flex-direction: column;
  }
}
