@keyframes subirTela {
    from {
        transform: translate(-50%, 50%); /* começa mais pra baixo */
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%); /*termina centralizado */
        opacity: 1;
    }
}

@keyframes descerTela {
    from {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
    to {
        transform: translate(-50%, 50%); 
        opacity: 0;
    }
}

@font-face {
    font-family: 'Balatro'; /* Nome da fonte */
    src: url('../../assets/fonts/balatro.otf') format('opentype'); /* Caminho para o arquivo .otf */
}

body{
    font-family: 'Balatro', sans-serif;
    margin: auto;
    cursor: url('../../assets/cursor/Hand3.png'), auto;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

main {
    display: flex;
    flex: 1; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

html, body {
    height: 100%;
}

.cabeçalho {
    width: auto; /* Para ele se adaptar melhor */
    height: auto; /* Altura automática baseada no conteúdo */
    padding: 1rem;
    margin: 2rem auto; /* Centraliza no meio */
    background-size: contain; /* Faz a imagem caber sem esticar */
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Vídeo como background */
#background-video {
    position: fixed; /* Coloca o vídeo em um nível de fundo */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Faz o vídeo cobrir a área sem distorcer */
    z-index: -1; /* Coloca o vídeo atrás do conteúdo */
}

h1 {
    position: relative;
    text-align: center;
    z-index: 1; /* Garante que o texto fique sobre o vídeo */
}

#bloco-titulo{
      width: 20rem; /* ajuste para o tamanho da sua imagem */
      height: 5rem; /* ajuste para o tamanho da sua imagem */
      background-image: url('../../assets/UI/bloco-novo.png'); /* substitua pelo caminho certo */
      background-position: center;
      background-size: 100% 100%; /* estica a imagem proporcionalmente */
      background-repeat: no-repeat;
      display:flex;
      justify-content: center;
      align-items: center;
      font-family: 'Balatro', monospace;
      font-size: 1.5rem;
      color: #29012b;
      text-shadow: 1px 1px 1px #ffaa00;
}

.bloco-botão{
    width: 200px;
    height: 80px;
    margin: 50px auto;
    background-image: url('../../assets/UI/bloco-novo.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Balatro', monospace;
    font-size: 1.5rem;
    color: #29012b;
    text-shadow: 1px 1px 1px #ffaa00;
    border: none;
    background-color: transparent;
    border-radius: 1rem;
    cursor: url('../../assets/cursor/Hand2.png'), auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#botão-voltar {
   margin-top: 20rem; 
   background-color: transparent;
   border-radius: 1rem;
   color: #29012b;
}

.paragrafo-recuado {
    text-indent: 30px;
    margin-left: 30px;
    margin-top: 0px;
    color: antiquewhite;
}

.caixa-transparente{
    background-color: rgba(0, 0, 0, 0.5); /* preto com 50% de opacidade */
    text-align:justify;
    position: relative;
    color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 1200px;
    text-indent: 30px;
}

.afasta-esquerda{
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    margin: auto;
}

.caixa-botão{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15rem; /* diminui o espaço entre os botões */
    flex-wrap: wrap; /* permite que quebre para outra linha se faltar espaço */
}

button {
    border: none; /* Sem bordas */
    transition: box-shadow 0.3s ease, transform 0.3s ease; /* Transição suave */
    background:none;
    border: none;
    border-radius: 1rem;
}

button:hover {
    transform: translateY(-25px) scale(1.05);
    box-shadow: 0 0 15px 5px rgb(240, 181, 55); /* Efeito de luz ao redor */
}

button, button *{
    cursor: url('../../assets/cursor/Hand2.png'), auto;
}

.tela-sobreposta {
    opacity: 0;
    position: fixed;
    transform-origin: center center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 50%); /* começa abaixo do centro */
    width: auto;
    max-width: 800px;
    height: 80vh;
    background-color: rgba(32, 31, 31, 0.95);
    z-index: 100;
    animation: subirTela 0.4s ease-out forwards;
    display: none;
    color: white;
    padding: 2rem;
    overflow-y: none;
    border-radius: 1rem;
    height: auto;
}
  
  .tela-sobreposta.abrindo {
    opacity: 1;
    transform: translateY(0);
  }
  

#sale {
    width: 49rem;
    height: 30rem;
}

.ativo {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.sidebar {
    width: 20rem;
    height: 70rem;
    background-color: #444444;
    border-left: 0.3rem solid rgb(175, 61, 61);
    border-right: 0.3rem solid rgb(175, 61, 61);
    box-sizing: border-box;

    display: flex;              /* ativa flexbox */
    flex-direction: column;     /* organiza os elementos na vertical */
    justify-content: flex-start; /* alinha os itens no topo */
    align-items: center;         /* centraliza na horizontal */
    padding-top: 12rem;           /* redução no espaçamento superior */        /* espaçamento superior para afastar do topo */

}

.project-footer {
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 0.80rem;
    text-align: center;
    padding: 0.5rem 0.5rem;
    font-family: 'Press Start 2P'; 
    border-top: 2px dashed #fcd34d;
    margin-top: 5rem;
}

  .project-footer strong {
    color: #ff8800;
}  

#tela-preta {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: black;
	opacity: 0;
	transition: opacity 0.5s;
	pointer-events: none;
	z-index: 1000;
}

#tela-preta.ativo {
	opacity: 1;
	pointer-events: auto;
}

/* Ajustes gerais para garantir que o layout se ajuste à tela */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Balatro', sans-serif;
    overflow-x: hidden; /* Impede o excesso de largura */
}

/* Vídeo como fundo */
#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

@media screen and (max-width: 800px) {
    .cabeçalho {
        width: 100%;
        scale: 0.8;
    }

    .sidebar {
        width: 90%;
        height: auto;
        padding-top: 5rem;
    }

    .project-footer {
        font-size: 1rem;
        text-align: center;
    }

    #tela-preta {
        height: 100%;
    }

    .tela-sobreposta {
        width: 90%;
        height: auto;
        max-height: 90vh;
        padding: 1rem;
    }

    .bloco-botão {
        width: 150px; /* diminui o tamanho dos botões */
        height: 60px;
        font-size: 1.2rem;
    }

    .afasta-esquerda {
        align-items: center;
    }

    #bloco-titulo {
        width: 15rem;
        height: 4rem;
        font-size: 1.2rem;
    }

    .caixa-transparente {
        width: 90%;
        padding: 1rem;
        font-size: 0.9rem;
        margin: 0 auto; /* NOVO: centraliza horizontalmente */
        text-indent: 30px;
        box-sizing: border-box; /* garante que padding não aumente o tamanho */
    }

    .caixa-botão {
        gap: 1rem; /* diminui o espaço entre os botões */
    }

    #sale {
        width: 100%;
        height: auto;
    }
}