/* 自定义样式：页脚运行时间 + 徽章卡片 */

/* 运行时间一行 */
.site-runtime-line {
  margin: 10px 0 14px;
  font-size: 0.85rem;
  color: var(--font-color, #666);
}
.site-runtime-line .num {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 4px;
  margin: 0 2px;
  border-radius: 4px;
  background: rgba(127, 127, 127, 0.12);
  font-family: Consolas, Monaco, monospace;
  color: var(--font-color, #333);
  font-weight: 600;
}

/* 徽章卡片容器 */
.footer-badge-wrap {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 10px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 6px;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 0.8rem;
  line-height: 1;
  border: 1px solid rgba(127, 127, 127, 0.35);
  background: rgba(127, 127, 127, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.footer-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.footer-badge .badge-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  font-family: Consolas, Monaco, monospace;
}
.badge-hexo .badge-logo { background: #0e83c4; }
.badge-butterfly .badge-logo { background: #9455e8; }

.footer-badge .badge-text {
  color: var(--font-color, #666);
}
.footer-badge .badge-text b {
  color: var(--font-color, #333);
  font-weight: 600;
}

/* 暗色模式微调 */
[data-theme='dark'] .footer-badge {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

/* ===== 首页全屏横幅 + 打字机编辑器 ===== */
/* 仅首页（JS 会给 body 和头部加类） */
#page-header.tw-hero {
  height: 100vh;
  background-attachment: fixed; /* 与 body 固定背景无缝衔接 */
}
/* 黑幕退尽后，照片作为整页固定背景 */
body.tw-hero-page {
  background-image: url(/images/banner.jpg);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
/* 进入时的纯黑代码界面，滚动时减退过渡到图片 */
#page-header.tw-hero .tw-veil {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.1s linear;
}
#page-header.tw-hero #site-info {
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

/* VS Code Dark+ 配色 + 等宽代码字体 */
#site-title .tw-editor {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 1em;
  font-family: 'Cascadia Code', Consolas, 'Courier New', monospace;
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap; /* 小屏不换行 */
  text-shadow: none;
  color: #d4d4d4;
}
/* （已取消模糊条设计，改为整屏黑幕过渡，见上方 .tw-veil） */
#site-title .tw-lineno {
  color: #6e7681;
  user-select: none;
}
#site-title .tw-kw {
  color: #dcdcaa; /* print（内置函数） */
}
#site-title .tw-punc {
  color: #d4d4d4; /* 括号和引号 */
}
#site-title .tw-str {
  color: #ce9178; /* 字符串 */
}
#site-title .tw-cursor {
  display: inline-block;
  margin-left: 2px;
  color: #ffffff;
  animation: tw-blink 1s step-end infinite;
}
@keyframes tw-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
