/* ============================================
   91 - 植物视频社区 | 改进版CSS
   百度SEO优化 + EEAT原则 + 移动端优化
   ============================================ */

:root {
  --primary-color: #2d5016;
  --secondary-color: #6ba547;
  --accent-color: #f4a460;
  --text-dark: #1a1a1a;
  --text-light: #666;
  --bg-light: #f9f9f9;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  background-color: #fff;
  line-height: 1.6;
}

/* ============ 头部导航 ============ */
header {
  background: white;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 20px;
  transition: var(--transition);
}

.logo:hover {
  color: var(--secondary-color);
}

.logo-icon {
  font-size: 28px;
}

nav {
  display: flex;
  gap: 25px;
  flex: 1;
}

nav a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

.search-container {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border-radius: 25px;
  padding: 8px 15px;
  gap: 10px;
  min-width: 250px;
}

.search-container input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: 14px;
}

.search-container button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
}

.search-container button:hover {
  transform: scale(1.1);
}

/* ============ 搜索导航 ============ */
.search-nav {
  background: var(--bg-light);
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.search-nav input {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.search-nav input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(107, 165, 71, 0.1);
}

/* ============ 英雄区域 ============ */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 80, 22, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 15px;
  opacity: 0.95;
}

.hero-desc {
  font-size: 16px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.cta-button {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(244, 164, 96, 0.3);
}

.cta-button:hover {
  background: #d68a3a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(244, 164, 96, 0.4);
}

/* ============ 更新标记 ============ */
.update-badge-section {
  background: white;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.update-badge,
.stats-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-light);
  margin: 0 10px;
  font-weight: 500;
}

.update-badge {
  background: #fff3cd;
  color: #856404;
}

.stats-badge {
  background: #d4edda;
  color: #155724;
}

/* ============ 章节标题 ============ */
section {
  padding: 60px 0;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 2px;
}

/* ============ 视频网格 ============ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.video-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #f0f0f0;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.play-button::before {
  content: '▶';
  color: var(--secondary-color);
  margin-left: 3px;
}

.video-card:hover .play-button {
  opacity: 1;
}

.video-info {
  padding: 20px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 12px;
  line-height: 1.4;
}

.video-stats {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.video-date {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 10px;
}

/* ============ FAQ容器 ============ */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--secondary-color);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: var(--primary-color);
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--bg-light);
}

.faq-toggle {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 12px;
}

.faq-item.active .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 20px;
  color: var(--text-light);
  line-height: 1.8;
  display: none;
  animation: slideDown 0.3s ease;
}

.faq-item.active .faq-answer {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ 面包屑导航 ============ */
nav[aria-label="breadcrumb"] {
  background: white;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

nav[aria-label="breadcrumb"] ol {
  display: flex;
  list-style: none;
  gap: 10px;
  flex-wrap: wrap;
}

nav[aria-label="breadcrumb"] li {
  display: flex;
  align-items: center;
}

nav[aria-label="breadcrumb"] li::after {
  content: '›';
  margin: 0 10px;
  color: var(--text-light);
}

nav[aria-label="breadcrumb"] li:last-child::after {
  content: '';
}

nav[aria-label="breadcrumb"] a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
}

nav[aria-label="breadcrumb"] a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* ============ 页脚 ============ */
footer {
  background: var(--primary-color);
  color: white;
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
}

.footer-section a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
  margin: 8px 0;
}

/* ============ 相关文章推荐 ============ */
.related-articles {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-top: 40px;
}

.related-articles h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 20px;
}

.related-articles ul {
  list-style: none;
}

.related-articles li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.related-articles li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.related-articles a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.related-articles a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* ============ 用户评价 ============ */
.user-review {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
}

.user-review img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.username {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.stars {
  color: var(--accent-color);
  font-size: 14px;
}

.score {
  color: var(--text-light);
  font-weight: 600;
}

/* ============ 响应式设计 ============ */
@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    gap: 15px;
  }

  nav {
    order: 3;
    width: 100%;
    gap: 15px;
    font-size: 14px;
  }

  .search-container {
    min-width: auto;
    flex: 1;
  }

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

  .hero-subtitle {
    font-size: 18px;
  }

  .section-title {
    font-size: 24px;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  section {
    padding: 40px 0;
  }

  .container {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .header-content {
    padding: 12px 0;
  }

  .logo {
    font-size: 18px;
  }

  nav {
    gap: 12px;
    font-size: 12px;
  }

  .search-container {
    padding: 6px 12px;
  }

  .hero {
    min-height: 300px;
  }

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

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

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

  .cta-button {
    padding: 12px 30px;
    font-size: 14px;
  }

  .section-title {
    font-size: 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .faq-question {
    padding: 15px;
    font-size: 14px;
  }

  .faq-answer {
    padding: 0 15px 15px;
    font-size: 14px;
  }
}

/* ============ 无障碍设计 ============ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ 打印样式 ============ */
@media print {
  header,
  .search-nav,
  footer,
  .cta-button,
  .play-button {
    display: none;
  }

  body {
    background: white;
  }

  a {
    color: var(--secondary-color);
    text-decoration: underline;
  }
}
