* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: #1e2a3e;
    scroll-behavior: smooth;
    min-height: 100vh;
}

/* 主容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
}

/* 顶部网站标题区 */
.site-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0 1rem;
    position: relative;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4a6b8f, #2c3e66, #4a6b8f, transparent);
}

.site-title {
    font-size: clamp(2rem, 7vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #2c3e66, #4a6b8f, #6b8cae);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.site-sub {
    font-size: 0.9rem;
    color: #5c6f87;
    margin-top: 0.75rem;
}

/* 筛选栏 */
.filter-bar {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 60px;
    margin: 1.5rem 0 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e66;
}

.year-select {
    padding: 0.5rem 1rem;
    border: 1px solid #dce5ef;
    border-radius: 40px;
    background: white;
    font-size: 0.9rem;
    color: #1e2f41;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.year-select:hover {
    border-color: #4a6b8f;
}

.year-select:focus {
    border-color: #2c3e66;
    box-shadow: 0 0 0 2px rgba(44,62,102,0.1);
}

.photo-count {
    font-size: 0.85rem;
    color: #6b7f9c;
    background: #f0f3f8;
    padding: 0.3rem 1rem;
    border-radius: 30px;
}

.photo-count span {
    font-weight: 700;
    color: #2c3e66;
    font-size: 1rem;
}

.reset-btn {
    background: #eef2f7;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #4a6b8f;
}

.reset-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* 加载状态 */
.loading-spinner {
    text-align: center;
    padding: 4rem;
    font-size: 1.2rem;
    color: #6c819e;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #4a6b8f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 照片网格 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0 3rem;
}

/* 卡片样式 */
.photo-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
    animation: fadeInUp 0.5s ease;
}

.photo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 35px -12px rgba(0, 0, 0, 0.2);
}

.photo-img-wrapper {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eef2f5;
    position: relative;
}

.photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.photo-card:hover .photo-img {
    transform: scale(1.05);
}

.date-float {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 500;
    font-family: monospace;
    z-index: 2;
}

.photo-info {
    padding: 1rem 1.2rem;
    background: white;
    text-align: center;
}

.photo-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1e2f41;
    word-break: break-all;
    font-family: monospace;
}

/* 动画定义 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 骨架屏加载动画 */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ========== 优化版灯箱样式（完美适配手机端） ========== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 80px 20px;
}

/* 图片容器 - 优化触摸体验 */
.lightbox-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

/* 图片缩放状态 */
.lightbox-image.zoomed {
    cursor: zoom-out;
    transform: scale(2);
}

/* 灯箱信息卡片 - 移动端优化 */
.lightbox-info {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 70%, rgba(0,0,0,0) 100%);
    padding: 20px 20px 30px 20px;
    backdrop-filter: blur(20px);
    color: white;
    text-align: center;
    z-index: 10;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

/* 信息卡片可隐藏（点击图片时） */
.lightbox-info.hidden {
    transform: translateY(100%);
}

.lightbox-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.4;
}

.lightbox-date {
    font-size: 0.8rem;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

/* 导航按钮 - 移动端优化 */
.lightbox-nav {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 12px;
    z-index: 5;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
    transition: all 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.7);
}

/* 关闭按钮 - 移动端优化 */
.close-lightbox {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    color: white;
    transition: all 0.2s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.close-lightbox:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.8);
}

/* 底部指示器（滑动提示）*/
.lightbox-indicator {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 15;
    pointer-events: none;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

.indicator-dot.active {
    width: 20px;
    border-radius: 3px;
    background: white;
}

/* 触摸滑动提示 */
.touch-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 30px;
    color: white;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 25;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.touch-hint.show {
    opacity: 1;
}

/* 加载状态 */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 5;
}

/* 灯箱动画 */
@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 底部按钮 */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2c3e66;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 60px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
}

.back-to-top:hover {
    background: #1f2f4a;
    transform: translateY(-3px);
}

.error-message {
    text-align: center;
    padding: 3rem;
    background: #fff5f5;
    border-radius: 24px;
    color: #c56a6a;
}

.empty-state {
    text-align: center;
    padding: 4rem;
    color: #8b9ab0;
    font-size: 1.1rem;
}

/* ========== 响应式设计 ========== */
/* 平板和手机优化 */
@media (max-width: 768px) {
    .container {
        padding: 1rem 1rem 3rem;
    }
    
    .photo-grid {
        gap: 1.2rem;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
    }
    
    .filter-group {
        justify-content: center;
    }
    
    /* 灯箱移动端优化 */
    .lightbox-container {
        padding: 50px 12px 70px 12px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    
    .close-lightbox {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-info {
        padding: 16px 16px 25px 16px;
    }
    
    .lightbox-title {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }
    
    .lightbox-date {
        font-size: 0.7rem;
    }
    
    /* 隐藏桌面端的 hover 效果 */
    .nav-btn:hover {
        transform: none;
    }
    
    /* 增加触摸区域 */
    .nav-btn, .close-lightbox {
        min-width: 44px;
        min-height: 44px;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .lightbox-container {
        padding: 45px 10px 60px 10px;
    }
    
    .nav-btn {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .close-lightbox {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .lightbox-info {
        padding: 12px 12px 20px 12px;
    }
    
    .lightbox-title {
        font-size: 0.9rem;
    }
    
    .indicator-dot {
        width: 5px;
        height: 5px;
    }
    
    .indicator-dot.active {
        width: 16px;
    }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .lightbox-container {
        padding: 40px 12px 40px 12px;
    }
    
    .lightbox-info {
        padding: 8px 12px 12px 12px;
    }
    
    .lightbox-title {
        font-size: 0.85rem;
        margin-bottom: 2px;
    }
    
    .lightbox-date {
        font-size: 0.65rem;
    }
    
    .nav-btn, .close-lightbox {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}