/* 公告页面加载动画样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 防止页面滚动和跳动 */
html:not(.no-js) {
    overflow: hidden;
    position: relative;
}

html:not(.no-js) body {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* 加载动画隐藏后恢复页面滚动 */
html:not(.no-js) body.loaded {
    overflow: visible;
    position: static;
}

/* 恢复HTML元素滚动 */
html:not(.no-js).loaded {
    overflow: visible;
    position: static;
}

/* 确保body元素在loaded状态下可以滚动 */
html:not(.no-js) body.loaded {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
    width: auto !important;
}

/* 确保页面内容可以滚动 */
html:not(.no-js).loaded body {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
    width: auto !important;
}

/* 确保页面内容区域可以滚动 */
html.loaded .page-content {
    overflow: visible !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
    min-height: 100vh !important;
}

/* 确保HTML和body元素在loaded状态下可以完全滚动 */
html.loaded, html.loaded body {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: auto !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
    width: auto !important;
}

/* 确保页面内容区域可以滚动 */
html.loaded .page-content {
    overflow: visible !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
    min-height: 100vh !important;
    width: 100% !important;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    position: relative;
    margin-bottom: 20px;
}

.loading-spinner::before,
.loading-spinner::after,
.loading-spinner .inner-ring {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #4a90e2;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loading-spinner::after {
    border-top-color: #34a85c;
    animation-delay: 0.2s;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.loading-spinner .inner-ring {
    border-top-color: #fbbc05;
    animation-delay: 0.4s;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* 页面内容淡入效果 - 默认隐藏，避免页面跳动 */
.page-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in, visibility 0.8s ease-in;
}

.page-content.fade-in {
    opacity: 1;
    visibility: visible;
}

/* 页面退出淡出效果 */
.page-content.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

/* 加载文字提示 */
.loading-text {
    font-size: 18px;
    color: #4a90e2;
    font-family: 'Arial', sans-serif;
    letter-spacing: 1px;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
}

/* 防止页面加载时的闪烁 */
.no-js .page-content {
    opacity: 1;
    visibility: visible;
}

/* 修复加载动画出现时页面跳动的问题 */
html:not(.no-js) .page-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in, visibility 0.8s ease-in;
}

html:not(.no-js) .page-content.fade-in {
    opacity: 1;
    visibility: visible;
}