html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}

/* 现代化全屏加载样式 */
#app-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 添加动态背景效果 */
#app-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(148, 163, 184, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(203, 213, 225, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(148, 163, 184, 0.15) 0%, transparent 50%);
    animation: background-shift 6s ease-in-out infinite;
}

.app-loading-wrap {
    position: relative;
    text-align: center;
    z-index: 2;
}

/* 现代化几何spinner */
.app-loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 40px;
    position: relative;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: spinner-rotate 2s linear infinite;
}

.spinner-ring:nth-child(1) {
    border: 3px solid transparent;
    border-top: 3px solid rgba(59, 130, 246, 0.8);
    animation-duration: 1.5s;
}

.spinner-ring:nth-child(2) {
    border: 3px solid transparent;
    border-top: 3px solid rgba(99, 102, 241, 0.6);
    animation-duration: 2s;
    animation-direction: reverse;
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
}

.spinner-ring:nth-child(3) {
    border: 2px solid transparent;
    border-top: 2px solid rgba(139, 92, 246, 0.4);
    animation-duration: 3s;
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
}

/* 脉冲中心点 */
.spinner-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.9) 0%, rgba(99, 102, 241, 0.4) 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s ease-in-out infinite;
}

/* 现代化进度条 */
.app-loading-progress {
    width: 240px;
    height: 4px;
    background: rgba(203, 213, 225, 0.3);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
}

.app-loading-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.9) 0%, rgba(99, 102, 241, 0.7) 50%, rgba(59, 130, 246, 0.9) 100%);
    animation: progress-flow 2s ease-in-out infinite;
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* 进度百分比 */
.app-loading-percentage {
    font-size: 14px;
    font-weight: 500;
    color: rgba(71, 85, 105, 0.8);
    margin-top: 12px;
    opacity: 1;
    text-align: center;
}

/* 动画定义 */
@keyframes background-shift {
    0%,
    100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-5px) translateY(-5px);
    }
    50% {
        transform: translateX(5px) translateY(5px);
    }
    75% {
        transform: translateX(-3px) translateY(3px);
    }
}

@keyframes spinner-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progress-flow {
    0% {
        width: 0%;
        opacity: 1;
    }
    50% {
        width: 75%;
        opacity: 0.8;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-loading-spinner {
        width: 60px;
        height: 60px;
    }

    .app-loading-title {
        font-size: 24px;
    }

    .app-loading-progress {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .app-loading-spinner {
        width: 50px;
        height: 50px;
    }

    .app-loading-progress {
        width: 160px;
    }
}
