/* 自定义样式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

/* 全局字体设置 */
body {
  font-family: 'Noto Sans SC', sans-serif;
}

/* 导航栏链接悬停效果 */
nav a {
  transition: all 0.3s ease;
}

nav a:hover {
  transform: translateY(-1px);
}

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

article:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 按钮悬停效果 */
button {
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-1px);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* 代码块样式 */
.code-block {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 1rem;
  font-family: monospace;
  overflow-x: auto;
}

/* 响应式调整 */
@media (max-width: 640px) {
  .prose {
    font-size: 0.95rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

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

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

/* 自定义工具提示 */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem;
  background-color: #333;
  color: white;
  border-radius: 4px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

[data-tooltip]:hover:before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

main {
  min-height: calc(100vh - 300px);
}
