/* ========== 开屏动画 v3 - 极光流星轨道版 ========== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: #050510;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
}

.splash-screen.splash-exit {
    animation: splashExit 1s cubic-bezier(0.4, 0, 0, 1) forwards;
}

@keyframes splashExit {
    0% { opacity: 1; filter: blur(0); transform: scale(1); }
    50% { opacity: 0.8; filter: blur(2px); transform: scale(1.02); }
    100% { opacity: 0; filter: blur(20px); transform: scale(1.1); visibility: hidden; }
}

/* ========== 极光背景 ========== */
.splash-aurora {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        conic-gradient(from 0deg at 50% 50%,
            transparent 0deg,
            rgba(74, 158, 255, 0.08) 60deg,
            transparent 120deg,
            rgba(168, 85, 247, 0.06) 180deg,
            transparent 240deg,
            rgba(236, 72, 153, 0.05) 300deg,
            transparent 360deg);
    animation: auroraRotate 15s linear infinite;
    filter: blur(60px);
    opacity: 0.7;
}

.splash-aurora-2 {
    background:
        conic-gradient(from 180deg at 50% 50%,
            transparent 0deg,
            rgba(236, 72, 153, 0.06) 90deg,
            transparent 180deg,
            rgba(74, 158, 255, 0.08) 270deg,
            transparent 360deg);
    animation: auroraRotate 20s linear infinite reverse;
    filter: blur(80px);
    opacity: 0.5;
}

@keyframes auroraRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== 中心光晕 ========== */
.splash-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(74, 158, 255, 0.1) 0%,
        rgba(168, 85, 247, 0.05) 30%,
        rgba(236, 72, 153, 0.02) 50%,
        transparent 70%);
    animation: glowBreath 4s ease-in-out infinite;
    filter: blur(30px);
}

@keyframes glowBreath {
    0%, 100% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* ========== 流星 ========== */
.splash-meteors {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.splash-meteor {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: rotate(-35deg);
    opacity: 0;
    animation: meteorFall linear infinite;
}

.splash-meteor::before {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px #4a9eff, 0 0 12px #a855f7;
}

@keyframes meteorFall {
    0% { opacity: 0; transform: rotate(-35deg) translateX(-200px); }
    5% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; transform: rotate(-35deg) translateX(600px); }
}

/* ========== 轨道粒子 ========== */
.splash-orbits {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.splash-orbit-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: calc(-1 * var(--size, 160px) / 2);
    margin-left: calc(-1 * var(--size, 160px) / 2);
    border: 1px solid rgba(74, 158, 255, 0.06);
    border-radius: 50%;
    animation: orbitSpin linear infinite;
}

.splash-orbit-dot span {
    position: absolute;
    top: -2px;
    left: 50%;
    margin-left: -2px;
    border-radius: 50%;
    display: block;
}

@keyframes orbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== 浮动粒子 ========== */
.splash-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.splash-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0); }
    20% { opacity: 1; transform: translateY(-20px) scale(1); }
    50% { opacity: 0.6; transform: translateY(-40px) scale(0.8); }
    80% { opacity: 1; transform: translateY(-10px) scale(1.1); }
}

/* ========== 中心内容 ========== */
.splash-center {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* ========== Logo ========== */
.splash-logo-wrap {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: scale(0.3);
}

.splash-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4a9eff 0%, #a855f7 50%, #ec4899 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 30px rgba(74, 158, 255, 0.3), 0 0 60px rgba(168, 85, 247, 0.15);
    overflow: hidden;
}

.splash-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.splash-logo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    margin-top: -35px;
    margin-left: -35px;
    border: 1.5px solid transparent;
    border-top-color: rgba(74, 158, 255, 0.5);
    border-right-color: rgba(168, 85, 247, 0.3);
    border-radius: 50%;
    animation: ringRotate 3s linear infinite;
}

.splash-logo-ring-2 {
    width: 82px;
    height: 82px;
    margin-top: -41px;
    margin-left: -41px;
    border-top-color: rgba(236, 72, 153, 0.3);
    border-right-color: rgba(74, 158, 255, 0.15);
    border-left-color: rgba(168, 85, 247, 0.2);
    animation: ringRotate 5s linear infinite reverse;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes logoEnter {
    to { opacity: 1; transform: scale(1); }
}

/* ========== 乱码解码文字 ========== */
.splash-title {
    display: flex;
    gap: 1px;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 4px;
    font-family: 'Courier New', 'SF Mono', 'Fira Code', monospace;
}

.splash-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: charReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    color: rgba(255, 255, 255, 0.3);
    text-shadow: none;
    min-width: 4px;
    text-align: center;
}

.splash-char.decoded {
    color: #fff;
    text-shadow: 0 0 20px rgba(74, 158, 255, 0.5), 0 0 40px rgba(168, 85, 247, 0.2);
    animation: charDecode 0.3s ease forwards;
}

@keyframes charReveal {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes charDecode {
    0% { transform: scale(1.3); filter: blur(4px); }
    50% { transform: scale(0.95); filter: blur(0); }
    100% { transform: scale(1); filter: blur(0); }
}

/* ========== 分隔线 ========== */
.splash-divider {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4a9eff, #a855f7, #ec4899, transparent);
    animation: dividerGrow 1s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    position: relative;
}

.splash-divider::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: inherit;
    filter: blur(4px);
    opacity: 0.5;
}

@keyframes dividerGrow {
    to { width: 140px; opacity: 1; }
}

/* ========== 副标题 ========== */
.splash-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 8px;
    opacity: 0;
    animation: subtitleFade 0.6s 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateY(8px);
}

@keyframes subtitleFade {
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 圆形进度环 ========== */
.splash-ring-wrap {
    position: absolute;
    bottom: 50px;
    z-index: 10;
    opacity: 0;
    animation: subtitleFade 0.6s 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-ring-svg {
    width: 70px;
    height: 70px;
    transform: rotate(-90deg);
}

.splash-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 2;
}

.splash-ring-fg {
    fill: none;
    stroke: url(#ringGrad);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
    filter: drop-shadow(0 0 4px rgba(74, 158, 255, 0.5));
}

/* 用纯色渐变替代SVG gradient（兼容性更好） */
.splash-ring-fg {
    stroke: #4a9eff;
    background: none;
}

.splash-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* ========== 响应式 ========== */
@media (max-width: 480px) {
    .splash-title { font-size: 22px; letter-spacing: 2px; }
    .splash-logo { width: 42px; height: 42px; font-size: 18px; border-radius: 12px; }
    .splash-logo-wrap { width: 56px; height: 56px; }
    .splash-logo-ring { width: 56px; height: 56px; margin-top: -28px; margin-left: -28px; }
    .splash-logo-ring-2 { width: 66px; height: 66px; margin-top: -33px; margin-left: -33px; }
    .splash-orbit-dot { display: none; }
    .splash-subtitle { font-size: 10px; letter-spacing: 5px; }
}
