/* 糖心vlog论坛 - 全局样式文件 */

:root {
  --primary-color: #ff6b6b;
  --secondary-color: #4ecdc4;
  --accent-color: #f9ca24;
  --dark-bg: #2c3e50;
  --light-bg: #ecf0f1;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --white: #ffffff;
  --border-color: #dfe6e9;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

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

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

/* 头部导航样式 */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo h1 {
  font-size: 1.8rem;
  color: var(--primary-color);
  font-weight: 700;
}

.site-logo h1 a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

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

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s;
  padding: 0.5rem 1rem;
  border-radius: 5px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-color);
  background: rgba(255, 107, 107, 0.1);
}

/* 主要内容区域 */
.main-content {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* 页面标题区域 */
.page-header-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 15px;
  margin-bottom: 3rem;
}

.page-header-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-header-section p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* 英雄区域 */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 5rem 2rem;
  text-align: center;
  border-radius: 15px;
  margin-bottom: 3rem;
}

.hero-section h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--white);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* 功能卡片网格 */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  text-align: center;
}

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

.feature-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.8;
}

/* 论坛帖子列表 */
.forum-posts-list {
  background: var(--white);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.forum-post-item {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s;
}

.forum-post-item:last-child {
  border-bottom: none;
}

.forum-post-item:hover {
  background: rgba(78, 205, 196, 0.05);
}

.post-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.post-title-link {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s;
}

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

.post-meta-info {
  display: flex;
  gap: 1.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.post-excerpt-text {
  color: var(--text-light);
  line-height: 1.8;
  margin-top: 0.5rem;
}

/* 分类标签 */
.category-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--accent-color);
  color: var(--text-dark);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* 侧边栏 */
.sidebar-widget {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s;
}

.sidebar-list a:hover {
  color: var(--primary-color);
}

/* 两栏布局 */
.two-column-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

/* 三栏网格 */
.three-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

/* 内容卡片 */
.content-card-item {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.content-card-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.content-card-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-body-content {
  padding: 1.5rem;
}

.card-body-content h3 {
  margin-bottom: 0.8rem;
  color: var(--text-dark);
}

.card-body-content p {
  color: var(--text-light);
  line-height: 1.8;
}

/* 页脚 */
.site-footer {
  background: var(--dark-bg);
  color: var(--white);
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
}

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

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

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--accent-color);
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-section a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0.7;
}

/* 统计数据展示 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.stat-box {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-light);
  font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .two-column-layout {
    grid-template-columns: 1fr;
  }

  .hero-section h2 {
    font-size: 2rem;
  }

  .page-header-section h2 {
    font-size: 1.8rem;
  }

  .features-grid,
  .three-column-grid {
    grid-template-columns: 1fr;
  }
}

/* 加载动画 */
@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;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.section-title {
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 2rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 3rem;
}
