/* ============================================
   自定义样式文件 - 只包含非框架相关的样式
   ============================================ */

/* 4. 页面加载动画 */
.loader-body {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, #f9fbff 0%, #eef3ff 55%, #e3ebff 100%);
    overflow: hidden;
    z-index: 999999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #42506b;
    opacity: 1;
    visibility: visible;
    transition: opacity .4s ease, visibility .4s ease;
}

/* 暗黑主题下的加载动画背景 */
.dark .loader-body,
[data-theme='dark'] .loader-body {
    background: radial-gradient(circle at 20% 20%, #111827 0%, #1f2937 55%, #374151 100%);
    color: #e5e7eb;
}

.loader-body::before,
.loader-body::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 40%;
    background: radial-gradient(circle, rgba(126, 149, 255, .3) 0%, rgba(126, 149, 255, 0) 70%);
    filter: blur(40px);
    opacity: .5;
    z-index: 0;
}

.loader-body::before {
    top: -120px;
    right: -60px;
}

.loader-body::after {
    bottom: -110px;
    left: -80px;
    background: radial-gradient(circle, rgba(106, 224, 197, .25) 0%, rgba(106, 224, 197, 0) 70%);
}

.loader-body.active {
    opacity: 1;
    visibility: visible;
}

.loader-body:not(.active) {
    opacity: 0;
    visibility: hidden;
}

.loader-shell {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    min-width: auto;
}

.loader-core {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-arc {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #7785ff;
    border-right-color: #78e8c9;
    animation: loaderSpin 1.2s linear infinite;
}

.loader-arc--a {
    inset: 0;
    filter: drop-shadow(0 4px 14px rgba(118, 132, 255, .45));
}

.loader-arc--b {
    inset: 12px;
    border-top-color: #7fe2ff;
    border-right-color: transparent;
    border-left-color: #7fe2ff;
    animation-duration: 1.6s;
}

.loader-arc--c {
    inset: 24px;
    border-width: 2px;
    border-top-color: #ffc58a;
    border-right-color: #ffc58a;
    border-left-color: transparent;
    animation-duration: .9s;
}

.loader-orb {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6f7dff, #91b0ff);
    box-shadow: 0 0 18px rgba(111, 125, 255, .7);
    animation: orbOrbit 1.8s linear infinite;
}

.loader-orb::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(111, 125, 255, .35);
}

.loader-spark {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6adcc0;
    box-shadow: 0 0 12px rgba(106, 220, 192, .8);
    animation: sparkDrift 1.6s ease-in-out infinite;
}

.loader-spark--one {
    top: 18px;
    left: 16px;
}

.loader-spark--two {
    bottom: 18px;
    right: 20px;
    animation-delay: -.6s;
    background: #ffb661;
    box-shadow: 0 0 12px rgba(255, 182, 97, .7);
}

@keyframes loaderSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes orbOrbit {
    0% {
        transform: rotate(0deg) translateX(32px);
    }
    50% {
        transform: rotate(180deg) translateX(32px);
    }
    100% {
        transform: rotate(360deg) translateX(32px);
    }
}

@keyframes sparkDrift {
    0%, 100% {
        transform: translate3d(0, 0, 0);
        opacity: .8;
    }
    50% {
        transform: translate3d(6px, -6px, 0);
        opacity: 1;
    }
}
