* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Header样式 - 液态玻璃效果 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 100;
    padding: 10px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
    margin: 10px 10px 0 10px;
}

/* 无需特殊选择器，直接通过z-index确保灯箱覆盖所有内容 */

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

nav ul li a img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

nav ul li a:hover img {
    transform: scale(1.1);
}

/* 灯箱中的header - 液态玻璃效果 */
.lightbox-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1001;
    padding: 10px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
    margin: 10px 10px 0 10px;
}

.lightbox-header .header-container {
    padding: 0 20px;
}

.lightbox-header nav ul li a {
    color: #333;
}

.lightbox-header nav ul li a img {
    width: 32px;
    height: 32px;
}

/* 调整灯箱内容的顶部间距，为header腾出空间 */
.lightbox-image-container {
    margin-top: 60px;
}

/* 调整移动端灯箱的图片容器顶部间距 */
@media (max-width: 1023px) {
    .lightbox-image-container {
        margin-top: 60px;
    }
}

@media (max-width: 480px) {
    .lightbox-image-container {
        margin-top: 60px;
    }
    
    .lightbox-header {
        padding: 10px 0;
    }
    
    .lightbox-header nav ul li a img {
        width: 32px;
        height: 32px;
    }
}

.gallery-container {
    width: 100%;
    padding: 2px 0 20px 0;
}

.gallery {
    position: relative;
    width: 100%;
    margin: 0 auto;
    margin-top: 80px;
}

.gallery-column {
    position: absolute;
    top: 0;
    width: 25%;
    padding: 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #fff;
    margin: 2px;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    opacity: 0;
}

.gallery-item:hover .gallery-title {
    opacity: 1;
    height: 15%;
    font-size: 1rem;
}



.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom:2px;
}



/* 灯箱样式 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    z-index: 2000;
    overflow: hidden;
}

.lightbox.active {
    display: flex;
    flex-direction: column;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    position: relative;
    background: transparent;
    box-shadow: none;
    border: none;
    margin: 0;
    max-width: 100%;
}

.lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 20px 0 20px;
    background: transparent;
    margin: 0;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 240px);
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    margin: 0;
}

.lightbox-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #1d1d1f;
    transform: translateY(0);
    transition: all 0.3s ease;
    width: 100%;
    min-height: 180px;
    z-index: 1000;
}

/* 信息提示按钮样式 */
.info-toggle-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 40px;
    height: 40px;
    font-size: 18px;
    color: #1d1d1f;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* 关闭按钮样式 */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: #1d1d1f;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 信息区域隐藏/显示状态 */
.lightbox-info.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.image-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #1d1d1f;
    font-weight: 600;
}

.image-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-size: 0.7rem;
    color: #86868b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 0.8rem;
    color: #1d1d1f;
    font-weight: 500;
    word-break: break-all;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .gallery {
        column-count: 3;
    }
}

@media (min-width: 1024px) {
    .lightbox {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
    }
    
    .lightbox-content {
        flex-direction: row;
        height: auto;
        max-height: 90vh;
        max-width: 1200px;
        margin: 0 auto;
        background: rgba(255, 255, 255, 0);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 8px 32px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 20px;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding-top: 70px;
        margin-top: 9vh;
    }
    
    .lightbox-image-container {
        flex: 1;
        padding: 30px 40px;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lightbox-image {
        max-height: 55vh;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 32px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        margin: 0;
        padding: 0;
    }
    
    .lightbox-image:hover {
        transform: scale(1.01);
    }
    
    .lightbox-info {
        position: static;
        width: 360px;
        order: -1;
        padding: 30px;
        background: transparent;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        border-right: 1px solid rgba(255, 255, 255, 0.15);
        color: #1d1d1f;
        overflow-y: visible;
    }
    
    .info-content {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }
    
    .image-title {
        color: #1d1d1f;
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 0;
        letter-spacing: -0.02em;
        line-height: 1.2;
    }
    
    .meta-label {
        color: #86868b;
        font-weight: 600;
    }
    
    .meta-value {
        color: #1d1d1f;
        font-weight: 500;
    }
    
    .image-meta {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .meta-item {
        gap: 4px;
    }
    
    .meta-label {
        font-size: 0.725rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: 600;
    }
    
    .meta-value {
        font-size: 0.9rem;
        line-height: 1.35;
    }
    
    /* RGB直方图样式 */
    .rgb-histogram-container {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
    
    .rgb-histogram-title {
        font-size: 0.9rem;
        font-weight: 600;
        color: #1d1d1f;
        margin: 0 0 12px 0;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    #rgbHistogramCanvas {
        width: 100%;
        height: auto;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .lightbox-close {
        top: -10px;
        background: rgba(255, 255, 255, 0.15);
        color: #1d1d1f;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 50%;
        width: 44px;
        height: 44px;
        font-size: 22px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .lightbox-close:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    }
    
    .lightbox-close:active {
        transform: scale(0.95);
    }
}

@media (max-width: 1023px) {
    .gallery {
        column-count: 2;
        column-gap: 0;
    }
    
    /* 在移动端显示RGB直方图 */
    .rgb-histogram-container {
        display: block;
        margin-top: 15px;
    }
    
    /* RGB直方图样式 - 移动端 */
    .rgb-histogram-container {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
    
    .rgb-histogram-title {
        font-size: 0.8rem;
        font-weight: 600;
        color: #1d1d1f;
        margin: 0 0 10px 0;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    #rgbHistogramCanvas {
        width: 100%;
        height: auto;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .gallery-container {
        padding: 0;
    }
    
    .gallery-item {
        margin-bottom: 0;
    }
    
    .lightbox {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
    }
    
    .lightbox-content {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .lightbox-image-container {
        padding: 20px 20px 0 20px;
        align-items: center;
        position: relative;
    }
    
    .lightbox-image {
        max-height: calc(100vh - 120px);
        min-height: 50vh;
        height: auto;
        border-radius: 20px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
        margin-bottom: 0;
        width: 100%;
        object-fit: contain;
    }
    
    /* 确保图片容器充满可用空间 */
    .lightbox-image-container {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        margin: 0;
        background: transparent;
    }
    
    /* 确保灯箱内容充满整个视口 */
    .lightbox-content {
        display: flex;
        flex-direction: column;
        height: 100vh;
        width: 100%;
        overflow: hidden;
    }
    
    .lightbox-info {
        position: absolute;
        top: 60px; /* 调整为从顶部header下方开始 */
        left: 20px;
        right: 20px;
        padding: 20px;
        max-height: 300px;
        min-height: 200px;
        overflow-y: auto;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.25);
        color: #1d1d1f;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
        width: calc(100% - 40px);
        z-index: 1000;
        transform-origin: top;
    }
    
    /* 信息提示按钮 - 平板端 */
    .info-toggle-btn {
        display: block;
        position: absolute;
        top: 15px;
        left: 15px;
        z-index: 1001;
    }
    
    /* 关闭按钮 - 平板端 */
    .lightbox-close {
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 1001;
    }
    
    /* 默认隐藏信息区域 - 从顶部滑出 */
    .lightbox-info {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-100%);
    }
    
    .lightbox-info:not(.hidden) {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        border-radius: 15px;
    }
    
    /* 自定义滚动条 */
    .lightbox-info::-webkit-scrollbar {
        width: 4px;
    }
    
    .lightbox-info::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
    
    .lightbox-info::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 2px;
    }
    
    .lightbox-info::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.5);
    }
    
    .image-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
        color: #1d1d1f;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
    
    .image-meta {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .meta-item {
        gap: 4px;
    }
    
    .meta-label {
        font-size: 0.65rem;
        color: #86868b;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    .meta-value {
        font-size: 0.8rem;
        color: #1d1d1f;
        font-weight: 500;
        line-height: 1.3;
    }
    
    .lightbox-close {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .gallery {
        column-count: 1;
        column-gap: 0;
    }
    
    .gallery-container {
        padding: 0;
    }
    
    .gallery-item {
        margin-bottom: 0;
    }
    
    .lightbox {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }
    
    .lightbox-content {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .lightbox-image-container {
        padding: 15px 15px 0 15px;
        align-items: center;
        position: relative;
    }
    
    .lightbox-image {
        max-height: calc(100vh - 100px);
        min-height: 50vh;
        height: auto;
        border-radius: 18px;
        box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
        margin-bottom: 0;
        width: 100%;
        object-fit: contain;
    }
    
    /* 确保图片容器充满可用空间 - 小屏幕移动端 */
    .lightbox-image-container {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px;
        margin: 0;
        background: transparent;
    }
    
    /* 确保灯箱内容充满整个视口 - 小屏幕移动端 */
    .lightbox-content {
        display: flex;
        flex-direction: column;
        height: 100vh;
        width: 100%;
        overflow: hidden;
    }
    
    /* 在移动端显示RGB直方图 */
    .rgb-histogram-container {
        display: block;
        margin-top: 12px;
    }
    
    /* RGB直方图样式 - 小屏幕移动端 */
    .rgb-histogram-container {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 10px;
        padding: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
    
    .rgb-histogram-title {
        font-size: 0.75rem;
        font-weight: 600;
        color: #1d1d1f;
        margin: 0 0 8px 0;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    
    #rgbHistogramCanvas {
        width: 100%;
        height: auto;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .lightbox-info {
        position: absolute;
        top: 80px; /* 调整为从顶部header下方开始 */
        left: 15px;
        right: 15px;
        padding: 18px;
        max-height: 280px;
        min-height: 160px;
        overflow-y: auto;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.25);
        color: #1d1d1f;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
        width: calc(100% - 30px);
        z-index: 1000;
        transform-origin: top;
    }
    
    /* 信息提示按钮 - 小屏幕移动端 */
    .info-toggle-btn {
        display: block;
        position: absolute;
        top: 80px;
        left: 12px;
        width: 36px;
        height: 36px;
        font-size: 16px;
        z-index: 1001;
    }
    
    /* 关闭按钮 - 小屏幕移动端 */
    .lightbox-close {
        position: absolute;
        top: 80px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 20px;
        z-index: 1001;
    }
    
    /* 默认隐藏信息区域 - 从顶部滑出 */
    .lightbox-info {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-100%);
    }
    
    .lightbox-info:not(.hidden) {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        border-radius: 15px;
    }
    
    .image-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
        color: #1d1d1f;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
    
    .image-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .meta-item {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 3px;
    }
    
    .meta-label {
        font-size: 0.625rem;
        color: #86868b;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        width: auto;
    }
    
    .meta-value {
        font-size: 0.8rem;
        text-align: left;
        flex: none;
        color: #1d1d1f;
        font-weight: 500;
        line-height: 1.3;
    }
    
    .lightbox-close {
        top: 80px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 20px;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        color: #1d1d1f;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
    
    .lightbox-close:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.05);
    }
}