
/* 全局样式增强 */
.ui-style-7 {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f59e0b;
  --text-color: #1e293b;
  --text-light: #64748b;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
}

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

/* 卡片悬停效果 */
article {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
  main {
    padding: 1rem 0.75rem !important;
  }

  h1 {
    font-size: 1.8rem !important;
  }

  h2 {
    font-size: 1.4rem !important;
  }

  article {
    padding: 1.25rem !important;
  }

  nav {
    position: sticky;
    top: 0;
  }

  nav ul {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: visible;
    justify-content: space-between;
    padding: 0;
  }

  nav li {
    flex: 1 1 0;
    min-width: 0;
  }

  nav a {
    padding: 0.75rem 0.25rem;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 480px) {
  nav a {
    padding: 0.6rem 0.15rem;
    font-size: 0.75rem;
  }
}

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

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

body {
  animation: fadeIn 0.3s ease-out;
}

/* 选中文本样式 */
::selection {
  background: var(--primary-color);
  color: white;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 链接焦点样式 */
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 2px;
}

/* 图片懒加载占位 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
