/* 基础变量 */
:root {
  --primary-color: #0066cc;
  --primary-hover: #003d7a;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
  --text-dark: #1a1a1a;
  --text-medium: #333;
  --text-light: #666;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 8px;
}

/* 视频卡片 */
.video-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
}

.video-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.video-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

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

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

.video-card .meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.video-card .oneline {
  color: var(--text-medium);
  font-size: 0.95rem;
  line-height: 1.6;
}

.video-card .rank {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #0066cc 0%, #003d7a 100%);
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
}

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

.video-grid .video-card {
  margin-bottom: 0;
}

/* 视频列表 */
.video-list {
  margin-top: 1.5rem;
}

/* 快速链接 */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.link-card {
  background: linear-gradient(135deg, #0066cc 0%, #004c99 100%);
  color: white !important;
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

/* 详情页信息框 */
.info-box {
  background: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.info-box p {
  margin: 0.75rem 0;
  color: var(--text-medium);
}

.info-box strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* 相关推荐列表 */
.related-list {
  list-style: none;
  margin-top: 1rem;
}

.related-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.related-list a {
  font-weight: 600;
  color: var(--primary-color);
}

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

/* 简介区域 */
.intro {
  background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.intro h1 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.intro p {
  color: var(--text-medium);
  line-height: 1.8;
}

/* 文章内容 */
article h2 {
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

article p {
  line-height: 1.8;
  color: var(--text-medium);
}

/* 响应式 */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  .container {
    margin: 1rem auto;
    padding: 0 0.75rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  .info-box {
    padding: 1rem;
  }

  .video-card {
    padding: 1rem;
  }

  .intro {
    padding: 1.5rem;
  }
}

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

.section {
  animation: fadeIn 0.5s ease-out;
}

/* 滚动优化 */
html {
  scroll-behavior: smooth;
}

/* 返回顶部按钮 */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  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: var(--shadow-md);
  transition: all 0.3s ease;
  z-index: 1000;
}

#backToTop:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

#backToTop.show {
  display: flex;
}
