/* 全局样式增强 */
body {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* 导航样式 */
.site-nav {
  border-bottom: 2px solid var(--primary-color, #3498db);
}

.logo a:hover {
  color: var(--primary-color, #3498db);
}

.nav-menu li a:hover {
  color: var(--primary-color, #3498db);
  background: rgba(52, 152, 219, 0.1);
  border-radius: 4px;
}

/* 移动端导航强制单行 */
@media (max-width: 768px) {
  .nav-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow: hidden;
  }

  .nav-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow: hidden;
    white-space: nowrap;
  }

  .nav-menu li {
    flex-shrink: 1;
    min-width: 0;
  }

  .nav-menu li a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* 卡片动画 */
.video-card, .related-card {
  transition: all 0.3s ease;
}

.video-card:hover, .related-card:hover {
  border-color: var(--primary-color, #3498db);
}

.video-card h3, .related-card h3 {
  transition: color 0.3s ease;
}

.video-card:hover h3, .related-card:hover h3 {
  color: var(--primary-color, #3498db);
}

/* 按钮样式 */
.video-card a, .related-card a, .video-item a {
  transition: all 0.3s ease;
}

.video-card a:hover, .related-card a:hover, .video-item a:hover {
  color: var(--secondary-color, #2ecc71);
  text-decoration: underline;
}

/* 页面头部渐变 */
.hero {
  background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 100%);
}

/* 响应式布局优化 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 14px;
  }

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

  .container {
    padding: 15px;
  }

  section {
    padding: 20px 15px;
  }
}

@media (max-width: 480px) {
  .detail-header h1 {
    font-size: 24px;
  }

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

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color, #3498db);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color, #2ecc71);
}

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

.video-card, .related-card, .video-item {
  animation: fadeIn 0.5s ease-out;
}

/* 链接下划线动画 */
a {
  position: relative;
}

.video-card a::after, .related-card a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary-color, #3498db);
  transition: width 0.3s ease;
}

.video-card a:hover::after, .related-card a:hover::after {
  width: 100%;
}

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

.back-to-top:hover {
  background: var(--secondary-color, #2ecc71);
  transform: translateY(-5px);
}

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

@media (max-width: 768px) {
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
  }
}
