/* 全站通用样式扩展 */

/* UI Style 5 特定样式 */
body.ui-style-5 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body.ui-style-5 header {
  backdrop-filter: blur(10px);
}

body.ui-style-5 .card:hover,
body.ui-style-5 .list-item:hover {
  box-shadow: 0 12px 24px rgba(102, 126, 234, 0.2);
}

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

/* 链接通用样式 */
a {
  transition: all 0.3s ease;
}

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

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

.back-to-top:hover {
  background: #5568d3;
  transform: translateY(-3px);
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s ease-in-out infinite;
}

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

/* 响应式表格 */
@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr !important;
  }

  .grid {
    grid-template-columns: 1fr !important;
  }

  .related-grid {
    grid-template-columns: 1fr !important;
  }
}

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

  body {
    background: white !important;
  }

  main {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  body {
    background: white;
    color: black;
  }

  .card, .list-item {
    border: 2px solid black;
  }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
