/* 抖阴植物视频社区 - 全站 CSS 样式 */
/* 设计理念：现代植物主题 + 视频社区氛围 */

:root {
  /* 色彩系统 */
  --primary-green: #2d7a3e;
  --primary-light: #4a9d5f;
  --primary-lighter: #7bc97f;
  --accent-orange: #e8764a;
  --accent-purple: #6b5b95;
  --bg-light: #f5f9f7;
  --bg-white: #ffffff;
  --text-dark: #1a1a1a;
  --text-gray: #666666;
  --text-light: #999999;
  --border-color: #e0e0e0;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.15);
  
  /* 字体 */
  --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-family-serif: "Georgia", "Garamond", serif;
  
  /* 间距 */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
}

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

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

body {
  font-family: var(--font-family-sans);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-lg);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-gray);
}

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

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

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-lg);
}

/* 头部导航 */
header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
  text-decoration: none;
}

.logo img {
  height: 40px;
  margin-right: var(--spacing-md);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text .brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-green);
}

.logo-text .tagline {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* 导航菜单 */
nav {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 4px;
  transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
  color: var(--primary-green);
  background-color: rgba(45, 122, 62, 0.08);
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: var(--spacing-sm) var(--spacing-md);
  width: 250px;
  transition: all 0.3s ease;
}

.search-box:focus-within {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(45, 122, 62, 0.1);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.search-box input::placeholder {
  color: var(--text-light);
}

.search-box button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1rem;
  transition: color 0.3s ease;
}

.search-box button:hover {
  color: var(--primary-green);
}

/* Banner 区域 */
.banner {
  position: relative;
  height: 500px;
  background: linear-gradient(135deg, rgba(45, 122, 62, 0.8), rgba(107, 91, 149, 0.8)), 
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 500"><defs><pattern id="plants" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="30" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="1200" height="500" fill="url(%23plants)"/></svg>');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: var(--spacing-3xl);
}

.banner-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 800px;
  animation: fadeInUp 0.8s ease;
}

.banner-content h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-lg);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-green);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background-color: var(--accent-orange);
  color: white;
}

.btn-secondary:hover {
  background-color: #d95f35;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
}

.btn-outline:hover {
  background-color: var(--primary-green);
  color: white;
}

/* 卡片 */
.card {
  background-color: var(--bg-white);
  border-radius: 8px;
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark);
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-gray);
  margin-bottom: var(--spacing-md);
}

/* 视频卡片 */
.video-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background-color: #000;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.video-card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-card-overlay {
  opacity: 1;
}

.video-play-button {
  width: 60px;
  height: 60px;
  background-color: var(--accent-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  transition: all 0.3s ease;
}

.video-card:hover .video-play-button {
  transform: scale(1.1);
  background-color: #d95f35;
}

.video-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  padding: var(--spacing-lg) var(--spacing-md);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.video-card:hover .video-card-info {
  transform: translateY(0);
}

.video-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.video-card-stats {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

/* 网格布局 */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

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

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

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

/* 部分标题 */
.section-title {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: var(--spacing-md);
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--accent-orange));
  border-radius: 2px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1rem;
  margin-top: var(--spacing-md);
}

/* FAQ 区域 */
.faq-item {
  background-color: var(--bg-white);
  border-left: 4px solid var(--primary-green);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: var(--shadow-light);
}

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

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

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

.faq-answer {
  margin-top: var(--spacing-md);
  color: var(--text-gray);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
  animation: slideDown 0.3s ease;
}

/* 评论区域 */
.review-item {
  background-color: var(--bg-white);
  padding: var(--spacing-lg);
  border-radius: 8px;
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-light);
}

.review-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-green), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  margin-right: var(--spacing-md);
}

.review-meta {
  flex: 1;
}

.review-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
}

.review-date {
  font-size: 0.85rem;
  color: var(--text-light);
}

.review-rating {
  color: #ffc107;
  font-size: 0.9rem;
}

.review-text {
  color: var(--text-gray);
  line-height: 1.6;
}

/* 底部 */
footer {
  background-color: var(--text-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--spacing-3xl) 0 var(--spacing-lg);
  margin-top: var(--spacing-3xl);
}

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

.footer-section h4 {
  color: white;
  margin-bottom: var(--spacing-md);
  font-size: 1rem;
}

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

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
}

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

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

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .header-content {
    height: auto;
    padding: var(--spacing-md) 0;
  }

  nav {
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
  }

  nav a {
    width: 100%;
    text-align: center;
  }

  .search-box {
    width: 100%;
    margin-top: var(--spacing-md);
  }

  .banner {
    height: 300px;
  }

  .banner-content h1 {
    font-size: 1.8rem;
  }

  .banner-content p {
    font-size: 1rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

  .section-title h2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 13px;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .banner {
    height: 200px;
  }

  .banner-content h1 {
    font-size: 1.3rem;
  }

  .banner-content p {
    font-size: 0.9rem;
  }

  .btn {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 0.9rem;
  }

  .logo-text .brand {
    font-size: 1rem;
  }

  .logo-text .tagline {
    font-size: 0.65rem;
  }
}

/* 打印样式 */
@media print {
  header,
  footer,
  .search-box,
  .btn {
    display: none;
  }

  body {
    background-color: white;
  }

  .card {
    box-shadow: none;
    border: 1px solid var(--border-color);
  }
}
