*{
    padding: 0;
    margin: 0;
}
html,body{
    height: 100%;
    background: #120F30;
    overflow-x: hidden;
    font-family: monospace;
    padding-top: 60px;
}

nav.nav-custom{
    background: #0D0B1A;
    padding: 15px 0;
    font-size: 18px;
    z-index: 20;
    
}
.navbar-dark .navbar-nav .nav-link{
    color: white;
}
.navbar-dark .navbar-nav .nav-link:hover{
    color: #a78bfa;
}
.navbar-dark .navbar-toggler-icon {
    color: rgba(255, 255, 255, .5);
    border-color: white;
}
h1{
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 30px ;
    color: white;
}
h2{
    color: white;
    padding-bottom: 15px;
}
#home p{
    color: white;
}

#checklist{
    margin-top: 30px;
    padding: 3rem 0;
}


.custom-control-label::before {
  width: 2.8rem !important;
  height: 1.5rem !important;
  border-radius: 1.5rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.custom-control-label::after {
  width: 0.9rem !important;
  height: 0.9rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  left: -2.05rem !important;
}

.custom-control-input:checked ~ .custom-control-label::after {
  top: 50% !important;
  transform: translateY(-50%) translateX(1.3rem) !important;
}

.custom-section{
    background: #0D0B1A ;
    padding: 20px;
    border-radius: 20px;
    gap: 45px;
    width: 100%;
}

.app-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    width: wrap-content;
    /* largura fixa/consistente em toda a grade */
    flex: 0 0 16.66%;
    max-width: 16.66%;
    min-width: 160px;
    overflow: visible;

    z-index: 20;
}

@media (max-width: 992px) {
    .app-card {
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }
}

@media (max-width: 768px) {
    .app-card {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    .app-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.app-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.app-card img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.app-card .custom-control-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
}

.app-card .custom-control-label::before {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Fix alinhamento vertical do switch dentro do app-card */
.app-card .custom-control {
    display: flex;
    align-items: center;
    padding-left: 0;
    min-height: unset;
}

.app-card .custom-control-label {
    display: flex;
    align-items: center;
    padding-left: 3rem;
    line-height: 1;
    margin-bottom: 0;
}

.app-card .custom-control-label::before {
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: 0 !important;
}

.app-card .custom-control-label::after {
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: 0.25rem !important;
}

.app-card .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateY(-50%) translateX(1.3rem) !important;
}

#rodape{
    background-color: #0D0B1A;
    margin-top: 30px;
    padding: 40px 0 20px;
    position: relative;
}

#rodape h3{
    color:#a78bfa;
    text-align: center;
}
#rodape hr{
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 5px;
}

.card-dev {
    background: rgba(255, 255, 255, 0.04);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.avatar {
    width: 65px;
    height: 48px;
   margin-bottom: 42px;
 
}

.dev-nome { 
    color: #e8e6ff;
    font-size: 15px;
 }

.dev-github {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
}

#rodape span a{
    text-decoration: none;
}
#rodape span a:hover{
    text-decoration: none;
    color: #a78bfa;
}



#home h3{
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px 0;
}

.form-control {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);  
  border-radius: 14px;
  color: #cdd8e6;
  height: 45px;
  font-size: 17px;
  
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.04);
  color: #cdd8e6;
  border-color: #4a7ab5;
  box-shadow: 0 0 0 3px rgba(74, 122, 181, 0.25);
}

.form-control option {
  background-color: #0D0B1A;
  color: #cdd8e6;
}
#confirm-generation {
  display: none;
  font-size: large;
}


/* CAIXA */
.floating-box {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translate(-100%, -50%); /* escondida fora da tela */

  display: flex;
  flex-direction: column;
  justify-content: center; 
  

  width: 260px;
  height: 50vh;

  background: #0D0B1A;
  color: white;
  padding: 20px;

  transition: transform 0.4s ease;
  z-index: 20;
  overflow-y: scroll;
}

/* quando ativa */
.floating-box.ativo {
  transform: translate(0, -50%);
}


/* BOTÃO */
.btn-fixed {
  position: fixed;
  top: 50%;
  left: 0px;
  transform: translateY(-50%);
  z-index: 20;
  height: 50vh;
  transition: all 0.4s ease;
}

/* botão vai junto com a div */
.btn-fixed.ativo {
  left: 260px; /* mesma largura da box */
}

.apps-list{
    position: relative;
    width: 90%;
    background: rgba(255, 255, 255, 0.04);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 7px;

    flex: 1;              /* ocupa espaço disponível */
    height: 25vh;         /* REMOVE o 25vh */
    overflow-y: auto;
    margin-top: 25px;

}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 4px;
  height: 4px; /* espessura da barra horizontal */
}

::-webkit-scrollbar-track {
  background: transparent; /* sem fundo */
}

::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.6); /* roxinho suave */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 250, 0.9);
}


#btn-confirm{
    width: 90%;
}


.overlay-div{
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    z-index: 999;
    color: black;
    background: rgba(0, 0, 0, 0.5); /* fundo escuro transparente */

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.3s ease;
}
.overlay-div.ativo {
  opacity: 1;
  pointer-events: all;
}

.script-section{
    position: relative;
    background-color: rgb(206, 203, 203);
    color: #0D0B1A;
    width: 70vw;
    height: 70vh;

    border-radius: 20px;
    
    
    overflow-y: scroll;
}

.btn-overlay{

    position: absolute;
    top: 25px;
    left: 0px;
    transform: translateY(-50%);
    border-radius: 0 0 20px 0;
   
    height: 50px;
    width: 4vw;
    
}

.selected-item{
    display: flex;
    justify-content: space-between;
    padding: 3px 5px;
}


.selected-item:hover {
    background: rgba(167, 139, 250, 0.185);
    
    border-radius: 10px;
    cursor: pointer;
    padding: 3px 5px;
}

.bi-x-lg{
    display: none;
    font-size: 14px;
    cursor: pointer;
    padding: 3px 5px;
    
}
.selected-item:hover .bi-x-lg {
    display: block;
    padding: 3px 5px;
}

.bi-x-lg:hover{
    background: rgba(167, 139, 250, 0.6);
    border-radius: 50%;
}

.overlay-header{
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
}

.header-side{
    display: flex;
    align-items: center;
}

.header-side.left{
    justify-content: flex-start;
}

.header-side.right{
    justify-content: flex-end;
}

.header-center{
    display: flex;
    justify-content: center;
    align-items: center;
}

.h1-overlay{
    margin: 0;
    font-size: 3rem;
    text-align: center;
}

.btn-overlay i{
    font-size: 1.8rem;
}

.div_distro{
    font-size: 20px;
    text-align: right;
    white-space: nowrap;
}

/* RESPONSIVO */
@media (max-width: 768px){

    .overlay-header{
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .header-side.left,
    .header-side.right,
    .header-center{
        justify-content: center;
    }

    .div_distro{
        text-align: center;
    }

    .h1-overlay{
        font-size: 1.6rem;
    }
}

.overlay-app-card {
     background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 5px 7px;

    display: flex;
    flex-direction: column; /* imagem em cima */
    align-items: center;    /* centraliza horizontalmente */
    justify-content: center;

    /*gap: 12px;*/
    text-align: center;

    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    font-size: 16px;

    flex: 0 0 130px; /* impede encolher */
    max-width: 140px;
    min-width: 110px;
    overflow: visible;

    z-index: 20;
}
@media (max-width: 992px) {
    .overlay-app-card {
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }
}

@media (max-width: 768px) {
    .overlay-app-card {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    .overlay-app-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.overlay-app-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.overlay-app-card img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    
}

.overlay-app-card .custom-control-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
}

.overlay-app-card .custom-control-label::before {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Fix alinhamento vertical do switch dentro do overlay-app-card */
.overlay-app-card .custom-control {
    display: flex;
    align-items: center;
    padding-left: 0;
    min-height: unset;
}

.overlay-app-card .custom-control-label {
    display: flex;
    align-items: center;
    padding-left: 3rem;
    line-height: 1;
    margin-bottom: 0;
}

.overlay-app-card .custom-control-label::before {
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: 0 !important;
}

.overlay-app-card .custom-control-label::after {
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: 0.25rem !important;
}

.overlay-app-card .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateY(-50%) translateX(1.3rem) !important;
}



.overlay-custom-section{
    display: flex;
    flex-wrap: nowrap; /* impede quebrar linha */
    justify-content: flex-start;
    align-items: center;
    gap: 15px;

    background: #bdbdc2;
    padding: 10px;
    border-radius: 20px;

    width: fit-content;
    max-width: 77%;

    min-height: 110px;

    margin: 0 auto;

    overflow-x: auto; /* scroll horizontal */
    overflow-y: hidden; /* remove vertical */
}

.overlay-script{
    margin: 25 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    
    
}

.script-box{
    position: relative;
    
    width: 75%;

    background: #bdbdc2;
    border-radius: 18px;

    padding: 20px;

  

    max-height: 220px;

    overflow-y: auto;
    overflow-x: hidden;
}
.script-box pre{
    margin: 0;

    color: #1e1e1e;
    font-size: 15px;
    line-height: 2;

    white-space: pre-wrap;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    display: block;

    width: 75%;

    

    padding-top: 10px;
}

.copy-btn{
    position: sticky;
    top: 5px;
    float: right;

    
    right: 20px;
    border: none;
    background: #0D0B1A;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: white;
    font-size: 18px;

    cursor: pointer;
    transition: 0.2s ease;
    margin-right: -10px;
}

.copy-btn:hover{
    background: #1c1838;
    transform: scale(1.05);
}

.btn-script {
    /* Em vez de width fixo, usamos padding para o fundo acompanhar o texto */
    padding: 10px 30px; 
    min-width: 160px; /* Garante um tamanho robusto */
    
    font-weight: bold; /* Corrigido de font-style para font-weight */
    font-size: 1.2rem; /* Um tamanho grande, mas equilibrado */
    border-radius: 12px;
    
    /* Garante que o texto não quebre linha */
    white-space: nowrap; 
    
    /* Efeito de hover para ficar profissional */
    transition: transform 0.2s, background-color 0.2s;
}

.btn-script:hover {
    transform: scale(1.05);
    background-color: #218838; /* Um verde levemente mais escuro */
}


.overlay-warning{
    width: 75%;
    background: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 15px;
    margin-top: 15px;
    font-weight: 600;
    text-align: center;
}

.error-popup{
    position: fixed;
    top: 20px;
    right: 20px;
    background: #d32f2f;
    color: white;
    padding: 16px 22px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);

    opacity: 0;
    transform: translateY(-10px);

    transition: all .3s ease;

    z-index: 99999;
}

.error-popup.show{
    opacity: 1;
    transform: translateY(0);
}