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: no-repeat;

  color: rgb(255, 255, 255);
  font-family: Arial, sans-serif;
}

.wapper{
 display: flex;
 flex-direction: row;
 gap: 1rem;

}



.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;
}

@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: min(70rem, 100%);
  max-width: none;  
}

.hero-img-2 {
  position: absolute;
  /* 设置子容器为定位参考 */
  z-index: 4;
  overflow: hidden;
  transform: translateX(0) scale(1);
  width: min(70rem, 100%);
  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: block;       /* 这里用 block 更简单 */
  position: relative;
  text-decoration: none;
}

.work-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;            /* 关键：按最短边铺满并裁剪 */
  object-position: center center;
  display: block;
}

@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; 
}

.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(255, 255, 255); /* 保持和正文文字一样的颜色 */
}

/* 保证点过的链接也不会变下划线 */
a:visited {
  text-decoration: none;
  color: rgb(255, 255, 255); /* 防止变成紫色 */
}