@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
}

/* ------------------------------------------------------------------ *
 * 文章标题：更鲜明突出
 * ------------------------------------------------------------------ */
.fly-post-page-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: -0.018em;
  overflow-wrap: anywhere;
}

.fly-post-page-header--classic .fly-post-page-title {
  margin-bottom: 2px;
  /* 标题整体适当下移，给上方装饰线留出呼吸空间 */
  margin-top: 18px;
}

/* 标题上方的商务蓝短横线：吸引视线、提升设计感（仅默认文章模板 classic 布局） */
.fly-post-page-header--classic .fly-post-page-title::before {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: #1e6fd9;
}

/* ------------------------------------------------------------------ *
 * 文章图集：横向滑动查看
 * ------------------------------------------------------------------ */
.fly-post-gallery {
  position: relative;
  margin: 30px 0;
}

.fly-post-gallery-viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  border-radius: 12px;
  background: #0d0d0f;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  outline-offset: 3px;
}

.fly-post-gallery-viewport::-webkit-scrollbar {
  display: none;
}

.fly-post-gallery-track {
  position: relative;
  display: flex;
}

.fly-post-gallery-slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  margin: 0;
}

.fly-post-gallery-media {
  /* border-box 下 aspect-ratio 作用于含边框的整体，保证卡片严格 16:9 且不溢出 */
  box-sizing: border-box;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 20px solid #9dc3e6;
  border-radius: 8px;
  background: #0d0d0f;
  overflow: hidden;
}

.fly-post-gallery-media img {
  display: block;
  width: 100%;
  height: 100%;
  /* 填满 16:9 画幅（超出部分裁切），点击灯箱可查看完整原图 */
  object-fit: cover;
  cursor: zoom-in;
}

.fly-post-gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.55);
  color: #fff;
  padding: 0;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
  transition:
    opacity 0.3s cubic-bezier(0.32, 0.72, 0, 1),
    background-color 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.fly-post-gallery-arrow:hover,
.fly-post-gallery-arrow:focus-visible {
  background: rgba(20, 20, 22, 0.82);
}

.fly-post-gallery-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.fly-post-gallery-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.fly-post-gallery-arrow--prev {
  left: 12px;
}

.fly-post-gallery-arrow--next {
  right: 12px;
}

.fly-post-gallery-chevron {
  display: block;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.fly-post-gallery-arrow--prev .fly-post-gallery-chevron {
  margin-left: -2px;
  transform: rotate(-135deg);
}

.fly-post-gallery-arrow--next .fly-post-gallery-chevron {
  margin-right: -2px;
  transform: rotate(45deg);
}

.fly-post-gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}

.fly-post-gallery-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  padding: 0;
  cursor: pointer;
  transition:
    background-color 0.3s cubic-bezier(0.32, 0.72, 0, 1),
    transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.fly-post-gallery-dot:hover {
  background: var(--muted);
}

.fly-post-gallery-dot.fly-is-active {
  background: var(--fly-primary-color, #000);
  transform: scale(1.3);
}

.fly-post-gallery-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
}

.fly-post-gallery-caption {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
  flex: 1;
}

.fly-post-gallery-counter {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

@media (max-width: 640px) {
  .fly-post-gallery {
    margin: 22px 0;
  }

  .fly-post-gallery-media {
    /* 小屏收窄边框，比例仍保持 16:9 */
    border-width: 12px;
    border-radius: 6px;
  }

  .fly-post-gallery-arrow {
    width: 34px;
    height: 34px;
  }
}

/* ------------------------------------------------------------------ *
 * 灯箱：暗色背景
 * ------------------------------------------------------------------ */
.fly-post-lightbox,
.fly-post-lightbox::backdrop {
  background: #0d0d0f;
}

.fly-post-lightbox {
  color: #f2f2f4;
}

.fly-post-lightbox-shell {
  background: #0d0d0f;
}

.fly-post-lightbox-control {
  background: rgba(255, 255, 255, 0.14);
  color: #f2f2f4;
}

.fly-post-lightbox-control:hover,
.fly-post-lightbox-control:focus-visible {
  background: rgba(255, 255, 255, 0.26);
}

.fly-post-lightbox-control:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.fly-post-lightbox-counter {
  background: rgba(255, 255, 255, 0.14);
  color: #f2f2f4;
}

.fly-post-lightbox[data-fly-zoomed="true"] .fly-post-lightbox-stage img {
  cursor: grab;
}
