*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* 强制始终显示滚动条，避免出现/消失时页面抖动 */
  overflow-y: scroll;
}

/* 从作品页带 #projects-section 返回时，先暂时隐藏页面，等脚本准备好后再显示，避免看到顶部闪一下 */
html.start-at-projects body {
  visibility: hidden;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
  background-color: #fafafa;
  color: #111111;
}

/* 中文状态下，整体字体稍微缩小，避免错位 */
body.lang-zh .nav-tab,
body.lang-zh .view-tab,
body.lang-zh .category-btn,
body.lang-zh .category-item {
  font-size: 0.95em;
}

/* 锁定滚动：首页动画未完成时 */
body.lock-scroll {
  overflow: hidden;
  height: 100vh;
}

body.unlock-scroll {
  overflow-y: auto;
  height: auto;
}

.viewport {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: #ffffff;
}

/* 当解锁滚动后，viewport 不再固定高度 */
body.unlock-scroll .viewport {
  position: relative;
  height: 100vh;
}

.frame {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #fafafa;
}

.photo-shell {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #fafafa;
  overflow: hidden;
  z-index: 2; /* 遮罩在上层，用它来"盖住"底部文字 */
}

.hero-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%);
  object-fit: cover; /* 始终按初始视口大小铺满，蒙版缩小时只是裁切更多画面 */
  display: block;
  opacity: 1;
  transition: opacity 0.7s ease-in-out; /* 0.7秒的交叉淡化时间 */
}

/* 两张图片层叠在一起 */
.hero-photo-1 {
  z-index: 1;
}

.hero-photo-2 {
  z-index: 2;
}

/* 标题文字统一样式 */
.title-text {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}

body.lang-zh .title-text {
  letter-spacing: 0.08em;
  font-size: 26px;
  font-weight: 560;
}

/* 黑色标题：在白色区域，z-index 在遮罩下面 */
.title-black {
  position: absolute;
  top: 23px;
  left: 40px;
  right: 40px;
  z-index: 1;
  pointer-events: none;
  color: #111111;
}

/* 白色标题：在 photo-shell 里面，和图片一起被裁切 */
.title-white {
  position: absolute;
  top: 23px;
  left: 40px;
  right: 40px;
  z-index: 3;
  pointer-events: none;
  color: #ffffff;
}

/* 文字公共样式：始终保持在外面白色区域，由图片遮罩来决定露出多少 */
.meta {
  position: absolute;
  font-size: 14px;
  letter-spacing: 0.02em;
  z-index: 1;
}

.site-title {
  margin: 0;
}

.meta-bottom-left {
  left: 40px;
  bottom: 24px;
  color: #111111;
}

.meta-bottom-center {
  right: 40px;
  bottom: 24px;
  transform: none;
  text-align: right;
  white-space: nowrap;
  color: #111111;
}

/* 右上角语言切换按钮 */
.language-switch {
  position: absolute;
  top: 32px;                    /* 往下移动 8px (原来 24px) */
  right: 40px;
  z-index: 1;                   /* z-index: 1，和底部文字一样，会被遮罩(z-index: 2)盖住 */
}

.lang-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #111111;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s ease;
}

.lang-btn:hover {
  opacity: 0.6;
}

/* 默认隐藏桌面端专用的中文按钮（移动端不显示） */
.lang-btn-work-desktop {
  display: none;
}

/* 默认隐藏桌面端 About 页面右上角语言切换按钮（移动端不显示） */
.lang-btn-about-desktop {
  display: none;
}

/* 默认隐藏桌面端 Works 页面右下角版权信息（移动端不显示） */
.copyright-work-desktop {
  display: none;
}

/* ========= 手机端专用：首页取消缩放遮罩，改为居中大图 ========= */
body.is-mobile .viewport {
  height: auto;
  min-height: 100vh;      /* 视觉上至少一屏高，不随地址栏滑动缩放 */
  overflow: visible;      /* 允许自然滚动，避免视口高度变化导致“放大”感 */
  display: flex;
  flex-direction: column;
}

body.is-mobile .frame {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 25px 20px 0;      /* 底部从 20px 减少到 0px，减少与下方空白 */
  min-height: 0;
}

body.is-mobile .title-black {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  padding-top: 0;
  padding-bottom: 16px;
  flex-shrink: 0;
  z-index: 10;
}

/* 手机端：隐藏首页原语言切换按钮 */
body.is-mobile .language-switch {
  display: none;
}

/* 手机端：首页右上角 Logo，向上移动5px */
body.is-mobile .top-logo {
  display: none;                /* 手机端隐藏首页右上角 logo */
}

/* 桌面端（body 标记为 is-desktop）始终隐藏手机 Logo，
   即使窗口被压缩到窄宽度也不显示 */
body.is-desktop .top-logo {
  display: none !important;
}

body.is-mobile .logo-image {
  height: 30px;
  width: auto;
  display: block;
}

/* 取消蒙版绝对定位，让图片正常排版（固定竖版比例，不随视口高度变化） */
body.is-mobile .photo-shell {
  position: relative;
  flex: 0 0 auto;              /* 不参与高度拉伸，按自身内容高度 */
  width: 100%;
  padding-top: 155%;           /* 稍微加高，让图片+箭头更接近填满首屏 */
  overflow: hidden;
  background-color: transparent;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  transform: none !important;
  transition: none !important;
}

/* 主图改为竖版裁剪，完全跟随固定比例容器，不再受滚动影响 */
body.is-mobile .hero-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity 0.7s ease-in-out;
  transform: none !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
}

/* 手机端第一张图 */
body.is-mobile .hero-photo-1 {
  opacity: 1;
  z-index: 1;
}

/* 手机端第二张图（轮播用） */
body.is-mobile .hero-photo-2 {
  display: block !important;
  opacity: 0;
  z-index: 2;
}

/* 只保留左上角黑色标题，白字标题在手机端隐藏 */
body.is-mobile .title-white {
  display: none;
}

/* 手机端去掉底部两行介绍小字 */
body.is-mobile .meta-row {
  display: none;
}

@media (max-width: 768px) {
  .title-black,
  .title-white {
    left: 20px;
    right: 20px;
  }

  .title-text {
    font-size: 22px;
  }

  .meta-bottom-left,
  .meta-bottom-right {
    bottom: 16px;
  }

  .meta-bottom-left {
    left: 20px;
  }

  .meta-bottom-right {
    right: 20px;
  }

  .meta-bottom-center {
    display: none;
  }
}

/* ========== 空白过渡区域 ========== */
.spacer-section {
  width: 100%;
  height: 80px;
  background-color: transparent;
}

/* 手机端：减少空白区域高度 20px */
body.is-mobile .spacer-section {
  display: none;  /* 手机端首页和导览页之间的空白区域不再需要，直接隐藏 */
}

body.is-desktop .spacer-section {
  height: 80px;
}

body.is-mobile .scroll-arrow {
  width: 24px;
  height: 24px;
  border-left: 2px solid #999999;
  border-bottom: 2px solid #999999;
  transform: rotate(-45deg);
  flex-shrink: 0;
  margin: 20px auto 10px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

body.is-mobile .scroll-arrow:hover {
  border-color: #666666;
}

/* 桌面端隐藏箭头 */
body.is-desktop .scroll-arrow {
  display: none;
}

/* ========== 只有标签的板块 ========== */
.tabs-only-section {
  width: 100%;
  padding: 20px 0;
  background-color: transparent;
}

.tabs-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  position: relative;                   /* 为分类下拉的绝对定位提供参考 */
}

/* 左侧导航按钮 */
.nav-tabs {
  display: flex;
  gap: 0;
}

.nav-tab {
  background: none;
  border: none;
  padding: 12px 32px 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: #999999;
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: inherit;
}

.nav-tab:hover {
  color: #111111;
}

.nav-tab.active {
  color: #111111;
}

/* 右侧视图切换按钮 */
.view-tabs {
  display: flex;
  gap: 0;
}

/* ========== 项目展示区域 ========== */
.projects-section {
  width: 100%;
  background-color: transparent;
  padding: 0 0 20px 0;
  position: relative;           /* 作为 Works 左下角中文按钮的定位容器（桌面端） */
}

.projects-container {
  display: flex;
  width: 100%;
  height: 85vh;
  max-height: 85vh;
}

/* 左侧预览区域 */
.project-preview {
  width: 30%;
  padding: 0 40px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  background-color: transparent;
}

.preview-image-wrapper {
  width: 100%;
  aspect-ratio: 3/2;
  overflow: hidden;
  background-color: #fafafa;
  position: relative;
  cursor: pointer;
}

.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  background-color: #fafafa;
}

@media (min-width: 769px) {
  .preview-image-wrapper:hover .preview-view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* 预览图右上角“View All”按钮基础样式（默认桌面端隐藏） */
.preview-view-all-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: none;
  background-color: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  cursor: pointer;
  display: none; /* 默认不显示，后面在手机端单独打开 */
  z-index: 5;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.preview-view-all-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #111111;
}

.preview-description {
  margin: 0;
  font-size: 14px;
  color: #666666;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* ========== 列表页样式 ========== */
.list-page {
  display: flex;
  padding: 40px 40px 60px;
  gap: 60px;
}

.list-image-panel {
  flex: 0 0 40%;
  max-width: 40%;
}

.list-image-wrapper {
  width: 100%;
  background-color: #fafafa;
}

.list-main-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.list-table-panel {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

/* 为 list-table-panel 添加顶部遮罩，防止滚动时内容从顶部露出 */
.list-table-panel::before {
  content: '';
  position: sticky;
  top: -1px;
  left: 0;
  right: 0;
  height: 10px;
  background-color: #fafafa;
  z-index: 10;
  display: block;
}

.project-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  table-layout: fixed;
}

.project-list-table thead {
  border-bottom: 1px solid #dddddd;
}

.project-list-table th,
.project-list-table td {
  padding: 14px 12px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-list-table th.col-year,
.project-list-table td.col-year {
  width: 20%;           /* 年份 */
}

.project-list-table th.col-title,
.project-list-table td.col-title {
  width: 30%;           /* 项目名 */
}

.project-list-table th.col-designer,
.project-list-table td.col-designer {
  width: 30%;           /* 设计方 */
}

.project-list-table th.col-location,
.project-list-table td.col-location {
  width: 20%;           /* 位置 */
}

.project-list-table tbody tr {
  border-bottom: 1px solid #eeeeee;
  cursor: pointer;
}

.project-list-table tbody tr:hover {
  background-color: #f2f2f2;
}

.project-list-link {
  color: inherit;
  text-decoration: none;
}

.project-list-link:hover {
  text-decoration: underline;
}

#project-list-body tr:first-child td {
  border-top: none;
}

/* 列表表头固定在顶部 */
.project-list-table thead th {
  position: sticky;
  top: 0;
  background-color: #fafafa;
  z-index: 1;
  box-shadow: 0 1px 0 0 #dddddd;
}

/* 为了防止滚动时内容从表头上方露出，添加顶部遮罩 */
.project-list-table::before {
  content: '';
  position: sticky;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #fafafa;
  z-index: 2;
  display: block;
}

#year-header {
  cursor: pointer;
  user-select: none;
}

#year-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
}

/* 右侧列表和列表页的滚动条更细、更淡 */
.list-table-panel::-webkit-scrollbar,
.map-list-container::-webkit-scrollbar {
  width: 6px;
}

.list-table-panel::-webkit-scrollbar-track,
.map-list-container::-webkit-scrollbar-track {
  background: transparent;
}

.list-table-panel::-webkit-scrollbar-thumb,
.map-list-container::-webkit-scrollbar-thumb {
  background-color: #d0d0d0;
  border-radius: 3px;
}

.view-tab {
  background: none;
  border: none;
  padding: 12px 12px 12px 12px;
  font-size: 15px;
  color: #999999;
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: inherit;
}

.view-tab:last-child {
  padding-right: 0;
}

.view-tab:hover {
  color: #111111;
}

.view-tab.active {
  color: #111111;
  font-weight: 500;
}

/* 项目分类下拉菜单 */
.category-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 20px;
}

.category-btn {
  background: none;
  border: none;
  padding: 12px 24px 12px 12px;
  font-size: 15px;
  color: #111111;
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: inherit;
  font-weight: 500;
  position: relative;
}

.category-btn::after {
  content: '▼';
  position: absolute;
  right: 6px;                        /* 略向右移动，避免遮挡文字 */
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #999999;
  transition: transform 0.2s ease;
}

.category-dropdown.open .category-btn::after {
  transform: translateY(-50%) rotate(180deg);
}

.category-btn:hover {
  color: #000000;
}

.category-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  display: none;
  z-index: 1000;
  margin-top: 4px;
}

.category-dropdown.open .category-menu {
  display: block;
}

.category-item {
  padding: 10px 16px;
  font-size: 14px;
  color: #333333;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.category-item:hover {
  background-color: #f5f5f5;
}

.category-item.active {
  color: #111111;
  font-weight: 500;
  background-color: #fafafa;
}

.category-item:first-child {
  border-radius: 4px 4px 0 0;
}

.category-item:last-child {
  border-radius: 0 0 4px 4px;
}

/* 右侧地图区域 */
.project-map {
  width: 70%;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  padding: 0 40px 20px 40px;
  height: 100%;
}

.map-container {
  flex: 1;
  position: relative;
  background-color: transparent;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #d0d0d0;
  height: 100%;
  width: 100%;
}

/* 地图归位按钮 - 默认隐藏，手机端显示 */
.map-reset-btn {
  display: none;
}

@media (max-width: 768px) {
  .map-reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    color: #666;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  }
  .map-reset-btn:active {
    background: #f0f0f0;
  }
}

.map-list-container {
  flex: 1;
  margin-top: 0;
  display: none; /* 默认隐藏，点击 List 时显示 */
  overflow-y: auto;
  height: 100%;
  position: relative;
}

/* 为了防止滚动时内容从列表顶部露出，添加顶部遮罩层 */
.map-list-container::before {
  content: '';
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #fafafa;
  z-index: 10;
  display: block;
}

.images-grid {
  display: none; /* 点击 Images 时显示 */
  padding: 40px 40px 60px;
  width: 100%;
  box-sizing: border-box;
  column-gap: 24px;          /* 每张图左右间距 */
  row-gap: 32px;             /* 每张图上下间距 */
  grid-template-columns: repeat(5, minmax(0, 1fr)); /* 一排 5 张图 */
  height: 85vh;              /* 和 projects-container 一样高 */
  max-height: 85vh;
  overflow-y: auto;          /* 显示不下的图通过滚动查看 */
  grid-auto-rows: max-content; /* 每一行高度由内容撑开，不压缩 */
}

/* Images 视图的滚动条样式（和列表一样窄一点） */
.images-grid::-webkit-scrollbar {
  width: 6px;
}

.images-grid::-webkit-scrollbar-track {
  background: transparent;
}

.images-grid::-webkit-scrollbar-thumb {
  background-color: #d0d0d0;
  border-radius: 3px;
}

.image-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background-color: #f0f0f0;
  aspect-ratio: 4 / 3; /* 固定缩略图比例，保持行高一致 */
  width: 100%;         /* 让图片按列宽自适应 */
}

/* Images 视图右上角“View All”按钮 —— 每张小图右上角 */
.image-card-view-all {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: none;
  background-color: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  cursor: pointer;
  display: none; /* 默认隐藏，手机端再打开 */
  z-index: 5;
  text-decoration: none;
}

.image-card-view-all:hover {
  background-color: rgba(0, 0, 0, 0.85);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease;
}

.image-card:hover img,
.image-card.active img {
  filter: brightness(0.6);
}

.image-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px 16px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
  opacity: 0;                 /* 默认不显示文字 */
  transition: opacity 0.25s ease;
}

.image-card-overlay h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.image-card-overlay p {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: 0.9;
}

/* 悬浮 / 激活时才显示文字信息 */
.image-card:hover .image-card-overlay,
.image-card.active .image-card-overlay {
  opacity: 1;
}

.noscript-seo {
  max-width: 720px;
  margin: 24px auto;
  padding: 0 20px;
  color: #111111;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#map {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* 隐藏 Mapbox 底部控件 */
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
  display: none !important;
}

.map-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d0d0d0 0%, #e8e8e8 100%);
}

/* Mapbox 地图标记样式 */
.map-marker {
  position: relative;
}

.map-marker.active {
  box-shadow: 0 4px 16px rgba(74, 108, 247, 0.8) !important;
}

/* ========== About 页面 ========== */
.about-section {
  width: 100%;
  background-color: #fafafa;
  display: none; /* 默认隐藏，点击 About 时显示 */
  padding: 0 0 20px 0;          /* 和 projects-section 保持一致 */
  position: relative;           /* 为绝对定位的子元素提供参照 */
}

.film-section {
  width: 100%;
  background-color: #fafafa;
  display: none;
  min-height: 85vh;
  padding: 0 0 20px 0;
  position: relative;
}

.film-wrapper {
  display: flex;
  gap: 36px;
  padding: 0 40px 60px 40px;
  min-height: 85vh;
  height: 85vh;
  box-sizing: border-box;
  align-items: stretch;
}

.film-list-panel {
  flex: 0 0 23%;
  min-width: 280px;
  height: 100%;
  overflow: hidden;
}

.film-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #d9d9d9;
  height: 100%;
  overflow-y: auto;
}

.film-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border: none;
  border-bottom: 1px solid #d9d9d9;
  background: transparent;
  color: #8b8b8b;
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.film-list-item:hover {
  color: #111111;
}

.film-list-item.active {
  background-color: #f2f2f2;
  color: #111111;
}

.film-list-item-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 500;
}

.film-list-item-status {
  display: none;
}

.film-player-panel {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  height: 100%;
}

.film-player-frame {
  width: 100%;
  height: 100%;
  background-color: #f2f2f2;
  overflow: hidden;
  position: relative;
  border-radius: 2px;
}

.film-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
}

.film-loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  white-space: nowrap;
}

.film-player-frame[data-loading="true"] .film-loading-indicator {
  opacity: 1;
}

.film-controls {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.42);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.film-player-frame:hover .film-controls,
.film-player-frame:focus-within .film-controls {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.film-play-btn {
  border: none;
  background: transparent;
  color: #f5f5f5;
  width: 20px;
  height: 20px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.film-play-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.film-play-icon-pause {
  display: block;
}

.film-play-icon-play {
  display: none;
}

.film-player-frame[data-paused="true"] .film-play-icon-pause {
  display: none;
}

.film-player-frame[data-paused="true"] .film-play-icon-play {
  display: block;
}

.film-volume {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.film-fullscreen-btn {
  border: none;
  background: transparent;
  color: #f5f5f5;
  width: 20px;
  height: 20px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.film-fullscreen-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.film-mute-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  color: #f5f5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.film-volume-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.film-volume-wave {
  opacity: 0;
  transition: opacity 0.2s ease;
  transform: translateY(-0.6px);
}

.film-volume-slash {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.film-volume[data-muted="false"] .film-volume-wave {
  opacity: 1;
}

.film-volume[data-muted="false"] .film-volume-slash {
  opacity: 0;
}

.film-volume-panel {
  position: absolute;
  right: -8px;
  bottom: calc(100% + 10px);
  width: 44px;
  height: 112px;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.film-volume.open .film-volume-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.film-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 82px;
  height: 16px;
  background: transparent;
  cursor: pointer;
  transform: rotate(-90deg);
}

.film-progress {
  flex: 1 1 auto;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  margin: 0;
  cursor: pointer;
}

.film-center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.film-player-frame[data-paused="true"] .film-center-play {
  opacity: 1;
  pointer-events: auto;
}

.film-center-play-icon {
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid rgba(255, 255, 255, 0.88);
  margin-left: 4px;
}

.film-progress::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.95) var(--film-progress, 0%), rgba(255, 255, 255, 0.28) var(--film-progress, 0%), rgba(255, 255, 255, 0.28) 100%);
  border-radius: 999px;
}

.film-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f5f5f5;
  margin-top: -4px;
  border: 0;
}

.film-progress::-moz-range-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.film-progress::-moz-range-progress {
  height: 2px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
}

.film-progress::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f5f5f5;
  border: 0;
}

.film-volume-slider::-webkit-slider-runnable-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.film-volume-slider {
  --film-volume-progress: 0%;
}

.film-volume-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #1f7aff 0%, #1f7aff var(--film-volume-progress, 0%), rgba(255, 255, 255, 0.28) var(--film-volume-progress, 0%), rgba(255, 255, 255, 0.28) 100%);
}

.film-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f5f5f5;
  margin-top: -5px;
  border: 0;
}

.film-volume-slider::-moz-range-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.film-volume-slider::-moz-range-progress {
  height: 2px;
  background: #1f7aff;
  border-radius: 999px;
}

.film-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f5f5f5;
  border: 0;
}

.copyright-film-desktop {
  position: absolute;
  right: 40px;
  bottom: 33px;
  font-size: 12px;
  color: #b6b6b6;
  letter-spacing: 0.01em;
}

.copyright-film-desktop p {
  margin: 0;
}

.copyright-film-desktop a {
  color: inherit;
  text-decoration: none;
}

.copyright-film-desktop a:hover {
  opacity: 0.6;
}

.about-section .about-wrapper {
  height: 85vh;                 /* 固定高度，和 projects-container 一致 */
  max-height: 85vh;
  overflow: hidden;             /* 防止整体滚动 */
  padding: 0 40px 60px 40px;    /* 底部增加内边距，为左下角语言按钮留出空间 */
  padding-right: 50px;          /* 右侧边距增加 10px (从 40px 到 50px) */
  position: relative;           /* 作为 About 左下角中文按钮的定位容器（桌面端） */
}

.about-corner-logo {
  position: absolute;
  right: 60px;
  bottom: 0;
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: 0.9;
}

.about-container {
  display: flex;
  gap: 70px;                    /* 左右两板块中间间距增加 10px (从 60px 到 70px) */
  align-items: flex-start;
  height: 100%;
  width: 100%;
}

.about-text-panel {
  flex: 1;                      /* 占满整个容器 */
  max-height: 100%;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  color: #333333;
  padding-right: 40px;
  scrollbar-width: none;        /* Firefox 隐藏滚动条 */
  -ms-overflow-style: none;     /* IE/Edge 隐藏滚动条 */
}

.about-text-panel p {
  margin: 0 0 16px;
}

.about-subheading {
  margin: 48px 0 12px;          /* 增加上边距，从 32px 改为 48px */
  padding-top: 32px;            /* 添加内边距，让文字与分割线有间距 */
  border-top: 1px solid #E0E0E0;  /* 添加浅灰色细线作为分割 */
  font-size: 16px;
  font-weight: 600;
}

.about-year-heading {
  margin: 20px 0 8px;
  font-size: 14px;
  font-weight: 600;
}

/* 桌面端 About 右侧固定人物照片 + 联系方式侧栏 */
.about-sidebar {
  flex: 0 0 500px;              /* 扩大宽度 30px (从 420px 到 450px) */
  max-width: 500px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 90px;                    /* 增加间距，让联系方式往下移动 40px (从 32px 到 72px) */
  font-size: 13px;
  color: #333333;
}

.about-sidebar-portraits {
  display: flex;
  flex-direction: row;          /* 照片在桌面端并排 */
  gap: 25px;                    /* 照片之间间距增加 5px (从 20px 到 25px) */
  align-items: flex-start;
}

.about-sidebar-portraits .about-portrait {
  margin: 0;
  flex: 1 1 0;
  max-width: 230px;             /* 限制每张照片的最大宽度，使其缩小一点点 */
}

.about-sidebar-portraits .about-portrait img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.about-sidebar-portraits .about-portrait-caption {
  margin-top: 6px;
  font-size: 13px;
  color: #555555;
}

.about-sidebar-contact {
  padding-top: 0;               /* 移除上边距（之前是 16px） */
  line-height: 1.7;
}

.about-sidebar-contact p {
  margin: 0 0 6px;
}

/* 联系方式中的社交媒体链接样式 */
.about-sidebar-contact a,
.about-contact a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.about-sidebar-contact a:hover,
.about-contact a:hover {
  opacity: 0.6;
}

/* 人物照片在文本内（桌面端隐藏，手机端显示在最上方） */
.about-portraits {
  display: none;                /* 桌面端隐藏 */
  flex-direction: row;
  gap: 20px;
  justify-content: flex-start;
  margin-bottom: 24px;
}

.about-portrait {
  flex: 0 0 auto;
  margin: 0;
}

.about-portrait img {
  display: block;
  width: 220px;
  height: auto;
  object-fit: contain;
}

.about-portrait-caption {
  margin-top: 8px;
  font-size: 13px;
  color: #555555;
  text-align: left;
}

/* 联系方式在文本内（桌面端隐藏，手机端显示在最下方） */
.about-contact {
  display: none;                /* 桌面端隐藏 */
  font-size: 13px;
  line-height: 1.8;
  color: #333333;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
}

.about-contact p {
  margin: 0 0 6px;
}

.about-text-panel::-webkit-scrollbar {
  width: 0;                     /* WebKit 隐藏滚动条 */
  height: 0;
}

.about-text-panel::-webkit-scrollbar-track {
  background: transparent;
}

.about-text-panel::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 3px;
}


/* 响应式 - 手机端布局 (≤768px) */
@media (max-width: 768px) {
  .spacer-section {
    height: 50px;
  }

  .tabs-container {
    padding: 0 20px;
  }

  .nav-tab {
    padding: 12px 16px;
    font-size: 16px;
  }

  .view-tab {
    padding: 12px 16px;
  }

  .projects-container {
    flex-direction: column;
    height: auto;
  }

  .project-preview {
    width: 100%;
    padding: 0 20px 40px 20px;
  }

  .about-section {
    padding: 0;
    background-color: #fafafa;
    height: calc(100vh - 70px);   /* 再增加 30px 可见高度（原来是 100vh - 100px） */
    overflow: hidden;             /* 防止外部滚动 */
  }

  .film-section {
    min-height: calc(100vh - 70px);
    height: calc(100vh - 70px);
    padding: 0;
    overflow: hidden;
  }

  .film-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px 24px 16px;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
  }

  .film-list-panel {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
  }

  .film-player-panel {
    order: 1;
    flex: 0 0 auto;
    height: auto;
    display: flex;
    flex-direction: column;
  }

  .film-list-item {
    padding: 14px 0;
    font-size: 14px;
    line-height: 1.35;
  }

  .film-list-item-status {
    font-size: 12px;
  }

  .film-list {
    height: 100%;
    overflow-y: auto;
  }

  .film-player-frame {
    aspect-ratio: 16 / 9;
    height: auto;
    margin: 18px 0 56px;
    overflow: visible;
  }

  .film-controls {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    padding: 8px 10px;
  }

  .film-center-play {
    width: 62px;
    height: 62px;
  }

  .film-volume-panel {
    right: -4px;
  }

  .copyright-film-desktop {
    display: none;
  }

  .lang-btn-film-desktop {
    display: none;
  }

  .about-section .about-wrapper {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;              /* 内部滚动 */
    overflow-x: hidden;
    padding: 0 16px 24px 16px;
    -webkit-overflow-scrolling: touch;  /* iOS 平滑滚动 */
    overscroll-behavior: contain;  /* 防止滚动穿透到页面级别 */
  }

  .about-container {
    flex-direction: column;
    gap: 0;
    height: auto;
    min-height: 100%;              /* 确保内容至少填满容器 */
  }

  .about-text-panel {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  /* 手机端显示人物照片和联系方式 */
  .about-portraits {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .about-portrait {
    flex: 0 0 auto;
  }

  .about-portrait img {
    width: auto;
    max-width: calc(50vw - 24px);  /* 每张图最大宽度，确保两张能并排 */
    height: auto;
  }

  .about-contact {
    display: block;
  }

  /* 移动端隐藏右侧固定侧栏，改为在文本内显示人物照片和联系方式 */
  .about-sidebar {
    display: none;
  }

  .about-corner-logo {
    display: block;
    position: static;
    width: 56px;
    height: 56px;
    margin-top: 28px;
    margin-bottom: 12px;
    margin-left: 0;
    opacity: 0.9;
  }

  .project-map {
    width: 100%;
    min-height: 60vh;
    padding: 0 20px 20px 20px;
  }

  /* 手机端下的作品区精简布局 */
  /* 给 tabs-only-section 增加下边距，为语言切换按钮和分类按钮预留空间 */
  .tabs-only-section {
    padding: 20px 0 57px 0;     /* 底部保持 57px */
  }

  /* About 模式下，减少下方绿色区域高度到 5px，并固定在顶部 */
  body.about-mode .tabs-only-section {
    position: sticky;
    top: 0;
    padding: 20px 0 5px 0;
    background-color: #fafafa;  /* 确保背景不透明，覆盖滚动内容 */
    z-index: 10;                /* 确保在内容上方 */
  }

  body.film-mode .tabs-only-section {
    position: sticky;
    top: 0;
    padding: 20px 0 5px 0;
    background-color: #fafafa;
    z-index: 10;
  }

  /* 顶部 tabs 与下方图片左右边缘对齐 */
  .tabs-container {
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    row-gap: 4px;
    position: relative;
  }

  /* 手机端标签栏中的语言切换按钮：默认在Works下方左侧 */
  .language-switch-tabs {
    position: absolute;
    top: 100%;
    left: 16px;
    margin-top: 4px;
    z-index: 10;
    display: block;            /* 手机端显示 */
  }

  .language-switch-tabs .lang-btn {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 16px;
    color: #111111;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.02em;
  }

  /* About 模式下，语言切换按钮移到右上角与 Works / About 并排 */
  body.about-mode .language-switch-tabs,
  body.film-mode .language-switch-tabs {
    position: static;
    margin-top: 0;
    margin-left: auto;
    padding-left: 12px;
  }

  body.about-mode .language-switch-tabs .lang-btn,
  body.film-mode .language-switch-tabs .lang-btn {
    padding: 9px 0;            /* 与 nav-tab 高度对齐 */
    color: #999999;            /* 与未激活的 tab 颜色一致 */
  }

  .nav-tabs {
    gap: 6px;                         /* Works / About 间距略增 */
  }

  .nav-tab {
    padding: 9px 10px 9px 0;          /* 上下稍微大一点，字也稍微大一点 */
    font-size: 16px;
  }

  .view-tabs {
    display: flex;
    flex-wrap: nowrap;                /* Map / List / Images 不换行，保持在第一行 */
    column-gap: 6px;                  /* Map / List / Images 间距略增，但仍然紧凑 */
  }

  .view-tab {
    padding: 7px 8px;
    font-size: 13px;
  }

  /* 分类下拉单独一行，靠右对齐图片右边缘 */
  .category-dropdown {
    position: absolute;               /* 从正常流中脱离，不影响第一行 */
    top: 100%;                        /* 定位在 tabs-container 第一行的下方 */
    right: 16px;                      /* 和图片右边缘对齐 */
    margin-top: 4px;
    z-index: 10;
  }

  .category-btn {
    padding: 8px 18px 8px 8px;        /* 右侧多留一点空间给三角形 */
    font-size: 14px;
  }

  .projects-container {
    height: auto;
  }

  .project-preview {
    padding: 0 16px 19px 16px;    /* padding-bottom 从 24px 减少到 19px，减少 5px */
    gap: 16px;
  }

  .preview-image-wrapper {
    aspect-ratio: 16/9;      /* 进一步降低高度，避免和分类按钮重叠 */
  }

  .preview-title {
    font-size: 18px;
  }

  .preview-description {
    font-size: 13px;
    line-height: 1.5;
  }

  .project-map {
    min-height: calc(42vh + 5px);         /* 整体减少 5px (从 10px 改为 5px) */
    padding: 0 16px 6px 16px;             /* 底部略收紧一些，减少与下方空白 */
  }

  .map-container {
    height: calc(42vh + 5px);             /* 固定高度 */
    max-height: calc(42vh + 5px);
    padding: 0;
    background-color: transparent;
  }

  .map-list-container {
    max-height: calc(42vh + 5px);         /* 整体减少 5px (从 10px 改为 5px) */
    padding: 0;                           /* 移除 padding，让滚动条紧贴右侧 */
  }

  /* 手机端列表滚动条始终可见 */
  .map-list-container::-webkit-scrollbar {
    width: 4px;
  }
  .map-list-container::-webkit-scrollbar-track {
    background: #e5e5e5;
    border-radius: 2px;
  }
  .map-list-container::-webkit-scrollbar-thumb {
    background-color: #999999;
    border-radius: 2px;
  }

  /* Images 视图高度：匹配整个 Map/List 区域（包括预览图+内容） */
  /* 预览图约为视口宽度的16:9 + 标题描述约80px + gap 35px + 内容区域(42vh + 10px) */
  /* 简化计算：让 images-grid 占据与整体相当的高度 */
  .images-grid {
    height: calc(100vh - 140px) !important;      /* 增加 20px (从 -200px 改为 -180px) */
    max-height: calc(100vh - 140px) !important;  /* 限制最大高度 */
    min-height: calc(100vh - 140px) !important;  /* 最小高度也设置，确保固定 */
    padding: 0 16px 6px 16px;             /* 与 .project-map 的 padding 完全一致 */
    box-sizing: border-box;               /* padding 计入总高度 */
    display: grid;                        /* 使用网格布局 */
    grid-template-columns: repeat(2, minmax(0, 1fr));  /* 一排 2 张图 */
    column-gap: 12px;
    row-gap: 16px;
    overflow-y: auto;                     /* 图片较多时可在该区域内部滚动 */
    align-content: start;                 /* 图片从顶部开始排列 */
  }

  /* 手机端才显示“View All”按钮 */
  .preview-view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* 手机端：仅在图片被激活（信息已展开）时，才显示小图右上角的 View All 按钮 */
  .image-card.active .image-card-view-all {
    display: inline-flex !important;  /* 强制覆盖默认的 display: none */
    align-items: center;
    justify-content: center;
  }
}

/* 桌面端隐藏标签栏中的语言切换按钮 */
@media (min-width: 769px) {
  .language-switch-tabs {
    display: none;           /* 桌面端隐藏标签栏中的语言切换按钮 */
  }

  .top-logo {
    display: none;           /* 桌面端隐藏首页右上角 logo */
  }

  /* 桌面端隐藏首页右上角旧的中文按钮 */
  .language-switch {
    display: none;
  }

  /* 桌面端调整 project-map 底部内边距，为版权信息留出空间 */
  .project-map {
    padding-bottom: 50px;        /* 从 60px 减少到 50px，让 map/list 区域更高一些 */
  }

  /* 桌面端 Works 区域左下角中文按钮 */
  .lang-btn-work-desktop {
    display: block;              /* 桌面端显示 */
    position: absolute;
    left: 40px;
    bottom: 32px;
    font-size: 14px;
    background: none;
    border: none;
    padding: 0;
    letter-spacing: 0.02em;
    color: #111111;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s ease;
    z-index: 10;
  }
  
  .lang-btn-work-desktop:hover {
    opacity: 0.6;
  }

  /* 桌面端 About 页面左下角语言切换按钮（与 Work 页面位置一致） */
  .lang-btn-about-desktop {
    display: block;              /* 桌面端显示 */
    position: absolute;
    left: 40px;                  /* 左下角，与 Work 页面一致 */
    bottom: 32px;                /* 底部距离，与 Work 页面一致 */
    font-size: 14px;
    background: none;
    border: none;
    padding: 0;
    letter-spacing: 0.02em;
    color: #111111;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s ease;
    z-index: 10;
  }
  
  .lang-btn-about-desktop:hover {
    opacity: 0.6;
  }

  .lang-btn-film-desktop {
    display: block;
    position: absolute;
    left: 40px;
    bottom: 32px;
    font-size: 14px;
    background: none;
    border: none;
    padding: 0;
    letter-spacing: 0.02em;
    color: #111111;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s ease;
    z-index: 10;
  }

  .lang-btn-film-desktop:hover {
    opacity: 0.6;
  }

  /* 桌面端 Works 页面右下角版权信息 */
  .copyright-work-desktop {
    display: block;              /* 桌面端显示 */
    position: absolute;
    right: 40px;                 /* 右下角，与右侧内边距对齐 */
    bottom: 32px;                /* 底部距离，与左下角按钮对齐 */
    font-size: 12px;
    color: #BBBBBB;              /* 颜色更浅，从 #999999 改为 #BBBBBB */
    line-height: 1.5;
    z-index: 10;
    text-align: right;
  }

  .copyright-work-desktop p {
    margin: 0;
  }

  .copyright-work-desktop a {
    color: #BBBBBB;              /* 链接颜色也更浅，从 #999999 改为 #BBBBBB */
    text-decoration: none;
    transition: color 0.2s ease; /* 从 opacity 改为 color 过渡 */
  }

  .copyright-work-desktop a:hover {
    color: #6f6f6f;              /* hover 时变深，从变浅改为变深 */
  }
}
