/* ========================================
   PENSE RÁPIDO - ESTILOS
   Jogo de classificação de cartas
   ======================================== */

* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#mainpense_rapido {
    width: 100%;
    height: 100%;
    overflow: hidden;
}



#stage {
    width: 60%;
    height: 70%;
    position: absolute;
    top: 15%;
    left: 20%;
}

#cima {
    width: 100%;
    height: 15%;
    position: absolute;
    top: 0px;
    left: 0%;
}

#baixo {
    width: 100%;
    height: 15%;
    position: absolute;
    top: 85%;
    left: 0%;
}

#direita {
    width: 20%;
    height: 70%;
    position: absolute;
    top: 15%;
    left: 80%;
}

#esquerda {
    width: 20%;
    height: 70%;
    position: absolute;
    top: 15%;
    left: 0%;

}

#esquerda .centraliza, #direita .centraliza {
    text-align: center;
    width: 20vw;
    padding: 12px;
}

/* ========================================
   ÁREAS DE DIREÇÃO (GRUPOS)
   ======================================== */

.direcao {
    cursor: pointer;
    transition: all 0.3s ease;
}

.direcao:hover {
    background: var(--neutral-200);
}

.direcao:active {
    background: var(--neutral-300);
}

/* Estado bloqueado durante animação */
.direcao.bloqueado {
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.grupo-card .centraliza, .tip_grupo-card .centraliza {
    color: var(--neutral-800);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.card[tembg='s'], .grupo-card[tembg='s'] , .tip_grupo-card[tembg='s'] {
    border: 5px solid #fff;
}

.card[tembg='s'] .card-content, .grupo-card[tembg='s'] .centraliza , .tip_grupo-card[tembg='s'] .centraliza{
    background-color: #fff;
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translate(-50%, calc(-100% + 5px));
    line-height: 1em;
    padding: 4px;
    border-radius: 5px;
    font-size: 14px;
    /* color: var(--texto); */
    max-width: 90%;
    min-width: 70%;
    text-align: center;
}

.centraliza {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1em;
    color: var(--primary);
    text-decoration: underline;
    font-weight: 700;
    font-size: 16px;
    transition: color 0.3s ease;
}

.direcao:hover .centraliza {
    color: var(--primary-dark);
}

.card {
    position: absolute;
    width: 80%;
    max-width: 200px;
    height: 70%;
    max-height: 230px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    transition: all 0.3s ease;

    &:hover {
        box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
        transform: translate(-50%, -50%) scale(1.2);
        
    }

}

.card-content {
    /* position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); */
    display: flex;
    font-size: 20px;
    color: var(--neutral900);
    font-weight: 600;
    text-align: center;

    @media (max-width: 768px) {
        font-size: 16px;
    }

}

.ouvir-container {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: var(--neutral900);

}



/* ========================================
   CARD-MINI (INDICADORES NOS GRUPOS)
   ======================================== */

.card-mini {
    background: var(--neutral-100);
    border: 1px solid var(--neutral-400);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    width: 10px;
    height: 14px;
    display: inline-block;
    margin-left: 6px;
    transition: all 0.3s ease;
}

.card-mini-correta {
    background: var(--feedback-positivo-100);
    border-color: var(--feedback-positivo);
    box-shadow: 0 0 8px var(--feedback-positivo-light);
    animation: pulseCorrect 2s ease-in-out infinite;
}

@keyframes pulseCorrect {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ========================================
   TELA DE RESULTADOS
   ======================================== */

#resultados {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--neutral-100);
    top: 0;
    left: 0;
    display: none;
    overflow-y: auto;
    padding-top: 50px;
}

#resultados h1 {
    text-align: center;
    color: var(--neutral-800);
    font-size: 32px;
    margin-bottom: 30px;
}

/* ========================================
   BOTÕES DE AÇÃO
   ======================================== */

.botoes-resultado {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px;
    margin-top: 20px;
}

.btn_novamente,
.btn_incorretas {
    margin: 0;
    min-width: 200px;
}

/* Os botões btn_novamente e btn_incorretas usam as classes
   btn-azul e btn-verde definidas em g_styles.css */

/* ========================================
   GRUPOS DE CARTAS (RESULTADOS)
   ======================================== */

.grupo {
    float: left;
    width: 50%;
    text-align: center;
    padding-bottom: 32px;
}

.grupo-titulo {
    text-align: center;
    font-weight: 800;
    font-size: 18px;
    padding: 12px 5px;
    color: var(--neutral-800);
    background: var(--neutral-200);
    border-radius: 12px;
    margin: 0 16px 16px 16px;
}

.grupo-card,
.tip_grupo-card {
    display: inline-block;
    border-radius: 12px;
    background: var(--neutral-100);
    width: 100px;
    height: 160px;
    position: relative;
    margin: 8px 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 3px solid var(--neutral-300);
}

.grupo-card:hover,
.tip_grupo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* ========================================
   FEEDBACK VISUAL - CARTAS CORRETAS/ERRADAS
   ======================================== */

.certo {
    border: 3px solid var(--feedback-positivo);
    background: var(--feedback-positivo-100);
    animation: feedbackCorrect 0.5s ease;
}

.errado {
    border: 3px solid var(--feedback-negativo);
    background: var(--feedback-negativo-light);
    animation: feedbackWrong 0.5s ease;
}

@keyframes feedbackCorrect {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes feedbackWrong {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.errado::after {
    /* content      : "\2718"; */
    /* width     : 10px;
    height       : 10px; */
    /* background   : #FE4A4B;
    display      : inline-block;
    line-height  : 1em;
    color        : #fff;
    padding      : 0 3px;
    border-radius: 10px; */
    content: url(../imgs/icon_errado.svg);
    display: inline-block;
}

.certo::after {
    /* content      : "\2714"; */
    /* width     : 10px;
    height       : 10px; */
    /* background   : #4FBA43;
    display      : inline-block;
    line-height  : 1em;
    color        : #fff;
    padding      : 0 3px;
    border-radius: 10px; */
    content: url(../imgs/icon_certo.svg);
    display: inline-block;
}

/* ========================================
   FEEDBACK DE ERRO
   ======================================== */

.feed_errado {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, var(--feedback-negativo-light) 0%, var(--neutral-100) 100%);
    border: 2px solid var(--feedback-negativo);
    clear: both;
    max-width: 800px;
    margin: 24px auto;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.2);
}

.feed_errado .feed_msg {
    font-size: 22px;
    font-weight: 800;
    color: var(--feedback-negativo-dark);
    margin-bottom: 16px;
}

/* ========================================
   BOTÃO DE DICA
   ======================================== */

#tip_btn {
    display: flex;
    align-items: center;
    max-width: 280px;
    margin: 20px auto 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 12px;
}

#tip_btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.5);
}

#tip_btn img {
    display: block;
    width: 60px;
    height: auto;
    flex-shrink: 0;
}

#tip_balao {
    background: var(--neutral-100);
    font-weight: 600;
    font-size: 13px;
    color: var(--neutral-800);
    border-radius: 12px 12px 12px 0;
    border: 2px solid var(--primary);
    margin-left: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

#tip_balao::before {
    content: '';
    position: absolute;
    left: -8px;
    bottom: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent var(--primary) transparent transparent;
}

.centro {
    text-align: center;
}


#jogo_enunciado {
    position: absolute;
    /* border: 1px solid red; */
    width: 60%;
    position: absolute;
    top: 50%;
    left: 20%;
    text-align: center;
    padding-bottom: 24px;
    font-size: 15px;
    transform: translateY(calc(-100% - 115px));
}


/* ========================================
   MODAL DE DICA (RESPOSTAS)
   ======================================== */

#tip_content {
    position: fixed;
    background: var(--neutral-100);
    width: calc(100% - 40px);
    max-width: 900px;
    max-height: calc(100% - 100px);
    left: 50%;
    top: 50%;
    border-radius: 20px;
    transform: translate(-50%, -50%);
    padding: 32px 24px;
    overflow-y: auto;
    display: none;
    flex-wrap: wrap;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    justify-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    z-index: 10000;
}

#tip_content h2 {
    width: 100%;
    font-size: 28px;
    font-weight: 800;
    color: var(--neutral-800);
    margin-bottom: 24px;
    text-align: center;
}

#tip_content h3 {
    width: 100%;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 16px 0 12px 0;
    padding: 8px 12px;
    background: var(--primary-verylight);
    border-radius: 10px;
    text-align: center;
}

#tip_buttons {
    width: 100%;
    text-align: center;
    margin-top: 24px;
}

/* Botões dentro do modal usam estilos padrão do g_styles.css */

.tip_group {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--neutral-200);
    border-radius: 16px;
}

/* ========================================
   BACKDROP DO MODAL
   ======================================== */

/* #tip_content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
} */

/* ========================================
   RESPONSIVIDADE
   ======================================== */

@media only screen and (max-width: 768px) {
    .card {
        width: 80%;
        max-width: 150px;
        height: 65%;
        max-height: 210px;
    }

    #jogo_enunciado {
        font-size: 13px;
        padding-bottom: 16px;
    }

    .centraliza {
        font-size: 13px;
        font-weight: 900;
    }

    .feed_errado {
        padding: 24px 16px;
        margin: 16px;
    }

    #resultados h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .grupo {
        width: 100%;
        float: none;
    }

    .botoes-resultado {
        flex-direction: column;
        padding: 16px;
    }

    .btn_novamente,
    .btn_incorretas {
        width: 100%;
        min-width: auto;
    }

    #tip_content {
        width: calc(100% - 20px);
        padding: 20px 16px;
    }

    #tip_content h2 {
        font-size: 22px;
    }

    #tip_content h3 {
        font-size: 16px;
    }

    .tip_group {
        padding: 12px;
    }
}


#feed{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    margin: 0 auto;
}
