/* ==================================== */
/* 字体声明 (@font-face) - 引用本地字体文件 */
/* ==================================== */
@font-face {
    font-family: 'Zhi Mang Xing';
    /* ⭐️ 路径修正：指向 assets/fonts 文件夹 ⭐️ */
    src: url('../assets/fonts/ZhiMangXing-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap; 
}
@font-face {
    font-family: 'Sacramento';
    /* ⭐️ 路径修正：指向 assets/fonts 文件夹 ⭐️ */
    src: url('../assets/fonts/ZhiMangXing-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==================================== */
/* 整体风格与排版 (无路径变化，保持不变) */
/* ==================================== */
:root {
    --color-primary: #FFADAD; 
    --color-secondary: #9DE0AD; 
    --color-background: #FDFDFD; 
    --color-text: #444444; 
    --shadow-light: 0 6px 20px rgba(0, 0, 0, 0.1); 
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.25);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
    padding: 0 10px 20px;
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    transition: background-color 0.5s;
}

/* ==================================== */
/* 3. 新增：导航栏 (Navigation Bar) */
/* ==================================== */
.main-nav {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 2px solid var(--color-primary);
    padding: 10px 20px;
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.main-nav li {
    display: inline-block;
}

.main-nav a {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
    text-decoration: none;
    color: var(--color-text);
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
    font-size: 1.1em;
}

.main-nav a:hover {
    background-color: rgba(255, 173, 173, 0.1);
    color: var(--color-primary);
}

.main-nav a.active-nav {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 2px 4px rgba(255, 173, 173, 0.4);
}

h1 {
    font-family: 'Zhi Mang Xing', 'Sacramento', cursive, sans-serif; 
    color: var(--color-primary);
    margin: 20px 0 50px;
    font-size: 3.2em; 
    font-weight: normal; 
    letter-spacing: 5px; 
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15); 
    line-height: 1.2;
}


/* ==================================== */
/* 照片墙布局 - 自适应核心 (无路径变化，保持不变) */
/* ==================================== */
.photo-wall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow-light); 
    cursor: pointer;
    aspect-ratio: 1 / 1; 
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
    outline: none; 
    border: 5px solid white; 
    box-sizing: border-box; 
}

.photo-item:focus {
    outline: 3px solid var(--color-secondary); 
    outline-offset: 5px;
}

.photo-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px) rotate(1deg); 
}

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

.photo-item:hover img { 
    transform: scale(1.08);
}

/* 定制化布局 */
.photo-item.wide { grid-column: span 2; }
.photo-item.tall { grid-row: span 2; aspect-ratio: unset; }

/* ==================================== */
/* 加载占位符 (Skeleton) 样式 (无路径变化，保持不变) */
/* ==================================== */
.skeleton {
    background-color: #e0e0e0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 5px solid white;
    animation: loading-pulse 1.5s infinite linear; 
}

.skeleton.wide { grid-column: span 2; }
.skeleton.tall { grid-row: span 2; aspect-ratio: unset; }

@keyframes loading-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}


/* ==================================== */
/* 描述文字 (Caption) 悬浮显示 (无路径变化，保持不变) */
/* ==================================== */
.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0)); 
    color: white;
    font-family: 'Sacramento', 'Helvetica Neue', Arial, sans-serif; 
    font-size: 1.2em;
    opacity: 0; 
    transition: opacity 0.5s ease 0.1s; 
    text-align: left;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.photo-item:hover .photo-caption {
    opacity: 1; 
}

/* ==================================== */
/* Lightbox (模态框) (无路径变化，保持不变) */
/* ==================================== */
.lightbox {
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    visibility: hidden; 
    opacity: 0;        
    background-color: rgba(0, 0, 0, 0.9); 
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease; 
}

.lightbox.show {
    visibility: visible;
    opacity: 1;
}

.lightbox-content {
    position: relative; /* 用于幻灯片按钮定位 */
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    cursor: default;
}

.lightbox-media-container {
    max-width: 100%;
    max-height: 80vh; 
    margin: auto;
}

.lightbox-media-container img { 
    display: block;
    max-width: 100%;
    max-height: 80vh; 
    border-radius: 5px;
    margin: auto;
    transform: translateZ(0); 
}

.lightbox-caption {
    color: #f1f1f1;
    font-size: 1.2em;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    margin-top: 10px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

/* ==================================== */
/* 4. 新增：Lightbox 导航和幻灯片样式 */
/* ==================================== */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    user-select: none; /* 防止选择文本 */
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    z-index: 1001; /* 确保在内容之上 */
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.nav-btn.prev {
    left: 15px;
}

.nav-btn.next {
    right: 15px;
}

.slideshow-controls {
    text-align: center;
    margin-top: 10px;
}

.slideshow-btn {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    font-size: 1.5em; /* 调整 emoji 大小 */
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
}

.slideshow-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ==================================== */
/* 媒体查询 (移动端适配) (无路径变化，保持不变) */
/* ==================================== */
@media (max-width: 600px) {
    h1 { 
        font-size: 2.2em; 
        letter-spacing: 2px;
    }
    .photo-wall { gap: 10px; }
    .photo-item, .skeleton {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        aspect-ratio: 1 / 1;
        border-width: 3px; 
    }
    
    /* 移动端隐藏导航箭头 */
    .nav-btn {
        display: none;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
}
/* ==================================== */
/* 控制栏样式 (无路径变化，保持不变) */
/* ==================================== */
.controls-bar {
    display: flex;
    justify-content: center; 
    align-items: center;
    flex-wrap: wrap; 
    gap: 15px;
    margin-bottom: 30px;
    padding: 0 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.filters-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn, .sort-select {
    padding: 8px 15px;
    border: 2px solid var(--color-primary);
    border-radius: 20px; 
    background-color: transparent;
    color: var(--color-primary);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    outline: none;
}

.filter-btn:hover, .sort-select:hover {
    background-color: rgba(255, 173, 173, 0.1); 
}

.filter-btn.active {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 8px rgba(255, 173, 173, 0.4);
}

.sort-select {
    min-width: 180px;
    appearance: none; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFADAD'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}