/* ============================================
   时光相册 - 全局样式
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- CSS 变量 --- */
:root {
    --bg-primary: #f5f3ef;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #2c2416;
    --text-secondary: #7d7667;
    --text-muted: #b0a99e;
    --accent: #d4976b;
    --accent-hover: #c17f52;
    --accent-light: rgba(212, 151, 107, 0.12);
    --border: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.06);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --column-gap: 4px;
}

/* 暗色主题 */
[data-theme="dark"] {
    --bg-primary: #1a1a1e;
    --bg-secondary: #222228;
    --bg-card: #28282f;
    --text-primary: #e8e4dd;
    --text-secondary: #9a9488;
    --text-muted: #5e5a54;
    --accent: #d4976b;
    --accent-hover: #e0a87e;
    --accent-light: rgba(212, 151, 107, 0.15);
    --border: rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(34, 34, 40, 0.8);
    --glass-border: rgba(255, 255, 255, 0.06);
}

/* --- 重置 --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Noto Sans SC', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition), color var(--transition);
    line-height: 1.6;
}

/* --- 导航栏 --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 0.9rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    user-select: none;
}

.logo-icon {
    width: 26px;
    height: 26px;
    color: var(--accent);
}

.logo-text {
    letter-spacing: -0.3px;
}

.logo-accent {
    color: var(--accent);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.nav-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: var(--accent-light);
}

.nav-btn svg {
    width: 16px;
    height: 16px;
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

.github-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 6px;
    border-radius: 10px;
    transition: background var(--transition);
}

.github-link:hover {
    background: var(--accent-light);
}

.github-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity var(--transition);
    filter: var(--github-filter);
}

[data-theme="dark"] .github-icon { filter: invert(1); opacity: 0.4; }
[data-theme="dark"] .github-link:hover .github-icon { opacity: 0.7; }

.github-link:hover .github-icon {
    opacity: 0.9;
}

/* --- 首页 Hero --- */
.hero {
    margin-top: 80px;
    padding: 5rem 5% 3rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto;
}

.hero-sub {
    margin-top: 0.5rem !important;
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
}

/* --- 相册卡片网格 --- */
.albums-container {
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 300px);
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
    gap: 28px;
    justify-content: center;
}

/* 相册卡片 */
.album-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.album-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.album-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.album-card:active {
    transform: scale(0.98);
}

.album-cover-wrap {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 */
    overflow: hidden;
    background: var(--bg-secondary);
}

.album-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.album-card:hover .album-cover {
    transform: scale(1.06);
}

.album-cover-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-light), var(--bg-secondary));
    color: var(--text-muted);
}

.album-cover-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.album-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.album-info {
    padding: 1.2rem 1.4rem;
}

.album-card-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    letter-spacing: -0.2px;
}

.album-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 0.7rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.album-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.album-card-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.album-card-count svg {
    width: 14px;
    height: 14px;
}

/* --- 相册详情页 --- */
.album-header {
    margin-top: 80px;
    padding: 3rem 5% 1.5rem;
    text-align: center;
}

.album-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.3px;
}

.album-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.album-count {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* --- 瀑布流 --- */
.gallery-container {
    padding: 0rem 0.5% 0rem;
}

.gallery-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--column-gap);
    width: 100%;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-grid[data-ready="true"] {
    opacity: 1;
    transform: translateY(0);
}

.gallery-column {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: var(--column-gap);
}

/* 照片卡片 */
.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    cursor: pointer;
    transform: translateZ(0);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    box-shadow: var(--shadow-sm);
}

.gallery-item.visible {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
    min-height: 120px;
}

.gallery-item.loaded img {
    opacity: 1;
}

/* 加载骨架 */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(110deg, var(--bg-secondary) 30%, var(--bg-card) 50%, var(--bg-secondary) 70%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    z-index: 1;
}

.gallery-item.loaded::before {
    display: none;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 照片悬浮信息 */
.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 16px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    z-index: 2;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-caption {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.gallery-item-date,
.gallery-item-res {
    color: rgba(255,255,255,0.8);
    font-size: 0.72rem;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* --- 加载器 --- */
.loader-container {
    padding: 40px 0;
    text-align: center;
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-container .spinner {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loader-container.active .spinner {
    opacity: 1;
}

.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

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

.end-message {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 0.9rem;
    display: none;
}

/* --- 灯箱 --- */
.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.93);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    user-select: none;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

/* 图片舞台（可缩放容器） */
.lightbox-stage {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: zoom-in;
    max-width: 92vw;
    max-height: 75vh;
}

.lightbox-img {
    display: block;
    max-width: 92vw;
    max-height: 75vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    -webkit-user-drag: none;
    transition: transform 0.2s ease, filter 0.4s ease, opacity 0.4s ease;
}

.lightbox-img.zoomed {
    cursor: grab;
}

.lightbox-img.zoomed:active {
    cursor: grabbing;
}

.lightbox-caption {
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    margin-top: 10px;
    padding: 0 10px;
    min-height: 22px;
    transition: opacity 0.3s;
}

.lightbox-caption.hide {
    opacity: 0;
}

/* --- 底部工具栏 --- */
.lightbox-toolbar {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 6px 14px;
    z-index: 1001;
}

.tb-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.tb-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tb-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.tb-btn:active {
    transform: scale(0.93);
}

.tb-btn svg {
    width: 18px;
    height: 18px;
}

/* 幻灯片按钮 - 播放/暂停切换 */
.tb-icon-pause { display: none; }
#tb-slideshow.playing .tb-icon-play { display: none; }
#tb-slideshow.playing .tb-icon-pause { display: block; }

.tb-speed {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    min-width: 20px;
    text-align: center;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.tb-speed:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.tb-counter {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

.tb-zoom-level {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    min-width: 36px;
    text-align: center;
}

/* 缩放重置 */
#tb-zoom-reset {
    font-size: 0.7rem;
    font-weight: 600;
    width: auto;
    padding: 0 8px;
    letter-spacing: 0.5px;
}

/* --- 关闭 & 导航 --- */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    transition: all var(--transition);
    z-index: 1001;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--transition);
    z-index: 1001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav svg {
    width: 20px;
    height: 20px;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* 移动端工具栏适配 */
@media (max-width: 768px) {
    .lightbox-nav { display: none; }
    .lightbox-close { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 1.3rem; }
    .lightbox-toolbar {
        bottom: 16px;
        gap: 8px;
        padding: 5px 10px;
        border-radius: 12px;
    }
    .tb-btn { width: 30px; height: 30px; }
    .tb-btn svg { width: 16px; height: 16px; }
    .lightbox-stage { max-width: 96vw; max-height: 68vh; }
    .lightbox-img { max-width: 96vw; max-height: 68vh; }
}

/* --- 密码弹窗 --- */
.pwd-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pwd-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.pwd-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem 2rem;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transform: translateY(12px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwd-overlay.active .pwd-modal {
    transform: translateY(0) scale(1);
}

.pwd-modal.shake {
    animation: pwd-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes pwd-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.pwd-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.pwd-icon svg {
    width: 26px;
    height: 26px;
}

.pwd-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.pwd-album-name {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.pwd-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.pwd-input-wrap {
    position: relative;
    margin-bottom: 1.2rem;
}

.pwd-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    text-align: center;
    letter-spacing: 4px;
}

.pwd-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.pwd-input::placeholder {
    letter-spacing: 0;
    color: var(--text-muted);
}

.pwd-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    color: #e74c3c;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.25s ease;
    pointer-events: none;
}

.pwd-error.show {
    opacity: 1;
    transform: translateY(0);
}

.pwd-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pwd-btn {
    flex: 1;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.pwd-btn-cancel {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border);
}

.pwd-btn-cancel:hover {
    background: var(--border);
    color: var(--text-primary);
}

.pwd-btn-confirm {
    background: var(--accent);
    color: #fff;
}

.pwd-btn-confirm:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 151, 107, 0.35);
}

.pwd-btn-confirm:active {
    transform: scale(0.97);
}

/* --- 相册卡片密码锁图标 --- */
.album-card-lock {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0;
    transition: opacity var(--transition);
}

.album-card:hover .album-card-lock {
    opacity: 1;
}

.album-card-lock svg {
    width: 14px;
    height: 14px;
    color: #fff;
}

/* --- 回到顶部 --- */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all var(--transition);
    z-index: 50;
    box-shadow: var(--shadow-md);
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.scroll-top:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.scroll-top svg {
    width: 18px;
    height: 18px;
}

/* --- 页面上滑动画 --- */
.page {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.page.slide-out {
    opacity: 0;
    transform: translateY(-10px);
}

.page.slide-in {
    opacity: 0;
    transform: translateY(10px);
}

.page.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- 响应式 --- */
@media (max-width: 1200px) {
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .hero h1 { font-size: 2.5rem; }
    .album-header h2 { font-size: 1.8rem; }
}

@media (max-width: 768px) {
    .navbar { padding: 0.7rem 4%; }
    .logo { font-size: 1.1rem; }
    .logo-icon { width: 22px; height: 22px; }

    .hero {
        margin-top: 65px;
        padding: 3rem 4% 2rem;
    }
    .hero h1 { font-size: 2rem; }

    .albums-container { padding: 0.5rem 4% 3rem; }
    .albums-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .album-header {
        margin-top: 65px;
        padding: 2rem 4% 1rem;
    }
    .album-header h2 { font-size: 1.6rem; }

    .gallery-container { padding: 0.5rem 4% 3rem; }
    :root { --column-gap: 10px; }

    .lightbox-nav { display: none; }
    .lightbox-close { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 1.3rem; }

    .scroll-top { bottom: 20px; right: 16px; width: 38px; height: 38px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.7rem; }
    .hero p { font-size: 0.95rem; }
    .nav-btn { padding: 6px 10px; font-size: 0.8rem; }
    .nav-btn span { display: none; }
}
