
/* === 基础样式重置与全局设置 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

/* === 链接样式 === */
a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0052a3;
  text-decoration: underline;
}

/* === 按钮样式 === */
.btn {
  display: inline-block;
  padding: 10px 24px;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background: #0052a3;
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-secondary {
  background: #6c757d;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* === 卡片样式 === */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-body {
  padding: 20px;
}

/* === 返回顶部按钮 === */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #0066cc;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

#back-to-top:hover {
  background: #0052a3;
  transform: scale(1.1);
}

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

/* === 响应式设计 === */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .container {
    padding: 0 15px;
  }

  h1 {
    font-size: 24px !important;
  }

  h2 {
    font-size: 20px !important;
  }

  .card-body {
    padding: 15px;
  }

  #back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}

/* === UI风格变体（0-15）=== */
.ui-style-0 { --theme-color: #0066cc; }
.ui-style-1 { --theme-color: #1e88e5; }
.ui-style-2 { --theme-color: #43a047; }
.ui-style-3 { --theme-color: #fb8c00; }
.ui-style-4 { --theme-color: #e53935; }
.ui-style-5 { --theme-color: #8e24aa; }
.ui-style-6 { --theme-color: #00acc1; }
.ui-style-7 { --theme-color: #d81b60; }
.ui-style-8 { --theme-color: #5e35b1; }
.ui-style-9 { --theme-color: #f4511e; }
.ui-style-10 { --theme-color: #00897b; }
.ui-style-11 { --theme-color: #6d4c41; }
.ui-style-12 { --theme-color: #546e7a; }
.ui-style-13 { --theme-color: #c62828; }
.ui-style-14 { --theme-color: #283593; }
.ui-style-15 { --theme-color: #558b2f; }

/* === 列表页特殊样式 === */
.video-card.with-rank .rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: #fff;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}
