@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,800;1,400;1,600;1,800&display=swap');




* {
    box-sizing: border-box;
    margin: 0;
    user-select: none;

    font-family: 'Nunito', sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

html {
    height: 100%;
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;

    display: flex;

    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    height: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #ccc;

    flex-shrink: 0;
    align-self: stretch;
    height: 50px;

    /* pointer-events: none; */


    #header_form {
        display: flex;

        input {
            user-select: auto;
            /* pointer-events: all; */
        }
    }

    h1 {
        font-size: 26px;
        font-weight: 700;
    }
}

main {
    background: #f0f0f0;
    flex: 1 0 0;
    align-self: stretch;
    position: relative;




    #options {
        position: fixed;
        z-index: 10000;
        left: calc(100% - 30px);
        top: calc(100% - 30px);
        transform: translate(-100%, -100%);
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
    }

    #svgContainer {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        /* border: 2px solid yellow; */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }





    #palco {
        background: #000;
        position: relative;
        width: 100vw;
        height: calc(100vh - 50px);
        overflow: auto auto;
        /* border: 1px blue solid; */

        .bg {
            img {
                pointer-events: none;
                opacity: 0.9;
            }
        }

        .locals {
            position: absolute;
            top: 0;
            left: 0;
            /* border: 1px red solid; */


            .pin {
                position: absolute;
                width: 50px;
                height: 75px;
                background: url(pin.svg) no-repeat center center;
                display: flex;
                justify-content: center;
                padding-top: 10px;
                transform: translate(0px, -35px);
                /* opacity: 0.5; */
                cursor: pointer;

                img {
                    border: 2px solid white;
                    border-radius: 12px;
                    transform: translateY(-20px);
                    pointer-events: none;
                }
            }
        }


    }



    #trail_header {
        position: absolute;
        top: 0;
        left: 0;
        padding: 20px 30px;
        display: flex;
        width: 100%;
        justify-content: space-between;

        #trail_title {
            font-size: 46px;
            font-weight: 800;
        }
    }


}


#title {
    border: none;
    border-bottom: 2px solid #ccc;
    width: auto;
    font-size: 24px;
    min-width: 10ch;
    /* Largura mínima baseada em 10 caracteres */
    max-width: 100%;
    overflow: visible;
    padding: 5px 10px;
}

#title:focus {
    outline: none;
    border-bottom: 2px solid #000;
    background: #00000010;
    font-weight: 800;
}



.success-effect {
    border-bottom: 2px solid #16e416;
    animation: borderFlash 0.5s ease-in-out;
}

@keyframes borderFlash {
    0% {
        border-bottom-width: 2px;
        border-bottom-color: transparent;
        transform: scale(1);
        background: transparent;
    }

    50% {
        border-bottom-width: 2px;
        border-bottom-color: #16e416;
        transform: scale(0.95);
        background: #ddfedd;
    }

    100% {
        border-bottom-width: 2px;
        border-bottom-color: transparent;
        transform: scale(1);
        background: transparent;
    }
}








/* modal styles */
#modal_outside {


    background-color: #00000033;
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: 20000;
    display: flex;
    justify-content: center;

    /* exibição------------------------------------------- */
    display: none;
    align-items: center;
    gap: 40px;



    #modal_inside {
        background-color: #fff;
        width: 90vw;
        max-width: 800px;
        /* height: auto; */
        /* margin-left: 50%; */
        box-shadow: 0 40px 20px rgba(0, 0, 0, 0.5);

        display: flex;
        flex-direction: column;
        align-self: center;
        border-radius: 20px;
        max-height: 80vh;

        #modal_header {
            padding: 10px 20px;
            /* flex-shrink: 0; */
            /* align-self: stretch; */
            border-bottom: #ccc 1px solid;
            display: flex;
            align-items: center;
            justify-content: space-between;

            #modal_close {
                width: 40px;
                height: 40px;
                display: flex;
                align-items: center;
                padding: 0;
                justify-content: center;
            }


        }

        #modal_body {
            padding: 10px 30px;
            /* flex: 1 0 0; */
            /* align-self: stretch; */
            max-height: 80%;
            overflow-y: auto;


        }

        #modal_footer {
            padding: 10px 30px;
            /* flex-shrink: 0; */
            /* align-self: stretch; */
            border-top: #ccc 1px solid;
            display: none;
            justify-content: center;
        }

    }

}


button {
    font-size: 16px;
    border-radius: 30px;
    padding: 8px 24px;
    border: none;
    outline: none;
    background: #f5f5f5;
    color: #000;
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    align-items: center;
    justify-content: center;

    &:hover {
        background: rgba(0, 0, 0, 1);
        color: #fff;
        cursor: pointer;
    }
}



.modal_form {
    padding: 20px 0;

    .modal_form_title {
        font-size: 14px;
        margin-bottom: 5px;
    }

    input,
    textarea,
    select {
        font-size: 18px;
        background: rgba(0, 0, 0, 0.03);
        border: none;
        border-bottom: 1px solid #000;
        padding: 10px 20px;
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
    }

    textarea {
        min-height: 250px;
    }
}





#modals {
    display: none;
}



#trilha_capa {
    border: 1px solid #000000cc;
    border-radius: 8px;
    margin-bottom: 10px;
}


#fase_sel {
    /* background: #ebeff4;
    border-radius: 20px;

    padding: 20px;

    margin-bottom: 20px; */

    #fase_sel_info {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;


        #fase_sel_img {
            border-radius: 8px;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

    }
}


#fase_search {


    #fase_search_area {
        display: flex;
        gap: 10px;
        margin-bottom: 20px
    }


    #fase_search_results {

        display: flex;
        gap: 10px;
        flex-direction: column;


        .fase_search_result {
            display: flex;
            gap: 10px;

            padding: 10px 0;
            border-bottom: 1px solid #ccc;

            img {
                align-self: flex-start;
                border-radius: 8px;
                border: 1px solid rgba(0, 0, 0, 0.1);

            }

            .fase_search_result_info {
                display: flex;
                flex-direction: column;
                gap: 10px;

                button {
                    align-self: flex-start;
                    font-size: 14px;
                }
            }



            .fase_search_result_title {
                font-size: 16px;
                font-weight: 800;
            }

            .fase_search_result_objetivo {
                font-size: 14px;
            }
        }

    }

}

#fase_sel_del_dialog {
    display: flex;
    justify-content: center;
    width: 100%;
}


.colored_btn {
    background-color: #3700FE;
    color: #ffffffda;
    /* transition */
    transition: all 0.3s;
    gap: 10px;

    span {
        color: #2BD9E2;
    }

    &:hover {
        background-color: #3200e9;
        transform: scale(1.1);
        outline: #2bd9e24b solid 8px;
        color: #ffffff;
    }
}


.tooltip {
    position: absolute;
    z-index: 30000;
    background: black;
    color: white;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 10px;
    white-space: nowrap;

}


#largada,
#chegada {
    position: absolute;
    background: black;
    color: white;
    display: flex;
    z-index: 20000;
    top: -35px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px;

}


#pin_user {
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    position: absolute;
    top: 0px;
    left: 0px;
    display: flex;
    background-image: url(pin2.svg);
    background-repeat: no-repeat;
    width: 48px;
    height: 62px;
    /* align-content: center; */
    justify-content: center;
    align-items: start;
    padding-top: 10px;

    /* transform: translate(-42px , -20px); */
}


.w40 {
    width: 40px;
    height: 40px;
}

a {
    text-decoration: none;
}


aside {
    background: #fff;
    width: 200px;
    max-height: calc(100% - 100px);
    position: fixed;
    top: 70px;
    left: 10px;
    border-radius: 20px;
    padding: 20px 5px 20px 10px;

    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.3);

    display: none;


}

#drag_handle {
    position: absolute;
    top: 5px;
    left: 5px;
    /* transform: translateX(-50%); */
    width: 40px;
    height: 20px;
    /* background: #f0f0f0; */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 1000;
    /* border: 1px solid #ddd; */
    
    span {
        color: #999;
        font-size: 16px;
        pointer-events: none;
    }
    
    &:hover {
        background: #f3f3f3;
        /* border-color: #ccc; */
    }
    
    &:active {
        cursor: grabbing;
        background: #d0d0d0;
    }
}

#aside_content {
    /* background-color: #16e416; */
    /* overflow-x: auto; */
    width: 100%;
    /* height: 100%; */
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    /* Habilita a rolagem vertical */


}

#aside_content,
#palco {
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #ffffff00 #ffffff00;
    /* Firefox (cor do polegar e trilha) */
}


#aside_content:hover,
#palco:hover {
    scrollbar-color: #8c8c8c83 #ffffff00;
}

/* Personalização para navegadores baseados em WebKit (Chrome, Edge, Safari) */
aside_content::-webkit-scrollbar,
#palco::-webkit-scrollbar {
    width: 10px;
    /* Largura da barra de rolagem */
    border-radius: 10px;
}

aside_content::-webkit-scrollbar-track,
#palco::-webkit-scrollbar-track {
    background: #ffffff00;
    /* Cor do fundo da barra */
    border-radius: 10px;
}

aside_content::-webkit-scrollbar-thumb,
#palco::-webkit-scrollbar-thumb {
    background: #8c8c8c83;
    /* Cor do polegar (scroll) */
    border-radius: 10px;
}

aside_content::-webkit-scrollbar-thumb:hover,
#palco::-webkit-scrollbar-thumb:hover {
    background: #8c8c8c83;
    /* Cor ao passar o mouse */
    border-radius: 10px;
}




#avatar {
    display: flex;
    flex-direction: column;
    gap: 12px;

    color: #1C1B1F;

    #avatar_foto {
        display: flex;
        align-items: center;
        justify-content: center;

        img {
            width: 80px;
            height: 80px;
            border-radius: 50%;
        }

        .moldura {
            position: relative;
            width: 92px;
            height: 92px;
            transform: translateX(-50%);
        }

        .img_avatar {
            border: 2px solid black;
            transform: translateX(50%);
        }
    }


    #avatar_broches {
        display: flex;
        justify-content: center;
        gap: 5px;
        margin-top: 10px;
    }


    .group1 {
        display: flex;
        flex-direction: column;
        /* gap: 10px; */
    }


    #avatar_nome {
        font-size: 16px;
        font-weight: 800;
        text-align: center;
    }

    #avatar_class {
        text-align: center;
        font-size: 14px;
        font-weight: 400;
        color: #716F77;
    }
}



#xp_painel {
    background-color: #F3F0FE;
    border-radius: 120px;
    display: flex;

    margin-top: 20px;
    align-items: center;
    gap: 10px;
    padding: 5px;

    #xp_nivel {
        background: #3700FE;
        color: white;
        border-radius: 120px;
        width: 50px;
        height: 50px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;



        .xp_label {
            color: #ffffffdd;
            font-size: 12px;
        }

        .xp_big {
            font-weight: 800;
            font-size: 24px;
            margin-top: -5px;
        }
    }

    .xp_info {
        flex: 1 0 0;
        padding-right: 16px;
    }


    #xp_bar {
        width: 100%;
        height: 5px;
        overflow: hidden;
        background-color: #3700FE33;
        border-radius: 20px;
        align-self: stretch;
    }

    #xp_bar_inner {
        background: #3700FE;
        height: 100%;
        transition: all 2s;
    }

    #xp_number {
        font-weight: 800;
    }
}


#coins {
    display: flex;
    justify-content: center;
    margin-top: 20px;

    .coin_col {
        display: flex;
        flex-direction: column;
        flex: 1 0 0;
        align-items: center;
        font-size: 20px;
        font-style: normal;
        font-weight: 800;
        line-height: normal;
    }
}


#conquitas {
    display: flex;
    flex-direction: column;
    margin-top: 20px;

    #conquitas_trofeu {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;


        background: radial-gradient(50% 50% at 50% 50%, rgba(251, 212, 90, 0.50) 0%, rgba(251, 212, 90, 0.00) 100%);

        span {
            font-size: 20px;
            font-style: normal;
            font-weight: 800;
            line-height: normal;

        }
    }

    #medals {
        display: flex;
        margin-top: 10px;

        .medals_col {
            display: flex;
            flex-direction: column;
            flex: 1 0 0;
            align-items: center;
            font-size: 14px;
            font-style: normal;
            font-weight: 700;
            line-height: normal;
        }
    }
}


.aside_title {
    color: #696969;
    text-align: center;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 14px;
}

#conclusoes {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;

    .conclusoes_item_row1 {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .orange {
        span {
            color: #ff6600;
        }
    }

    .pink {
        span {
            color: #CF16C3;
        }
    }

    .conclusoes_num {
        font-size: 20px;
        font-weight: 800;
    }


    .bar_done {
        height: 5px;
        overflow: hidden;
        width: 100%;
        border-radius: 10px;
        margin-top: 5px;

        .bar_done_inner {
            height: 100%;
            transition: all 2s;
        }
    }

    .bar_orange {
        background: #ff66004d;

        .bar_done_inner {
            background: #ff6600;
        }
    }

    .bar_pink {
        background: #CF16C34d;

        .bar_done_inner {
            background: #CF16C3;
        }
    }



}

#ranking {
    margin-top: 40px;
    padding-right: 5px;
}

#podium {
    display: flex;
    flex-direction: column;
    color: #fff;
    margin-top: 5px;

    .podium_item {
        background-color: #A9B4D3;
        border-radius: 8px;
        display: flex;
        padding: 10px;
        justify-content: space-between;

        &:first-of-type {
            transform: scale(0.9);
            margin-bottom: -5px;
        }

        &:last-of-type {
            transform: scale(0.9);
            margin-top: -5px;
        }


        &:nth-of-type(2) {
            z-index: 1000;

            background: linear-gradient(90deg, #3700FE 0%, #00BDE8 100%);
            outline: 7px solid rgba(43, 217, 226, 0.26);
        }

    }


}


#lojinha {
    margin-top: 40px;
    border-radius: 20px;
    background: #D6F9F7;

    display: flex;
    padding: 10px;
    align-items: center;
    gap: 10px;
    align-self: stretch;

    color: #065471;
    border: 2px solid #fff;
    cursor: pointer;
    transition: all 0.5s;

    &:hover {
        background: #8cf7ff;
        color: #3700FE;
        border: 2px solid #3700FE;
    }
}



.done {
    img {
        border: 2px solid #91f891 !important;
        outline: 5px solid #16e41636 !important;
    }
}


.fase_checked {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #b5ffb5;
    color: #008b4a;
    border-radius: 40px;
    position: absolute;
    top: -24px;
    left: 60px;
}


#amigos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
    color: #505050;
    gap: 8px;

    border-radius: 50px;
    /* border: 1px solid #fafafa; */
    background: #fafafa;
    padding: 4px 10px 4px 20px;

}

#amigos_container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


.amigo_item {
    width: 46px;
    border-radius: 46px;
    margin-right: -16px;
    border: #ffffff 1px solid;
    box-shadow: -5px 0 1px rgba(0, 0, 0, 0.2);



    &:first-of-type {
        box-shadow: none;
    }

    &:last-of-type {
        margin-right: 0;
    }
}



#forum_btn {
    background: #FAFAFA;
    /* border: 1px solid #f3f3f3; */
    color: #2700b4;
    gap: 5px;
    font-size: 14px;
    transition: all 0.5s;


    &:hover {
        background-color: #eaeaea;
        /* transform: scale(1.1); */
        /* outline: #2bd9e24b solid 8px; */
        /* color: #ffffff; */
    }
}



#chat_container {
    background: #fff;
    border-radius: 20px;
    max-width: 500px;
    max-height: calc(100vh - 80px);
    box-shadow: 0 40px 20px rgba(0, 0, 0, 0.5);


    #chat_header {
        padding: 10px 20px;
        /* flex-shrink: 0; */
        /* align-self: stretch; */
        border-bottom: #ccc 1px solid;
        display: flex;
        align-items: center;
        justify-content: space-between;


        #chat_close {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            padding: 0;
            justify-content: center;
        }
    }



    #chat_area {
        background: #dfe2e2;
        display: flex;
        flex-direction: column;
        padding: 10px;
        gap: 30px;
    }


    .chat_msg {
        display: flex;
        gap: 5px;
    }

    .chat_msg_content_text {
        background: #00000010;
        font-size: 14px;
        padding: 10px;
        border-radius: 0 20px 20px 20px;
        max-width: 80%;
    }

    .chat_msg_content_time {
        font-size: 12px;
        padding: 5px 20px;
    }


    .chat_msg_right {
        flex-direction: row-reverse;

        .chat_msg_content {
            display: flex;
            align-items: end;
            flex-direction: column;
        }

        .chat_msg_content_text {
            background: #e8fbff;
            font-size: 14px;
            padding: 10px;
            border-radius: 20px 0px 20px 20px;
        }
    }


    #chat_send {
        display: flex;
        align-items: center;
        padding: 10px;
        gap: 5px;


        #chat_input {
            flex: 1 0 0;
            border: none;
            font-size: 16px;
            padding: 10px;
            outline: none;
        }
    }
}


#avatar_galery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 4 colunas iguais */
    gap: 10px;
    /* Espaço entre os itens */
    justify-content: center;
    align-items: center;

    

    img {
        width: 100%;
        /* Ajusta a largura ao tamanho da célula */
        height: auto;
        /* Mantém a proporção original da imagem */
        object-fit: contain;
        /* Garante que a imagem se ajuste sem cortar */
        border-radius: 50%;
        /* Opcional: arredondamento */
        border: 2px solid rgba(0, 0, 0, 0.1);
        cursor: pointer;
        filter: saturate(1);
        transition: all 0.5s;


        &:hover{
            border: 2px solid rgb(43, 0, 255);
            filter: saturate(1);
            transform: scale(1.1);
        }
    }
}


.avatar_selected{
    transform: scale(1.1) !important;
    border: 2px solid rgb(43, 0, 255)!important;
    filter: saturate(1.3)!important;
}


.avatar_no_selected{
    filter: saturate(0.1)!important;
}




#avatar_dialog{
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}


#change_user{
    font-size: 13px;
    gap: 5px;
    margin-top: 40px;
    margin: 20px auto 10px auto;
    span{
        font-size: 20px;
    }
}


.buttons_confirma{
    display: flex ;
    gap: 20px;
    justify-content: center;
    margin: 30px auto;

    button{
        padding: 10px 30px;
    }
}

@media (max-width: 600px) {
    #header_form h1 {
        font-size: 15px;
        font-weight: 600;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin: 0 8px 0 0;
        line-height: 1.2;
    }
}
#header_form{
    padding: 10px;
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Melhorar foco para acessibilidade */
button:focus,
a:focus,
[tabindex]:focus {
    outline: 2px solid #3700fe;
    outline-offset: 2px;
}

/* Indicador de carregamento acessível */
[aria-busy="true"] {
    position: relative;
}

[aria-busy="true"]::after {
    content: "Carregando...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.header_roteiro{
    justify-content: space-between;
}

/* CSS do breadcrumb (caminho de pão) */
.caminho_de_pao {
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* padding: 10px 20px; */
    ul {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
        padding: 0;
        list-style: none;
        li {
            margin: 0;
            padding: 0;
            display: flex;
            align-items: center;
            a {
                color: #495057;
                background: #e9ecef;
                padding: 5px 10px;
                border-radius: 6px;
                font-size: 14px;
                text-decoration: none;
                max-width: 200px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                display: block;
                transition: all 0.2s ease;
                &:hover {
                    background: #dee2e6;
                    color: #212529;
                }
                &[href="#"] {
                    margin-left: 10px;
                    font-weight: 600;
                    font-size: 16px;
                    background: #3700fe;
                    color: white;
                }
            }
        }
    }
}


.user-info{
    margin-right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    .user-avatar{
        img{
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 2px solid #3700fe;
        }
    }
}


/* ============================================
   RANKING DA FASE
   ============================================ */

#ranking_fase_container {
    margin: 20px 0;
    padding: 20px;
    /* background: #f9f9f9; */
    width: 100%;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.ranking_fase_container_inner {
    display: flex;
    gap: 24px;
}

.ranking_fase_header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    /* color: #495057; */
    
    .material-symbols-outlined {
        font-size: 28px;
        color: #ffc107;
    }
    
    h3 {
        font-size: 16px;
        font-weight: 700;
        margin: 0;
    }
}

/* Top 3 */
.ranking_fase_top3 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking_fase_item {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    background: white;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    
    &:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
}

.ranking_fase_item_gold {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.ranking_fase_item_silver {
    border-color: #9e9e9e;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}

.ranking_fase_item_bronze {
    border-color: #cd7f32;
    background: linear-gradient(135deg, #fff4e6 0%, #ffffff 100%);
}

.ranking_fase_posicao {
    font-size: 16px;
    font-weight: 800;
    color: #495057;
    /* min-width: 40px; */
    text-align: center;
}

.ranking_fase_item_gold .ranking_fase_posicao {
    color: #ffc107;
}

.ranking_fase_item_silver .ranking_fase_posicao {
    color: #9e9e9e;
}

.ranking_fase_item_bronze .ranking_fase_posicao {
    color: #cd7f32;
}

.ranking_fase_avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 2px solid #e9ecef;
        object-fit: cover;
    }
}

.ranking_fase_item_gold .ranking_fase_avatar img {
    border-color: #ffc107;
}

.ranking_fase_item_silver .ranking_fase_avatar img {
    border-color: #9e9e9e;
}

.ranking_fase_item_bronze .ranking_fase_avatar img {
    border-color: #cd7f32;
}

.ranking_fase_nome {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking_fase_moedas {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #d9a138;
    
    img {
        width: 24px;
        height: 24px;
    }
}

/* Outros que passaram */
#ranking_fase_outros_section {
    align-items: center;
    justify-content: center;
    flex: 1;
    /* o conteúdo deste elemento deve estar centralizado vertical e horizontalmente*/


}

.ranking_fase_outros_section_inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ranking_fase_outros_header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
    
    .material-symbols-outlined {
        font-size: 20px;
    }
}

.ranking_fase_outros {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.ranking_fase_outro_avatar {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    
    img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 2px solid #dee2e6;
        object-fit: cover;
    }
    
    &:hover {
        transform: scale(1.1);
        
        img {
            border-color: #3700fe;
        }
        
        &::after {
            content: attr(title);
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.9);
            color: white;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            white-space: nowrap;
            margin-bottom: 5px;
            z-index: 1000;
            pointer-events: none;
        }
    }
}

.ranking_fase_load_more {
    display: flex;
    width: 100%;
    padding: 10px;
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 32px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 200px;
    
    &:hover:not(:disabled) {
        background: #f8f9fa;
        border-color: #3700fe;
        color: #3700fe;
    }
    
    &:disabled {
        cursor: not-allowed;
        opacity: 0.6;
    }
}

/* Estados de carregamento e vazio */
.ranking_fase_loading,
.ranking_fase_empty,
.ranking_fase_error {
    padding: 30px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.ranking_fase_error {
    color: #dc3545;
}

/* ============================================
   RESPONSIVIDADE MOBILE - RANKING DA FASE
   ============================================ */

@media (max-width: 768px) {
    /* Container geral */
    #ranking_fase_container {
        margin: 15px 0;
        padding: 15px 10px;
    }

    /* Header do ranking */
    .ranking_fase_header {
        gap: 8px;
        margin-bottom: 15px;
        
        .material-symbols-outlined {
            font-size: 24px;
        }
        
        h3 {
            font-size: 14px;
        }
    }

    /* Container interno - empilhar verticalmente em mobile */
    .ranking_fase_container_inner {
        flex-direction: column;
        gap: 16px;
    }

    /* Top 3 - ajustes para mobile */
    .ranking_fase_top3 {
        gap: 6px;
        width: 100%;
    }

    .ranking_fase_item {
        gap: 6px;
        padding: 6px 8px;
        border-radius: 12px;
    }

    .ranking_fase_posicao {
        font-size: 14px;
        min-width: 30px;
    }

    .ranking_fase_avatar {
        img {
            width: 32px;
            height: 32px;
            border-width: 1.5px;
        }
    }

    .ranking_fase_nome {
        font-size: 13px;
        max-width: 120px;
    }

    .ranking_fase_moedas {
        font-size: 14px;
        gap: 4px;
        
        img {
            width: 20px;
            height: 20px;
        }
    }

    /* Seção "Também passaram por aqui" */
    #ranking_fase_outros_section {
        width: 100%;
    }

    .ranking_fase_outros_section_inner {
        width: 100%;
    }

    .ranking_fase_outros_header {
        gap: 6px;
        margin-bottom: 12px;
        font-size: 13px;
        justify-content: center;
        
        .material-symbols-outlined {
            font-size: 18px;
        }
    }

    .ranking_fase_outros {
        gap: 8px;
        margin-bottom: 10px;
        justify-content: center;
    }

    .ranking_fase_outro_avatar {
        img {
            width: 36px;
            height: 36px;
            border-width: 1.5px;
        }
        
        /* Ajustar tooltip em mobile */
        &:hover::after {
            font-size: 11px;
            padding: 4px 8px;
        }
    }

    .ranking_fase_load_more {
        padding: 8px 16px;
        font-size: 13px;
        max-width: 180px;
    }

    /* Estados */
    .ranking_fase_loading,
    .ranking_fase_empty,
    .ranking_fase_error {
        padding: 20px 10px;
        font-size: 13px;
    }
}

/* Ajustes adicionais para telas muito pequenas */
@media (max-width: 480px) {
    #ranking_fase_container {
        margin: 10px 0;
        padding: 10px 8px;
    }

    .ranking_fase_header {
        h3 {
            font-size: 13px;
        }
    }

    .ranking_fase_item {
        padding: 5px 6px;
        gap: 5px;
    }

    .ranking_fase_posicao {
        font-size: 13px;
        min-width: 25px;
    }

    .ranking_fase_avatar {
        img {
            width: 28px;
            height: 28px;
        }
    }

    .ranking_fase_nome {
        font-size: 12px;
        max-width: 100px;
    }

    .ranking_fase_moedas {
        font-size: 13px;
        
        img {
            width: 18px;
            height: 18px;
        }
    }

    .ranking_fase_outros {
        gap: 6px;
    }

    .ranking_fase_outro_avatar {
        img {
            width: 32px;
            height: 32px;
        }
    }

    .ranking_fase_load_more {
        font-size: 12px;
        padding: 7px 14px;
    }
}

/* Ajuste do modal geral em mobile */
@media (max-width: 768px) {
    #modal_inside {
        width: 95vw;
        max-height: 95vh;
        border-radius: 16px;
    }

    #modal_body {
        padding: 10px 15px;
    }

    #modal_header {
        padding: 8px 15px;
    }
}

/* ============================================
   Responsividade do Header - Mobile
   ============================================ */

/* Tablet e mobile geral */
@media (max-width: 768px) {
    header {
        height: auto;
        min-height: 50px;
        padding: 8px 12px;
        flex-wrap: wrap;
    }
    
    #brand img {
        height: 32px;
    }
    
    /* Header normal (não roteiro) */
    #header_form {
        flex: 1;
        min-width: 0;
        padding: 5px;
    }
    
    #header_form h1 {
        font-size: 16px;
        line-height: 1.3;
    }
    
    #user button {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    /* Header em contexto de roteiro */
    .header_roteiro {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .brand {
        flex-shrink: 0;
    }
    
    .brand img {
        width: 28px;
        height: 35px;
    }
    
    .caminho_de_pao {
        flex: 1;
        min-width: 0;
        margin-left: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .caminho_de_pao::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .caminho_de_pao ul {
        gap: 6px;
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    
    .caminho_de_pao li {
        font-size: 12px;
    }
    
    .caminho_de_pao li a {
        font-size: 12px;
        padding: 4px 6px;
        display: inline-block;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-info {
        margin-right: 0;
        gap: 6px;
        font-size: 12px;
        flex-shrink: 0;
    }
    
    .user-info .user-avatar img {
        width: 28px;
        height: 28px;
    }
}

/* Mobile pequeno */
@media (max-width: 600px) {
    header {
        padding: 6px 8px;
    }
    
    .header_roteiro {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 6px 8px 8px 8px;
        position: relative;
    }
    
    .brand {
        align-self: flex-start;
        padding-right: 80px; /* Espaço para o user-info no canto direito */
    }
    
    .caminho_de_pao {
        width: 100%;
        margin-left: 0;
        order: 2;
        border-top: 1px solid #e0e0e0;
        padding-top: 6px;
        padding-right: 0;
    }
    
    .caminho_de_pao ul {
        gap: 4px;
    }
    
    .caminho_de_pao li {
        font-size: 11px;
    }
    
    .caminho_de_pao li a {
        font-size: 11px;
        padding: 3px 5px;
        max-width: 120px;
    }
    
    .caminho_de_pao li a[href="#"] {
        font-size: 12px;
        font-weight: 600;
    }
    
    .user-info {
        position: absolute;
        right: 8px;
        top: 8px;
        gap: 5px;
        font-size: 11px;
    }
    
    .user-info .user-avatar img {
        width: 26px;
        height: 26px;
    }
    
    #header_form h1 {
        font-size: 14px;
    }
}

/* Mobile muito pequeno */
@media (max-width: 480px) {
    header {
        padding: 5px 6px;
    }
    
    .header_roteiro {
        padding: 5px 6px;
    }
    
    .brand img {
        width: 24px;
        height: 30px;
    }
    
    .caminho_de_pao {
        padding-top: 5px;
    }
    
    .caminho_de_pao ul {
        gap: 3px;
    }
    
    .caminho_de_pao li {
        font-size: 10px;
    }
    
    .caminho_de_pao li a {
        font-size: 10px;
        max-width: 100px;
        padding: 2px 4px;
    }
    
    .caminho_de_pao li a[href="#"] {
        font-size: 11px;
    }
    
    .user-info {
        font-size: 10px;
        gap: 4px;
        right: 6px;
        top: 6px;
    }
    
    .user-info .user-avatar img {
        width: 24px;
        height: 24px;
    }
    
    #header_form h1 {
        font-size: 13px;
    }
    
    #brand img {
        height: 28px;
    }
}

/* ============================================
   Responsividade do Aside (Placar) - Mobile
   ============================================ */

@media (max-width: 768px) {
    aside.placar {
        width: 180px;
        top: 60px;
        left: 8px;
        padding: 15px 5px 15px 8px;
        max-height: calc(100vh - 80px);
    }
    
    #drag_handle {
        width: 40px;
        height: 40px;
    }
    
    #avatar #avatar_foto img {
        width: 60px;
        height: 60px;
    }
    
    #avatar #avatar_foto .moldura {
        width: 72px;
        height: 72px;
    }
    
    #avatar #avatar_nome {
        font-size: 14px;
    }
    
    #coins {
        flex-direction: row;
        gap: 8px;
    }
    
    .coin_col {
        flex: 1;
        gap: 4px;
    }
    
    .coin_col img {
        width: 28px;
        height: 28px;
    }
    
    .coin_col span {
        font-size: 14px;
    }
    
    #conclusoes {
        margin-top: 20px;
    }
    
    .aside_title {
        font-size: 12px;
    }
    
    .conclusoes_item_row1 {
        font-size: 12px;
    }
    
    .conclusoes_num {
        font-size: 16px;
    }
    
    #change_user {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    aside.placar {
        width: 160px;
        top: auto;
        left: 8px;
        bottom: 8px;
        max-height: 50vh;
        padding: 12px 5px;
    }
    
    #drag_handle {
        width: 36px;
        height: 36px;
    }
    
    #avatar {
        gap: 8px;
    }
    
    #avatar #avatar_foto img {
        width: 50px;
        height: 50px;
    }
    
    #avatar #avatar_foto .moldura {
        width: 62px;
        height: 62px;
    }
    
    #avatar #avatar_nome {
        font-size: 13px;
    }
    
    .coin_col img {
        width: 24px;
        height: 24px;
    }
    
    .coin_col span {
        font-size: 12px;
    }
    
    #conclusoes {
        margin-top: 15px;
    }
    
    .conclusoes_item {
        margin-bottom: 8px;
    }
    
    .conclusoes_item_row1 {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .conclusoes_num {
        font-size: 14px;
    }
    
    .bar_done {
        height: 4px;
    }
    
    #change_user {
        padding: 6px 12px;
        font-size: 12px;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    aside.placar {
        width: 140px;
        left: 6px;
        bottom: 6px;
        padding: 10px 4px;
    }
    
    #aside_content {
        max-height: calc(45vh - 50px);
    }
}