/* =========================================
   1. GLOBAL SETTINGS (保留 GPT 的变量)
========================================= */
:root {
  --ink: #20231d;
  --cream: #f4e7cb;
  --gold: #d9b875;
  --muted: rgba(244, 231, 203, .78);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.mucha-theme {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
}
.gallery {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: #1a1c16; /* 深色底 */
}

/* =========================================
   2. MOSAIC WALL (三张图拼贴的背景墙)
========================================= */
.wall-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  /* 分成不规则的三列，模仿画廊墙面 */
  grid-template-columns: 1fr 2.5fr 1fr;
  gap: 10px;
  padding: 10px;
  background: #111;
}
.wall-tile {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(216, 192, 143, .3);
  box-shadow: inset 0 0 50px rgba(0,0,0,0);
}
.wall-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9) brightness(.99) blur(0.5px); /* 模糊变暗，绝不抢戏 */
}

/* 遮罩层：防止文字看不清 */
/* 替换掉原来的 .ambient-overlay */
.ambient-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  
  /* 核心：用多重背景做剧场打光 */
  background: 
    /* 1. 顶部一束暖光打下来 (颜色调成了复古的淡金黄色) */
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 235, 180, 0.15), transparent 70%),
    /* 2. 屏幕中间的聚光灯，照亮中心人物 */
    radial-gradient(circle at 50% 55%, transparent 20%, rgba(14, 15, 12, 0.6) 80%),
    /* 3. 四周的暗角 (Vignette)，让视线聚焦 */
    linear-gradient(to top, rgba(10, 10, 8, 0.8) 0%, transparent 40%);
    
  /* 让光照更有电影感 */
  mix-blend-mode: multiply; 
}

/* =========================================
   3. COLLAGE ARTWORK (超大人物，疯狂挤压)
========================================= */
.artwork {
  position: absolute;
  margin: 0;
  z-index: 3;
  animation: reveal 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.artwork img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* 超级深邃的立体阴影 */
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.7));
  transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .6s ease;
  pointer-events: none;
}

/* 左侧：尺寸极大，向内倾斜 */
.artwork-left {
  left: 8%;
  bottom: 0%;
  width: 35vw;
  height: 100vh;
  z-index: 3;
  animation-delay: .2s;
}
.artwork-left img { transform: rotate(-4deg); }

/* 中间：绝对巨无霸，顶天立地 */
.artwork-center {
  left: 30%;
  top: 1%;
  width: 40vw;
  height: 115vh; /* 故意超出屏幕底部！ */
  z-index: 5;
  animation-delay: .0s;
}
.artwork-center img {
  filter: drop-shadow(0 25px 40px rgba(0,0,0,0.8))
          drop-shadow(0 0 15px 40px rgba(255, 220, 150, 0.15));
}

/* 右侧：尺寸极大，向内倾斜 */
.artwork-right {
  right: 8%;
  bottom: 2%;
  width: 35vw;
  height: 100vh;
  z-index: 4; /* 注意：低于文字层的 z-index: 50 */
  animation-delay: .2s;
}
.artwork-right img { transform: rotate(3deg); }

/* 鼠标交互 */
.artwork:hover { z-index: 10; }
.artwork:hover img {
  filter: drop-shadow(0 30px 40px rgba(0,0,0,1)) brightness(1.1);
}

/* =========================================
   4. FLOATING DECORATIVE CUT-OUTS
========================================= */
.fragment {
  position: absolute;
  z-index: 8;
  width: 20vw;
  pointer-events: none;
  filter: drop-shadow(0 15px 20px rgba(0,0,0,0.6));
}
.fragment img { display: block; width: 100%; height: auto; }

.frag-left { 
  left: -1.5%;   /* 改左右：正数往右，负数往左出屏幕 */
  top: 50%;    /* 改上下：数字越小越靠上 */
  animation: float-left 6s ease-in-out infinite alternate; 
}

/* 右边那个 */
.frag-right { 
  right: -7%;  /* 改左右 */
  top: -4%;    /* 改上下 */
  width: 25vw; /* 你可以给右边单独设置比左边稍大一点 */
  animation: float-right 7s ease-in-out infinite alternate; 
}

.frag-lili { 
  right: 0%;  /* 改左右 */
  top: 60%;    /* 改上下 */
  width: 16vw; /* 你可以给右边单独设置比左边稍大一点 */
  filter: drop-shadow(0 15px 20px rgba(0,0,0,0.6));

}
/* =========================================
   5. TYPOGRAPHY AND INTRODUCTION (修复被挡住的bug)
========================================= */
.gallery-header {
  position: absolute;
  left: 4.5%;
  top: 5%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  animation: text-reveal 1s .3s both;
}

.eyebrow {
  font-family: "Inter", sans-serif;
  font-size: .65rem;
  letter-spacing: .25em;
  color: var(--cream);
  opacity: .9;
}

/* 极细的金线 */
.header-line {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 15px 0;
}

/* 错落的高级排版 */
.header-text-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.header-text-block p {
  margin: 0;
  color: var(--gold);
  font: 0.6rem "Inter", sans-serif;
  letter-spacing: 0.2em;
}

.header-text-block h3 {
  margin: 0;
  color: rgba(244, 231, 203, 0.8);
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.1em;
}

.header-text-block .tiny-text {
  margin-top: 5px;
  font: 300 0.55rem "Inter", sans-serif;
  letter-spacing: 0.3em;
  color: rgba(205, 231, 179, 0.5);
}

.intro-panel {
  position: absolute;
  right: 9%;
  bottom: 2%;
  z-index: 999; /* 绝对最高层级，谁也别想挡住我 */
  width: min(30vw, 380px);
  padding: 24px 26px;

  background: rgba(31, 32, 25, .35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(217,184,117,.35);
  box-shadow: 0 15px 45px rgba(0,0,0,0.4);
  backdrop-filter: blur(5px);
  animation: text-reveal 1.1s .5s both;
}

/* 这个类名是我们一会用 JS 加上去的 */
.fade-out {
    animation: fadeOutAnim 0.8s ease forwards;
}

@keyframes fadeOutAnim {
    to {
        opacity: 0;
        filter: brightness(0);
        transform: scale(0.98);
    }
}


.intro-kicker { margin: 0 0 12px; color: var(--gold); font: .6rem "Inter", sans-serif; letter-spacing: .2em; }
.intro-panel h1 { margin: 0; color: var(--cream); font-size: clamp(2rem, 3.5vw, 3.5rem); font-weight: 400; line-height: .95; letter-spacing: .07em; }
.title-divider { display: flex; align-items: center; gap: 9px; margin: 17px 0; }
.title-divider span { width: 32px; height: 1px; background: var(--gold); }
.title-divider .divider-diamond { width: 5px; height: 5px; border: 1px solid var(--gold); transform: rotate(45deg); }
.intro-panel h2 { margin: 0 0 10px; color: var(--gold); font-size: clamp(1.4rem, 2vw, 2rem); font-weight: 500; }
.intro-description { margin: 0 0 13px; font-size: 1.1rem; line-height: 1.4; font-style: italic; color: var(--cream); }
.intro-detail { margin: 0; color: var(--muted); font: 300 .72rem/1.8 "Inter", sans-serif; }
.explore-link { display: inline-flex; align-items: center; gap: 15px; margin-top: 20px; padding-bottom: 7px; border-bottom: 1px solid rgba(217,184,117,.7); color: var(--cream); font: .65rem "Inter", sans-serif; letter-spacing: .15em; text-decoration: none; transition: gap .3s ease, color .3s ease; }
.explore-link:hover { gap: 23px; color: var(--gold); }
.arrow { font-size: 1rem; }

.gallery-footer {
  position: absolute;
  left: 4.5%;
  bottom: 4%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(244,231,203,.8);
  font: .6rem "Inter", sans-serif;
  letter-spacing: .2em;
  animation: text-reveal 1s .7s both;
}

.screen-frame { position: absolute; inset: 12px; z-index: 60; border: 1px solid rgba(244,231,203,.16); pointer-events: none; }

/* =========================================
   6. ANIMATIONS
========================================= */
@keyframes reveal { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes text-reveal { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes float-left { from { translate: 0 0; rotate: -4deg; } to { translate: 0 -15px; rotate: 0deg; } }
@keyframes float-right { from { translate: 0 0; rotate: 3deg; } to { translate: 0 15px; rotate: 0deg; } }

/* =========================================
   7. RESPONSIVE (移动端自动堆叠)
========================================= */
@media (max-width: 1000px) {
  .artwork-left { left: -5%; width: 50vw; }
  .artwork-center { left: 25%; width: 50vw; }
  .artwork-right { right: -5%; width: 48vw; }
  .intro-panel { right: 3%; bottom: 6%; width: 35vw; }
}
@media (max-width: 768px) {
  .gallery { height: auto; min-height: 100vh; padding-bottom: 50px; }
  .artwork { position: relative; left: auto; right: auto; top: auto; bottom: auto; margin: -40px auto 0; width: 90vw; height: auto; }
  .artwork-center { width: 95vw; z-index: 10; }
  .intro-panel { position: relative; right: auto; bottom: auto; margin: 30px 20px 0; width: auto; z-index: 50; }
  .gallery-header { top: 20px; left: 20px; }
  .fragment { display: none; }
}