/* ============================================================
   loading.css - 加载界面样式（V3.0）
   ============================================================ */

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.5s ease;
}
.loading-screen.loading-fadeout {
    opacity: 0;
    pointer-events: none;
}

/* 背景星空 */
.loading-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.loading-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, #fff 50%, transparent 100%),
        radial-gradient(1px 1px at 60% 70%, #fff 50%, transparent 100%),
        radial-gradient(2px 2px at 40% 50%, #fff 50%, transparent 100%),
        radial-gradient(1px 1px at 80% 20%, #fff 50%, transparent 100%),
        radial-gradient(1px 1px at 10% 80%, #fff 50%, transparent 100%),
        radial-gradient(2px 2px at 90% 60%, #fff 50%, transparent 100%),
        radial-gradient(1px 1px at 30% 90%, #fff 50%, transparent 100%),
        radial-gradient(1px 1px at 70% 40%, #fff 50%, transparent 100%);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: loading-stars-move 30s linear infinite;
    opacity: 0.6;
}
@keyframes loading-stars-move {
    from { background-position: 0% 0%; }
    to { background-position: -200% -200%; }
}

/* 内容容器 */
.loading-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #eaeaea;
    max-width: 480px;
    padding: 20px;
    width: 90%;
}

/* Logo */
.loading-logo-icon {
    font-size: 64px;
    margin-bottom: 12px;
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
    transition: transform 0.1s linear;
}

.loading-title {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 32px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 6px;
    text-shadow: 0 2px 12px rgba(255, 215, 0, 0.3);
    letter-spacing: 2px;
}

.loading-subtitle {
    font-family: "SimSun", "宋体", serif;
    font-size: 14px;
    color: #8a9ab0;
    margin-bottom: 36px;
}

/* 进度条区域 */
.loading-progress-section {
    margin-bottom: 20px;
}

.loading-progress-text {
    font-family: "SimSun", "宋体", serif;
    font-size: 14px;
    color: #d6dde8;
    margin-bottom: 12px;
    min-height: 20px;
    transition: color 0.3s;
}

.loading-progress-track {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
}

.loading-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    background-size: 200% 100%;
    border-radius: 4px;
    box-shadow:
        0 0 8px rgba(255, 215, 0, 0.6),
        0 0 16px rgba(255, 215, 0, 0.3);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: loading-shimmer 1.5s linear infinite;
}

@keyframes loading-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.loading-progress-percent {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    font-variant-numeric: tabular-nums;
}

.loading-phase-hint {
    font-family: "SimSun", "宋体", serif;
    font-size: 12px;
    color: #6a7a8a;
    margin-top: 8px;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .loading-logo-icon { font-size: 48px; }
    .loading-title { font-size: 26px; }
    .loading-subtitle { font-size: 12px; margin-bottom: 28px; }
    .loading-progress-text { font-size: 13px; }
    .loading-progress-track { height: 6px; }
    .loading-progress-percent { font-size: 16px; }
    .loading-phase-hint { font-size: 11px; }
}
