/* 全局样式增强 */
.ui-style-5 {
  --primary: #667eea;
  --primary-dark: #5568d3;
  --secondary: #764ba2;
  --accent: #f093fb;
  --bg-light: #f5f5f5;
  --text-dark: #333;
  --text-light: #666;
}

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

/* 链接过渡效果 */
a {
  transition: all 0.3s ease;
}

/* 按钮悬停效果增强 */
.btn, .card .btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* 卡片阴影增强 */
.card {
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  transform: translateY(-8px);
}

/* 标签样式优化 */
.tag {
  transition: all 0.3s ease;
  cursor: pointer;
}

.tag:hover {
  background: #5568d3;
  color: white;
  transform: scale(1.05);
}

/* 导航链接下划线效果 */
nav a {
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* 响应式图片 */
img {
  max-width: 100%;
  height: auto;
}

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

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

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

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

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

/* 排行榜徽章渐变 */
.rank-badge {
  box-shadow: 0 2px 8px rgba(118, 75, 162, 0.4);
}

/* 移动端优化 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .detail-header h1 {
    font-size: 1.5rem;
  }

  #back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* 打印样式 */
@media print {
  header, footer, nav, #back-to-top {
    display: none;
  }

  body {
    background: white;
  }

  .card, .detail-container {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
