﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    background-color: #090A0F;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    color-scheme: dark;
}

html {
    background: #090A0F;
}

    body::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(2px 2px at 20px 30px, white, transparent), radial-gradient(2px 2px at 60px 70px, white, transparent), radial-gradient(1px 1px at 50px 50px, white, transparent), radial-gradient(1px 1px at 130px 80px, white, transparent), radial-gradient(2px 2px at 90px 10px, white, transparent);
        background-size: 200px 200px;
        animation: stars 3s ease-in-out infinite;
        opacity: 0.5;
    }

    body::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(ellipse at center, rgba(138, 43, 226, 0.15) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(147, 51, 234, 0.2) 0%, transparent 50%), radial-gradient(ellipse at 20% 80%, rgba(124, 58, 237, 0.15) 0%, transparent 50%);
        animation: nebula 8s ease-in-out infinite alternate;
    }

.splash-container {
    text-align: center;
    animation: fadeIn 0.8s ease-in;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 40px rgba(167, 139, 250, 0.5);
    animation: slideDown 1s ease-out, glow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.4));
}

.subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    letter-spacing: 0.2rem;
    animation: slideUp 1s ease-out;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
}

.loader {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
    animation: rotate 2s linear infinite;
}

.loader-circle {
    width: 100%;
    height: 100%;
    border: 8px solid rgba(167, 139, 250, 0.2);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.4);
}

.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-top: 2rem;
    letter-spacing: 0.1rem;
    animation: pulse 1.5s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
    z-index: -1;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

    .particle:nth-child(1) {
        width: 3px;
        height: 3px;
        left: 10%;
        top: 20%;
        animation-delay: 0s;
        background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, transparent 70%);
    }

    .particle:nth-child(2) {
        width: 4px;
        height: 4px;
        left: 80%;
        top: 40%;
        animation-delay: 0.5s;
        background: radial-gradient(circle, rgba(167, 139, 250, 0.8) 0%, transparent 70%);
    }

    .particle:nth-child(3) {
        width: 2px;
        height: 2px;
        left: 30%;
        top: 60%;
        animation-delay: 1s;
        background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, transparent 70%);
    }

    .particle:nth-child(4) {
        width: 5px;
        height: 5px;
        left: 70%;
        top: 80%;
        animation-delay: 1.5s;
        background: radial-gradient(circle, rgba(167, 139, 250, 0.9) 0%, transparent 70%);
    }

    .particle:nth-child(5) {
        width: 3px;
        height: 3px;
        left: 50%;
        top: 10%;
        animation-delay: 2s;
        background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, transparent 70%);
    }

    .particle:nth-child(6) {
        width: 2px;
        height: 2px;
        left: 15%;
        top: 75%;
        animation-delay: 0.8s;
        background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, transparent 70%);
    }

    .particle:nth-child(7) {
        width: 4px;
        height: 4px;
        left: 85%;
        top: 15%;
        animation-delay: 1.2s;
        background: radial-gradient(circle, rgba(167, 139, 250, 0.8) 0%, transparent 70%);
    }

    .particle:nth-child(8) {
        width: 3px;
        height: 3px;
        left: 40%;
        top: 85%;
        animation-delay: 1.8s;
        background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, transparent 70%);
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

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

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

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

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }

    33% {
        transform: translateY(-20px) translateX(10px);
    }

    66% {
        transform: translateY(-10px) translateX(-10px);
    }
}

@keyframes stars {
    0%, 100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes nebula {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.2) rotate(10deg);
        opacity: 0.5;
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(167, 139, 250, 0.6));
    }
}

/* Efecto de fade out cuando se carga */
.splash-container.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 3rem;
        letter-spacing: 0.3rem;
    }

    .subtitle {
        font-size: 1rem;
        letter-spacing: 0.1rem;
    }

    .loader {
        width: 60px;
        height: 60px;
    }
}
