/* 
 * 星辰加密系统 - 启动页样式
 * 版本: v1.0.1
 * 最后更新: 2024-06-07
 */

.splash-screen {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    max-width: 100vw;
    touch-action: none;
    background: radial-gradient(ellipse at center, #0f0f23 0%, #090920 50%, #030311 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    will-change: opacity;
    transform: translateZ(0);
    z-index: 9999;
}

.splash-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 5% 10%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 15% 25%, rgba(139, 233, 253, 0.8), transparent),
        radial-gradient(1px 1px at 25% 45%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 35% 15%, rgba(189, 147, 249, 0.8), transparent),
        radial-gradient(1px 1px at 45% 55%, rgba(255, 121, 198, 0.8), transparent),
        radial-gradient(1px 1px at 55% 30%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 65% 70%, rgba(139, 233, 253, 0.8), transparent),
        radial-gradient(1px 1px at 75% 40%, rgba(80, 250, 123, 0.8), transparent),
        radial-gradient(1px 1px at 85% 60%, rgba(255, 184, 108, 0.8), transparent),
        radial-gradient(1px 1px at 95% 80%, rgba(255, 255, 255, 0.9), transparent);
    z-index: -1;
    opacity: 0.8;
    will-change: opacity;
    animation: starsAppear 1s ease-in forwards;
}

.splash-meteor {
    position: absolute;
    height: 1px;
    border-radius: 100px;
    opacity: 0;
    transform: translateZ(0);
    will-change: transform, opacity;
}

.splash-meteor:nth-child(2) {
    width: 100px;
    top: 15%;
    left: -10%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
    animation: meteor 3s linear 0.2s infinite;
}

.splash-meteor:nth-child(3) {
    width: 150px;
    top: 25%;
    left: -15%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(139, 233, 253, 0.9), rgba(139, 233, 253, 0));
    animation: meteor 2.5s linear 0.8s infinite;
}

.splash-meteor:nth-child(4) {
    width: 120px;
    top: 35%;
    left: -5%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(189, 147, 249, 0.9), rgba(189, 147, 249, 0));
    animation: meteor 3.2s linear 1.5s infinite;
}

.splash-meteor:nth-child(5) {
    width: 80px;
    top: 45%;
    left: -10%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 121, 198, 0.9), rgba(255, 121, 198, 0));
    animation: meteor 2.8s linear 0.5s infinite;
}

.splash-meteor:nth-child(6) {
    width: 130px;
    top: 55%;
    left: -15%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(80, 250, 123, 0.9), rgba(80, 250, 123, 0));
    animation: meteor 3.5s linear 1.2s infinite;
}

.splash-meteor:nth-child(7) {
    width: 90px;
    top: 65%;
    left: -10%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 184, 108, 0.9), rgba(255, 184, 108, 0));
    animation: meteor 2.9s linear 0.3s infinite;
}

.splash-meteor:nth-child(8) {
    width: 120px;
    top: 75%;
    left: -5%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(241, 250, 140, 0.9), rgba(241, 250, 140, 0));
    animation: meteor 3.3s linear 1.8s infinite;
}

.splash-meteor:nth-child(9) {
    width: 140px;
    top: 10%;
    left: -15%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
    animation: meteor 3.1s linear 2.2s infinite;
}

.splash-meteor:nth-child(10) {
    width: 100px;
    top: 85%;
    left: -5%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(139, 233, 253, 0.9), rgba(139, 233, 253, 0));
    animation: meteor 3.7s linear 1.0s infinite;
}

.splash-meteor:nth-child(11) {
    width: 110px;
    top: 30%;
    left: -10%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(189, 147, 249, 0.9), rgba(189, 147, 249, 0));
    animation: meteor 2.7s linear 2.5s infinite;
}

.splash-star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(139, 233, 253, 0.6);
    animation: starPulse 3s ease-in-out infinite alternate;
    will-change: transform, opacity;
    z-index: 1;
}

.splash-star:nth-child(12) {
    width: 6px;
    height: 6px;
    top: 25%;
    left: 30%;
    background: #8be9fd;
    animation-delay: 0.5s;
}

.splash-star:nth-child(13) {
    width: 5px;
    height: 5px;
    top: 15%;
    left: 70%;
    background: #ff79c6;
    animation-delay: 1.2s;
}

.splash-star:nth-child(14) {
    width: 7px;
    height: 7px;
    top: 75%;
    left: 25%;
    background: #50fa7b;
    animation-delay: 0.8s;
}

.splash-star:nth-child(15) {
    width: 4px;
    height: 4px;
    top: 60%;
    left: 65%;
    background: #bd93f9;
    animation-delay: 1.5s;
}

.splash-star:nth-child(16) {
    width: 8px;
    height: 8px;
    top: 40%;
    left: 80%;
    background: #ffb86c;
    animation-delay: 0.2s;
}

.splash-nebula {
    position: absolute;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, 
                rgba(139, 233, 253, 0.1) 0%, 
                rgba(189, 147, 249, 0.1) 30%, 
                rgba(255, 121, 198, 0.1) 50%, 
                transparent 70%);
    filter: blur(20px);
    opacity: 0;
    animation: nebulaAppear 2s ease-in forwards;
    mix-blend-mode: screen;
    z-index: -1;
}

.splash-title {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 2.5rem;
    position: relative;
    text-shadow: 0 0 15px rgba(139, 233, 253, 0.8);
    animation: titleJelly 1.2s ease-out,
               titleGlow 4s ease-in-out infinite alternate,
               titleFloat 6s ease-in-out infinite;
    will-change: transform, opacity, text-shadow;
    transform: translateZ(0);
    z-index: 2;
    letter-spacing: 2px;
}

.splash-title::before,
.splash-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transform-origin: center;
    opacity: 0.5;
}

.splash-title::before {
    text-shadow: 0 0 20px #ff79c6;
    animation: glitchEffect 3s infinite;
}

.splash-title::after {
    text-shadow: 0 0 20px #bd93f9;
    animation: glitchEffect 2s infinite reverse;
}

.enter-btn {
    background: linear-gradient(45deg, #282a36, #44475a);
    color: #f8f8f2;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.3rem;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(139, 233, 253, 0.5);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: buttonAppear 0.5s ease-in 2s forwards;
    will-change: transform, box-shadow;
    z-index: 2;
}

.enter-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff79c6, #bd93f9, #8be9fd, #50fa7b);
    z-index: -1;
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.enter-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 25px rgba(139, 233, 253, 0.6);
}

.enter-btn:hover::before {
    opacity: 0.3;
    animation: rotate-gradient 3s linear infinite;
}

.enter-btn:active {
    transform: scale(0.95) translateY(0);
}

@keyframes starsAppear {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes nebulaAppear {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
}

@keyframes buttonAppear {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes meteor {
    0% {
        transform: translateX(0) rotate(-45deg);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateX(200vw) translateY(200vh) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes titleJelly {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(0.9);
    }
    85% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes titleGlow {
    0% {
        text-shadow: 0 0 15px rgba(139, 233, 253, 0.6);
    }
    50% {
        text-shadow: 0 0 25px rgba(139, 233, 253, 0.8),
                    0 0 45px rgba(80, 250, 123, 0.4);
    }
    100% {
        text-shadow: 0 0 15px rgba(139, 233, 253, 0.6),
                    0 0 30px rgba(189, 147, 249, 0.4);
    }
}

@keyframes glitchEffect {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(3px, -3px); }
    60% { transform: translate(-3px, -3px); }
    80% { transform: translate(3px, 3px); }
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes starPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.7;
        box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
    }
}

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

@media screen and (max-width: 768px) {
    .splash-title {
        font-size: 2.5rem;
    }
    
    .enter-btn {
        padding: 10px 25px;
        font-size: 1.1rem;
    }
    
    .splash-nebula {
        width: 200px;
        height: 200px;
    }
}

@media screen and (max-width: 480px) {
    .splash-title {
        font-size: 2rem;
    }
    
    .enter-btn {
        padding: 8px 20px;
        font-size: 1rem;
    }
    
    .splash-nebula {
        width: 150px;
        height: 150px;
    }
}