/* Remove margens padrão */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Configuração geral */
html,
body {
    width: 100%;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #111111;
}

/* Evita rolagem lateral */
body {
    overflow-x: hidden;
}

/* Área principal do convite */
.aplicativo {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
    background-color: #000000;
    overflow: hidden;
}

button,
a {
    touch-action: manipulation;
}

/* Imagens das telas */
.imagem-tela {
    display: block;
    width: 100%;
    min-height: 100vh;
    object-fit: cover;
}

/* Classe usada para esconder elementos */
.escondido {
    display: none;
}

/* Tela de abertura */
.abertura {
    position: relative;
    width: 100%;
    min-height: 100vh;
    opacity: 1;
    transition:
        opacity 1s ease,
        transform 1s ease;
}

/* Animação de saída */
.abertura.saindo {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

/* Botão Abrir convite */
.botao-abrir {
    position: absolute;
    left: 50%;
    bottom: 13%;
    transform: translateX(-50%);

    width: 70%;
    padding: 14px 20px;

    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;

    background-color: rgba(30, 60, 38, 0.85);
    color: #ffffff;

    font-size: 18px;
    font-weight: bold;
    cursor: pointer;

    backdrop-filter: blur(6px);
}

/* Efeito ao tocar */
.botao-abrir:active {
    transform: translateX(-50%) scale(0.97);
}

/* Botão pular abertura */
.botao-pular {
    position: absolute;
    left: 50%;
    bottom: 5%;
    transform: translateX(-50%);

    border: none;
    background: transparent;
    color: #ffffff;

    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

/* Vídeo exibido depois da abertura */
.tela-video {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    background-color: #000000;
}

.video-abertura {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000000;
}

.botao-pular-video {
    position: absolute;
    right: 18px;
    bottom: 24px;
    z-index: 2;

    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;

    background-color: rgba(0, 0, 0, 0.65);
    color: #ffffff;

    font-size: 14px;
    cursor: pointer;
}

/* Convite principal */
.convite {
    width: 100%;
    min-height: 100vh;
}

/* Div necessária para posicionar os botões */
.conteudo-convite {
    width: 100%;
    position: relative;
}

.conteudo-convite .imagem-tela {
    min-height: 0;
    height: auto;
    object-fit: contain;
}

/* Áreas transparentes clicáveis */
.area-clicavel {
    position: absolute;
    z-index: 2;
    display: block;

    border: none;
    border-radius: 50%;

    background-color: transparent;
    cursor: pointer;

    -webkit-tap-highlight-color: transparent;
}

.area-clicavel:focus-visible,
.botao-abrir:focus-visible,
.botao-pular:focus-visible,
.botao-pular-video:focus-visible,
.botao-fechar:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

/*
Estas posições são exemplos.

Você deverá ajustar os valores de acordo
com a localização dos ícones em sua imagem.
*/

/* Localização */
.botao-localizacao {
    width: 16%;
    height: 10%;
    left: 42.5%;
    top: 65.5%;
}

/* Confirmação pelo WhatsApp */
.botao-confirmacao {
    width: 16%;
    height: 10%;
    left: 25.5%;
    top: 65.5%;
}

/* Presentes */
.botao-presentes {
    width: 16%;
    height: 10%;
    left: 59.5%;
    top: 65.5%;
}

/* Mostra uma marcação durante os testes */
.modo-teste .area-clicavel {
    background-color: rgba(255, 0, 0, 0.25);
    outline: 2px solid red;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: none;
    align-items: center;
    justify-content: center;

    background-color: rgba(0, 0, 0, 0.9);
}

/* Modal aberto */
.modal.aberto {
    display: flex;
}

/* Conteúdo central do modal */
.conteudo-modal {
    position: relative;
    width: 100%;
    max-width: 430px;
    height: 100vh;
    overflow-y: auto;
    background-color: #000000;
}

/* Imagem do modal */
.imagem-modal {
    display: block;
    width: 100%;
    min-height: 0;
    height: auto;
    object-fit: contain;
}

/* Botão fechar */
.botao-fechar {
    position: fixed;
    top: 18px;
    left: max(18px, calc((100vw - 430px) / 2 + 18px));

    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;

    background-color: rgba(0, 0, 0, 0.65);
    color: #ffffff;

    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

/* Melhora a visualização em computadores */
@media screen and (min-width: 431px) {
    body {
        padding: 20px 0;
    }

    .aplicativo {
        min-height: calc(100vh - 40px);
        border-radius: 12px;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    }

    .imagem-tela {
        min-height: calc(100vh - 40px);
    }
}
