/* 全局样式 */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #ddd;
  --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: 2rem 1rem;
  width: 100%;
}

/* 导航栏 */
nav {
  border-bottom: 1px solid var(--border-color);
}

nav > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo a {
  color: var(--primary-color);
  font-weight: 700;
  transition: color 0.3s;
}

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

nav .nav-links a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
}

nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s;
}

nav .nav-links a:hover::after,
nav .nav-links a.active::after {
  width: 80%;
}

/* 首页样式 */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
}

section {
  margin-bottom: 3rem;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  border-left: 4px solid var(--secondary-color);
  padding-left: 1rem;
}

.intro {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  line-height: 1.8;
}

.intro p {
  font-size: 1.05rem;
}

/* 视频网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

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

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

.video-card .rank {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--accent-color);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.video-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--primary-color);
}

.video-card h3 a {
  color: inherit;
  transition: color 0.3s;
}

.video-card h3 a:hover {
  color: var(--secondary-color);
}

.video-card .meta {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: #666;
  flex-wrap: wrap;
}

.video-card .meta span {
  background: #f0f0f0;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

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

.more-link {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.1rem;
}

.more-link a {
  color: var(--secondary-color);
  font-weight: 600;
  transition: color 0.3s;
}

.more-link a:hover {
  color: var(--primary-color);
}

/* 列表页样式 */
.list-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.page-desc {
  font-size: 1.05rem;
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.list-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.list-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--primary-color);
}

.list-item h3 a {
  color: inherit;
  transition: color 0.3s;
}

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

.list-item .meta {
  color: #666;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.list-item p {
  color: #555;
  line-height: 1.6;
}

/* 排行榜样式 */
.ranked-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.rank-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
}

.item-content {
  flex: 1;
}

/* 专题样式 */
.topic-item {
  position: relative;
  padding-left: 100px;
}

.topic-label {
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  background: var(--secondary-color);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* 最新样式 */
.latest-item {
  position: relative;
  padding-left: 80px;
}

.date-tag {
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  background: var(--accent-color);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-weight: 600;
}

/* 详情页样式 */
.detail-page article {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-page h1 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 1rem;
}

.detail-page section {
  margin-bottom: 2rem;
}

.detail-page h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.basic-info ul {
  list-style: none;
  line-height: 2;
}

.basic-info li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.basic-info strong {
  display: inline-block;
  width: 80px;
  color: var(--primary-color);
}

.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
}

.highlight p {
  font-size: 1.2rem;
  line-height: 1.6;
}

.summary p,
.review p {
  line-height: 1.8;
  font-size: 1.05rem;
  color: #444;
  text-align: justify;
}

.related .video-grid {
  margin-top: 1.5rem;
}

/* 页脚 */
footer {
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: auto;
}

footer p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* UI样式变体 */
.ui-style-0 { --primary-color: #2c3e50; --secondary-color: #3498db; }
.ui-style-1 { --primary-color: #34495e; --secondary-color: #1abc9c; }
.ui-style-2 { --primary-color: #2c3e50; --secondary-color: #9b59b6; }
.ui-style-3 { --primary-color: #16a085; --secondary-color: #27ae60; }
.ui-style-4 { --primary-color: #c0392b; --secondary-color: #e74c3c; }
.ui-style-5 { --primary-color: #8e44ad; --secondary-color: #3498db; }
.ui-style-6 { --primary-color: #2980b9; --secondary-color: #e67e22; }
.ui-style-7 { --primary-color: #27ae60; --secondary-color: #f39c12; }
.ui-style-8 { --primary-color: #d35400; --secondary-color: #c0392b; }
.ui-style-9 { --primary-color: #7f8c8d; --secondary-color: #34495e; }
.ui-style-10 { --primary-color: #2c3e50; --secondary-color: #16a085; }
.ui-style-11 { --primary-color: #8e44ad; --secondary-color: #2ecc71; }
.ui-style-12 { --primary-color: #2980b9; --secondary-color: #f1c40f; }
.ui-style-13 { --primary-color: #c0392b; --secondary-color: #3498db; }
.ui-style-14 { --primary-color: #16a085; --secondary-color: #e74c3c; }
.ui-style-15 { --primary-color: #34495e; --secondary-color: #f39c12; }

/* 响应式设计 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

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

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

  .basic-info strong {
    display: block;
    margin-bottom: 0.3rem;
  }

  .topic-item,
  .latest-item,
  .ranked-item {
    padding-left: 1.5rem;
  }

  .topic-label,
  .date-tag {
    position: static;
    display: inline-block;
    margin-bottom: 0.8rem;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 1rem 0.5rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .intro,
  .detail-page article {
    padding: 1.5rem;
  }

  .video-card,
  .list-item {
    padding: 1rem;
  }
}
