/* 全局样式增强 */
body.ui-style-5 {
  font-size: 15px;
}

/* 响应式优化 */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 26px !important;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  main {
    padding: 0 15px !important;
  }

  .hero {
    padding: 40px 20px !important;
  }

  .hero h1 {
    font-size: 22px !important;
  }

  .section, .intro-section {
    padding: 20px !important;
  }

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

  .detail-container {
    padding: 20px !important;
  }

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

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

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

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

  .list-item {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .item-date {
    text-align: left !important;
  }
}

/* 移动端导航强制单行 */
@media (max-width: 768px) {
  nav {
    flex-wrap: nowrap !important;
  }

  .nav-links {
    flex-wrap: nowrap !important;
    overflow-x: visible !important;
  }

  .nav-links li {
    white-space: nowrap !important;
  }
}

/* 动画效果 */
.card, .related-item, .list-item, .nav-card {
  transition: all 0.3s ease;
}

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

/* 可访问性 */
a:focus, button:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

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

/* 加载状态 */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* 工具提示 */
[title] {
  cursor: help;
}

/* 选中文本样式 */
::selection {
  background: #667eea;
  color: #fff;
}

/* 滚动条样式 */
::-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;
}
