/* ============================================
   魅影剧场 - 植物视频社区 | 主样式表
   ============================================ */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

a {
  color: #2ecc71;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #27ae60;
}

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

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

.row {
  display: flex;
  flex-wrap: wrap;
  margin: -10px;
}

.col {
  flex: 1;
  min-width: 250px;
  padding: 10px;
}

.col-1 { flex: 0 0 8.333%; }
.col-2 { flex: 0 0 16.666%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333%; }
.col-6 { flex: 0 0 50%; }
.col-12 { flex: 0 0 100%; }

/* 头部导航 */
header {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo img {
  width: 180px;
  height: 48px;
  border-radius: 0;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  align-items: center;
}

nav a {
  color: white;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

nav a:hover {
  opacity: 0.8;
  color: white;
}

.search-box {
  display: flex;
  gap: 5px;
  align-items: center;
}

.search-box input {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  width: 200px;
  font-size: 14px;
}

.search-box button {
  padding: 8px 15px;
  background: white;
  color: #2ecc71;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: #f0f0f0;
}

/* Banner 大图 */
.banner {
  background: url('https://d2xsxph8kpxj0f.cloudfront.net/310519663730042594/8MtbGhawMrgiy9hNB9QbwZ/banner-hero-UGTERgmZuScvxJtX9SsMy7.webp') center/cover no-repeat;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1;
}

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

.banner h1 {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

.banner-btn {
  display: inline-block;
  padding: 12px 30px;
  background: #2ecc71;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-weight: bold;
}

.banner-btn:hover {
  background: #27ae60;
}

/* 模块区域 */
section {
  padding: 60px 0;
}

section h2 {
  font-size: 36px;
  margin-bottom: 40px;
  text-align: center;
  color: #2c3e50;
  position: relative;
  padding-bottom: 20px;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: #2ecc71;
  border-radius: 2px;
}

/* 视频卡片 */
.video-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

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

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

.video-thumbnail video,
.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.video-play-btn::after {
  content: '▶';
  color: white;
  font-size: 24px;
  margin-left: 4px;
}

.video-info {
  padding: 15px;
}

.video-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #2c3e50;
}

.video-stats {
  font-size: 12px;
  color: #7f8c8d;
  display: flex;
  gap: 15px;
}

/* 专家卡片 */
.expert-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.expert-card:hover {
  transform: translateY(-5px);
}

.expert-avatar {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 80px;
}

.expert-info {
  padding: 20px;
}

.expert-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #2c3e50;
}

.expert-title {
  font-size: 14px;
  color: #7f8c8d;
  margin-bottom: 10px;
}

.expert-bio {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 15px;
}

.expert-btn {
  display: inline-block;
  padding: 8px 15px;
  background: #2ecc71;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  margin: 5px;
  transition: background 0.3s ease;
}

.expert-btn:hover {
  background: #27ae60;
}

/* FAQ 区域 */
.faq-item {
  background: white;
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.faq-question {
  padding: 20px;
  background: #f5f5f5;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  color: #2c3e50;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: #e8f5e9;
}

.faq-toggle {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.faq-answer {
  padding: 20px;
  display: none;
  color: #555;
  line-height: 1.8;
}

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

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

/* 用户评论 */
.comment-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comment-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.comment-avatar {
  width: 180px;
  height: 48px;
  border-radius: 0;
  background: #2ecc71;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 10px;
}

.comment-name {
  font-weight: bold;
  color: #2c3e50;
  margin-right: 10px;
}

.comment-rating {
  color: #f39c12;
  font-size: 14px;
}

.comment-text {
  color: #555;
  line-height: 1.6;
  margin-top: 10px;
}

/* 底部 */
footer {
  background: #2c3e50;
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

footer h3 {
  margin-bottom: 15px;
  font-size: 16px;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: 8px;
}

footer a {
  color: #bdc3c7;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #2ecc71;
}

.footer-section {
  margin-bottom: 30px;
}

.footer-qr {
  text-align: center;
  margin: 20px 0;
}

.footer-qr img {
  width: 100px;
  height: 100px;
  border-radius: 4px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #34495e;
  color: #95a5a6;
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  nav ul {
    gap: 15px;
    font-size: 14px;
  }

  .search-box input {
    width: 120px;
  }

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

  .banner p {
    font-size: 16px;
  }

  section h2 {
    font-size: 28px;
  }

  .col {
    min-width: 100%;
  }

  .col-4 {
    flex: 0 0 50%;
  }

  .col-6 {
    flex: 0 0 100%;
  }

  .row {
    margin: -5px;
  }

  .col {
    padding: 5px;
  }
}

@media (max-width: 480px) {
  header .container {
    flex-direction: column;
    gap: 10px;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    text-align: center;
  }

  .search-box {
    width: 100%;
    justify-content: center;
  }

  .search-box input {
    width: 100%;
  }

  .banner {
    height: 300px;
  }

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

  .banner p {
    font-size: 14px;
  }

  section {
    padding: 40px 0;
  }

  section h2 {
    font-size: 22px;
  }
}

/* 内联CSS优化 - 关键首屏元素 */
.lazy-load {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy-load.loaded {
  opacity: 1;
}

/* 视频标签强调 */
.video-tag {
  display: inline-block;
  background: #2ecc71;
  color: white;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  margin-right: 5px;
  font-weight: bold;
}

/* 品牌强调 */
.brand-highlight {
  color: #2ecc71;
  font-weight: bold;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #2ecc71;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
  text-align: center;
}

.btn:hover {
  background: #27ae60;
}

.btn-secondary {
  background: #3498db;
}

.btn-secondary:hover {
  background: #2980b9;
}

/* 隐藏元素 */
.hidden {
  display: none;
}

/* 文本对齐 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* 间距工具类 */
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.pt-20 { padding-top: 20px; }
.pb-20 { padding-bottom: 20px; }

/* 网格布局 */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
