/* ========================================
   轻绘漫画 - 植物视频社区
   全局样式表
   ======================================== */

:root {
  --primary-color: #1a3a3a;
  --secondary-color: #2d5f5f;
  --accent-color: #d4af37;
  --text-dark: #1a1a1a;
  --text-light: #f5f5f5;
  --bg-light: #f9f9f9;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
}

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

html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #ffffff;
}

body {
  overflow-x: hidden;
}

/* ========== 排版 ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: #555;
}

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

a:hover {
  color: #e8c547;
  text-decoration: underline;
}

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

.section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}

.section:last-child {
  border-bottom: none;
}

/* ========== 头部导航 ========== */
header {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo img {
  height: 40px;
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* ========== 搜索框 ========== */
.search-bar {
  width: 100%;
  background-color: rgba(255,255,255,0.1);
  padding: 10px 0;
  margin-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.search-container {
  display: flex;
  gap: 10px;
}

.search-container input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
}

.search-container button {
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: var(--text-dark);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.search-container button:hover {
  background-color: #e8c547;
}

/* ========== Banner ========== */
.banner {
  background: linear-gradient(135deg, rgba(26,58,58,0.8) 0%, rgba(45,95,95,0.8) 100%), 
              url('https://d2xsxph8kpxj0f.cloudfront.net/310519663491116738/kg5xuEscmgGwbRgLCPtMuh/banner_hero-R8NVP3rioMXgG4icGtyh.webp') center/cover;
  color: var(--text-light);
  padding: 100px 20px;
  text-align: center;
  position: relative;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.banner h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--accent-color);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  color: var(--text-light);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.banner-cta {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--accent-color);
  color: var(--text-dark);
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.banner-cta:hover {
  background-color: #e8c547;
  text-decoration: none;
}

/* ========== 卡片网格 ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: var(--bg-light);
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.card-description {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 15px;
}

.card-link {
  display: inline-block;
  color: var(--accent-color);
  font-weight: 600;
  transition: color 0.3s ease;
}

.card-link:hover {
  color: #e8c547;
}

/* ========== 视频卡片 ========== */
.video-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background-color: #000;
}

.video-card video,
.video-card .video-placeholder {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.video-card .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: rgba(212, 175, 55, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

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

.video-card .play-button::after {
  content: '▶';
  color: var(--text-dark);
  font-size: 1.5rem;
  margin-left: 4px;
}

/* ========== FAQ 部分 ========== */
.faq-item {
  background-color: var(--bg-light);
  border-left: 4px solid var(--accent-color);
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.faq-item:hover {
  background-color: #f0f0f0;
}

.faq-question {
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-toggle {
  font-size: 1.5rem;
  color: var(--accent-color);
  transition: transform 0.3s ease;
}

.faq-answer {
  display: none;
  margin-top: 15px;
  color: #666;
  line-height: 1.8;
}

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

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

/* ========== 评论部分 ========== */
.comments-section {
  margin-top: 40px;
}

.comment {
  background-color: var(--bg-light);
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--accent-color);
}

.comment-author {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.comment-date {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 10px;
}

.comment-text {
  color: #555;
  line-height: 1.6;
}

.comment-rating {
  color: var(--accent-color);
  margin-top: 10px;
  font-size: 0.9rem;
}

/* ========== 底部 ========== */
footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 40px 0 20px;
  margin-top: 60px;
}

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

.footer-section h3 {
  color: var(--accent-color);
  margin-bottom: 15px;
}

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

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

.footer-section a {
  color: var(--text-light);
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

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

.qr-codes {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.qr-code {
  text-align: center;
}

.qr-code img {
  width: 100px;
  height: 100px;
  border: 2px solid var(--accent-color);
  border-radius: 4px;
}

.qr-code label {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .banner {
    padding: 60px 20px;
    min-height: 350px;
  }
  
  .banner h1 {
    font-size: 2rem;
  }
  
  .banner p {
    font-size: 1rem;
  }
  
  nav ul {
    gap: 15px;
    font-size: 0.9rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .qr-codes {
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  
  .banner {
    padding: 40px 15px;
    min-height: 250px;
  }
  
  .banner h1 {
    font-size: 1.5rem;
  }
  
  nav ul {
    gap: 10px;
    font-size: 0.8rem;
  }
  
  .search-container {
    flex-direction: column;
  }
  
  .search-container input,
  .search-container button {
    width: 100%;
  }
}

/* ========== 干扰标签样式 ========== */
.noise-tag {
  display: none;
}

/* ========== 动画 ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ========== 实用类 ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

.hidden { display: none; }
.visible { display: block; }
