@charset "UTF-8";
/* ===========================
   Layer 3: Works 作品集页面专用样式
   Hero / 分类筛选 / 瀑布流卡片 / 悬停遮罩 / 灯箱 / 骨架屏
   仅在 works.html 中引入
   =========================== */


/* ========== Hero Section ========== */
.works-hero {
  background:
    linear-gradient(135deg, rgba(249, 189, 221, 0.25) 0%, rgba(180, 223, 251, 0.2) 50%, rgba(249, 189, 221, 0.15) 100%),
    url(../assets/backgrounds/checker.gif);
  background-size: auto, 200px;
  border-bottom: 2px solid #000;
  padding: 32px 24px 24px;
  position: relative;
  overflow: hidden;
}

.works-hero::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(180, 230, 251, 0.45) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.works-hero-title {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 30px;
  font-weight: bold;
  color: #000;
  margin: 0 0 6px;
  text-shadow: 2px 2px 0 rgba(249, 189, 221, 0.5);
}

.works-hero-sub {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 13px;
  color: #5a3e4b;
  margin: 0 0 14px;
  line-height: 1.6;
}

.works-hero-deco {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 140px;
}

.works-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c44569;
  flex-shrink: 0;
}

.works-line {
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, #d05588, #f9bddd, #5dcf61);
}


/* ========== 分类筛选栏 ========== */
.works-filter {
  padding: 16px 20px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.works-filter-btn {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 12px;
  padding: 5px 14px;
  border: 1.5px solid #e0cfd6;
  border-radius: 20px;
  background: #fff;
  color: #5a3e4b;
  cursor: url(../assets/items/select.png), pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}

.works-filter-btn:hover {
  background: #fff0f5;
  border-color: #d46493;
  color: #c44569;
  transform: translateY(-1px);
}

.works-filter-btn.active {
  background: #f9bddd;
  border-color: #c44569;
  color: #fff;
  box-shadow: 0 2px 8px rgba(196, 69, 105, 0.18);
}


/* ========== 瀑布流容器 (CSS column-count) ========== */
.works-grid-wrap {
  padding: 12px 20px 20px;
  /* 局部平铺背景 */
  background-image: url(../assets/images/.png);
  /*背景暂时为空*/
  background-size: 180px 300px;
  background-repeat: repeat;
  background-position: top left;
}

.works-grid {
  column-count: 3;
  column-gap: 14px;
  transition: opacity 0.25s ease;
}

.works-grid.works-grid-exit {
  opacity: 0;
  transform: translateY(6px);
}


/* ========== 单张卡片 ========== */
.works-card {
  break-inside: avoid;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #000;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;

  /* 入场动画 */
  animation: worksCardIn 0.45s ease both;
}

@keyframes worksCardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.works-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 8px 24px rgba(196, 69, 105, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.06);
}


/* ---- 卡片图片区域 ---- */
.works-card-img {
  position: relative;
  overflow: hidden;
  cursor: url(../assets/items/select.png), pointer;
  /* 骨架屏: 图片加载前的占位背景 */
  background: linear-gradient(135deg, #f8f0f4 25%, #fef6f9 50%, #f8f0f4 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease infinite;
  min-height: 80px;
}

@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.works-card-img img {
  width: 100%;
  display: block;
  transition: transform 0.35s ease, opacity 0.4s ease;
  opacity: 0;
}

.works-card-img img.loaded {
  opacity: 1;
}

.works-card:hover .works-card-img img {
  transform: scale(1.06);
}

/* ---- 悬停粉色遮罩 ---- */
.works-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(196, 69, 105, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.works-card:hover .works-card-overlay {
  opacity: 1;
}

.works-overlay-text {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 13px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 16px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  letter-spacing: 1px;
  transform: translateY(8px);
  transition: transform 0.3s ease;
}

.works-card:hover .works-overlay-text {
  transform: translateY(0);
}


/* ---- 卡片信息区 ---- */
.works-card-body {
  padding: 12px 14px 14px;
}

.works-card-title {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #2a1a2e;
  margin: 0 0 4px;
  line-height: 1.4;
  transition: color 0.2s;
}

.works-card:hover .works-card-title {
  color: #c44569;
}

.works-card-desc {
  font-size: 12px;
  color: #7a6470;
  line-height: 1.6;
  margin: 0 0 8px;
  /* 三行截断 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.works-card-cat {
  display: inline-block;
  font-size: 10px;
  padding: 1px 8px;
  border: 1px solid #e8a0b4;
  border-radius: 10px;
  background: #fff0f5;
  color: #c44569;
  line-height: 1.6;
  white-space: nowrap;
}


/* ========== 灯箱 (Lightbox) ========== */
.works-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.works-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.works-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.works-lb-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.works-lb-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  object-fit: contain;
}

.works-lightbox.active .works-lb-content img {
  animation: worksLbZoom 0.3s ease;
}

@keyframes worksLbZoom {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.works-lb-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #c44569;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url(../assets/items/select.png), pointer;
  transition: transform 0.15s, background 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.works-lb-close:hover {
  transform: scale(1.1) rotate(90deg);
  background: #a03050;
}


/* ========== 空状态 ========== */
.works-empty {
  column-span: all;
  text-align: center;
  padding: 60px 20px;
}

.works-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: #d3a6b4;
  animation: worksEmptyBob 3s ease-in-out infinite;
}

@keyframes worksEmptyBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.works-empty p {
  font-size: 13px;
  color: #bba3ad;
  line-height: 1.6;
}


/* ========== 底部结尾装饰 ========== */
.works-end {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 32px;
  background-image: url(../assets/images/bg-pattern.png);
  background-size: 180px 300px;
  background-repeat: repeat;
}

.works-end-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e0cfd6, transparent);
}

.works-end-text {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 11px;
  color: #bba3ad;
  white-space: nowrap;
}


/* ========== 响应式 ========== */

/* 平板: 2 列 */
@media (max-width: 1024px) {
  .works-grid {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  /* 隐藏左栏 */
  .left-col {
    display: none;
  }

  .col.right {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    border: none;
  }

  /* 移动端: 2 列紧凑 */
  .works-grid {
    column-count: 2;
    column-gap: 10px;
  }

  .works-grid-wrap {
    padding: 10px 12px 16px;
  }

  .works-card {
    margin-bottom: 10px;
  }

  .works-card-body {
    padding: 10px 12px 12px;
  }

  .works-card-title {
    font-size: 13px;
  }

  .works-card-desc {
    font-size: 11px;
    -webkit-line-clamp: 2;
  }

  /* Hero */
  .works-hero {
    padding: 24px 16px 20px;
  }

  .works-hero-title {
    font-size: 24px;
  }

  /* 筛选栏 */
  .works-filter {
    padding: 12px 12px 6px;
    gap: 6px;
  }

  .works-filter-btn {
    font-size: 11px;
    padding: 4px 12px;
  }

  /* 灯箱 */
  .works-lb-close {
    top: -40px;
    right: 4px;
  }
}

/* 超小屏: 1 列 */
@media (max-width: 420px) {
  .works-grid {
    column-count: 1;
  }
}
