header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

body {
  margin: 0;
  background-color: black;
  background-image: url("/website/resource/index/background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: repeat;

  color: rgb(255, 255, 255);
  font-family: Arial, sans-serif;
}

.page-container {
  width: 60%;
  /* 中间占70% */
  margin: 0 auto;
  /* 上下0，左右自动，居中 */
  box-sizing: border-box;
  /* 让padding不会撑大盒子 */
  overflow-wrap: break-word;
  /* 长单词/网址能断行 */
  word-wrap: break-word;
  /* 兼容性 */
}

.page-container img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}
.page-container video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}

@media (max-width: 768px) {
  .page-container {
    width: 90%;
    /* 小屏幕时候，内容更宽一点，留10%的边 */
  }
}

/*元素——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*/
.hero-icon {
  position: relative;
  /* 设置父容器为定位参考 */
  display: flex;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: visible; 
}

.hero-img {
  position: absolute;
  /* 设置子容器为定位参考 */
  z-index: 3;
  overflow: hidden;
  transform: translateX(0) scale(1.5);
  width: 100vw; 
  max-width: none;  
}

.hero-img-2 {
  position: absolute;
  /* 设置子容器为定位参考 */
  z-index: 4;
  overflow: hidden;
  transform: translateX(0) scale(1);
  width: 100vw; 
  max-width: none;  
}

.hero-video {
  position: absolute;
  /* 设置子容器为定位参考 */
  transform: scale(1.28) translate(-0.5%, 23%);
  z-index: 1;
  overflow: hidden;
}

/* 元素——————————worklist */
.works {
  width: 100%;
  margin: 0 auto;
  /* 自动左右居中 */
  padding: 0 1rem;
  /* 两边留一点点呼吸空间 */
  box-sizing: border-box;
}

.work-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.work-list a {
  flex: 0 0 calc(25% - 1rem);
  aspect-ratio: 1 / 1;  /* 保证正方形 */
  overflow: hidden;     /* 超出的图片部分裁剪掉 */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  position: relative;   /* 方便以后加浮层等特效 */
}

.work-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* 重点！裁剪并铺满 */
  display: block;        /* 消除img底部空隙 */
}

@media (max-width: 768px) {
  .work-list a {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (max-width: 480px) {
  .work-list a {
    flex: 0 0 calc(100% - 1rem);
  }
}


/* 元素——————————导航栏 */
.header-nav {
  display: flex;
  gap: 2rem; /* 两个链接之间留点间距 */
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中对齐 */
  margin-top: 1rem; /* 可以根据视觉需要加一点上边距 */
}

/* 可选：去掉 a标签下面的h2默认外边距，让间距更规整 */
.header-nav h2 {
  margin: 0;
}

/*字体——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*/
html {
  font-size: clamp(14px, 1.5vw, 20px);
}

h1 {
  font-family: Arial;
  font-size: 3.6rem;
  text-align: center;
  color: rgb(255, 255, 255);
}

h2 {
  font-family: 'Times New Roman', Times, serif;
  font-size: 2rem;
  text-align: center;
  color: rgb(255, 255, 255);
}

h3 {
  font-family: Verdana;
  font-size: 1rem;
  text-align: center;
  color: rgb(255, 255, 255);
}

/*超链接——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————*/
a {
  text-decoration: none;
  color: rgb(150, 150, 150); /* 保持和正文文字一样的颜色 */
}

/* 保证点过的链接也不会变下划线 */
a:visited {
  text-decoration: none;
  color: rgb(150, 150, 150); /* 防止变成紫色 */
}