#preloader {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 9999;
    background-color: #f4f4f4;
}

/* Imagem de fundo */
.loader-bg {
    position: absolute;
    inset: 0;
    background-image: url('assets/bgloader.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Filme escuro */
    filter: brightness(.45);
    transform: scale(1.15);
}

/* Mantém a animação acima do fundo */
.scene {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    z-index: 2;
}

/* --- O VETOR DO OVO --- */
.egg-svg {
    position: absolute;
    width: 160px;
    height: 220px;
    z-index: 2;
    overflow: visible;
}

/* Estilo das cascas dentro do SVG */
.egg-shell {
    fill: #fcecd2; /* Cor realista de ovo */
    stroke: #222;  /* Borda preta fina */
    stroke-width: 2px;
}

/* Linha da rachadura que aparece na vibração */
#crackLine {
    stroke: #222;
    stroke-width: 3px;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
}

/* --- A SUA LOGO IMAGEM --- */
.logo-inside {
    position: absolute;
    opacity: 0;
    transform: scale(0);
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ajustes da imagem da logo */
.logo-inside img {
    max-width: 150px;
    max-height: 150px;
    height: auto;
    object-fit: contain;
    /* Sombra suave para dar destaque à logo quando ela sair do ovo */
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6)); 
}

/* Bloquear scroll enquanto o loader está ativo */
body.loader-active {
    overflow: hidden;
}
