/* 按钮和模态窗口样式 *//* ======== 顶部按钮样式 ======== */
/* 顶部按钮公共样式 */
.top-buttons {
    position: fixed; /* 使用fixed定位，确保按钮始终可见 */
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    justify-content: flex-end;
    align-items: center; /* 确保垂直对齐 */
    box-sizing: border-box;
    pointer-events: auto;
    width: auto; /* 允许宽度自适应 */
}.top-buttons > div {
        margin-left: 15px;
        flex-shrink: 0; /* 防止按钮被压缩 */
    }

    /* 第一个按钮不需要左边距 */
    .top-buttons > div:first-child {
        margin-left: 0;
    }

    /* 顶部按钮的定位由容器控制，这里只添加特定的样式 */
    /* 这些类名保留用于按钮样式的应用 */    /* 按钮样式 */    .about-site-btn .button,
    .contact-admin-btn .button,
    .email-login-btn .button {
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: #ffffff;
        font-size: 0.7rem;
        padding: 0.5rem 1rem;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.3s ease;
        text-decoration: none;
        white-space: nowrap;
        height: 2.2rem;
        line-height: 1;
        border-radius: 4px;
        min-width: auto;
        box-sizing: border-box;
    }
    
    /* 修复图标样式 */
    .top-buttons .button .icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        width: 1rem;
        height: 1rem;
        margin-right: 0.5rem;
        line-height: 1;
    }

    .about-site-btn .button:hover,
    .contact-admin-btn .button:hover,
    .email-login-btn .button:hover {
        background-color: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.5);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        color: #ffffff;
        text-decoration: none;
    }

    /* 图标样式 */
    .about-site-btn .icon,
    .contact-admin-btn .icon,
    .email-login-btn .icon {
        margin-right: 0.5rem;
    }    /* 大屏幕优化 */
    @media screen and (min-width: 1200px) {
        .top-buttons {
            right: 30px; /* 在大屏幕上提供固定的右侧边距 */
        }
        
        /* 确保按钮在大屏幕上有足够的间距 */
        .top-buttons > div {
            margin-left: 20px;
        }
    }

    /* 平板设备优化 */
    @media screen and (max-width: 768px) {
        .top-buttons {
            padding-right: 15px;
        }
        
        .top-buttons > div {
            margin-left: 10px;
        }
    }

    /* 小屏幕设备优化 */
    @media screen and (max-width: 480px) {
        .top-buttons {
            padding: 15px 10px;
            justify-content: space-between;
        }
        
        .top-buttons > div {
            margin-left: 5px;
        }
        
        .about-site-btn .button,
        .contact-admin-btn .button,
        .email-login-btn .button {
            font-size: 0.6rem;
            padding: 0.4rem 0.8rem;
            min-width: auto;
        }
    }

    /* 超小屏幕设备优化 */
    @media screen and (max-width: 375px) {
        .top-buttons {
            flex-direction: column;
            align-items: center;
            padding: 10px;
        }
        
        .top-buttons > div {
            margin: 5px 0;
            width: 100%;
        }
        
        .about-site-btn .button,
        .contact-admin-btn .button,
        .email-login-btn .button {
            width: 100%;
            justify-content: center;
        }
        
        body.is-preload {
            padding-top: 120px; /* 为顶部按钮留出足够空间 */
        }
    }    /* ======== 关于本站弹窗样式 ======== */    #about {
        background: rgba(27, 31, 34, 0.95);
        border-radius: 12px;
        padding: 2.8rem 2.5rem 2rem 2.5rem;
        width: 40rem;
        max-width: 100%;
        overflow: hidden; /* 防止关闭按钮hover时出现滚动条 */
        max-height: 85vh;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
        position: relative;
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    /* 添加内部滚动容器 */
    #about .content {
        max-height: calc(85vh - 5.6rem); /* 减去padding的高度 */
        overflow-y: auto;
        padding-right: 5px; /* 为滚动条预留空间 */
    }    #about h2.major {
        border-bottom: solid 1px rgba(255, 255, 255, 0.15);
        margin: 0 0 1.8rem 0;
        padding: 0 0 1.2rem 0;
        font-size: 1.8rem;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.95);
        letter-spacing: 0.05em;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }    #about p {
        margin-bottom: 1.5rem;
        line-height: 1.8;
        color: rgba(255, 255, 255, 0.85);
        font-size: 1rem;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        letter-spacing: 0.01em;
    }

    /* 现代风格关闭按钮 */
    #about .close {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.8);
        font-size: 28px;
        font-weight: 300;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        background-color: rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        z-index: 100;
        transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        transform: scale(1);
    }

    #about .close:hover {
        background-color: rgba(255, 255, 255, 0.15);
        color: #ffffff;
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.2);
    }

    #about .close:active {
        background-color: rgba(255, 255, 255, 0.25);
        transform: scale(0.95);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    }    /* 调整主容器样式，确保弹窗垂直居中 */
    #main {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    /* 确保弹窗显示时可以点击 */
    body.is-article-visible #main {
        pointer-events: auto;
    }
    
    /* 弹窗遮罩背景 */
    body.is-article-visible #main::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: -1;
    }#main article {
        -moz-transform: translateY(0.25rem);
        -webkit-transform: translateY(0.25rem);
        -ms-transform: translateY(0.25rem);
        transform: translateY(0.25rem);
        -moz-transition: opacity 0.325s ease-in-out, -moz-transform 0.325s ease-in-out;
        -webkit-transition: opacity 0.325s ease-in-out, -webkit-transform 0.325s ease-in-out;
        -ms-transition: opacity 0.325s ease-in-out, -ms-transform 0.325s ease-in-out;
        transition: opacity 0.325s cubic-bezier(0.19, 1, 0.22, 1), transform 0.325s cubic-bezier(0.19, 1, 0.22, 1);
        padding: 4.5rem 2.5rem 1.5rem 2.5rem;
        position: relative;
        width: 40rem;
        max-width: 100%;
        background-color: rgba(27, 31, 34, 0.85);
        border-radius: 12px;
        opacity: 0;
    }

    #main article.active {
        -moz-transform: translateY(0);
        -webkit-transform: translateY(0);
        -ms-transform: translateY(0);
        transform: translateY(0);
        opacity: 1;
    }

    /* 弹窗遮罩层 */
    body.is-article-visible #main::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: -1;
        opacity: 1;
        transition: opacity 0.5s ease;
    }    @media screen and (max-width: 736px) {
        #main article {
            padding: 3.5rem 2rem 1.5rem 2rem;
            border-radius: 10px;
        }

        #about {
            padding: 2.5rem 1.8rem 1.5rem 1.8rem;
            border-radius: 10px;
        }
        
        #about h2.major {
            font-size: 1.5rem;
            margin: 0 0 1.5rem 0;
            padding: 0 0 1rem 0;
        }
        
        #about .close {
            top: 12px;
            right: 12px;
            width: 28px;
            height: 28px;
            font-size: 24px;
        }
    }

    @media screen and (max-width: 480px) {
        #main article {
            padding: 3rem 1.5rem 1.5rem 1.5rem;
            border-radius: 8px;
        }
        
        #about {
            padding: 2.2rem 1.5rem 1.2rem 1.5rem;
            border-radius: 8px;
        }
        
        #about h2.major {
            font-size: 1.4rem;
            margin: 0 0 1.2rem 0;
        }
        
        #about .close {
            top: 10px;
            right: 10px;
            width: 26px;
            height: 26px;
            font-size: 22px;
        }
    }

    /* 当弹窗显示时隐藏其他组件 */
body.is-article-visible .top-buttons {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Footer和弹窗状态 */
#footer {
    display: block;
    visibility: visible;
    opacity: 1;
    position: relative;
    z-index: 1;
    transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

body.is-article-visible #footer {
    opacity: 1;
    visibility: visible;
}
