/* 全局样式 */
:root {
    --primary-color: #8527d2b2;
    --secondary-color: #f5f5f5eb;
    --text-color: #333;
    --light-text: #fff;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

/* 修改body样式，添加背景图片 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    /* background-image已被backgroundLoader替代，注释掉避免冲突 */
    /* background-image: url('https://cdn.jsdelivr.net/gh/FunctionHookTJU/fxHook.io@master/assets/images/background4k.png'); */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-color);
    line-height: 1.6;
    /* 添加半透明遮罩，增强可读性 */
    position: relative;

    /* 布局改成Flex */
    display: flex;
    flex-flow: column nowrap;

    /* 最小高度是100vh */
    min-height: 100vh;
}

/* 添加背景遮罩层 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(245, 245, 245, 0.29);
    z-index: -1;
}



/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;

    /* 自动延展 */
    flex: 1;
}

/* 日记页面特殊容器样式 */
.diary-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
}

/* 导航栏样式：深色液态玻璃（参考 DeepSeek Harness 输入框） */
header {
    position: sticky;
    top: 12px;
    z-index: 100;
    margin: 12px 16px 0;
    border-radius: 18px;
    color: #eceef2;
    background: linear-gradient(180deg, rgba(48, 50, 60, 0.55), rgba(22, 23, 30, 0.75));
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -1px 0 rgba(0, 0, 0, 0.30),
        0 10px 34px rgba(0, 0, 0, 0.38);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eceef2;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.nav-links li {
    margin-left: 0;
}

.nav-links a {
    color: #c9cdd6;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.10);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.nav-links a.active {
    position: relative;
    background: transparent;
    color: #fff;
    font-weight: 600;
}

/* 液滴吸附：细窄横向「唇边」比主体略宽（向外吸附/展开），其下两角小内凹过渡，
   主体为圆角矩形、底部圆润，整体贴合 header 上边缘。静止状态，无动效。 */
/* clip-path 形状见 scripts/header.js 的内联 <clipPath id="liquid-tab"> */
.nav-links a.active::before {
    content: "";
    position: absolute;
    left: -25%;                              /* 让气泡明显宽于文字（约 1.5 倍条目宽） */
    right: -25%;
    top: -0.9rem;                            /* 抵消 nav 顶部 padding，贴到 header 上边缘 */
    height: calc(100% + 0.9rem + 0.6rem);
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.44) 52%,
        rgba(255, 255, 255, 0.16));
    z-index: -1;
    box-shadow: inset 0 -1px 6px rgba(255, 255, 255, 0.20);
    clip-path: url(#liquid-tab);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--light-text);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 响应式导航 */
@media (max-width: 900px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 88px;
        left: 16px;
        right: 16px;
        flex-direction: column;
        background: rgba(22, 23, 30, 0.94);
        border: 1px solid rgba(255, 255, 255, 0.09);
        border-radius: 16px;
        -webkit-backdrop-filter: blur(14px) saturate(160%);
        backdrop-filter: blur(14px) saturate(160%);
        padding: 0.75rem 1rem;
        gap: 0.4rem;
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.3s ease;
        box-shadow: 0 8px 24px rgba(0,0,0,0.3);
        z-index: 99;
    }
    
    .nav-links.mobile-open {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-links li {
        margin: 0;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 10px;
    }
}

/* 主要内容样式 */
main {
    padding: 2rem 0;
    flex: 1;
}

/* 日记页面主内容区 */
.diary-main {
    flex: 3;
}

/* 个人信息卡片 */
.profile-card {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.profile-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.profile-info p {
    font-size: 1.1rem;
    color: #666;
}

/* 内容部分样式 */
.content-section {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.content-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.content-section p {
    margin-bottom: 1rem;
}

/* 图片展示样式 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* 自定义tooltip样式 */
.image-card {
    position: relative;
}

.image-card img {
    cursor: pointer;
}

.image-card::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.image-card:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 15px;
}

/* 将重复的.image-card定义合并为一个，并调整图片尺寸 */
.image-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    width: 80%;
    margin: 0 auto;
    padding-bottom: 40%; /* 保持1:1比例 */
    overflow: hidden;
    background-color: white;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.image-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f5f5f5;
    transition: var(--transition);
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 视频部分样式 */
.video-section {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 1.5rem;
}

.video-section iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* 服务器信息样式 */
.server-info {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.server-info p {
    margin-bottom: 0.8rem;
}

.server-info strong {
    color: var(--primary-color);
}

/* 图标链接样式 */
.icon-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.icon-link:hover {
    text-decoration: underline;
}

/* PDF列表样式 */
.pdf-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.pdf-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

.pdf-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.pdf-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.pdf-item p {
    color: #666;
    font-size: 0.9rem;
}

/* PDF查看器样式 */
.pdf-viewer {
    display: none;
    margin-top: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.pdf-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.pdf-container {
    height: 70vh;
}

.pdf-container embed {
    width: 100%;
    height: 100%;
    border: none;
}

/* 日记条目样式 */
.diary-entry {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.diary-entry:last-child {
    border-bottom: none;
}

.diary-entry.hidden {
    display: none;
}

.entry-date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.entry-content {
    line-height: 1.8;
}

/* 侧边栏样式 */
aside {
    flex: 1;
    padding: 2rem 0;
}

.calendar-section {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 5rem;
}

.calendar-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-align: center;
}

/* 日历样式 */
.calendar {
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
}

.calendar-nav:hover {
    opacity: 0.9;
}

.calendar-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-table th {
    background-color: #f0f0f0;
    padding: 0.5rem;
    text-align: center;
}

.calendar-table td {
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    border: 1px solid #eee;
}

.calendar-table td:hover {
    background-color: #f0f8ff;
}

.calendar-table .today {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.calendar-table .other-month {
    color: #ccc;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none;
}

/* 页脚样式 */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 2rem 0;
    margin-top: 3rem;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        display: none;
    }

    .image-grid,
    .pdf-list {
        grid-template-columns: 1fr;
    }
    
    .diary-container {
        flex-direction: column;
    }
    
    aside {
        order: -1;
    }
}


/* 音频播放器样式 */
#audio-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(133, 39, 210, 0.8); /* 使用主题紫色 */
    color: white;
    padding: 10px 15px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#audio-player:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background-color: rgba(133, 39, 210, 0.9);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.player-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.volume-slider-container {
    width: 80px;
}

#volume-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: transform 0.3s ease;
}

#volume-slider::-moz-range-thumb:hover {
    transform: scale(1.3);
}

.music-title {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #audio-player {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .music-title {
        display: none; /* 在移动端隐藏标题以节省空间 */
    }
    
    .volume-slider-container {
        width: 60px;
    }
}

/* 静音按钮样式 */
#mute-button-container {
    list-style: none;
}

/* 图标按钮（静音/切换音频源）统一风格 */
.icon-btn,
.mute-btn,
.audio-source-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #c9cdd6;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border-radius: 10px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover,
.mute-btn:hover,
.audio-source-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.icon-btn:focus-visible,
.mute-btn:focus,
.audio-source-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* 确保在小屏幕上正确显示 */
@media (max-width: 768px) {
    .icon-btn,
    .mute-btn,
    .audio-source-btn {
        font-size: 0.95rem;
        min-width: 30px;
        height: 30px;
        padding: 0 6px;
    }
}
/* 更小的图片网格 - 一排四张 */
.small-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 更小的图片卡片样式 */
.small-image-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 保持1:1比例 */
    overflow: hidden;
}

.small-image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.small-image-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
}

/* 在CSS文件末尾添加以下样式 */
/* 圆形图片网格容器 */
.round-image-grid {
    display: flex;
    justify-content: flex-end; /* 使内容靠右对齐 */
    gap: 0.5rem;
    margin-top: 1rem;
}

/* 调整圆形图片卡片样式以适应flex布局 */
.round-image-card {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.round-image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.round-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保证图片填满整个圆形区域 */
}

/* 单个圆形图片的简单容器 */
.single-round-image {
    display: inline-block;
    margin: 0.5rem;
}

/* 折叠栏目样式 */
.collapsible-section {
    margin-top: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.collapsible-header {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.collapsible-header:hover {
    background-color: #e9ecef;
}

.collapsible-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.collapse-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: white;
}

.collapsible-content > * {
    padding: 1rem 1.5rem;
}

.collapsible-content .pdf-item {
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    border-radius: 0;
}

.collapsible-content .pdf-item:last-child {
    border-bottom: none;
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination-btn {
    padding: 10px 20px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #5568d3;
}

.pagination-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 产品展示页面样式 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.product-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-image .placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background-color: #f0f0f0;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-info p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-tag {
    background-color: rgba(133, 39, 210, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #6b1fa6;
    transform: translateY(-2px);
}

.coming-soon-badge {
    display: inline-block;
    background-color: #ffc107;
    color: #333;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.product-card.coming-soon {
    opacity: 0.8;
}

.product-card.coming-soon:hover {
    transform: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
/*webm视频循环播放*/
.webm-loop-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  height: 300px;
  z-index: 100;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.webm-loop-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== 图片墙：瀑布流 / masonry ===== */
.gallery-masonry {
    columns: 1;
    column-gap: 1rem;
}

@media (min-width: 640px) {
    .gallery-masonry {
        columns: 2;
    }
}

@media (min-width: 900px) {
    .gallery-masonry {
        columns: 3;
    }
}

@media (min-width: 1200px) {
    .gallery-masonry {
        columns: 4;
    }
}

.gallery-item {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 1rem;
    border-radius: 8px;
    overflow: hidden;
    cursor: zoom-in;
    background-color: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto; /* 保留原始宽高比，去掉 1:1 留白 */
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    outline: none;
}

.gallery-item:focus-visible {
    outline: 2px solid #4f8cff;
    outline-offset: 2px;
}

/* ===== 图片墙：灯箱 / lightbox ===== */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 92%;
    max-height: 92%;
    text-align: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    margin: 12px 0 0;
    color: #fff;
    font-size: 1rem;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    margin: 4px 0 0;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
    opacity: 0.25;
    cursor: default;
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-close {
        top: 8px;
        right: 8px;
    }
}