/* 全站通用样式增强 */

/* 移动端导航单行强制约束 */
@media (max-width: 768px) {
  .site-nav {
    width: 100%;
    overflow: hidden;
  }

  .nav-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    overflow: visible !important;
    gap: 2px !important;
  }

  .nav-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    text-align: center !important;
  }

  .nav-item a {
    display: block !important;
    padding: 6px 4px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* UI 风格变体 */
.ui-style-0 {
  --primary-color: #e74c3c;
  --secondary-color: #3498db;
  --text-color: #2c3e50;
}

.ui-style-1 {
  --primary-color: #e67e22;
  --secondary-color: #1abc9c;
  --text-color: #34495e;
}

.ui-style-2 {
  --primary-color: #9b59b6;
  --secondary-color: #2ecc71;
  --text-color: #2c3e50;
}

.ui-style-3 {
  --primary-color: #e91e63;
  --secondary-color: #00bcd4;
  --text-color: #212121;
}

.ui-style-4 {
  --primary-color: #f44336;
  --secondary-color: #4caf50;
  --text-color: #263238;
}

.ui-style-5 {
  --primary-color: #ff5722;
  --secondary-color: #009688;
  --text-color: #37474f;
}

.ui-style-6 {
  --primary-color: #ff9800;
  --secondary-color: #03a9f4;
  --text-color: #1e3a5f;
}

.ui-style-7 {
  --primary-color: #ffc107;
  --secondary-color: #2196f3;
  --text-color: #263238;
}

.ui-style-8 {
  --primary-color: #8bc34a;
  --secondary-color: #673ab7;
  --text-color: #1b5e20;
}

.ui-style-9 {
  --primary-color: #4caf50;
  --secondary-color: #e91e63;
  --text-color: #1b5e20;
}

.ui-style-10 {
  --primary-color: #00bcd4;
  --secondary-color: #ff5722;
  --text-color: #006064;
}

.ui-style-11 {
  --primary-color: #03a9f4;
  --secondary-color: #ff9800;
  --text-color: #01579b;
}

.ui-style-12 {
  --primary-color: #2196f3;
  --secondary-color: #ffc107;
  --text-color: #0d47a1;
}

.ui-style-13 {
  --primary-color: #3f51b5;
  --secondary-color: #cddc39;
  --text-color: #1a237e;
}

.ui-style-14 {
  --primary-color: #673ab7;
  --secondary-color: #8bc34a;
  --text-color: #311b92;
}

.ui-style-15 {
  --primary-color: #9c27b0;
  --secondary-color: #4caf50;
  --text-color: #4a148c;
}

/* 平滑过渡效果 */
a, button, .card, .list-card, .related-card {
  transition: all 0.3s ease;
}

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

/* 可访问性增强 */
a:focus, button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* 打印样式 */
@media print {
  header, footer, .site-nav {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

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

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

/* 悬停效果增强 */
.card:hover, .list-card:hover, .related-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 移动端触摸优化 */
@media (max-width: 768px) {
  .card, .list-card, .related-card {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }
}
