/* 全局样式 */
:root {
  --primary-color: #228b22;
  --secondary-color: #32cd32;
  --primary-light: rgba(34, 139, 34, 0.8);
  --primary-dark: rgba(0, 100, 0, 0.8);
  --primary-shadow: rgba(34, 139, 34, 0.4);
  --primary-hover-shadow: rgba(34, 139, 34, 0.2);
  --primary-card-shadow: rgba(34, 139, 34, 0.15);
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

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

.btn-hero:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary-dark);
  padding: 10px;
  color: #333;
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

/* 英雄区域样式 */
.hero-section {
  background:
    linear-gradient(var(--primary-light), var(--primary-dark)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%23f8f9fa" width="1200" height="400"/><g fill="%2328a745" opacity="0.1"><circle cx="100" cy="100" r="50"/><circle cx="500" cy="200" r="80"/><circle cx="900" cy="150" r="60"/><circle cx="1100" cy="300" r="40"/></g></svg>');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* 搜索区域样式 */
.search-section {
  max-width: 1000px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 10px;
}

.search-field {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.search-field label {
  color: #333;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 14px;
}

.search-field input,
.search-field select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-field input:focus,
.search-field select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(34, 139, 34, 0.2);
  outline: none;
}

.search-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.search-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.search-info p {
  font-size: 14px;
  color: #666;
}

.search-info p span {
  font-weight: 500;
  color: #333;
}

/* 动画 */
@keyframes fadeInUp {
  0% {
  }
}

.btn-search {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-search:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-reset {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  padding: 10px 25px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-reset:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 30px;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.btn-hero {
  padding: 10px 30px;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* 快速导航区域 */
.quick-nav-section {
  background: white;
  padding: 60px 0;
  position: relative;
  z-index: 1;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 40px;
  position: relative;
}

.section-title:after {
  content: '';
  width: 80px;
  height: 3px;
  background: #ffcc00;
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.quick-nav-item {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.quick-nav-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--primary-hover-shadow);
  border-color: var(--primary-color);
}

.quick-nav-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.quick-nav-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.quick-nav-desc {
  color: #666;
  font-size: 0.9rem;
}

/* 文章列表区域 */
.posts-section {
  background: white;
  padding: 60px 0;
}

/* 搜索结果区域 */
.search-results-section {
  background: #f5f5f5;
  padding: 40px 0 60px;
  min-height: 70vh;
}

/* 文章列表页面样式 */
.posts-list-section {
  background: #f5f5f5;
  padding: 40px 0 60px;
  min-height: 70vh;
}

.posts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.posts-actions {
  display: flex;
  gap: 10px;
}

.posts-content {
  position: relative;
}

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

.post-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
}

.post-item:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.top-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff4757;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-title-container {
  margin-bottom: 10px;
}

.post-title-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

/* 文章编号样式 */
.post-code {
  color: #666;
  font-size: 0.9rem;
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #999;
}

.post-number {
  color: #666;
  font-size: 0.9rem;
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
}

/* 文章信息区域 */
.post-info {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.post-date,
.post-views,
.post-category,
.post-standard-level,
.post-effect-level,
.post-prescription,
.publish-department {
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-category {
  background: var(--primary-color);
  color: white;
}

.post-standard-level {
  background: #17a2b8;
  color: white;
}

.post-effect-level {
  background: #ffc107;
  color: #333;
}

/* .post-valid {
  background: #28a745;
  color: white;
}

.post-most-used {
  background: #ff6b6b;
  color: white;
} */

/* 响应式设计 */
@media (max-width: 768px) {
  .search-header {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .search-title {
    font-size: 1.5rem;
  }

  .search-info {
    width: 100%;
    justify-content: space-between;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .pagination-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .post-title-container {
    padding-right: 0;
  }

  .top-badge {
    margin-bottom: 10px;
    align-self: flex-start;
  }

  .top-badge .top-text {
    display: none;
  }

  .post-download .download-text {
    display: none;
  }

  .post-meta {
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
  }

  .post-card .post-meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
  }
}

/* 通用页面头部样式 */
.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.posts-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.posts-title {
  font-size: 1.8rem;
  color: #333;
  position: relative;
  padding-left: 20px;
}

.posts-title:before {
  content: '';
  width: 4px;
  height: 30px;
  background: var(--primary-color);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.view-more-btn {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.3s ease;
}

.view-more-btn:hover {
  gap: 10px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;

  .post-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--primary-card-shadow);
    border-color: var(--primary-color);
  }
}

/* 通用文章标题样式 */
.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
  line-height: 1.4;
}

.post-title:hover {
  color: var(--primary-color);
}

/* 卡片文章标题特殊样式 */
.post-card .post-title {
  margin-bottom: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 通用文章元信息样式 */
.post-meta {
  display: flex;
  align-items: center;
  gap: 25px;
  color: #666;
  font-size: 0.9rem;
  flex-wrap: wrap;
  margin-top: 15px;
}

/* 卡片文章元信息特殊样式 */
.post-card .post-meta {
  justify-content: space-between;
  margin-top: auto;
  gap: 5px;
}

.post-download {
  color: #666;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.3s ease;
  margin-left: auto;
}

.post-download:hover {
  color: var(--primary-color);
}

.no-posts {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 60px 0;
  font-size: 1.1rem;
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .card {
    padding: 15px;
  }

  .search-section {
    margin: 30px 15px;
  }

  .search-field {
    flex-direction: row;
    gap: 20px;
    align-items: center;

    label {
      margin-bottom: 0;
    }
  }

  .posts-section,
  .quick-nav-section,
  .hero-section {
    padding: 30px 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    align-items: center;

    .btn-hero {
      padding: 5px 15px;
    }
  }

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

  .quick-nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .quick-nav-item {
    padding: 20px;
  }

  .quick-nav-icon {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .quick-nav-title {
    font-size: 1rem;
  }

  .quick-nav-desc {
    display: none;
  }
}
