/* 自定义字体 C01 - 使用压缩后的 WOFF2 格式 */

/* W03 - 正常 (Regular) - 用于所有正文 */
@font-face {
  font-family: 'C01';
  src: url('/font/C01-W03.woff2') format('woff2'),
    url('/font/C01 W03.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: block;
  /* 阻塞渲染直到字体加载完成，避免闪烁 */
}

/* W05 - 粗体 (Bold) - 用于标题 */
@font-face {
  font-family: 'C01';
  src: url('/font/C01-W05.woff2') format('woff2'),
    url('/font/C01 W05.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

/* 应用字体到全站 */
body,
.markdown-body {
  font-family: 'C01', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif !important;
}

/* 标题使用粗体 */
h1,
h2,
h3,
h4,
h5,
h6,
.post-title,
.page-title,
.navbar-brand {
  font-family: 'C01', sans-serif !important;
  font-weight: 700;
}

/* 导航栏 - 多彩渐变效果 */
.navbar {
  font-family: 'C01', sans-serif !important;
}

/* 暗色系渐变背景 - 滚动后显示 */
.navbar.top-nav-collapse,
.navbar-col-show {
  background: linear-gradient(135deg,
      #1a1a2e 0%,
      /* 深海蓝 */
      #16213e 25%,
      /* 午夜蓝 */
      #0f3460 50%,
      /* 藏青色 */
      #1a3a5c 75%,
      /* 深靛蓝 */
      #2d3a4a 100%
      /* 墨灰蓝 */
    ) !important;
  background-size: 200% 200%;
  animation: gradientFlow 8s ease infinite;
}

/* 渐变流动动画 */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* 导航链接悬停效果 - 暗色调 */
.navbar .nav-item .nav-link:hover {
  color: #7dd3fc !important;
  /* 悬停时变为淡天蓝色 */
  text-shadow: 0 0 8px rgba(125, 211, 252, 0.4);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* 品牌名称特殊样式 */
.navbar-brand strong {
  background: linear-gradient(90deg, #e0e7ff, #7dd3fc, #e0e7ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shineText 3s linear infinite;
}

@keyframes shineText {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* 导航链接底部指示线 - 暗色调 */
.navbar .nav-item .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #7dd3fc);
  transition: width 0.3s ease, left 0.3s ease;
}

.navbar .nav-item .nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* 确保链接有相对定位 */
.navbar .nav-item .nav-link {
  position: relative;
}