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

/* 导航栏增强动画 */
nav .logo {
  transition: transform 0.3s ease;
}

nav .logo:hover {
  transform: scale(1.05);
}

nav li {
  position: relative;
}

nav li::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: white;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav li:hover::after {
  width: 80%;
}

/* 卡片悬浮效果增强 */
.card,
.item,
.related-item {
  position: relative;
  overflow: hidden;
}

.card::before,
.item::before,
.related-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.card:hover::before,
.item:hover::before,
.related-item:hover::before {
  left: 100%;
}

/* 标签动画 */
.tag {
  transition: all 0.3s ease;
  cursor: default;
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

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

.section,
.detail-card {
  animation: fadeInUp 0.6s ease-out;
}

/* 按钮悬停效果 */
.quick-links a {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.quick-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(0,0,0,0.1);
  transition: width 0.3s ease;
  z-index: -1;
}

.quick-links a:hover::before {
  width: 100%;
}

/* 时间线动画 */
.timeline-item {
  opacity: 0;
  animation: slideInLeft 0.5s ease forwards;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.15s; }
.timeline-item:nth-child(3) { animation-delay: 0.2s; }
.timeline-item:nth-child(4) { animation-delay: 0.25s; }
.timeline-item:nth-child(5) { animation-delay: 0.3s; }

/* 榜单序号特效 */
.rank {
  transition: all 0.3s ease;
}

.item:hover .rank {
  transform: scale(1.2) rotate(5deg);
}

/* 响应式优化 */
@media (max-width: 768px) {
  nav ul {
    justify-content: space-around;
  }

  nav a {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

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

.card a,
.item a {
  display: inline-block;
}
