/* 全局样式 - 糖心美食论坛 */

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

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  line-height: 1.8;
  color: #333;
  background-color: #f8f9fa;
}

/* 导航栏 */
.site-header {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.site-logo h1 {
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.site-logo a {
  color: #fff;
  text-decoration: none;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 15px;
  border-radius: 20px;
}

.main-nav a:hover {
  background-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* 内容容器 */
.content-wrapper {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  min-height: calc(100vh - 250px);
}

/* 轮播横幅 */
.hero-banner {
  position: relative;
  height: 450px;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  padding: 40px;
  text-align: center;
}

.hero-overlay h2 {
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
}

.hero-overlay p {
  font-size: 20px;
  max-width: 700px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 卡片布局 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.food-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.food-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #ff6b6b;
}

.card-content p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #999;
}

/* 列表布局 */
.post-list {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
  margin-bottom: 30px;
}

.post-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
}

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

.post-item:hover {
  background-color: #fafafa;
  padding-left: 10px;
  margin-left: -10px;
  margin-right: -10px;
  padding-right: 10px;
}

.post-thumb {
  width: 180px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post-info h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 10px;
}

.post-info p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* 分类标签 */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}

.category-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 10px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.category-tag:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 侧边栏 */
.sidebar {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
  margin-bottom: 30px;
}

.sidebar h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #ff6b6b;
  border-left: 4px solid #ff6b6b;
  padding-left: 15px;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

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

.sidebar a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.sidebar a:hover {
  color: #ff6b6b;
}

/* 视频播放器 */
.video-player {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

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

/* 论坛帖子 */
.forum-thread {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.forum-thread:hover {
  box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.thread-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.thread-author h4 {
  font-size: 16px;
  color: #333;
}

.thread-time {
  font-size: 13px;
  color: #999;
}

/* 页脚 */
.site-footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 40px 0 20px;
  margin-top: 60px;
}

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

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

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #ff6b6b;
}

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

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

.footer-section a {
  color: #ecf0f1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #ff6b6b;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    height: auto;
    padding: 15px 20px;
  }

  .main-nav ul {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
  }

  .hero-banner {
    height: 300px;
  }

  .hero-overlay h2 {
    font-size: 32px;
  }

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

  .post-item {
    flex-direction: column;
  }

  .post-thumb {
    width: 100%;
    height: 200px;
  }
}

/* 按钮样式 */
.btn-primary {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  color: #fff;
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(255,107,107,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255,107,107,0.4);
}

/* 面包屑导航 */
.breadcrumb {
  background: #fff;
  padding: 15px 25px;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.breadcrumb a {
  color: #ff6b6b;
  text-decoration: none;
  margin-right: 8px;
}

.breadcrumb span {
  color: #999;
  margin-right: 8px;
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 40px;
  color: #999;
}

/* 搜索框 */
.search-box {
  position: relative;
  margin-bottom: 30px;
}

.search-box input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: 2px solid #eee;
  border-radius: 25px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}

.search-box button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: #ff6b6b;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
}
