::-webkit-scrollbar {
    display: none;
}

dialog:focus {
    outline: none;
}

#typing-text {
    font-family: ALEX, 楷体, KaiTi, STKaiti, "AR PL UKai CN", "AR KaiTi", "AR CaiDiao";
}

@font-face {
    font-family: "ALEX";
    src: url("./public/font/AlexBrush-Regular.ttf") format("truetype");
}

body {
    font-family: "ALEX", sans-serif;
    padding: 0;
    margin: 0;
    background: linear-gradient(0deg, #ffffff7a, #ffc0cb80);
    user-select: none;
    box-sizing: border-box;
}

dialog {
    background-color: transparent;
    border: 0;
    font-size: 40px;
    text-align: center;
    border-radius: 10px;
}

dialog::backdrop {
    backdrop-filter: blur(100px);
}

#typing-text::after {
    content: "|";
    animation: type 0.75s step-end infinite;
}

@keyframes type {
    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: black;
    }
}

#biaoti {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 80px 0 25px 0;
}

/* 图片区域 */
#container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 图片列表 */
.gallery {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    gap: 10px;
    padding: 0;
}

.gallery li {
    position: relative;
    transition: all 0.3s;
}

/* 媒体查询-电脑屏幕 */
@media screen and (min-width: 1024px) {
    .gallery li:hover {
        z-index: 2;
        transform: scale(1.3);
    }
}

li img {
    height: 160px;
    border-radius: 10px;
    float: left;
    box-shadow: 5px 5px 10px 0px #888888;
    transition: opacity 0.3s ease;
}

/* 图片加载状态 */
li img.loading {
    opacity: 0.5;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

li img.loaded {
    opacity: 1;
}

li img.error {
    opacity: 0.3;
    filter: grayscale(100%);
}

/* lightGallery 背景模糊效果 - 简化统一设置 */
.lg-backdrop,
[class*="backdrop"],
[class*="lg-backdrop"],
.lg-toolbar,
[class*="toolbar"],
.lg-thumb-outer,
[class*="thumb"] {
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
    transition: all 0.5s ease !important;
}

#lg-toolbar-2 {
    background: unset !important;
}

/* 上一张/下一张按钮圆形设计 */
.lg-prev,
.lg-next {
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

.lg-prev:hover,
.lg-next:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.lg-prev:after,
.lg-next:after {
    /* color: white !important; */
    font-size: 20px !important;
    font-weight: bold !important;
}

/* 确保画廊项目可点击 */
.gallery li {
    cursor: pointer;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .lg-backdrop,
    [class*="backdrop"],
    [class*="lg-backdrop"],
    .lg-toolbar,
    [class*="toolbar"],
    .lg-thumb-outer,
    [class*="thumb"] {
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
    }
    
    .lg-prev,
    .lg-next {
        width: 40px !important;
        height: 40px !important;
    }
}

/* 加载动画 */
@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 下载按钮，统计 */
.lg-icon,
.lg-counter {
    color: #2e2d2d !important;
}

h1 {
    font-size: 50px;
    margin-bottom: 0;
}

h1,
p,
#buttons button {
    color: transparent;
    background: linear-gradient(45deg, pink, purple);
    -webkit-background-clip: text;
    background-clip: text;
}

footer {
    position: fixed;
    border-radius: 10px;
    color: rgb(26, 26, 26);
    background-color: rgba(255, 255, 255, 0.625);
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px;
    z-index: 100;
    font-size: 12px;
}

footer a {
    text-decoration: none;
    color: black;
    font-family: 楷体, KaiTi, STKaiti, "AR PL UKai CN", "AR KaiTi", "AR CaiDiao";
}

/* Loading 元素样式 */
#loading {
    width: 100%;
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    font-size: 18px;
    color: #3f3f3f;
    border-radius: 10px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loading.visible {
    background: rgba(255, 0, 0, 0.2) !important;
    border: 2px solid red;
}