/* 全局样式 */
* {
    box-sizing: border-box;
}
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #000000;
    color: #e0e0e0;
    overscroll-behavior: none;
    -ms-scroll-chaining: none;
    -ms-overflow-style: none; /* IE 10+ */
    scrollbar-width: none; /* Firefox */
}
body {
    overflow: hidden;
    hanging-punctuation: first allow-end last;
    overflow-y: auto;
    overflow-x: hidden;
}
html::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
    width: 0;
    height: 0;
}
a, a:link, a:hover, a:active, a:visited {
    color: #ffffff;
    text-decoration: none;
}
/* 页头和导航栏组合样式 */
header {
    display: flex;
    justify-content: space-between;
    padding: 10px 1rem;
    z-index: 10;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    height: auto;
    align-items: flex-start;
}
header h1 {
    padding: 0;
    margin: 0;
    font-size: 1.1em;
    color: #ffffff;
    font-weight: 800;
    text-align: left;
    -webkit-touch-callout: none;
    height: 1.4rem;
    line-height: 1.4rem;
    display: block;
}
header h1 span {
    display: inline-block;
    text-transform: uppercase;
}
nav {
    height: 1.4rem;
}
nav ul {
    height: 1.4rem;
    font-size: 1.1em;
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1.4rem;
}
nav ul li {
    margin-left: 1rem;
    cursor: pointer;
}
nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease-in-out;
}
.ins-icon {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 1.15rem;
    height: 1.4rem;
    display: inline-block;
    background-image: url('ins.svg');
    background-repeat: no-repeat;
    background-position: center;
}
.page {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.page.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    position: relative;
    pointer-events: auto;
    min-height: calc(100vh - 1.4rem - 1.5px - 3.4rem);
}
/* 主体内容样式 */
.home-article {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}
.img-fullpage {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    pointer-events: none;
    filter: blur(20px);
    will-change: filter;
    transition: filter 1s ease-in-out;
    -webkit-touch-callout: none;
    z-index: 0;
}
#home-about {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    font-weight: 400;
    align-items: center;
    display: none;
    hanging-punctuation: first allow-end last;
}
#home-about p {
    margin: 0 auto;
    padding: 1em;
    width: 40rem;
    max-width: 100%;
    text-align: justify;
    line-height: 1.6;
}
#about article {
    padding: 1em;
    margin: 10rem auto;
    width: 100%;
    max-width: 47em;
    line-height: 1.6;
    box-sizing: border-box;
    z-index: 2;
}
.btn-about {
    bottom: 10vh;
    position: absolute;
    text-align: center;
    font-weight: 300;
    line-height: 1;
    width: 500px;
    left: 50%;
    margin-left: -250px;
    cursor: pointer;
    user-select: none;
    z-index: 5;
}
#qanda {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 3em;
    overflow-y: auto;
}
#qanda article {
    max-width: 45em;
}
#qanda img {
    margin-top: 6.2em;
    -webkit-touch-callout: none;
    max-width: 100vw;
    max-height: 100vw;
    pointer-events: none;
}
#contact {
    text-align: center;
    width: 100%;
}
#contact article {
    margin: 0 auto;
}
section {
    align-items: center;
    align-content: center;
}
article {
    padding: 1em;
    margin-left: 3em;
}
main {
    display: flex;
    justify-content: center;
}
/* 图片样式 */
main .img-standard {
    width: 500px;
    height: 500px;
    max-width: 100vw;
    max-height: 100vw;
    -webkit-touch-callout: none;
    pointer-events: none;
}
h2 {
    font-size: 1.6em;
    color: #ffffff; /* 白色标题 */
    margin-top: 0; /* 去除上边距 */
    margin-bottom: 20px;
    font-weight: 300;
}
h3 {
    font-size: 1.5em;
    color: #cccccc; /* 浅灰色标题 */
    margin-top: 20px;
    margin-bottom: 15px;
    font-weight: 400;
}
/* 段落和列表样式 */
p, ul {
    font-size: 1em;
    line-height: 1.8;
    margin-bottom: 20px;
}
ul {
    padding-left: 20px;
}
li {
    margin-bottom: 10px;
}
/* Q&A部分样式 */
.qa-item {
    margin-bottom: 5em;
}
.qa-item h3 {
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 10px;
    font-weight: 600;
}
.qa-item p {
    font-size: 1rem;
    line-height: 1.8;
    color: #cccccc; /* 浅灰色文字 */
}
/* 联系方式部分样式 */
#contact article {
    padding: 1em;
    margin: 8rem auto 6rem auto;
    width: 100%;
    max-width: 47em;
    line-height: 1.6;
    box-sizing: border-box;
    z-index: 2;
}
#contact #qrcode {
    width: 300px;
    height: auto;
}
#contact p {
    font-size: 1.1em;
    text-align: center;
    margin-top: 10px;
}
#contact a {
    color: #ffffff;
    text-decoration: none;
}
#gallery {
    width: 100%;
    flex-wrap: wrap;
    padding-top: 42px;
}
.work {
    width: calc(100% / 6);
    aspect-ratio: 1;
    background-size: cover;
    border: 0.01px solid hsla(0, 0%, 0%, 0.3);
    filter: brightness(var(--brightness, 1));
    transition: filter 0.6s ease;
    will-change: filter; /* 优化性能 */
    cursor: pointer;
}
.work:hover {
    filter: brightness(1);
}
.lazyloading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(1px);
    z-index: 1000;
    pointer-events: none;
    transition: filter 0.8s ease;
}
/* 页脚样式 */
footer {
    padding: 2rem;
    opacity: 0.7;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: #e0e0e0;
}
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}
#lightbox.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-content {
    position: absolute; /* 让两个图片内容重叠 */
    max-width: 90%;
    max-height: 90%;
    background-size: cover;
    background-position: center;
    aspect-ratio: 1;
    width: 82vmin;
    /* border: 0.2px solid hsla(0, 0%, 100%, 0.1); */
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none; /* 避免阻止点击事件 */
}
.lightbox-content.active {
    opacity: 1;
    pointer-events: auto; /* 当前激活的可交互 */
}
.lightbox-arrow {
    position: absolute;
    width: calc(40vmin + 7%);
    display: block;
    font-size: 2.3rem;
    color: white;
    cursor: pointer;
    user-select: none;
    z-index: 1001;
    transition: 0.3s;
    opacity: 0.6;
}
.lightbox-arrow:hover {
    opacity: 1;
    text-shadow: 0 0 30px #fff;
}
#lightbox-prev {
    text-align: left;
    margin-left: -50%;
}
#lightbox-next {
    text-align: right;
    margin-left: 50%;
}

/* 遮罩：黑色半透明 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85); /* 黑色半透明 */
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.show {
  opacity: 1;
}
.overlay.hide {
    pointer-events: none;
    opacity: 0;
}

/* 弹窗 */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background-color: rgba(0,0,0,0.95);
  color: #f5f5f5;
  padding: 2rem 3rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  text-align: center;
  max-width: 560px;
  width: 90%;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}


/* 内容文字 */
.popup p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
}

/* 邮箱输入表单 */
#subscribe-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

/* 统一 input 和 button 高度 */
#subscribe-form input[type="email"],
#subscribe-form button {
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  line-height: 1; 
  border-radius: 8px;
  border: none;
  outline: none;
  box-sizing: border-box;
}

#subscribe-form input[type="email"] {
  flex: 1;
  background-color: #222;
  color: #f5f5f5;
}

#subscribe-form button {
  background: #333;
  color: #f5f5f5;
  cursor: pointer;
  transition: background 0.2s;
}

#subscribe-form button:hover {
  background: #555;
}

#popup-close {
  background: #333;
  color: #f5f5f5;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

#popup-close:hover {
  background: #555;
}

.popup-close.hide {
    display: none;
}

@media (max-width: 1000px) {
    #qanda {
        flex-direction: column;
        align-items: center;
        padding-top: 3em;
    }
    #qanda img {
        margin-top: 2em;
    }
    footer {
        position: inherit;
    }
    article {
        padding: 1em;
        margin-left: 0;
    }
}
@media (min-width:5120px) {
    .work {
        width: calc(100% / 11);
    }
}
@media (min-width:3840px) and (max-width:5120px) {
    .work {
        width: calc(100% / 10);
    }
}
@media (min-width:2560px) and (max-width:3840px) {
    .work {
        width: calc(100% / 9);
    }
}
@media (min-width:1920px) and (max-width:2560px) {
    .work {
        width: calc(100% / 8);
    }
}
@media (min-width:1280px) and (max-width:1920px) {
    .work {
        width: calc(100% / 7);
    }
}
@media (min-width:720px) and (max-width:1280px) {
    .work {
        width: calc(100% / 6);
    }
}
@media (min-width:580px) and (max-width:720px) {
    .work {
        width: calc(100% / 5);
    }
}
@media (min-width:420px) and (max-width:580px) {
    .work {
        width: calc(100% / 4);
    }
}
@media (max-width:420px) {
    .work {
        width: calc(100% / 3);
    }
}