
/* =========================================
   GLUB — ESCOLHA DE FASES
   ========================================= */

#fases-tela {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;

    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;

    padding: 1% 2%;
    z-index: 170;

    background: linear-gradient(
        180deg,
        #164b60,
        #092c38
    );
}

/* =========================================
   TÍTULO
   ========================================= */

#fases-tela .fases-titulo {
    margin: 0;
    padding: 0.4% 2%;

    color: #ffe3a1;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 900;
    text-align: center;
    text-shadow: 2px 3px 3px #321500;

    background: linear-gradient(
        #ac692d,
        #713b16
    );

    border: 3px solid #dba24b;
    border-radius: 12px;

    flex-shrink: 0;
}

/* =========================================
   ORGANIZAÇÃO DOS SEIS QUADROS
   ========================================= */

#fases-tela .fases-grade {
    width: 100%;
    flex: 1;
    min-height: 0;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    grid-template-rows:
        repeat(2, minmax(0, 1fr));

    align-items: stretch;

    gap: 2%;
    padding: 1% 0;

    box-sizing: border-box;
}

/* =========================================
   MOLDURAS DAS MINIATURAS
   ========================================= */

#fases-tela .fases-miniatura {
    grid-column: auto;

    position: relative;

    min-height: 0;
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 0;
    overflow: hidden;

    cursor: pointer;
    touch-action: manipulation;

    border: 4px solid #d69b43;
    border-radius: 12px;

    background: #123b45;

    box-shadow: 0 4px 10px rgba(0,0,0,.55);

    transition:
        transform .15s ease,
        filter .15s ease,
        box-shadow .15s ease;
}

/* =========================================
   IMAGENS DO TREINO E DAS ATIVIDADES
   ========================================= */

#fases-tela .fases-miniatura > img {
    display: block;

    width: 100%;
    height: 0;

    flex: 1;
    min-height: 0;

    object-fit: contain;
    object-position: center;

    background: #123b45;

    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* =========================================
   LEGENDAS
   ========================================= */

#fases-tela .fases-miniatura span {
    display: block;

    padding: 5px 0;

    color: #fff3cf;

    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 900;

    text-align: center;
    line-height: 1.1;

    background: linear-gradient(
        #a85f25,
        #713b16
    );

    flex-shrink: 0;
    pointer-events: none;
}

/* =========================================
   EFEITOS DAS MINIATURAS CLICÁVEIS
   ========================================= */

#fases-tela .fases-miniatura:not(:disabled):hover {
    transform: scale(1.035);
    filter: brightness(1.12);
    box-shadow: 0 0 15px #ffdc65;
    z-index: 5;
}

#fases-tela .fases-miniatura:not(:disabled):active {
    transform: scale(.97);
}

#fases-tela .fases-miniatura:focus-visible {
    outline: 4px solid #ffe45c;
    outline-offset: 3px;
}

/* =========================================
   SEXTO QUADRO — FASE BLOQUEADA
   ========================================= */

#fases-tela .fases-bloqueada {
    cursor: not-allowed;
    opacity: 1;

    background: #123b45;
    border-color: #d69b43;
}

/* Área reservada ao baú fechado */

#fases-tela .fases-cadeado {
    display: flex;

    flex: 1;
    width: 100%;
    min-height: 0;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: radial-gradient(
        circle,
        #31596a,
        #102e39
    );
}

/* Imagem do baú fechado */

#fases-tela .fases-cadeado img {
    display: block;

    width: 95%;
    height: 95%;

    flex: none;

    object-fit: contain;
    object-position: center;

    background: transparent;

    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Legenda da fase bloqueada */

#fases-tela .fases-bloqueada span {
    color: #fff3cf;

    background: linear-gradient(
        #a85f25,
        #713b16
    );
}

/* Impede efeitos no quadro bloqueado */

#fases-tela .fases-bloqueada:hover,
#fases-tela .fases-bloqueada:active {
    transform: none;
    filter: none;
    box-shadow: 0 4px 10px rgba(0,0,0,.55);
}

/* =========================================
   RODAPÉ — PLACAR E VOLTAR
   ========================================= */

#fases-tela .fases-rodape {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    flex-shrink: 0;

    padding: 0;
}

/* Placas originais do tema pirata */

#fases-tela .fases-rodape button {
    width: 13%;
    height: 70px;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 0;

    background: transparent;
    box-shadow: none;

    cursor: pointer;

    transition:
        transform .15s ease,
        filter .15s ease;
}

/* Imagens das placas */

#fases-tela .fases-rodape button img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Efeitos das placas */

#fases-tela .fases-rodape button:hover {
    transform: scale(1.08);
    filter: brightness(1.15);
    background: transparent;
}

#fases-tela .fases-rodape button:active {
    transform: scale(.95);
}
