/* 页面加载状态 */
body {
    font-family: sans-serif;
    font-weight: normal;
    margin: 0;
    padding: 0;
    background-color: #f8fafc; /* 极浅的灰色作为fallback */
    visibility: hidden;
}

/* 显示页面 */
body.loaded {
    visibility: visible;
}

/* 加载指示器 */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(28, 100, 242, 0.3);
    border-top: 3px solid #1C64F2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 9999;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 可访问性工具类 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: initial;
    margin: initial;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* 改善焦点可见性 */
*:focus {
    outline: 2px solid #1C64F2;
    outline-offset: 2px;
}

/* 减少动画对于有前庭障碍的用户 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dify聊天机器人样式 */
#dify-chatbot-bubble-button {
    background-color: #1C64F2 !important;
}
#dify-chatbot-bubble-window {
    width: 24rem !important;
    height: 40rem !important;
}

/* 确保页面最小高度与字体渲染优化 */
html, body {
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}


