@font-face {
  font-family: 'Press Start 2P';
  src: url('/fonts/PressStart2P.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

#page-header #site-title {
  font-family: 'Press Start 2P', 'Noto Sans SC', monospace !important;
}

.my-timeline {
  position: relative;
  padding: 0;
}

.my-timeline::before {
  content: "";
  position: absolute;
  left: 72px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: #4c4948;
}

.my-timeline-item {
  position: relative;
  min-height: 40px;
  margin-bottom: 24px;
}

.my-timeline-time {
  position: absolute;
  left: 0;
  top: 0;
  width: 50px;
  text-align: right;
  font-size: 14px;
  color: #666;
}

.my-timeline-dot {
  position: absolute;
  left: 68px;
  top: 8px;
  width: 8px;
  height: 8px;
  background: #9b6ee1;
  border-radius: 0;
  image-rendering: pixelated;
  box-shadow: 
    2px 0 0 #9b6ee1,
    -2px 0 0 #9b6ee1,
    0 2px 0 #9b6ee1,
    0 -2px 0 #9b6ee1;
  z-index: 1;
}

.my-timeline-content {
  margin-left: 95px;
  font-size: 14px;
  color: #333;
  line-height: 24px;
  writing-mode: horizontal-tb; /* 防止竖排 */
}

/* 文章 description 板块 */
.post-description {
  padding: 15px 20px;
  margin-bottom: 20px;
  background: #f5edff;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* 深色模式下文章 description 背景深紫色 */
[data-theme='dark'] .post-description {
  background: #1a1129 !important;
  color: var(--font-color) !important;
}

/* 标题打字机效果 - 仅首页 */
.full_page #site-title {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid transparent;
  font-size: 3.5em !important;
  animation: typing 3s steps(25, end) forwards, blink-caret 0.75s step-end 3s 4, hide-caret 0.1s 6s forwards !important;
  text-shadow: 
    3px 0 0 #000,
    -3px 0 0 #000,
    0 3px 0 #000,
    0 -3px 0 #000,
    3px 3px 0 #000,
    -3px -3px 0 #000,
    3px -3px 0 #000,
    -3px 3px 0 #000 !important;
}

/* 归档、标签、分类页标题黑色像素描边 */
#page-site-info #site-title {
  text-shadow: 
    3px 0 0 #000,
    -3px 0 0 #000,
    0 3px 0 #000,
    0 -3px 0 #000,
    3px 3px 0 #000,
    -3px -3px 0 #000,
    3px -3px 0 #000,
    -3px 3px 0 #000 !important;
}

/* 移动端打字机效果 - 每帧一个字母 */
@media screen and (max-width: 768px) {
  .full_page #site-title {
    animation: typing-mobile 1.5s steps(7, end) forwards, blink-caret 0.75s step-end 1.5s 4, hide-caret 0.1s 1.5s forwards !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    text-align: center;
    margin: 0 auto;
    width: calc(100% - 12px); /* 减去左右 padding */
    padding-left: 6px; /* 防止文字被裁剪 */
    padding-right: 6px;
  }
}

@keyframes typing-mobile {
  from { 
    width: 0; 
    margin-left: 0;
  }
  to { 
    width: calc(7ch + 12px); /* 加上左右 padding */
    margin-left: auto;
    margin-right: auto;
  }
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #ffffff;
  }
}

@keyframes hide-caret {
  to {
    border-color: transparent;
  }
}

/* 移除头像旋转效果 */
.avatar-img img {
  transition: none !important;
}

.avatar-img img:hover {
  transform: none !important;
}

/* 统一 header 高度为 260px */
#page-header.full_page,
#page-header.not-home-page,
#page-header.post-bg {
  height: 260px !important;
  background-repeat: repeat;
  image-rendering: pixelated;
  background-size: 260px 260px !important;
  background-position: 0 0 !important;
}

#page-header #page-site-info {
  top: 120px !important;
}

#page-header #post-info {
  top: 120px !important;
}

/* 归档、标签、分类页标题字体大小 */
.not-home-page #site-title {
  font-size: 3.5em !important;
}

/* 时间线深色模式样式 */
[data-theme='dark'] .my-timeline-time {
  color: var(--font-color);
}

[data-theme='dark'] .my-timeline-content {
  color: var(--font-color);
}

[data-theme='dark'] .my-timeline::before {
  background: var(--font-color);
}


.error-content.error-404-layout {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
  background: #fff !important;
  box-shadow: none !important;
  border: none !important;
}

.error-content.error-404-layout .error-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  width: 100%;
  max-width: 960px;
}

.error-content.error-404-layout .error-left,
.error-content.error-404-layout .error-right {
  flex: 0 0 auto;
}

.error-content.error-404-layout .error-left img,
.error-content.error-404-layout .error-right img {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 220px;
  height: auto;
  image-rendering: pixelated;
}

.error-content.error-404-layout .error-center {
  text-align: center;
  color: #fff !important;
  line-height: 1.1;
  font-family: 'Press Start 2P', monospace !important;
  text-shadow: 
    4px 0 0 #000,
    -4px 0 0 #000,
    0 4px 0 #000,
    0 -4px 0 #000,
    4px 4px 0 #000,
    -4px -4px 0 #000,
    4px -4px 0 #000,
    -4px 4px 0 #000 !important;
}

.error-content.error-404-layout .error-title {
  margin: 0;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 4px;
}

.error-content.error-404-layout .error-code {
  margin-top: 8px;
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 6px;
}

.error-content.error-404-layout .error-subtitle {
  margin-top: 20px;
  font-size: 16px;
  color: #666;
  line-height: 1.6;
}

@media screen and (max-width: 768px) {
  .error-content.error-404-layout .error-wrap {
    flex-direction: column;
    gap: 24px;
  }

  .error-content.error-404-layout .error-left img,
  .error-content.error-404-layout .error-right img {
    max-width: 120px;
    max-height: 140px;
  }

  .error-content.error-404-layout .error-title {
    font-size: 42px;
  }

  .error-content.error-404-layout .error-code {
    font-size: 52px;
  }

  .error-content.error-404-layout .error-subtitle {
    font-size: 14px;
  }
}

/* 修改作者名字体 */
.author-info-name {
  font-family: 'Press Start 2P', monospace !important;
  font-size: 1.2em !important;
}

/* 深色模式下顶部图纯黑色 */
[data-theme='dark'] #page-header.full_page,
[data-theme='dark'] #page-header.not-home-page,
[data-theme='dark'] #page-header.post-bg {
  background-color: #000 !important;
  background-image: none !important;
}

/* 深色模式下页脚背景黑色 */
[data-theme='dark'] #footer {
  background-color: #000 !important;
  background-image: none !important;
}