/* 统一页面底部样式 */
.page-footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari兼容性 */
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* 确保footer始终显示 */
    position: relative;
    z-index: 10;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 防止被其他元素覆盖 */
    clear: both;
    width: 100%;
    box-sizing: border-box;
    /* Safari兼容性增强 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.page-footer .footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* 确保内容不会超出容器 */
    word-wrap: break-word;
    overflow-wrap: break-word;
    /* Safari兼容性 */
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.page-footer .copyright {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    /* 桌面端不换行 */
    white-space: nowrap;
    /* Safari兼容性 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page-footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
    /* 备案链接样式 */
    border-bottom: 1px solid transparent;
    /* Safari兼容性 */
    -webkit-transition: color 0.3s ease;
}

.page-footer a:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.page-footer .icp-link,
.page-footer .network-security-link {
    margin: 0 4px;
    /* 链接不换行 */
    white-space: nowrap;
}

/* 网安备案图标样式 */
.page-footer .beian-icon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
    display: inline-block;
    /* Safari兼容性 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 响应式设计 - 平板端 */
@media (max-width: 768px) {
    .page-footer {
        padding: 15px 10px;
        font-size: 0.8rem;
        min-height: 50px;
        line-height: 1.5;
    }
    
    .page-footer .footer-content {
        padding: 0 10px;
        /* 允许适度换行 */
        white-space: normal;
    }
    
    .page-footer .copyright {
        /* 平板端允许版权信息换行 */
        white-space: normal;
        display: inline-block;
        margin-bottom: 2px;
    }
    
    /* 备案信息在平板端可以换行 */
    .page-footer .icp-link,
    .page-footer .network-security-link {
        display: inline-block;
        margin: 2px 4px;
        /* 保持链接不换行，但允许整体布局换行 */
        white-space: nowrap;
    }
}

/* 手机端优化 - 版权信息与备案信息换行显示 */
@media (max-width: 480px) {
    .page-footer {
        padding: 15px 10px;
        font-size: 0.75rem;
        min-height: 60px; /* 增加高度以容纳多行内容 */
        line-height: 1.4;
        /* Safari兼容性增强 */
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    .page-footer .footer-content {
        padding: 0 10px;
        /* 改为垂直布局 */
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        /* Safari Flexbox兼容性 */
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -webkit-box-align: center;
        -webkit-align-items: center;
    }
    
    .page-footer .copyright {
        font-size: 0.75rem;
        margin-bottom: 0;
        /* 确保版权信息在手机端可见 */
        opacity: 1;
        color: rgba(255, 255, 255, 0.8);
        white-space: nowrap;
        /* Safari兼容性 */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        display: block;
        text-align: center;
    }
    
    /* 备案信息区域 */
    .page-footer .beian-section {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        font-size: 0.7rem;
        /* Safari Flexbox兼容性 */
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -webkit-box-align: center;
        -webkit-align-items: center;
    }
    
    .page-footer .icp-link,
    .page-footer .network-security-link {
        font-size: 0.7rem;
        margin: 0;
        padding: 4px 8px;
        /* 增加点击区域 */
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.05);
        white-space: nowrap;
        /* Safari兼容性 */
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
        display: inline-block;
    }
    
    .page-footer .icp-link:active,
    .page-footer .network-security-link:active {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* 超小屏幕适配 */
@media (max-width: 320px) {
    .page-footer {
        padding: 12px 8px;
        font-size: 0.7rem;
        min-height: 55px;
    }
    
    .page-footer .footer-content {
        padding: 0 8px;
        gap: 6px;
    }
    
    .page-footer .copyright {
        font-size: 0.7rem;
    }
    
    .page-footer .icp-link,
    .page-footer .network-security-link {
        font-size: 0.65rem;
        padding: 3px 6px;
        margin: 2px;
        display: block;
        text-align: center;
        width: auto;
        max-width: 200px;
    }
}

/* iPhone Safari特殊适配 */
@supports (-webkit-appearance: none) {
    .page-footer {
        /* 强制硬件加速 */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        /* 确保在Safari中正确显示 */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .page-footer .copyright {
        /* Safari文本渲染优化 */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        /* 确保文本可见 */
        will-change: opacity;
    }
}

/* iOS Safari特殊处理 */
@media screen and (-webkit-min-device-pixel-ratio: 1) {
    .page-footer {
        /* iOS Safari viewport修复 */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    @media (max-width: 480px) {
        .page-footer .copyright {
            /* iOS Safari文本显示修复 */
            -webkit-text-stroke: 0.01px rgba(255, 255, 255, 0.1);
            text-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
        }
    }
}

/* 确保footer不被固定定位的元素遮挡 */
body {
    padding-bottom: 0;
}

/* 针对特定布局的footer适配 */
body.has-fixed-footer .page-footer {
    position: relative;
    bottom: auto;
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .page-footer {
        background: rgba(0, 0, 0, 0.3);
        border-top-color: rgba(255, 255, 255, 0.15);
    }
    
    .page-footer .copyright {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .page-footer a {
        color: rgba(255, 255, 255, 0.95);
    }
}

/* 高对比度模式适配 */
@media (prefers-contrast: high) {
    .page-footer {
        background: rgba(0, 0, 0, 0.8);
        border-top: 2px solid rgba(255, 255, 255, 0.8);
    }
    
    .page-footer .copyright,
    .page-footer a {
        color: white;
    }
}

/* 打印样式 */
@media print {
    .page-footer {
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        color: black;
        border-top: 1px solid black;
        margin-top: 20px;
        page-break-inside: avoid;
    }
    
    .page-footer .copyright,
    .page-footer a {
        color: black;
    }
} 