/* 全站样式 - 响应式布局 */

/* UI Style 变体颜色配置 */
body.ui-style-0 { --primary: #2563eb; --accent: #f59e0b; }
body.ui-style-1 { --primary: #7c3aed; --accent: #ec4899; }
body.ui-style-2 { --primary: #059669; --accent: #06b6d4; }
body.ui-style-3 { --primary: #dc2626; --accent: #f97316; }
body.ui-style-4 { --primary: #0891b2; --accent: #8b5cf6; }
body.ui-style-5 { --primary: #ea580c; --accent: #14b8a6; }
body.ui-style-6 { --primary: #4f46e5; --accent: #10b981; }
body.ui-style-7 { --primary: #be123c; --accent: #fbbf24; }
body.ui-style-8 { --primary: #0d9488; --accent: #a855f7; }
body.ui-style-9 { --primary: #7c2d12; --accent: #3b82f6; }
body.ui-style-10 { --primary: #1e40af; --accent: #f43f5e; }
body.ui-style-11 { --primary: #15803d; --accent: #d946ef; }
body.ui-style-12 { --primary: #9333ea; --accent: #22c55e; }
body.ui-style-13 { --primary: #0369a1; --accent: #eab308; }
body.ui-style-14 { --primary: #b91c1c; --accent: #06b6d4; }
body.ui-style-15 { --primary: #6366f1; --accent: #fb923c; }

/* 链接颜色使用CSS变量 */
a { color: var(--primary, #2563eb); }
.logo { color: var(--primary, #1e40af) !important; }

/* 导航悬停效果 */
nav ul li a:hover {
  background: rgba(37, 99, 235, 0.1);
  border-radius: 4px;
}

/* 视频卡片悬停动画 */
.video-card {
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.video-card:hover {
  border-left-color: var(--primary, #2563eb);
  background: #fff !important;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary, #2563eb);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent, #f59e0b);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  text-decoration: none;
}

/* 标签样式 */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary, #2563eb);
  border-radius: 4px;
  font-size: 13px;
  margin: 3px;
  transition: all 0.2s;
}

.tag:hover {
  background: var(--primary, #2563eb);
  color: #fff;
}

/* 响应式优化 */
@media (max-width: 992px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 20px 15px;
  }

  main {
    padding: 20px 0;
  }
}

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

#backToTop:hover {
  background: var(--accent, #f59e0b);
  transform: translateY(-5px);
}

#backToTop.show {
  display: flex;
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(37, 99, 235, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary, #2563eb);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 渐入动画 */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 卡片入场动画 */
.video-card {
  animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 移动端导航固定 */
@media (max-width: 768px) {
  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
  }

  main {
    margin-top: 60px;
  }

  nav ul {
    overflow: hidden;
  }

  nav ul li a {
    font-size: 11px;
    padding: 5px 2px;
  }
}

/* 打印样式 */
@media print {
  header, footer, #backToTop {
    display: none;
  }

  .video-card {
    page-break-inside: avoid;
  }
}
