/**
 * 首屏就绪模块样式（独立，不与其他面板通用）
 * 用于“首屏隐藏 + 统一显示”：加载期间隐藏主内容、显示加载遮罩，就绪后统一展示
 * 类名均以 first-screen- 为前缀，避免与其它模块冲突
 */

/* 等待态：隐藏主内容区 */
body.first-screen-waiting .first-screen-main {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

/* 就绪态：显示主内容区 */
body.first-screen-ready .first-screen-main {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 加载遮罩：仅等待态显示 */
.first-screen-loading-overlay {
    --first-screen-progress: 0;
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* 加载完成时（上层渐隐为 0）即为此纯色 */
    background-color: #06070b;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", Arial, sans-serif;
}

/* 参考 login/css/auth-base：渐变底 + 柔光球；不透明度随 --first-screen-progress 增大而减小，与进度条同步 */
.first-screen-loading-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: calc(1 - var(--first-screen-progress) / 100);
    transition: opacity 0.25s ease-out;
}

.first-screen-bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 620px at 80% 10%, rgba(157, 130, 255, 0.25), transparent 62%),
        radial-gradient(700px 500px at 10% 90%, rgba(62, 178, 255, 0.22), transparent 65%),
        #06070b;
}

.first-screen-bg-decor {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: first-screen-bg-decor-float 20s infinite ease-in-out;
}

.first-screen-bg-decor-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at center, rgba(157, 130, 255, 0.65), rgba(157, 130, 255, 0));
    top: -100px;
    left: -100px;
}

.first-screen-bg-decor-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at center, rgba(99, 215, 255, 0.6), rgba(99, 215, 255, 0));
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.first-screen-bg-decor-3 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at center, rgba(157, 130, 255, 0.35), rgba(157, 130, 255, 0));
    top: 52%;
    left: 12%;
    animation-delay: -10s;
}

@keyframes first-screen-bg-decor-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

body.first-screen-waiting .first-screen-loading-overlay {
    display: flex;
}

body.first-screen-ready .first-screen-loading-overlay {
    display: none;
    pointer-events: none;
}

/* 遮罩内容区 */
.first-screen-loading-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.first-screen-loading-logo {
    /* 原为 120x120，这里按约 1.5 倍放大，以增强品牌露出 */
    width: 180px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 8px;
}

/* 加载进度条：轨道 */
.first-screen-loading-progress-track {
    width: 200px;
    margin-bottom: 12px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    overflow: hidden;
}

/* 加载进度条：绿色填充条（宽度由 JS 按 1–100% 设置） */
.first-screen-loading-progress-bar {
    height: 100%;
    width: 0%;
    max-width: 100%;
    background-color: #22c55e;
    border-radius: 3px;
    transition: width 0.25s ease-out;
}

/* 进度百分比数字 */
.first-screen-loading-percent {
    font-size: 13px;
    color: #999;
    font-weight: normal;
    min-width: 2.5em;
    text-align: center;
}
