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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

body.ui-style-1 {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

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

ul {
  list-style: none;
}

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

/* 顶部导航 */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
  letter-spacing: 2px;
}

nav ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 30px;
  align-items: center;
}

nav ul li a {
  color: #555;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

nav ul li a:hover {
  color: #3498db;
  background: rgba(52, 152, 219, 0.1);
  transform: translateY(-2px);
}

/* 移动端导航 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 10px;
    padding: 10px 15px;
  }

  .logo {
    font-size: 20px;
  }

  nav ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0;
    overflow: hidden;
  }

  nav ul li {
    flex: 1 1 0;
    min-width: 0;
  }

  nav ul li a {
    display: block;
    padding: 6px 4px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* 主内容区 */
main {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

/* 页面标题 */
.page-title {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-title h1 {
  font-size: 32px;
  color: #2c3e50;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-description {
  font-size: 16px;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

/* 内容区块 */
.content-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-title {
  font-size: 24px;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid #3498db;
  display: inline-block;
}

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

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

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

.video-card-content {
  padding: 20px;
}

.video-title {
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 10px;
  line-height: 1.4;
}

.video-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #7f8c8d;
}

.video-meta span {
  background: #ecf0f1;
  padding: 3px 10px;
  border-radius: 4px;
}

.video-description {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 视频列表 */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.video-list-item {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  display: flex;
  gap: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.video-list-item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateX(5px);
}

.video-rank {
  font-size: 32px;
  font-weight: bold;
  color: #3498db;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-list-content {
  flex: 1;
}

.video-list-title {
  font-size: 20px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 10px;
}

.video-list-info {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #7f8c8d;
}

.video-list-desc {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
}

/* 详情页 */
.detail-container {
  max-width: 900px;
  margin: 0 auto;
}

.detail-header {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.detail-title {
  font-size: 36px;
  color: #2c3e50;
  margin-bottom: 20px;
  line-height: 1.3;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
}

.meta-item {
  background: #ecf0f1;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 15px;
  color: #555;
}

.meta-label {
  font-weight: bold;
  color: #2c3e50;
  margin-right: 5px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
}

.detail-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 35px;
  margin-bottom: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.detail-section h2 {
  font-size: 24px;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
}

.detail-section p {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  text-align: justify;
}

.highlight-box {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
  padding: 20px 25px;
  border-radius: 10px;
  font-size: 17px;
  line-height: 1.6;
  margin: 20px 0;
}

.related-videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* 底部 */
footer {
  background: rgba(44, 62, 80, 0.95);
  color: #ecf0f1;
  padding: 30px 0;
  margin-top: 60px;
  text-align: center;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #ecf0f1;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #3498db;
}

.copyright {
  font-size: 14px;
  color: #95a5a6;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

/* 响应式 */
@media (max-width: 768px) {
  .page-title h1 {
    font-size: 24px;
  }

  .page-description {
    font-size: 14px;
  }

  .content-section {
    padding: 20px;
  }

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

  .detail-header {
    padding: 25px;
  }

  .detail-title {
    font-size: 26px;
  }

  .detail-section {
    padding: 20px;
  }

  .video-list-item {
    flex-direction: column;
    padding: 20px;
  }

  .video-rank {
    font-size: 24px;
    min-width: auto;
  }
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-card, .video-list-item, .content-section {
  animation: fadeIn 0.6s ease-out;
}
