.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100dvw;
    height: 100dvh;
    box-sizing: border-box;
}

#background-login {
    width: 100%;
    height: 100%;
    /*  background-color: rgb(20, 20, 20); */
    background-image: url('/img/background_login.png');

    /*       background-image: 
      radial-gradient(
        ellipse 60% 100% at 110% 50%, 
        #26c6f777 0%, 
        transparent 80%
      ),
      radial-gradient(
        ellipse 60% 100% at -10% 50%, 
        #26ADF7 0%, 
        transparent 80%
      ),
    linear-gradient(180deg, #0a0e1a 0%, #050912 50%); */

    position: fixed;
    opacity: 0.8;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -1;
}




.login-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 40px;
    height: auto;
}


.profile-picture-wrapper {
    max-width: 60%;
    overflow-x: auto;
    margin: 0;
    display: flex;
    padding: 10px;
    justify-content: flex-start;
    flex-direction: row;
    gap: 32px;
}

.profile-picture-wrapper.create {
    justify-content: center;
    align-items: center;
    overflow: hidden;
    max-width: 100%;
    height: 100%;
    flex-direction: column;
    gap: clamp(26px, 3.35dvw, 40px);
}

.profile-item {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 14px;
}

.profile-group {
    display: flex;
    flex-direction: column;
}

.box-profile-picture {
    width: clamp(90px, 15vw, 140px);
    height: clamp(90px, 15vw, 140px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;

}


#add-profile {
    border: 2px solid #9ca3af;
    background-color: #9ca3af34;
}

#text-add-profile {
    color: #9ca3af;
}


.box-profile-picture img {
    width: clamp(90px, 15vw, 140px);
    height: clamp(90px, 15vw, 140px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}


.box-profile-picture.create img {
    width: clamp(100px, 15vw, 140px) !important;
    height: clamp(100px, 15vw, 140px) !important;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}



#btn-gerenciar-perfis {
    width: 162px;
    height: 42px;
    background: transparent;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    font-weight: 500;
    font-family: "Montserrat", sans-serif;
    border-radius: 7px;
    border: 1px solid #6b7280;
    color: #9ca3af;
}








.create-perfil-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    display: none;
    margin-top: -10vh;
}



.box-create-perfil {
    width: 60dvw;
    max-width: 742px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}


.box-profile-picture.create .profile-picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


.inputs-wrapper {
    margin: 40px 0px 50px 0px;
    display: flex;
    width: 100%;
    justify-content: flex-start;
    flex-direction: column;
    gap: 24px;
}

.inputs-wrapper input,
.current-input {
    padding: 20px;
    width: 100% !important;
    outline: none;
    border-radius: 5px;
    border: none;
    color: #f0f8ff !important;
    background-color: rgb(39, 39, 44);
}

.inputs-wrapper input::placeholder,
.current-input::placeholder {
    color: #9ca3af;
}

.inputs-wrapper label {
    gap: 0 !important;
    line-height: 0px;
    margin-bottom: -5px;
    padding: 0;
    z-index: 1;
    position: relative;
}


.group-profile-pin {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.group-profile-pin .pin-digit {
    width: 58px !important;
    height: 58px !important;
    border-radius: 5px;
    border: none;
    background-color: rgb(39, 39, 44);
}



.pin-digit {
    outline: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3em;
}


#error-message-profile-name,
#error-message-username,
#error-message-pin {
    color: rgba(255, 79, 55, 0.89);
    line-height: 0;
    margin-top: -10px;
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.65s ease;
}



#btn-save-profile {
    width: 100%;
    padding: 14px;
    border-radius: 7px;
    border: none;
    background-color: #26ADF7;
    color: white;
    font-weight: 600;
    font-size: 1em;
}




.avatars-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    width: 100%;
    padding: 26px 0px 0px 26px;
    height: 100%;
    display: none;
}

.box-avatars {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: column;
}


.container-avatars {
    margin-top: 80px;
    width: 100%;
    height: 100%;
    padding: 10px -50px 10px 10px;
    display: flex;
    overflow-y: auto;
    flex-direction: column;
}

.avatars-rows {
    display: flex;
    flex-shrink: 0;
    width: 100%;
    height: 200px;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 35px;
    padding-right: 0px;
}

.avatars-rows-img {
    display: flex;
    padding: 10px;
    flex-shrink: 0;
    width: 100%;
    height: 200px;
    gap: 20px;
    flex-direction: row;
    overflow-x: auto;
    justify-content: flex-start;
    align-items: center;
    pointer-events: auto;
}


.avatars-rows-img::-webkit-scrollbar,
.container-avatars::-webkit-scrollbar {
    display: none;
}


.avatars-rows-img img {
    width: 140px;
    height: 140px;
    display: flex;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 50%;
}

.avatars-rows-img img:last-child {
    margin-right: 60px;
}

.box-create-perfil .btn-back,
.box-avatars .btn-back {
    position: absolute;
    top: 26px;
    left: 22px;
    display: flex;
    background-color: transparent;
    border: none;
    gap: 5px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-size: 1em;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
}



.login-wrapper,
.create-perfil-wrapper,
.avatars-wrapper {
    animation: opacity-open-screen 0.65s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

@keyframes opacity-open-screen {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}



















/* ════════════════════════════════════════
   login.tvNavigator.css

   Estilo do estado ".focused" aplicado pelo TVNavigator
   (home.tvNavigator.js) via login.tvNavigator.js.

   Cada elemento que pode receber foco por controle/teclado ganha
   a classe .focused enquanto estiver selecionado. Aqui só cuidamos
   da aparência desse estado — nada de layout.
════════════════════════════════════════ */

/* ---------- perfis (login) e avatar-picker (criar perfil) ---------- */

.box-profile-picture {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-radius: 8px;
    border-radius: 50%;
    outline: none;
}

.box-profile-picture.focused {
    transform: scale(1.05);
    border-radius: 50%;
    outline-offset: 2px;
    outline: 2px #ffffff solid;
}

.profile-item.add-profile {
    animation: show-add-profile 0.8s ease forwards;
    pointer-events: none;
}

.profile-item.add-profile.hidden {
    animation: hidden-add-profile 0.8s ease forwards;
    pointer-events: none;
}


@keyframes show-add-profile {
    0% {
        opacity: 0;
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        display: flex;
    }
}

@keyframes hidden-add-profile {
    0% {
        opacity: 1;
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        opacity: 0;
        display: none;
    }
}



.box-profile-picture#add-profile.focused {
    transform: scale(1.05);
    outline: none;
    border: 2px solid #ffffff !important;
    border-radius: 50%;
}


.box-profile-picture#add-profile.focused svg {
    color: #ffffff !important;
}


#btn-gerenciar-perfis.focused {
    background-color: #26ADF7 !important;
    transition: background 0.6s ease;
    font-size: 0.85em;
    font-weight: 600;
    outline: none;
    color: #f0f8ff !important;
    border: none;
}

#btn-gerenciar-perfis {
    outline: none;
    font-size: 0.85em;
}


/* ---------- avatares (grade de escolha) ---------- */

.avatar {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-radius: 6px;
    outline: none;
}

.avatar.focused {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px #ffffff;
    z-index: 1;
    position: relative;
}

/* ---------- botões (voltar, salvar, gerenciar perfis) ---------- */


.btn-back.focused,
.btn-back.focused svg {
    outline: none;
    color: white !important;
}

/* ---------- inputs (criar perfil) ---------- */

.inputs-wrapper input.focused,
.current-input.focused {
    outline: 2px #26ADF7 solid;
}

.pin-digit.focused {
    outline: 2px #26ADF7 solid;
}

#btn-save-profile.focused {
    outline: 2px #26ADF7 solid;
    outline-offset: 2px;
}

















































.container-teclado {
    z-index: 10;
}


.teclado-virtual {
    position: relative;
    /*     left: 50%;
    transform: translateX(-50%); */
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(20, 20, 20, 0.95);
    padding: 20px;
    border-radius: 12px;
    z-index: 1000;
}

.container-teclado.oculto {
    display: none;
}

.teclado-linha {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.tecla-teclado {
    min-width: 48px;
    height: 48px;
    padding: 0 12px;
    font-size: 20px;
    color: #fff;
    background: #333;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}

.tecla-larga {
    min-width: 140px;
}

/* TVNavigator destaca o item focado alternando esta classe
   (focusedClass, padrão 'focused' — ver home.tvNavigator.js).
   Ele NÃO chama .focus() nativo nas teclas. */
.tecla-teclado.focused {
    border-color: #26adf7;
    background: #26ADF7;
}

.tecla-teclado.tecla-larga.focused,
.tecla-teclado[data-char="BACKSPACE"].focused {
    background-color: #26ADF7;
}



.current-input-label {
    display: block;
    font-size: 14px;
    color: #797f86;
    margin-bottom: 4px;
}

.current-input {
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    pointer-events: none;
    outline: 2px solid #26ADF7;
}


#keyboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000e0;
    z-index: 2;
}


#keyboard-overlay.hidden {
    display: none;
}
















































/* Alvo: Largura lógica de até 960px COM densidade de pixels igual ou maior a 2 */
@media screen and (max-width: 960px) and (-webkit-min-device-pixel-ratio: 2),
screen and (max-width: 960px) and (min-resolution: 192dpi) {
    .box-create-perfil {
        transform: scale(0.65);
    }

    .container-teclado {
        transform: scale(0.80);
    }

    #keyboard-overlay {
        transform: scale(1.65);
        width: 400%;
        height: 400%;
    }

    .box-create-perfil .btn-back {
        display: none;
    }
}