html {
    scroll-behavior: smooth;
    background-color: #0f0f10; /* 防止滚动时露出白边 */
}

/* 隐藏滚动条但保留滚动功能（可选，让画面更干净） */
body::-webkit-scrollbar {
    width: 6px;
}
body::-webkit-scrollbar-track {
    background: #0f0f10;
}
body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

:root {
    --bg-color: #0f0f10;
    --card-bg: #1a1a1c;
    --text-main: #e0e0e0;
    --text-dim: #888;
    --accent: #ffffff;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
}

/* Header */
/* --- 导航栏全透明悬浮 --- */
.site-header {
    position: fixed;        /* 固定在顶部 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;          /* 确保在最上层 */
    padding: 25px 0;        /* 增加上下间距，更有呼吸感 */
    background: transparent; /* 初始透明 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* 极淡的分隔线 */
    transition: all 0.4s ease; /* 滚动变色时的过渡动画 */
}

/* 导航栏内容容器 */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;         /* 侧边留白 */
}

.brand {
    text-decoration: none !important; /* 强制去掉链接下划线 */
    border-bottom: none !important;  /* 强制去掉可能存在的底部边框 */
}

/* 品牌文字 */
.brand-text {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 6px;   /* 拉开字间距更有高级感 */
    color: #fff;
    text-decoration: none;
    border: none;
    outline: none; /* 去掉点击时的外轮廓 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* 轻微阴影，增加可读性 */
}

.logo {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* 导航链接 */
.site-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 2px;
    margin-left: 40px;
    transition: color 0.3s ease;
}

.site-nav a:hover {
    color: #fff;
}

/* --- 核心：当页面向下滚动时，给 Header 增加模糊黑背景 --- */
.site-header.scrolled {
    padding: 15px 0;       /* 缩小高度 */
    background: rgba(15, 15, 16, 0.8); /* 半透明黑 */
    backdrop-filter: blur(15px);      /* 毛玻璃效果 */
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero Section */
/* --- 1. 英雄区容器 --- */
.hero {
    position: relative;
    height: 100vh;           /* 占满整个屏幕 */
    width: 100%;
    display: flex;
    align-items: center;     /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    overflow: hidden;
    background-color: #0f0f10; /* 与 body 背景色严格一致 */
    margin-top: 0; /* 确保没有边距偏移 */
    padding-top: 0;
}

/* --- 2. 背景图片处理 --- */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://photo-art.pages.dev/file/1762158106829_E44AA241-F19F-41A7-AA49-0E2CFA906447_1_105_c-拷贝.jpg') center / cover no-repeat;
    filter: brightness(0.5); /* 压低亮度，保护眼睛并突出文字 */
    z-index: 0;
}

/* --- 3. 核心：双重遮罩消融效果 --- */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    /* 顶部微暗，底部完全融入背景色，四周微弱暗角 */
    background: linear-gradient(
        to bottom,
        rgba(15, 15, 16, 0.4) 0%,
        transparent 30%,
        transparent 70%,
        rgba(15, 15, 16, 1) 98%
    );
}

/* --- 4. 文字内容排版 --- */
.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.stanza p {
    font-size: 16px;
    font-weight: 300;
    line-height: 2.2;
    letter-spacing: 0.25em; /* 增加字间距，更有诗意 */
    color: rgba(255, 255, 255, 0.85);
    margin: 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); /* 确保在亮部也清晰 */
    /* 动画延迟设置 */
    opacity: 0;
    animation: fadeInSlide 1.5s ease forwards;
}

.divider {
    width: 30px;
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 0 auto;
}

/* --- 5. 按钮美化 --- */
.hero-action {
    opacity: 0;
    animation: fadeInSlide 1.5s ease forwards 2.5s; /* 延迟 2.5s 出现 */
}

.btn.primary {
    display: inline-block;
    padding: 15px 45px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px); /* 毛玻璃 */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.btn.primary:hover {
    background: #fff;
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255,255,255,0.15);
}

/* --- 6. 入场动画定义 --- */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 诗句逐行浮现延迟 */
.stanza:nth-child(1) p:nth-child(1) { animation-delay: 0.5s; }
.stanza:nth-child(1) p:nth-child(2) { animation-delay: 0.8s; }
.stanza:nth-child(1) p:nth-child(3) { animation-delay: 1.1s; }
.stanza:nth-child(3) p:nth-child(1) { animation-delay: 1.4s; }
.stanza:nth-child(3) p:nth-child(2) { animation-delay: 1.7s; }
.stanza:nth-child(3) p:nth-child(3) { animation-delay: 2.0s; }

/* Portfolio Section */
.section { padding: 80px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 50px; }
.section-head h2 { font-size: 24px; font-weight: 300; text-transform: uppercase; letter-spacing: 8px; }

.filters { display: flex; gap: 15px; }
.chip {
    background: transparent; border: 1px solid #333; color: var(--text-dim);
    padding: 6px 20px; border-radius: 30px; cursor: pointer; transition: 0.3s; font-size: 12px;
}
.chip.active, .chip:hover { background: white; color: black; border-color: white; }

/* Gallery Masonry */
.gallery {
    column-count: 3;
    column-gap: 25px;
}
@media (max-width: 1024px) { .gallery { column-count: 2; } }
@media (max-width: 600px) { .gallery { column-count: 1; } }

.gallery-item {
    break-inside: avoid;
    margin-bottom: 25px;
    background: var(--card-bg);
    overflow: hidden;
    cursor: zoom-in;
    transition: 0.4s;
}
.gallery-item img { width: 100%; display: block; transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); }
.gallery-item:hover img { transform: scale(1.05); filter: brightness(1.1); }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,0.98);
    display: none; flex-direction: column; justify-content: center; align-items: center; z-index: 2000;
}
.lightbox.active { display: flex; }
.lightbox-container img { max-width: 90vw; max-height: 85vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 30px; right: 40px; font-size: 40px; color: white; cursor: pointer; background: none; border: none; }

/* 改进的灯箱导航按钮 */
.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  /* 修复字符 ‹ › 可能出现的垂直偏移 */
  padding-bottom: 4px;
}

.lightbox .nav:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lightbox .nav:active {
  transform: translateY(-50%) scale(0.98);
}

.lightbox .nav.prev {
  left: 20px;
}

.lightbox .nav.next {
  right: 20px;
}

/* 禁用状态（例如：第一张或最后一张）*/
.lightbox .nav.disabled {
  opacity: 0.3;
  pointer-events: none;
  backdrop-filter: none;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .lightbox .nav {
    width: 40px;
    height: 40px;
    font-size: 2rem;
  }
  .lightbox .nav.prev {
    left: 8px;
  }
  .lightbox .nav.next {
    right: 8px;
  }
}

.lightbox .nav.disabled {
    opacity: 0.3;
    pointer-events: none;
    backdrop-filter: none;
}

/* 确保父容器有足够的空间 */
.hero-action {
    margin-top: 60px;
    position: relative;
    z-index: 10;
}

.btn.primary {
    display: inline-block;
    padding: 16px 50px;
    border-radius: 50px; /* 胶囊形状更显现代感 */
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 4px; /* 增加字间距 */
    text-indent: 4px; /* 修正字间距带来的居中偏移 */

    /* 核心：浮动感设置 */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px); /* 毛玻璃模糊 */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);

    /* 初始阴影：柔和的投影 */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);

    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

/* 悬停时的“升起”效果 */
.btn.primary:hover {
    color: #000;
    background: rgba(255, 255, 255, 0.95); /* 变为实色 */
    border-color: #ffffff;
    transform: translateY(-8px); /* 向上浮动更多 */

    /* 悬停阴影：更深、范围更广，模拟离地更远 */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* 点击时的“按下”反馈 */
.btn.primary:active {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}


/* 在上面的 .btn.primary 基础上增加 */
.btn.primary::after {
    content: "";
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.btn.primary:hover::after {
    opacity: 1;
}

/* 1. 定义按钮的入场动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px); /* 从下方 30px 处开始 */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 呼吸灯效果 */
@keyframes buttonPulse {
    0% { box-shadow: 0 15px 35px rgba(255, 255, 255, 0.1); }
    50% { box-shadow: 0 15px 45px rgba(255, 255, 255, 0.25); }
    100% { box-shadow: 0 15px 35px rgba(255, 255, 255, 0.1); }
}

.btn.primary {
    /* 在你之前的样式基础上添加 */
    animation: buttonPulse 3s infinite ease-in-out;
    /* 确保悬停时呼吸灯停止，转为强光 */
}

.btn.primary:hover {
    animation: none; /* 悬停时停止呼吸 */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* 2. 设置按钮容器初始状态 */
.hero-action {
    opacity: 0; /* 初始隐藏 */
    margin-top: 60px;
    /* 这里的动画会在页面加载后延迟 2.5 秒触发 */
    animation: fadeInUp 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 2.5s;
}

/* 3. 诗句的入场动画（可选：让诗句也更有节奏感） */
.stanza p {
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* 给每一行诗句设置不同的延迟，制造出“朗读”的效果 */
.stanza p:nth-child(1) { animation-delay: 0.5s; }
.stanza p:nth-child(2) { animation-delay: 1.0s; }
.stanza p:nth-child(3) { animation-delay: 1.5s; }

.hero-inner {
  text-align: center;
}

footer {
    display: block;
    unicode-bidi: isolate;
}
/* 页脚整体背景与间距 */
.site-footer {
    padding: 60px 0 30px; /* 增加顶部间距，让呼吸感更强 */
    background-color: #0f0f10;
    border-top: 1px solid rgba(255, 255, 255, 0.03); /* 极暗的分隔线 */
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666; /* 默认版权文字颜色调暗 */
    font-size: 12px;
    letter-spacing: 1px;
}

/* 社交链接区域 */
.social {
    display: flex;
    gap: 25px; /* 链接之间的间距 */
}

.social a {
    color: #666; /* 初始颜色：低调灰 */
    text-decoration: none; /* 去掉丑陋的蓝色下划线 */
    transition: all 0.3s ease; /* 平滑过渡效果 */
    font-weight: 300;
    position: relative;
}

/* 悬停效果：变亮并轻微上浮 */
.social a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.social a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 50%;
    background-color: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.social a:hover::after {
    width: 100%; /* 悬停时横线展开 */
}
/* 响应式适配：手机上改为垂直堆叠 */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .social {
        justify-content: center;
    }
}


/* --- 画廊页面布局 --- */
.gallery-page {
    padding-top: 120px; /* 为固定 Header 留出空间 */
    min-height: 100vh;
}

.section-head {
    margin-bottom: 60px;
    text-align: center;
}

.section-head h2 {
    font-weight: 300;
    letter-spacing: 8px;
    margin-bottom: 30px;
    color: #fff;
}

/* 分类按钮 */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.chip {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim);
    padding: 8px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.chip.active, .chip:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* --- 瀑布流核心代码 --- */
.gallery {
    column-count: 3;    /* 默认 3 列 */
    column-gap: 20px;   /* 列间距 */
}

@media (max-width: 1024px) { .gallery { column-count: 2; } }
@media (max-width: 600px) { .gallery { column-count: 1; } }

.gallery-item {
    break-inside: avoid; /* 防止图片被跨列截断 */
    margin-bottom: 20px;
    background: #1a1a1c;
    border-radius: 4px;
    overflow: hidden;
    cursor: zoom-in;
    transition: transform 0.4s ease;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.5s ease, transform 0.8s ease;
    filter: grayscale(0.3); /* 默认微带灰度，更高级 */
}

.gallery-item:hover img {
    filter: grayscale(0) brightness(1.1);
    transform: scale(1.03);
}

/* --- 灯箱预览 --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 11, 0.98);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: none; /* 默认隐藏 */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-container img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2010;
}

/* 瀑布流容器基础样式 */
.gallery {
    column-count: 3;
    column-gap: 20px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

@media (max-width: 900px) { .gallery { column-count: 2; } }
@media (max-width: 600px) { .gallery { column-count: 1; } }

/* 图片项动画 */
.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    cursor: zoom-in;
    background: #1a1a1c;
    animation: photoReveal 1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes photoReveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

:root { --bg: #0a0a0b; --text: #e0e0e0; --dim: #888; }
body { background: var(--bg); color: var(--text); font-family: sans-serif; margin: 0; }
.container { width: min(1200px, 94%); margin: 0 auto; }

/* 画廊瀑布流布局 */
.gallery {
    column-count: 3;
    column-gap: 25px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 25px;
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
    background: #161617;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}

.gallery-item:hover img { transform: scale(1.05); }

/* 悬浮文字遮罩 */
.item-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.3s;
}

.item-overlay span {
    border: 1px solid #fff; padding: 6px 15px; font-size: 12px; letter-spacing: 2px;
}

.gallery-item:hover .item-overlay { opacity: 1; }

/* 灯箱预览 */
.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95);
    backdrop-filter: blur(15px); display: none; z-index: 999;
    align-items: center; justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox-content { position: relative; max-width: 90vw; max-height: 85vh; }

#lightboxImage { max-width: 100%; max-height: 85vh; object-fit: contain; box-shadow: 0 0 50px rgba(0,0,0,0.5); }

.lightbox-close { position: absolute; top: -50px; right: 0; background: none; border: none; color: #fff; font-size: 40px; cursor: pointer; }

/* 响应式 */
@media (max-width: 800px) { .gallery { column-count: 2; } }
@media (max-width: 500px) { .gallery { column-count: 1; } }
/* --- 1. 骨架屏流光效果 --- */
/* 当图片还没加载出来时，显示一个深灰色的流光背景 */
.gallery-item {
    opacity: 0;
    transform: translateY(30px);
    background: linear-gradient(110deg, #1a1a1c 8%, #222 18%, #1a1a1c 33%);
    background-size: 200% 100%;
    animation: skeleton-loading 2s infinite linear;
    border-radius: 4px;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

/* 骨架屏动画定义 */
@keyframes skeleton-loading {
    to { background-position-x: -200%; }
}

/* --- 2. 滚动显现类 --- */
/* 当 JS 检测到图片进入视口时，添加此效果 */
.gallery-item.reveal {
    opacity: 1;
    transform: translateY(0);
    background: none; /* 加载后移除流光背景 */
    animation: none;
}

/* --- 3. 灯箱计数器 --- */
.lightbox-counter {
    margin-top: 15px;
    font-size: 13px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    text-align: center;
}

/* 保持你原有的 .gallery-item:hover 放大效果，它会和入场动画完美兼容 */




