/* ===== Lenis 平滑滚动适配 ===== */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 12px 48px;
  /* 纯黑底色 + 矩形6 叠加 */
  background-color: #000;
  background-image: url('../assets/images/normal/矩形 6.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  transition: background-color 0.4s, transform 0.35s ease;
}

/* 非第一屏时降低背景透明度 */
.navbar.translucent {
  background-color: rgba(0, 0, 0, 0.45);
}

/* 第三屏及之后：导航栏滑出隐藏 */
.navbar.hidden {
  transform: translateY(-100%);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

/* ---- 左侧：logo + 首页 + 间距 + 春夏秋冬 ---- */
.nav-left {
  display: flex;
  align-items: center;
  max-width: 50%;
  gap: 8px;
}

.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.nav-home img {
  height: 32px;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.3s;
  display: block;
}

/* 鼠标放上去后字更清晰（与书画卷轴一致的交互效果） */
.nav-home:hover img {
  opacity: 1;
}

.nav-gap {
  flex: 0 0 32px; /* logo/首页 与 四季选项之间留空 */
}

.nav-seasons {
  display: flex;
  gap: 26px;
}

.nav-season img {
  height: 28px;
  width: auto;
  opacity: 0.5;
  transition: opacity 0.3s, transform 0.3s;
  display: block;
}

.nav-season:hover img,
.nav-season.active img {
  opacity: 1;
  transform: scale(1.12);
}

/* ---- 右侧：书画卷轴 + 播放按钮 ---- */
.nav-right {
  display: flex;
  align-items: center;
  max-width: 20%;
  gap: 10px; /* 略紧 */
}

.nav-scroll img {
  height: 30px;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.3s;
  display: block;
}

.nav-scroll:hover img {
  opacity: 1;
}

.nav-play img {
  height: 28px;
  width: auto;
  opacity: 0.6;
  transition: opacity 0.3s;
  display: block;
}

.nav-play:hover img {
  opacity: 1;
}

/* 播放中状态 — 按钮常亮 */
.nav-play.playing img {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

/* ===== 导航栏涟漪动画图层 ===== */
.nav-ripple-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.nav-ripple {
  position: absolute;
  width: 45px;
  height: 45px;
  margin-left: -22.5px;
  margin-top: -22.5px;
  pointer-events: none;
  transform-origin: center center;
  animation: ripple-expand 1.4s ease-out forwards;
  will-change: transform, opacity;
  display: block;
  object-fit: contain;
}

@keyframes ripple-expand {
  0%   { transform: scale(0.2); opacity: 0; }
  15%  { opacity: 0.55; }
  57%  { transform: scale(1.3); opacity: 0.45; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* ===== 场景通用 ===== */
.scene {
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* 全屏背景 — 视差由 GSAP 驱动 */
.bg-full {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.bg-full img {
  /* 150vh = 100vh 场景 + 50vh 上下缓冲，滚动无白边 */
  width: 100vw;
  height: 150vh;
  max-width: none;
  margin-top: -25vh;
  object-fit: cover;
  object-position: center top;
  will-change: transform;
}


/* ================================================================
   四季第三屏统一花卉网格（全站复用，禁止各季节单独覆盖）
   ================================================================ */

/* ---- 网格容器 ---- */
.flower-grid {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  padding: 9% 5% 7% 5%;
  gap: 2% 1.5%;
}

/* ---- 单组花卉单元 ---- */
.flower-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

/* ---- 花卉配图 + 诗文 横向排布 ---- */
.flower-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* ---- ① 花名称图 ---- */
.flower-name {
  width: 22%;
  height: auto;
  object-fit: contain;
  display: block;
  margin-top: 3px;
}

/* ---- ② 主体花卉配图 ---- */
.flower-img {
  width: 50%;
  aspect-ratio: 0.85 / 1;
  object-fit: contain;
  display: block;
  filter: drop-shadow(2px 3px 5px rgba(0, 0, 0, 0.18));
}

/* ---- ③ 竖排诗文书法图 ---- */
.flower-poem {
  width: 24%;
  aspect-ratio: 0.45 / 1;
  object-fit: contain;
  display: block;
  transition: filter 0.4s ease;
  cursor: pointer;
}

/* ---- 统一 hover 动效：轻微放大 + 透明度微调 ---- */
.flower-name:hover,
.flower-img:hover,
.flower-poem:hover {
  transform: scale(1.03);
  opacity: 0.88;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---- 统一呼吸动画（不受滚动控制） ---- */
.flower-img {
  animation: flower-breathe 4.5s ease-in-out infinite;
}
.flower-cell:nth-child(even) .flower-img { animation-delay: -1.2s; }
.flower-cell:nth-child(3n)  .flower-img { animation-delay: -2.8s; }
@keyframes flower-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

/* 进入视口动画由各季节 JS 中的 GSAP ScrollTrigger 统一控制 */

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .flower-grid { padding: 11% 4% 9% 4%; }
  .flower-img  { width: 60%; }
  .flower-poem { width: 30%; }
  .flower-name { width: 28%; }
}
@media (max-width: 480px) {
  .flower-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    padding: 14% 4% 10% 4%;
    gap: 3% 3%;
  }
  .flower-img  { width: 50%; }
  .flower-poem { width: 32%; }
  .flower-name { width: 30%; }
}


/* ================================================================
   花卉诗文悬浮荧光 + 弹窗卡片
   ================================================================ */

/* ---- 暗色蒙版 — 不阻断滚动 ---- */
.poem-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(20, 18, 16, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.poem-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---- 卡片容器 — 从点击位置缩放浮现 ---- */
.poem-card {
  position: fixed;
  z-index: 901;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: min(500px, 90vw);
  max-height: 84vh;
  overflow-y: auto;
  pointer-events: none;
  opacity: 0;

  /* 宣纸底色 + 淡墨描边 */
  background: #F6F2E6;
  border: 1px solid rgba(80, 60, 40, 0.13);
  border-radius: 14px;
  box-shadow: 0 3px 20px rgba(0, 0, 0, 0.08),
              0 1px 3px rgba(0, 0, 0, 0.04);

  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, opacity;

  /* 宣纸纹理叠加 */
  background-image: url('../assets/images/normal/宣纸纹理素材.webp');
  background-size: cover;
  background-blend-mode: multiply;
}
.poem-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* 卡片内部 */
.poem-card-inner {
  padding: 26px 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ① 花卉明信片素材图 */
.poem-card-postcard {
  width: auto;
  height: 200px;
  max-width: 85%;
  display: block;
  border-radius: 6px;
  object-fit: contain;
}

/* ② 小标题 */
.poem-card-label {
  font-family: 'SimSun', 'Noto Serif SC', serif;
  font-size: 14px;
  color: #6b5a4a;
  letter-spacing: 2px;
  align-self: flex-start;
  margin-top: 2px;
}

/* ③ 可复制诗文原文 */
.poem-card-text {
  font-family: 'SimSun', 'Noto Serif SC', serif;
  font-size: 15px;
  line-height: 1.9;
  color: #3a2e24;
  text-align: justify;
  align-self: stretch;
  cursor: text;
  user-select: text;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.015);
  border-radius: 4px;
}

/* ④ 诗文释义 */
.poem-card-annotation {
  font-family: 'SimSun', 'Noto Serif SC', serif;
  font-size: 13.5px;
  line-height: 1.85;
  color: #5a4a3a;
  text-align: justify;
  align-self: stretch;
  cursor: text;
  user-select: text;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.012);
  border-radius: 4px;
}

/* 底部按钮组 */
.poem-card-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}
.poem-card-btn {
  font-family: 'SimSun', 'Noto Serif SC', serif;
  font-size: 13px;
  padding: 7px 18px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid rgba(80, 60, 40, 0.16);
  background: rgba(250, 248, 243, 0.75);
  color: #4a3a2a;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.poem-card-btn:hover {
  background: rgba(80, 60, 40, 0.05);
  border-color: rgba(80, 60, 40, 0.28);
  transform: scale(1.05);
}
.poem-card-btn:active {
  transform: scale(0.96);
}

/* 复制成功 Toast */
.poem-toast {
  position: fixed;
  z-index: 999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  pointer-events: none;
  opacity: 0;
  font-family: 'SimSun', 'Noto Serif SC', serif;
  font-size: 14px;
  color: #fff;
  background: rgba(60, 45, 30, 0.80);
  padding: 10px 24px;
  border-radius: 6px;
  letter-spacing: 2px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.poem-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}


/* ================================================================
   第四屏统一布局：关于我们（全站四季节共用）
   ================================================================ */

/* ---- 正文段落文字 — 画面上半区域 ---- */
.about-intro {
  position: absolute;
  z-index: 2;
  top: 12%;
  left: 22%;
  right: 8%;
  pointer-events: none;
}
.about-intro img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- 中部 LOGO + 关于我们 ---- */
.about-logo {
  position: absolute;
  z-index: 2;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.about-logo-img {
  width: 80px;
  height: auto;
  display: block;
}
.about-logo-text {
  width: 90px;
  height: auto;
  display: block;
}

/* ---- 底部通栏页脚 ---- */
.about-footer {
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.about-footer > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.about-copyright {
  position: relative;
  z-index: 1;
}
.about-copyright img {
  height: 16px;
  width: auto;
  display: block;
}

/* 响应式 */
@media (max-width: 768px) {
  .about-intro {
    top: 10%;
    left: 26%;
    right: 6%;
  }
  .about-logo-img { width: 60px; }
  .about-logo-text { width: 70px; }
}
@media (max-width: 480px) {
  .about-intro {
    top: 8%;
    left: 4%;
    right: 4%;
  }
  .about-logo-img { width: 50px; }
  .about-logo-text { width: 60px; }
}
