/* {模板路径}/static/css/style.css */
:root {
  --primary-color: #e74c3c;
  --secondary-color: #34495e;
  --accent-color: #c0392b;
  --text-color: #333;
  --light-text: #fff;
  --background-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #ddd;
  --hover-color: #c0392b;
  --footer-bg: #2c3e50;
  --gradient-start: #e74c3c;
  --gradient-end: #c0392b;
}

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

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 导航栏样式 */
header {
  background-color: var(--secondary-color);
  color: var(--light-text);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.logo h1 {
  font-size: 28px;
  font-weight: bold;
  color: var(--light-text);
  margin: 0;
}

nav ul {
  display: flex;
  gap: 20px;
}

nav ul li a {
  color: var(--light-text);
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
}

nav ul li a:hover {
  background-color: var(--primary-color);
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 4px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn.primary {
  background-color: var(--primary-color);
  color: var(--light-text);
}

.btn.secondary {
  background-color: transparent;
  border: 1px solid var(--light-text);
  color: var(--light-text);
}

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

.btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 区块标题样式 */
.section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 32px;
  color: var(--secondary-color);
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
}

/* 首页英雄区块 */
.hero-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: var(--light-text);
}

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

.hero-content {
  flex: 1;
  padding-right: 40px;
}

.hero-content h2 {
  font-size: 42px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
}

.cta-buttons {
  display: flex;
  gap: 15px;
}

.hero-image {
  flex: 1;
  text-align: right;
}

.hero-image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* 推荐区块 */
.recommend-section {
  padding: 80px 0;
  background-color: var(--background-color);
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 30px;
}

.card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-image {
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image img {
  transform: scale(1.1);
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.card-content p {
  color: #666;
  margin-bottom: 15px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: #888;
  font-size: 14px;
}

/* 热门区块 */
.popular-section {
  padding: 80px 0;
  background-color: #fff;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.popular-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 250px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.popular-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.popular-item:hover img {
  transform: scale(1.1);
}

.popular-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: var(--light-text);
}

.popular-overlay h3 {
  font-size: 20px;
  margin-bottom: 5px;
}

.popular-overlay p {
  font-size: 14px;
  opacity: 0.8;
}

/* 分类区块 */
.category-section {
  padding: 80px 0;
  background-color: var(--background-color);
}

.category-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
}

.category-item {
  text-align: center;
  transition: transform 0.3s ease;
}

.category-item:hover {
  transform: translateY(-10px);
}

.category-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.category-item h3 {
  font-size: 18px;
  color: var(--secondary-color);
}

/* 最新区块 */
.newest-section {
  padding: 80px 0;
  background-color: #fff;
}

.newest-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.newest-item {
  display: flex;
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.newest-image {
  flex: 0 0 300px;
}

.newest-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.newest-content {
  flex: 1;
  padding: 25px;
}

.newest-content h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.newest-content p {
  margin-bottom: 20px;
  color: #666;
}

.newest-meta {
  display: flex;
  gap: 20px;
  color: #888;
  font-size: 14px;
}

/* 经典影视区块 */
.creator-section {
  padding: 80px 0;
  background-color: var(--background-color);
}

.creator-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 30px;
}

.classic-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.classic-card:hover {
  transform: translateY(-10px);
}

.classic-image {
  height: 200px;
  overflow: hidden;
}

.classic-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.classic-card:hover .classic-image img {
  transform: scale(1.1);
}

.classic-info {
  padding: 20px;
}

.classic-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.classic-info p {
  color: #666;
}

/* 文章区块 */
.article-section {
  padding: 80px 0;
  background-color: #fff;
}

.article-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.article-item {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.article-item h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.article-item p {
  color: #666;
  line-height: 1.8;
  text-align: justify;
}

/* 关于我们区块 */
.about-section {
  padding: 80px 0;
  background-color: var(--background-color);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-image {
  flex: 0 0 40%;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.about-text p {
  margin-bottom: 15px;
  color: #666;
}

/* 页脚 */
.footer {
  background-color: var(--footer-bg);
  color: var(--light-text);
  padding: 60px 0 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  flex: 0 0 250px;
}

.footer-logo p {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
}

.footer-logo .slogan {
  font-size: 16px;
  opacity: 0.8;
}

.footer-links {
  flex: 1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-column h4 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
}

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

.footer-column ul li a {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-column ul li a:hover {
  opacity: 1;
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  opacity: 0.6;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .hero-section .container {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-content {
    padding-right: 0;
    margin-bottom: 40px;
  }
  
  .cta-buttons {
    justify-content: center;
  }
  
  .about-content {
    flex-direction: column;
  }
  
  .about-image {
    margin-bottom: 30px;
  }
  
  .newest-item {
    flex-direction: column;
  }
  
  .newest-image {
    flex: 0 0 200px;
  }
}

@media (max-width: 768px) {
  header .container {
    flex-direction: column;
  }
  
  .logo {
    margin-bottom: 15px;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .hero-content h2 {
    font-size: 32px;
  }
  
  .popular-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .footer-content {
    flex-direction: column;
    gap: 30px;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 30px;
  }
}

@media (max-width: 576px) {
  .card-container,
  .category-container,
  .creator-container {
    grid-template-columns: 1fr;
  }
  
  .hero-content h2 {
    font-size: 28px;
  }
  
  .popular-grid {
    grid-template-columns: 1fr;
  }
  
  .article-item {
    padding: 20px;
  }
  
  .article-item h3 {
    font-size: 22px;
  }
}

/* 动画效果 */
.card.animate {
  animation: fadeInUp 0.5s ease forwards;
}

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