/* 全局样式 */
:root {
  --primary-color: #e74c3c;
  --secondary-color: #3498db;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --text-color: #333;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
}

/* 导航样式增强 */
nav {
  border-bottom: 2px solid var(--primary-color);
}

nav a.active {
  color: var(--primary-color);
  font-weight: bold;
}

/* 站点头部 */
.site-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.site-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* 站点介绍 */
.site-intro {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  line-height: 1.8;
  font-size: 1.05rem;
}

/* 区块样式 */
section {
  margin-bottom: 50px;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary-color);
  color: var(--text-color);
}

section h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

/* 卡片网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-card h3, .video-card h4 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.video-card h3 a, .video-card h4 a {
  color: var(--text-color);
  transition: color 0.3s;
}

.video-card h3 a:hover, .video-card h4 a:hover {
  color: var(--primary-color);
}

.video-card .meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.video-card .oneline, .video-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

/* 列表样式 */
.video-list {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.list-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.list-item h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.list-item h3 a {
  color: var(--text-color);
  transition: color 0.3s;
}

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

.list-item .rank {
  display: inline-block;
  width: 30px;
  height: 30px;
  background: var(--primary-color);
  color: white;
  text-align: center;
  line-height: 30px;
  border-radius: 50%;
  margin-right: 15px;
  font-weight: bold;
}

.list-item .meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 8px;
}

/* 更多链接 */
.more-link {
  text-align: center;
  margin-top: 30px;
  font-size: 1.1rem;
}

.more-link a {
  color: var(--secondary-color);
  padding: 10px 20px;
  border: 2px solid var(--secondary-color);
  border-radius: 25px;
  display: inline-block;
  margin: 0 10px;
  transition: all 0.3s;
}

.more-link a:hover {
  background: var(--secondary-color);
  color: white;
}

/* 页面头部 */
.page-header {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.page-header p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #555;
}

/* 分组样式 */
.genre-group {
  margin-bottom: 40px;
}

.genre-group h3 {
  background: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* 排行列表 */
.ranking-list {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.rank-item {
  display: flex;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.rank-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 60px;
  text-align: center;
}

.rank-content {
  flex: 1;
}

.rank-content h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.rank-content .review {
  margin-top: 10px;
  padding: 10px;
  background: #f9f9f9;
  border-left: 3px solid var(--secondary-color);
  font-style: italic;
  color: #666;
}

/* 主题区块 */
.topic-section {
  margin-bottom: 40px;
}

.topic-section h3 {
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.topic-item {
  background: var(--card-bg);
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.topic-item:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

/* 最新列表 */
.latest-list {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.latest-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.latest-item .date {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 0.85rem;
  margin-right: 10px;
}

/* 详情页 */
.video-detail {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.video-detail header {
  text-align: center;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 30px;
}

.video-detail h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.video-detail .subtitle {
  font-size: 1.1rem;
  color: #666;
}

.video-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 15px 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.video-info dt {
  font-weight: bold;
  color: var(--text-color);
}

.video-info dd {
  color: #555;
}

.video-detail section {
  margin-bottom: 30px;
}

.video-detail section h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 8px;
}

.video-detail section p {
  line-height: 1.8;
  font-size: 1.05rem;
  color: #444;
}

.oneline p {
  background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
  padding: 15px 20px;
  border-left: 4px solid var(--primary-color);
  font-size: 1.1rem;
  font-weight: 500;
}

.summary p {
  text-indent: 2em;
}

.review {
  background: #fff9e6;
  border-left: 4px solid #ffc107;
  padding: 20px;
  border-radius: 8px;
}

.review p {
  font-style: italic;
  color: #555;
}

/* 相关推荐 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.related-item {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

.related-item:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.related-item h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.related-item h3 a {
  color: var(--text-color);
}

.related-item h3 a:hover {
  color: var(--primary-color);
}

/* 页脚 */
footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
}

footer p {
  font-size: 0.95rem;
}

/* 响应式 */
@media (max-width: 768px) {
  main {
    padding: 15px;
  }

  .site-header h1 {
    font-size: 1.5rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-detail {
    padding: 20px;
  }

  .video-detail h1 {
    font-size: 1.8rem;
  }

  .video-info dl {
    grid-template-columns: 80px 1fr;
    gap: 10px;
  }

  .rank-number {
    font-size: 1.5rem;
    min-width: 40px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 1000;
}

.back-to-top:hover {
  background: #c0392b;
  transform: translateY(-3px);
}

.back-to-top.show {
  display: flex;
}
