body {
  margin: 0;
  background: #0a0a0a;
  color: white;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

/* 入口页 */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  letter-spacing: 2px;
}

.enter {
  opacity: 0.5;
  cursor: pointer;
}

/* 流动层 */
.flow {
  height: 200vh;
  position: relative;
}

.layer {
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, #1a3a2a, transparent);
  opacity: 0.4;
  filter: blur(80px);
  transform: translateY(0);
}

.layer.slow {
  opacity: 0.2;
}

/* 作品 */
.gallery {
  padding: 100px 20px;
  height: auto;        /* 👈 关键 */
  overflow: visible;
}

.art {
  margin: 150px 0;
  height: auto;        
  overflow: visible;  
  transform: none;    
}
.art img {
  width: 90%;
  max-width: 600px;
  height: auto;   /* 👈 必须 */
  display: block;
  margin: auto;
}

.art.show {
  opacity: 1;
  transform: translateY(0);
}

.info {
  margin-top: 20px;
  text-align: center;
  color: #ddd;

  opacity: 0;
  transform: translateY(20px);
  transition: all 1.2s ease;
}

.art.show .info {
  opacity: 1;
  transform: translateY(0);
}

.cn {
  font-size: 14px;
  letter-spacing: 2px;

  opacity: 1;        
  color: #444;      
}

.meta {
  font-size: 12px;
  opacity: 0.4;
}

body {
  opacity: 1;
}

body.loaded {
  opacity: 1;
}

.diary {
  max-width: 500px;
  margin: 200px auto;
  line-height: 2;
  color: #bbb;
}

.nav {
  position: absolute;
  bottom: 60px;
  width: 100%;
}

.nav a {
  position: absolute;
  color: #aaa;
  text-decoration: none;
  font-size: 18px;
  transition: all 0.4s ease;
}

/* Atmosphere（左边） */
.nav a:first-child {
  left: 40px;
  font-family: sans-serif;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* Fragments（右边） */
.nav a:last-child {
  right: 40px;
  font-family: serif;
  letter-spacing: 1px;
  font-style: italic;
}

/* hover效果 */
.nav a:hover {
  opacity: 1;
  transform: translateY(-5px);
}

.nav a:first-child {
  letter-spacing: 6px;
}

.nav a:last-child {
  font-style: italic;
  opacity: 0.7;
}

body {
  font-family: 'Inter', sans-serif;
}

/* 日记 */
.diary {
  font-family: 'Playfair Display', serif;
}

/* 标题 */
h1, h2 {
  font-family: 'Playfair Display', serif;
}

.back {
  position: fixed;
  top: 30px;
  left: 30px;

  font-size: 13px;
  letter-spacing: 3px;

  color: #aaa;
  text-decoration: none;

  opacity: 0.4;
  transition: all 0.4s ease;

  z-index: 999;
}

.back::before {
  content: "← ";
}

.back:hover {
  opacity: 1;
  transform: translateX(-4px);
}

body.home {
  background: #000;
}

body.home::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("https://www.transparenttextures.com/patterns/noise.png");
  opacity: 0.05;
  pointer-events: none;
}

body.fade-out {
  opacity: 0;
  transition: opacity 1s ease;
}

.ripple {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);

  transform: scale(0);
  pointer-events: none;
}

.ripple {
  background: rgba(255,255,255,0.05);
  filter: blur(10px);
}

.light {
  position: fixed;
  inset: 0;
  pointer-events: none;

  background: radial-gradient(circle at center,
    rgba(255,255,255,0.15),
    transparent 60%
  );

  filter: blur(60px);
  mix-blend-mode: screen;

  z-index: 0;
}

.back {
  pointer-events: auto;
}

.timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 150px;
}

.year {
  font-size: 32px;
  margin: 30px 0;

  text-decoration: none;
  color: #aaa;

  letter-spacing: 4px;

  opacity: 0.3;
  transition: all 0.4s ease;
}

.year:hover {
  opacity: 1;
  transform: translateY(-5px) scale(1.1);
}

body.fade-out {
  opacity: 0;
  background: #000;
  transition: opacity 1s ease;
}

.diary-page {
  background: #000;
  color: #ccc;
}

.diary {
  max-width: 600px;
  margin: 140px auto;
}

.entry {
  text-align: center;
  transform: translateY(-20px);
}

.entry.show {
  opacity: 1;
  transform: translateY(0);
}

.date {
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0.4;
  margin-bottom: 10px;
}

.text {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
}

.year-title {
  text-align: center;
  font-size: 40px;
  letter-spacing: 6px;
  margin-top: 120px;
  margin-bottom: 80px;

  opacity: 1;         
  color: #111;        
}

.year-intro {
  max-width: 500px;
  margin: 60px auto;
  text-align: center;

  line-height: 2;
  color: #bbb;

  opacity: 0;
  transform: translateY(20px);
  transition: all 1.2s ease;
}

.year-intro.show {
  opacity: 1;
  transform: translateY(0);
}

.atmosphere-page {
  background: #000;
  color: #fff;
}

.page-title {
  text-align: center;
  font-size: 42px;
  letter-spacing: 10px;
  margin-top: 160px;
  margin-bottom: 120;
  opacity: 0.8;
}

.mediums {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.medium {
  font-size: 28px;
  letter-spacing: 6px;

  text-decoration: none;
  color: #aaa;

  transition: all 0.4s ease;
}

.medium:hover {
  color: #fff;
  transform: scale(1.2);
  letter-spacing: 10px;
}

.medium:nth-child(1) { opacity: 1; }
.medium:nth-child(2) { opacity: 0.7; }
.medium:nth-child(3) { opacity: 0.5; }
.medium:nth-child(4) { opacity: 0.3; }

.gallery-page {
  background: #000;
  color: #fff;
}

.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 100px;
  margin-top: 100px;
}

.art img {
  width: 85%;
  max-width: 600px;
  display: block;

  transition: all 0.8s ease;
}

.art {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1.2s ease;
}

.art.show {
  opacity: 1;
  transform: translateY(0);
}

.art img:hover {
  transform: scale(1.03);
  opacity: 0.9;
}

body {
  font-family: 'Inter', sans-serif;
}

.page-title {
  font-family: 'Playfair Display', serif;
}

.medium {
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
}

.info, .text {
  font-family: 'Playfair Display', serif;
}

.page-title {
  margin-top: 200px;
  margin-bottom: 100px;
}

.gallery {
  margin-top: 30px;
}

.flow {
  height: 50vh;
}

.about-page {
  background: #000;
  color: #fff;
}

.about-text {
  max-width: 500px;
  text-align: center;
  line-height: 2;
  color: #ccc;
}

.about-text .cn {
  opacity: 0.5;
  letter-spacing: 2px;
}

.portal {
  display: flex;
  justify-content: center;
  gap: 80px;
}

.portal-link {
  text-decoration: none;
  color: #aaa;
  font-size: 20px;
  letter-spacing: 4px;

  transition: all 0.4s ease;
}

.portal-link:hover {
  color: #fff;
  transform: translateY(-4px);
}

.about-text.show {
  opacity: 1;
  transform: translateY(0);
}

.portal-link {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  letter-spacing: 1px;
  text-decoration: none;
}

.portal-link:nth-child(1) {
  font-weight: 400;
}

.portal-link:nth-child(2) {
  font-weight: 300;
}

.portal-link:hover {
  opacity: 0.6;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  background: rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(6);
    opacity: 0;
  }
}

.side-nav {
  position: fixed;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);

  display: flex;
  flex-direction: column;
  gap: 20px;

  z-index: 1000;
}

.side-nav a {
  text-decoration: none;
  color: #888;
  font-size: 12px;
  letter-spacing: 2px;

  transition: all 0.3s ease;
}

.side-nav a:hover {
  color: #fff;
  transform: translateX(5px);
}

html {
  scroll-behavior: smooth;
}

.side-nav a {
  opacity: 0.4;
}

.side-nav a:hover {
  opacity: 1;
}

.art {
  scroll-margin-top: 20vh;
}

.about-page {
  background: #000;
  color: #fff;
  position: relative;
  z-index: 1; 
}

/* about */
/* 纸质纹理 */
.about-page::before {
  content: "";
  position: fixed;
  inset: 0;

  background: url("https://www.transparenttextures.com/patterns/paper.png");

  opacity: 0.15;
  mix-blend-mode: soft-light;

  pointer-events: none;
  z-index: 0; /* 在内容下面 */
}

.sketch-page .gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 80px 80px;

  max-width: 1000px;
  margin: 100px auto;
}

.sketch-page .art img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .sketch-page .gallery {
    grid-template-columns: 1fr;
  }
}

.container {
  width: 80%;
  margin: 0 auto;
}

.row {
  display: grid;
  grid-template-columns: 2fr 1fr; /* 英文2/3，中文1/3 */
  gap: 40px;
  margin-bottom: 28px;
}

.year-title {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  margin: 120px 0 80px;
  text-align: center;

  color: #fff;   /* ❗关键 */
  letter-spacing: 6px;
}

.diary-page {
  background: #000;
  color: #ccc;
}

.row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.diary-page .row .en {
  font-family: 'Inter', sans-serif;
  color: #e5e5e5;
  font-size: 15px;
  line-height: 1.8;
}

.diary-page .row .cn {
  font-family: 'Noto Serif SC', serif;
  color: #aaa;
  font-size: 14px;
  line-height: 1.9;
}

.hero {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.5s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-out {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.work {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease;
}

.work.show {
  opacity: 1;
  transform: translateY(0);
}

.work img {
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.work:hover img {
  transform: scale(1.03);
  opacity: 0.9;
}

body {
  background: #0a0a0a; /* 纯底色 */
}

/* 新建一个背景层 */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;

  background: linear-gradient(
    120deg,
    #0a0a0a,
    #0d1511,
    #13241a,
    #0d1511,
    #0a0a0a
  );

  background-size: 200% 200%;
  animation: flow 60s linear infinite;
}

@keyframes flow {
  0% {
    background-position: 0% 40%;
  }
  100% {
    background-position: 100% 60%;
  }
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle at 50% 50%,
    rgba(30, 70, 50, 0.2),
    transparent 70%
  );

  animation: breathe 12s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.05);
  }
}

.text {
  animation: textBreath 8s ease-in-out infinite;
}

@keyframes textBreath {
  0%, 100% {
    opacity: 0.5;
    transform: translateY(0px);
  }
  50% {
    opacity: 1;
    transform: translateY(-10px);
  }
}

.label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 14px;
}

.content.zh {
  font-size: 17px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 10px;
}

.content.en {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-links {
  margin: 100px 0;
  text-align: center;
}

.nav-links a {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 40px;
  text-decoration: none;
  transition: all 0.4s ease;
}

.nav-links a:hover {
  opacity: 0.6;
}

/* about页面排版 */
.about-info {
  max-width: 620px;
  padding: 0 24px;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1.5s ease forwards;
}

.about-layout {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.about-top {
  transform: translateY(-40px);
  text-align: center;
}

.about-bottom {
  transform: translateY(40px);
}

/* 页面整体布局 */
.about-layout {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  transform: translateY(60px);
}

/* 上方 intro */
.about-top {
  transform: translateY(-40px);
  text-align: center;
  opacity: 1;
}

.about-top p {
  margin: 4px 0;
  color: rgba(255,255,255,0.7);
}

.about-top .cn {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 2px;
}

/* 中间导航（视觉中心） */
.about-center {
  margin: 0;  /* 不用 margin-top，靠 flex 控制 */
}

.nav-links a {
  font-family: 'Cormorant Garamond', serif;  /* 优雅字体 */
  font-size: 28px;
  letter-spacing: 2px;

  color: #fff;
  margin: 0 60px;
  text-decoration: none;

  transition: all 0.4s ease;
}

.about-page .nav-muted {
  color: rgba(255,255,255,0.45);
  font-weight: 400;
  letter-spacing: 2.2px;
  font-style: italic;
  transform: translateY(-0.5px);
}

.nav-links a:hover {
  opacity: 0.8;
  transform: translateY(-5px) scale(1.05);
}

.nav-links a:first-child {
  font-weight: 500;
}

.nav-links a:last-child {
  font-style: italic;
  opacity: 0.8;
}

/* 下方说明淡化 */
.about-bottom {
  transform: translateY(80px);
  max-width: 620px;
  text-align: center;
  opacity: 0.4;
}

.about-info .label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 14px;
}

.about-info .content.zh {
  white-space: nowrap;
  font-size: 15px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.about-info .content.en {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.35);
}

.about-info {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-block {
  margin-bottom: 80px;
}

.back {
  position: fixed;
  top: 30px;
  left: 30px;

  font-size: 13px;
  letter-spacing: 2px;

  color: rgba(255,255,255,0.5);
  text-decoration: none;

  transition: all 0.3s ease;
  z-index: 999;
}

.back:hover {
  color: #fff;
  transform: translateX(-3px);
}

/*页面上方导航栏内容*/
/* ===== 全局导航 ===== */
.global-nav {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(0);

  display: flex;
  align-items: center;
  gap: 20px;

  z-index: 999;

  opacity: 1;
  transition: transform 0.3s ease, opacity 0.25s ease;
  will-change: transform, opacity;
}

.global-nav.hide {
  transform: translateX(-50%) translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

/* ===== 基础按钮 ===== */
.nav-item {
  font-size: 13px;
  letter-spacing: 2px;
  text-decoration: none;

  color: rgba(255,255,255,0.5);
  transition: color 0.25s ease, transform 0.25s ease;
}


.nav-item:hover {
  color: #fff;
}

/* 当前页面 */
.nav-item.active {
  color: rgba(255,255,255,0.9);
}

/* 分隔符 */
.divider {
  color: rgba(255,255,255,0.25);
  font-size: 12px;
}

/* ===== 下拉结构 ===== */
.nav-group {
  position: relative;
}

/* ===== 下拉菜单 ===== */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  display: flex;
  flex-direction: column;

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.nav-group:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown {
  padding-top: 10px;
}

/* ===== 下拉链接 ===== */
.dropdown a {
  display: block;

  font-size: 12px;
  letter-spacing: 2px;
  text-decoration: none;

  color: rgba(255,255,255,0.6);

  transition: color 0.2s ease, transform 0.2s ease;
}

.dropdown a:hover {
  color: #fff;
  transform: translateX(4px);
}

.nav-group {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

/*about页面解释*/
.section-intro {
  max-width: 700px;
  margin: 40px auto;
  text-align: center;
  line-height: 1.6;
  font-size: 15px;
  opacity: 0.85;
}

.section-intro p {
  margin: 10px 0;
}

.section-intro .cn {
  font-size: 14px;
  opacity: 0.7;
}

/* ===== 手机适配 ===== */
@media (max-width: 768px) {

  /* ===== 全局 ===== */
  body {
    padding: 0 12px;
  }

  /* ===== Hero ===== */
  .hero {
    padding: 0 20px;
    text-align: center;
  }

  /* ===== 标题 ===== */
  h1, .page-title {
    font-size: 26px;
    letter-spacing: 4px;
  }

  /* ===== 导航（底部左右） ===== */
  .nav {
    position: static;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
  }

  .nav a {
    position: static;
    font-size: 14px;
  }

  /* ===== 全局顶部导航 ===== */
  .global-nav {
    top: 15px;
    gap: 10px;
  }

  .nav-item {
    font-size: 11px;
    letter-spacing: 1px;
  }

  /* ===== 作品间距 ===== */
  .art {
    margin: 80px 0;
  }

  .art img {
    width: 100%;
  }

  /* ===== info文字 ===== */
  .info {
    font-size: 13px;
    padding: 0 10px;
  }

  /* ===== diary 双列 → 单列 ===== */
  .row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* ===== diary文字 ===== */
  .text {
    font-size: 16px;
  }

@media (max-width: 768px) {

  /* ===== about 页面整体取消100vh居中 ===== */
  .about-layout {
    height: auto;
    padding: 120px 20px 60px;
    transform: none;
    display: block;
  }

  /* ===== 上部介绍 ===== */
  .about-top {
    transform: none;
    text-align: center;
    margin-bottom: 40px;
  }

  .about-top p {
    font-size: 14px;
    line-height: 1.8;
  }

  .about-top .cn {
    font-size: 12px;
    opacity: 0.5;
  }

  /* ===== 中间导航（最重要改动） ===== */
  .nav-links {
    margin: 60px 0;
    text-align: center;
  }

  .nav-links a {
    display: block;     
    margin: 16px 0;
    font-size: 18px;
    letter-spacing: 2px;
  }

  /* ===== 下方说明 ===== */
  .about-bottom {
    transform: none;
    margin-top: 60px;
    padding: 0 10px;
    opacity: 0.6;
  }

  .about-info {
    max-width: 100%;
  }

  .about-info .content.zh {
    white-space: normal; /* ❗取消一行强制 */
    font-size: 14px;
  }

  .about-info .content.en {
    font-size: 13px;
    line-height: 1.7;
  }

}

  /* ===== portal（两个入口） ===== */
  .portal {
    flex-direction: column;
    gap: 20px;
  }

  /* ===== side-nav 直接隐藏 ===== */
  .side-nav {
    display: none;
  }

  /* ===== timeline 年份 ===== */
  .year {
    font-size: 22px;
  }

  /* ===== mediums ===== */
  .medium {
    font-size: 20px;
    letter-spacing: 3px;
  }

}

@media (max-width: 768px) {

  .dropdown a {
    padding: 8px 0;
  }

  .dropdown a + a {
    margin-top: 10px;
  }

}

/* resume */
/* ===== resume整体留白 + 分栏 ===== */
.resume-layout {
  display: flex;
  gap: 60px;

  max-width: 1100px;
  margin: 140px auto;
  padding: 0 40px;   /* ✔ 页面四周留白 */
}

/* 左图 */
.resume-left {
  flex: 1;
}

.resume-left img {
  width: 100%;
  height: auto;
  display: block;
}

/* 右内容 */
.resume-right {
  flex: 1.2;
}

/* 每块间距 */
.resume-block {
  margin-bottom: 40px;
}

/* 标签统一 */
.label {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.4;
  margin-bottom: 10px;
}

/* 中文 / 英文 */
.content.zh {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255,255,255,0.8);
}

.content.en {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
}

/* ===== resume手机适配 ===== */
@media (max-width: 768px) {
  .resume-layout {
    flex-direction: column;
    padding: 0 20px;
    margin: 100px auto;
  }

  .resume-left {
    margin-bottom: 40px;
  }
}

/* 整体适配改进 */
@media (max-width: 768px) {

  body {
    padding: 0 16px;
  }

  /* 标题整体收缩 */
  h1, .page-title {
    font-size: 24px;
    letter-spacing: 3px;
  }

  /* 全局间距收缩 */
  .section,
  .about-top,
  .about-bottom,
  .nav-links {
    margin: 40px 0;
  }
}

/* ===== 图片查看器 ===== */
.viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.4s ease;

  z-index: 9999;
}

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

.viewer img {
  max-width: 85%;
  max-height: 85%;

  user-select: none;
  cursor: grab;

  transform: scale(0.95);
  transition:
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.viewer.slide-left {
  animation: slideLeft 0.55s ease;
}

.viewer.slide-right {
  animation: slideRight 0.55s ease;
}

@keyframes slideLeft {
  0% {
    opacity: 0.4;
    transform: translateX(40px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideRight {
  0% {
    opacity: 0.4;
    transform: translateX(-40px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.viewer.active img {
  transform: scale(1);
}

/* 图片点击暗示 */
.art img {
  cursor: zoom-in;
}

/* 图片放大后左右切换 */
.viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;

  z-index: 9999;
}

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

/* 左右按钮 */
.viewer-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  background: none;
  border: none;

  font-size: 40px;
  color: rgba(255,255,255,0.6);

  cursor: pointer;
  transition: 0.3s ease;
}

.viewer-btn:hover {
  color: #fff;
}

.viewer-btn.left {
  left: 30px;
}

.viewer-btn.right {
  right: 30px;
}

/* 手机端隐藏按钮 */
@media (max-width: 768px) {
  .viewer-btn {
    display: none;
  }
}

/* 锁定body滚动 */
body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

.viewer {
  touch-action: none;
}

/* 图片局部放大 */
.viewer img.zoomed {
  transform: scale(2);
  cursor: zoom-out;
  transition: transform 0.3s ease;
}

.viewer-track {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;

  transform: translateX(0);
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.viewer-track img {
  max-width: 85%;
  max-height: 85%;
  user-select: none;
  pointer-events: none;
}

.viewer-frame {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  height: 100%;

  overflow: hidden;
}
