/* Preloader Styles */
@import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&display=swap');

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10002;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
}

.preloader-logo {
    max-width: 400px;
    max-height: 400px;
    width: auto;
    height: auto;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInLogo 1s ease-in-out 0.5s forwards;
}

/* Título do preloader */
.preloader-title {
    color: #fff;
    font-family: "Alfa Slab One", cursive;
    font-size: 2.2rem;
    font-weight: normal;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInTitle 1.2s ease-in-out 0.8s forwards;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Linha de batimento cardíaco */
.heartbeat-line {
    width: 400px;
    height: 2px;
    background-color: #fff;
    position: relative;
    margin: 20px 0;
    overflow: hidden;
}

.heartbeat-pulse {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        transparent 45%, 
        #999999 48%, 
        #cccccc 50%, 
        #999999 52%, 
        transparent 55%, 
        transparent 100%
    );
    animation: heartbeat 2s infinite;
}

/* Animações */
@keyframes fadeInLogo {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInTitle {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes heartbeat {
    0% {
        left: -100%;
        transform: scaleX(1);
    }
    15% {
        left: -50%;
        transform: scaleX(1.2);
    }
    25% {
        left: -20%;
        transform: scaleX(0.8);
    }
    35% {
        left: 10%;
        transform: scaleX(1.5);
    }
    45% {
        left: 50%;
        transform: scaleX(0.9);
    }
    60% {
        left: 100%;
        transform: scaleX(1);
    }
    100% {
        left: 100%;
        transform: scaleX(1);
    }
}

/* Texto de carregamento */
.loading-text {
    color: #fff;
    font-family: "Roboto Slab", serif;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-top: 30px;
    opacity: 0;
    animation: fadeInText 1s ease-in-out 1s forwards;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

/* Responsividade */
@media screen and (max-width: 768px) {
    .preloader-logo {
        max-width: 280px;
        max-height: 280px;
        margin-bottom: 15px;
    }
    
    .preloader-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
        letter-spacing: 0.5px;
    }
    
    .heartbeat-line {
        width: 250px;
    }
    
    .loading-text {
        font-size: 1rem;
        margin-top: 20px;
    }
}

@media screen and (max-width: 480px) {
    .preloader-logo {
        max-width: 220px;
        max-height: 220px;
        margin-bottom: 15px;
    }
    
    .preloader-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
        letter-spacing: 0.3px;
    }
    
    .heartbeat-line {
        width: 200px;
    }
    
    .loading-text {
        font-size: 0.9rem;
        margin-top: 15px;
    }
}
