@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --cor0: #a681c7;
    --cor1: #56396f;
    --cor2: #0d0d55;
    --cor3: #38a8bc;
    --cor4: #bd6c7d;
    --cor5: #d3fc72;
    --withe: #e6ede1;
    --withe-fundo:#e7e7dd;
    --black: #353535;
}

* {
    margin: 0px;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}
body {
    background-color: var(--withe-fundo);
    font-family: sans-serif;
}

a {
    text-decoration: none;
    color: var(--withe);
}

h1 {
    font-family: 'Press Start 2P', monospace, Arial, sans-serif;
    font-size: 20px;
    text-align: center;
}

header {
    padding: 15px 50px;
    background-color: var(--black);
    border-bottom: 10px double var(--cor4);
}

header img {
    width: 95px;
    height: 95px;
}
/* Menu */
#menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 55px;
}
#menu ul {
    list-style: none;
    display: flex;
    gap: 20px;
    font-size: 14px;
    font-family: 'Press Start 2P';
    align-items: center;
    color: var(--withe);
}

#menu a:hover {
    color: var(--cor5);
}

.penelope_img_header {
    filter: drop-shadow(-5px 2px 0 var(--withe));
}


/* MENU NORMAL (DESKTOP) */
#hamburger {
    display: none; /* ESCONDIDO */
}

menu#navLinks {
    display: flex;
    gap: 20px;
}

menu#navLinks > ul {
    display: flex;
    gap: 20px;
}

menu#navLinks > ul > li {
    list-style: none;
}

/* MOBILE */
@media (max-width: 768px) {

    #hamburger {
        display: flex;
        color: var(--withe);
        font-size: 2.5em;
        cursor: pointer;
    }

    menu#navLinks {
        display: none; /* ESCONDIDO */
        position: absolute;
        top: 90px;
        right: 0;
        width: 270px;
        background: var(--black);
        padding: 30px;
        flex-direction: column;
        gap: 30px;
        border-radius: 35px 0 0 15px;
        z-index: 9999;
    }

    menu#navLinks.active {
        display: flex; /* APARECE AO CLICAR */
    }

    menu#navLinks > ul {
        flex-direction: column;
        gap: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/*~~~~~~~~img fundo ~~~~~~~~*/
div#img_fundo {
    display: inline-block;
    width: auto;
    height: auto;

    background-color: var(--black);
    background-image: url('../imgs/circuito_fundo.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center bottom;
    border-bottom: 10px double var(--cor4);
}

/*~~~~~~~ apresentacao ~~~~~~~~~~*/
section#apresentacao {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--black);
    color: var(--withe);
    font-size: 20px;
    border: 5px groove var(--cor3);
    margin: 20px 15rem;
    padding: 30px 10rem;
    gap: 30px;
}

section#apresentacao img {
    width: 350px;
    height: 390px;
    
    opacity: 0;
    transform: translateY(15px);
    animation: appear 1s ease forwards;
}

@keyframes appear {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

.texto_apresentacao {
    line-height: 1.6;
    text-align: start;
}

/*~~~~~~~ pesqisa por jogos ~~~~~~~*/
section#secao_jogos {
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* garante que todo o conteúdo fique acima da onda */
section#secao_jogos> :not(.waves) {
    position: relative;
    z-index: 1;
}

#secao_jogos h3 {
    font-family: 'Press Start 2P', monospace, Arial, sans-serif;
    font-size: 30px;
    color: var(--cor2);
}

div#procurar {
    display: flex;
    justify-content: center;
    gap: 40px;
}

select {
  padding: 10px;
  border-radius: 10px;
  border: 2px solid var(--black);
  background-color: var(--withe);
  font-size: 15px;
  cursor: pointer;
}
select:focus {
    outline: 0px;
    border: 2px solid var(--cor1);
}
#select_ano {
    height: 35px; 
    border-radius: 10px; 
    border: 2px solid var(--black); 
    background-color: var(--withe); 
    font-size: 15px; 
    padding: 0 5px; 
    min-width: 150px;
}

#txt_pesquisa {
    border: 2px solid var(--black);
    background-color: var(--withe);
    border-radius: 10px;
    font-size: 15px;
    width: 440px;
    height: 40px;

    background-image: url('../imgs/lupa.png');
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 20px 20px;
    padding-left: 40px;
}

#txt_pesquisa:focus {
    outline: 0px;
    border: 2px solid var(--cor1);
}

/*~~~~~~~~~*/
#apresentacao_jogos {
    width: 100%;
    max-width: 50rem;
    /* limite em telas grandes */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.carrosel_jogos {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 82rem;
    overflow: hidden;
}

img.capa_jogo {
    /* capa do jogo */
    height: 20rem;
    width: 35rem;
    background-color: var(--black);
    border-radius: 5px;
}

.slides {
    /*valido para o carrosel de imgs do jogo*/
    display: flex;
    gap: 25px;
    transition: transform 0.5s ease-in-out;
    padding: 20px 40px;
    /* espaço interno pra mostrar o corte */
}

.jogo {
    flex: 0 0 250px;
    /* largura mínima */
    max-width: 100%;
    height: 20rem;
    width: 35rem;
    background-image: url(../imgs/capa.jpeg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-color: var(--black);
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.jogo:hover {
    transform: scale(1.02);
    /* zoom suave */  
}

/* botões */
.btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--withe);
    border: none;
    font-size: 2rem;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 5;
}

.btn:hover {
    background: var(--cor1);
}

.prev {
    left: 10px;
}

/* dentro da área visível, mas fora dos cards */
.next {
    right: 10px;
}

/* SVG das ondas (ajustável) */
.waves {
    position: absolute;
    bottom: 0;
    left: -10%;
    /* começo levemente à esquerda para dar "margem" ao deslize */
    width: 130%;
    /* maior que 100% para permitir animação sem expor vazio */
    height: 35rem;
    /* altura visível da onda (mude para mais/menos) */
    display: block;
    z-index: -1;
}

.waves svg,
.waves {
    display: block;
}

.wave {
    will-change: transform;
    transform-origin: center bottom;
    animation: moveWave 4s ease-in-out infinite alternate;
}

@keyframes moveWave {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-10%);
    }
}

/*~~~~~~~~~~~ roda pe ~~~~~~~~~~~~~~~~*/
footer {
    background-color: var(--black);
    border-top: 10px double var(--cor4);
    color: var(--withe);
    text-align: center;
    align-items: center;
    padding: 20px;
}

footer img {
    width: 55px;
    height: 55px;
    align-items: end;
}

footer p {
    font-size: 20px;
}

.link_empresa {
    color: #a681c7;
    cursor: pointer;
}

.link_empresa:hover {
    color: var(--cor4);
}

h5 {
    font-family: 'Press Start 2P';
    color: var(--cor5);
}

/*~~~~~~ area de dinamismo ~~~~~~~~*/
@media (max-width: 1200px) {
    section#apresentacao {
        margin: 20px 50px;
        padding: 25px 5rem;
    }

    .carrosel_jogos {
        max-width: 60rem;
    }
}

@media (max-width: 992px) {
    section#apresentacao img {
        width: 250px;
        height: 250px;
    }

    .carrosel_jogos {
        max-width: 50rem;
    }

    .slides {
        padding: 10px;
        gap: 25px;
    }

    .jogo {
        flex: 0 0 200px;
        height: 15rem;
        width: 25rem;
    }

    div.jogo img {
        height: 15rem;
        width: 25rem;
    }

}

@media (max-width: 768px) {
    header img {
        width: 85px;
        height: 85px;
    }

    section#apresentacao {
        flex-direction: column-reverse;
        margin: 20px;
        padding: 25px;
    }

    #secao_jogos h3 {
        font-size: 20px;
    }

    .carrosel_jogos {
        max-width: 30rem;
    }

    footer img {
        width: 45px;
        height: 45px;
    }
    footer p {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    section#apresentacao {
        margin: 20px;
        padding: 20px;
    }
    .texto_apresentacao {
        text-align: center;
    }
    section#apresentacao img {
        width: 200px;
        height: 200px;
    }

    /* busca */
    div#procurar {
        flex-direction: column-reverse;
        gap: 15px;
    }
    select {
        margin: 0 auto;
        width: 330px;
    }
    #txt_pesquisa {
        margin: 0 auto;
        width: 330px;
        height: 40px;
    }

    /* jogos */ 
    .carrosel_jogos {
        max-width: 22rem;
    }
    .jogo {
        height: 12rem;
        width: 20rem;
    }

    div.jogo img {
        height: 12rem;
        width: 20rem;
    }
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ galeria ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#galeria {
    height: 100%;
    padding: 30px 0;
}

div#procurar-galeria {
    display: flex;
    justify-content: center;
    gap: 40px;
}

#filtro-ano-galeria, #filtro-turma {
  padding: 10px;
  border-radius: 10px;
  border: 2px solid var(--black);
  background-color: var(--withe);
  font-size: 15px;
  cursor: pointer;
}
#filtro-ano-galeria:focus, #filtro-turma:focus {
    outline: 0px;
    border: 2px solid var(--cor3);
}

#txt_pesquisa_galeria {
    border: 2px solid var(--black);
    background-color: var(--withe);
    border-radius: 10px;
    font-size: 15px;
    width: 440px;
    height: 40px;

    background-image: url('../imgs/lupa.png');
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 20px 20px;
    padding-left: 40px;
}

#txt_pesquisa_galeria:focus {
    outline: 0px;
    border: 2px solid var(--cor3);
}

/*~~~~~~~~~*/
.carrosel-galeria-videos {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 60rem;
    overflow: hidden;
}

.slides {
    display: flex;
    margin-left: 5px;
    margin-bottom: 20px;
    transition: transform 0.5s ease-in-out;
    /* espaço interno pra mostrar o corte */
}

.video {
    flex: 0 0 54rem;
    /* largura mínima */
    max-width: 100%;
    border-radius: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
video {
    height: 25rem;
    width: 54rem;
}

/* botões */
.btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--withe);
    border: none;
    font-size: 2rem;
    padding: 5px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 1;
}

.btn:hover {
    background: rgba(0, 0, 0, 0.359);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/*~~~~~~~~~~~*/
#Galeria {
    column-count: 3; 
    column-gap: 20px;
    padding: 0 110px;
}

.imagem {
    break-inside: avoid;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.imagem img {
    width: 100%;
    height: 100%;
    border-radius: 10px 5px;
    display: block;
    background-color: var(--black);
}

/*~~~~~~ area de dinamismo ~~~~~~~~*/
@media (max-width: 1200px) {}

@media (max-width: 992px) {
    div#procurar-galeria {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 35px;
        padding: 20px;
    }
    #txt_pesquisa_galeria {
        width: 400px;
        height: 35px;
        margin: 0 auto;
        grid-column: 1 / 3; /* ocupa da coluna 1 até a 3 */
        grid-row: 2;        /* primeira linha */
    }

    .slides {
        margin-right: 15px;
    }

    #Galeria {
        column-count: 2; 
        column-gap: 15px;
        padding: 0 30px;
    }
    .imagem {
        padding: 5px;
    }
}

@media (max-width: 768px) {
    video {
        height: 20rem;
        width: 100%;
    }
}

@media (max-width: 480px) {
    div#procurar-galeria {
        display: flex;
        flex-direction: column-reverse;
        gap: 25px;
        padding: 15px;
    }
    #txt_pesquisa_galeria {
        width: 350px;
        height: 35px;
        margin: 0 auto;
        grid-column: 1 / 3; /* ocupa da coluna 1 até a 3 */
        grid-row: 2;        /* primeira linha */
    }

    video {
        height: 13rem;
    }

    .imagem {
        padding: 5px;
        text-align: center;
    }
}