/* =========================
   Variáveis Globais
========================= */ 
:root {
    --color-eletrico: rgba(252, 199, 25, 0.85);
    --color-fogo: rgba(241, 80, 0, 0.7);
    --color-agua: rgba(1, 92, 152, 0.7);
    --color-grama: rgba(73, 208, 176, 0.7);
    --color-trevas: rgba(186, 104, 200, 0.7);
    --color-fada: rgba(194, 151, 145, 0.8);
    --color-default: rgba(107, 114, 122, 0.6); 
    --color-active: #fa6668;
    --type-color: var(--color-default);
    --bg-global: rgba(0, 0, 0, 0.1); 
}

/* =========================
   Reset e Base 
========================= */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

ul { list-style-type: none; }

body, html {
    font-family: "Poppins", sans-serif;
    background: url(../imagens/background.png) no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
}

body::before { 
    content: ""; 
    position: fixed;
    inset: 0;
    z-index: 0; 
    background-color: var(--bg-global); 
    mix-blend-mode: color;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    transition: background-color 0.8s ease-in-out;
    pointer-events: none; 
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* =========================
   Mapeamento de Tipos
========================= */ 
.tipo-eletrico { --type-color: var(--color-eletrico); }
.tipo-fogo     { --type-color: var(--color-fogo); }
.tipo-agua     { --type-color: var(--color-agua); }
.tipo-grama    { --type-color: var(--color-grama); }
.tipo-trevas   { --type-color: var(--color-trevas); }
.tipo-fada     { --type-color: var(--color-fada); }

/* =========================
   Animações
========================= */ 
@keyframes entrarCartao {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pirueta {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

@keyframes slide { 
    0%, 100% { transform: translate(0, 0); } 
    25% { transform: translate(-25px, 0px); } 
    50% { transform: translate(-30px, 35px); } 
    75% { transform: translate(0px, 30px); } 
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-7px); }
}

.pula-pirueta {
    animation: pirueta 0.8s ease-in-out!important;
}

/* =========================
   Componente Cartão
========================= */ 
.pokedevs {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.cartao-pokedev {
    display: none;
    max-width: 300px;
    box-shadow: 8px 8px 10px rgba(0, 0, 0, 0.9);
    background-color: var(--type-color);
    backdrop-filter: blur(10px);
    border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
    overflow: hidden;
}

.cartao-pokedev.aberto { 
    display: block; 
    animation: entrarCartao 0.4s ease-out forwards;
}

.cartao-pokedev img {
    width: 100%;
    margin-top: 10px;
    animation: slide 6s linear infinite; 
}

.cartao-pokedev .cartao-topo {
    padding: 30px 40px 0;
}

.cartao-pokedev .detalhes {
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cartao-pokedev .detalhes span {  /* Easter Egg */
    display: inline-block; 
    transition: transform 0.1s ease, color 0.1s ease;
    user-select: none; 
    cursor: help; 
}

.cartao-pokedev .detalhes span:hover {
    transform: scale(1.2);
    color: #fff; 
    text-shadow: 0 0 5px #fff, 0 0 10px #fcc719, 0 0 15px #fcc719;
    -webkit-text-stroke: 0.5px rgba(0,0,0,0.5);
}

.cartao-pokedev .tipo {
    background-color: #ffffff;
    color: #333;
    font-size: 14px;
    opacity: 0.8;
    border-radius: 10px;
    padding: 3px 10px;
}

.cartao-pokedev .cartao-informacoes {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 80px 30px 40px;
    margin-top: -70px;
    height: 270px; 
    overflow-y: auto;
}

.cartao-pokedev .cartao-informacoes h3 {
    font-size: 19px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #6b727a;
}

.cartao-pokedev .descricao {
    font-size: 15px;
}

.cartao-pokedev .habilidades ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cartao-pokedev .habilidades li {
    background-color: var(--type-color);
    color: #fdfdfd;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 15px;
    opacity: 0.9;
    transition: all 0.3s ease;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.cartao-pokedev .habilidades li:hover {
    transform: scale(1.1);
    opacity: 1;
    color: #fff;
}

/* =========================
   Listagem Lateral
========================= */ 
.listagem { 
    max-width: 200px; 
}

.listagem .pokedev {
    background-color: var(--color-default);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    margin-bottom: 20px;
    cursor: pointer;
    border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
    min-height: 70px;
    box-shadow: 7px 7px 9px rgba(0, 0, 0, 0.9);
    transition: 0.15s ease-in-out;
}

.listagem .pokedev:hover img {
    animation: bounce 0.4s ease infinite alternate;
}

.listagem .pokedev:hover { 
    transform: scale(1.05); 
}

.listagem .pokedev.ativo {
    background-color: var(--color-active);
}

.listagem .pokedev img { 
    width: 42%; 
    padding-left: 15px; 
}

.listagem .pokedev span { 
    padding-right: 20px; 
}

/* =========================
   Responsividade
========================= */ 
@media (max-width: 750px) {
    .pokedevs { 
        flex-direction: column; 
        align-items: center; 
        padding: 20px 0; 
    }
    .cartao-pokedev { 
        max-width: 300px; 
    }
    .cartao-pokedev .cartao-informacoes {
       height: 300px;
    }
    .listagem { 
        max-width: 360px; 
    }
    .listagem ul { 
        display: flex; 
        flex-wrap: wrap; 
        gap: 8px; 
        justify-content: center; 
    }
    .listagem .pokedev { 
        width: 45%; 
        margin-bottom: 0; 
        min-height: 30px; 
        border-top-left-radius: 20px; 
        border-bottom-right-radius: 20px; 
    }
    .listagem .pokedev span { 
        font-size: 14px; 
        padding-right: 5px; 
    }
}