/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* 导航栏 */
nav {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

nav a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 1.2rem 1rem;
  text-decoration: none;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
}

nav a:hover {
  background: #f8f8f8;
  color: #e74c3c;
}

nav a:first-child {
  font-weight: bold;
  color: #e74c3c;
  font-size: 1.1rem;
}

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

section {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #e74c3c;
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #333;
  border-left: 4px solid #e74c3c;
  padding-left: 1rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #333;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

a {
  color: #e74c3c;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #c0392b;
}

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

.video-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.2rem;
  transition: all 0.3s ease;
  background: #fff;
}

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

.video-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.video-card h3 a {
  color: #333;
  text-decoration: none;
}

.video-card h3 a:hover {
  color: #e74c3c;
}

.video-meta {
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.video-desc {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 详情页 */
article {
  background: #fff;
  padding: 2.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.info-box {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.info-box p {
  margin-bottom: 0.5rem;
  color: #666;
  font-size: 0.95rem;
}

.section-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #333;
  border-bottom: 2px solid #e74c3c;
  padding-bottom: 0.5rem;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: #e74c3c;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 返回顶部按钮 */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 999;
}

#backToTop:hover {
  background: #c0392b;
  transform: translateY(-4px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  nav a {
    padding: 0.8rem 0.3rem;
    font-size: 0.85rem;
  }

  nav a:first-child {
    font-size: 0.95rem;
  }

  main {
    padding: 0 0.5rem;
  }

  section {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

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

  article {
    padding: 1.5rem;
  }

  #backToTop {
    width: 45px;
    height: 45px;
    bottom: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px) {
  nav a {
    padding: 0.6rem 0.2rem;
    font-size: 0.75rem;
  }

  nav a:first-child {
    font-size: 0.85rem;
  }

  h1 {
    font-size: 1.3rem;
  }

  section {
    padding: 1rem;
  }
}

/* UI风格变体 */
.ui-style-0 { --primary-color: #e74c3c; }
.ui-style-1 { --primary-color: #3498db; }
.ui-style-2 { --primary-color: #2ecc71; }
.ui-style-3 { --primary-color: #9b59b6; }
.ui-style-4 { --primary-color: #f39c12; }
.ui-style-5 { --primary-color: #1abc9c; }
.ui-style-6 { --primary-color: #e67e22; }
.ui-style-7 { --primary-color: #34495e; }
.ui-style-8 { --primary-color: #e91e63; }
.ui-style-9 { --primary-color: #00bcd4; }
.ui-style-10 { --primary-color: #ff5722; }
.ui-style-11 { --primary-color: #607d8b; }
.ui-style-12 { --primary-color: #8bc34a; }
.ui-style-13 { --primary-color: #ff9800; }
.ui-style-14 { --primary-color: #795548; }
.ui-style-15 { --primary-color: #009688; }

/* Footer */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}
