/* Splash Screen Styles */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--color-agro-dark) 0%, var(--color-background-dark) 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.8s ease-out;
    pointer-events: all;
}

#splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#splash-screen.fast-exit {
    transition: opacity 0.3s ease-out;
}

/* Logo Container - Ajustado para imágenes grandes */
.splash-logo-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

/* Contenedor interno para la imagen con fondo blanco */
.splash-logo-inner {
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: 50%;
    padding: 20px;
    box-shadow: 
        0 0 60px rgba(19, 236, 19, 0.4),
        0 0 120px rgba(19, 236, 19, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* La imagen del logo */
.splash-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Glow effect alrededor del logo */
.splash-logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(
        circle at center,
        rgba(19, 236, 19, 0.3) 0%,
        rgba(19, 236, 19, 0.1) 40%,
        transparent 70%
    );
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
    z-index: -1;
}

/* Animations */
@keyframes float {
    0%, 100% { 
        transform: translateY(0) scale(1); 
    }
    50% { 
        transform: translateY(-20px) scale(1.05); 
    }
}

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 0.5;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progress-bar {
    from { width: 0%; }
    to { width: 100%; }
}

@keyframes dots-bounce {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

/* Logo animation */
.splash-logo-container {
    animation: float 3s ease-in-out infinite;
}

/* Text styles */
.splash-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    text-align: center;
    margin-bottom: 0.5rem;
    animation: fade-in-up 0.8s ease-out 0.2s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.splash-title span {
    color: var(--color-primary);
}

.splash-subtitle {
    font-size: 1.2rem;
    color: var(--color-agro-gold);
    text-align: center;
    margin-bottom: 2rem;
    animation: fade-in-up 0.8s ease-out 0.4s both;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Progress bar */
.splash-progress-container {
    width: 300px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 2rem auto;
    animation: fade-in-up 0.8s ease-out 0.6s both;
}

.splash-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, 
        var(--color-primary),
        var(--color-agro-gold)
    );
    border-radius: 3px;
    transition: width 5s ease-out;
}

/* Loading dots */
.splash-loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    animation: fade-in-up 0.8s ease-out 0.8s both;
}

.splash-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-primary);
    animation: dots-bounce 1.4s ease-in-out infinite;
}

.splash-dot:nth-child(2) {
    animation-delay: 0.2s;
    background-color: var(--color-agro-gold);
}

.splash-dot:nth-child(3) {
    animation-delay: 0.4s;
    background-color: var(--color-primary);
}

/* Hide main content while splash is visible */
body.splash-active {
    overflow: hidden;
}

body.splash-active #app {
    opacity: 0;
    visibility: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .splash-logo-container {
        width: 150px;
        height: 150px;
    }
    
    .splash-title {
        font-size: 2.5rem;
    }
    
    .splash-subtitle {
        font-size: 1rem;
    }
    
    .splash-progress-container {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .splash-logo-container {
        width: 120px;
        height: 120px;
    }
    
    .splash-logo-inner {
        padding: 15px;
    }
    
    .splash-title {
        font-size: 2rem;
    }
    
    .splash-progress-container {
        width: 200px;
    }
}

/* Texto de progreso */
.splash-progress-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-top: 1rem;
    animation: fade-in-up 0.8s ease-out 1s both;
    min-height: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Transición suave para la barra de progreso */
.splash-progress-bar {
    transition: width 0.3s ease-out;
}

/* Animación para el texto de progreso */
@keyframes fade-in-out {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.splash-progress-text {
    animation: fade-in-out 2s ease-in-out infinite;
}

/* Responsive para texto de progreso */
@media (max-width: 768px) {
    .splash-progress-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .splash-progress-text {
        font-size: 0.75rem;
    }
}