/**
 * 加载状态管理样式
 */

/* 页面加载状态 */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.page-loading.hidden {
    display: none;
}

/* 加载动画 */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 加载文字 */
.loading-text {
    font-size: 16px;
    color: #666;
    text-align: center;
}

/* 错误状态 */
.error-state {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
}

.error-icon {
    font-size: 48px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.error-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.retry-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.retry-button:hover {
    background: #2980b9;
}

/* 组件加载状态 */
.component-loading {
    position: relative;
    min-height: 200px;
}

.component-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.component-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

/* 隐藏加载状态 */
.component-loading.loaded::before,
.component-loading.loaded::after {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-loading {
        padding: 20px;
    }
    
    .error-state {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .loading-text {
        font-size: 14px;
    }
}










