
/* FONTE USADA NOS TÍTULOS E NOS LOGOS */
@font-face {
  font-family: 'Orbitron';
  src: url('/fonts/Orbitron-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;  /* intervalo de peso suportado */
  font-style: normal;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900; /* intervalo de pesos */
  font-style: normal;
  font-optical-sizing: auto; /* ativa o ajuste óptico automaticamente */
}



html{
    font-size: 62.5%;
    /* font-family: 'AtkinsonHyperlegibleMono', monospace; */
    /* font-family: 'Inter', sans-serif, monospace; */
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;


    /* font-family: Arial, Helvetica, sans-serif; */
    color: rgb(0, 0, 0);
    /* font-weight: 400; Regular */
    letter-spacing: 0.1rem;
    --text-5xl: 4rem;
    --text-4xl: 3.6rem;
    --text-3xl: 3.2rem;
    --text-2xl: 2.8rem;
    --text-xl: 2.4rem;
    --text-lg: 2rem;
    --text-base: 1.7rem;
    --text-sm: 1.2rem;
    --text-xs: 0.8rem;


    /* cores do editor */
     /* Fundo principal (editor, tela geral) */
    --editor-content-dark: rgb(13, 17, 23);
    /* Fundo da lista de arquivos */
    --files-list-bg-dark: rgb(22, 27, 34);
    /* Barra superior com nomes dos arquivos */
    --top-bar-bg-dark: rgb(33, 38, 45);
    /* Barra superior com nomes dos arquivos */
    --nav-bar-bg-dark: rgb(28, 32, 37);
    /* Cor do nome do arquivo aberto / ativo */
    --file-active-name: rgb(52, 102, 160);
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a{
    color: black;
    text-decoration: none;
}

body{
    font-size: var(--text-base);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background-size: 70px 70px;
    background-image: linear-gradient(to right, rgba(100, 100, 100, 0.1) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(100, 100, 100, 0.1) 1px, transparent 1px);
    position: relative;
}

h1    { font-size: var(--text-5xl); font-family: 'Orbitron'; font-weight: 400;}
h2    { font-size: var(--text-3xl); }
h3    { font-size: var(--text-2xl); }
h4    { font-size: var(--text-xl); }
h5    { font-size: var(--text-lg); }
p, span, a, input, textarea, button { font-size: var(--text-base); }
small { font-size: var(--text-sm); }











.dev-ribbon {
  position: fixed;
  top: 20px;            /* distância do topo, ajuste conforme o design */
  left: -60px;          /* empurra um pouco para fora para centralizar melhor */
  width: 200px;         /* largura da faixa */
  height: 50px;         /* altura maior para caber o texto em duas linhas */
  background: red;
  color: white;
  text-align: center;
  line-height: 24px;    /* define altura das linhas, ajuste conforme tamanho da fonte */
  transform: rotate(-45deg); /* diagonal indo para cima à esquerda */
  font-family: sans-serif;
  font-size: 19px;
  font-weight: 800px;
  z-index: 9999;
  box-shadow: 0 0 5px rgba(0,0,0,0.6);
  pointer-events: none; /* evita que a faixa atrapa*/
}






/* Container fixo no canto da tela */
.toast-container {
  position: fixed;
  top: 20px;           /* ou bottom: 20px; se preferir */
  left: 20px;
  right: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Estilo base do toast */
.toast {
/*   min-width: 220px;
  max-width: 300px; */
  width: fit-content;
  padding: 12px 16px;
  border-radius: 6px;
  color: #fff;
  font-family: sans-serif;
  font-size: 14px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  opacity: 0;                /* começa invisível */
  transform: translateY(-20px);
  animation: slideIn 0.5s forwards;
}

/* Sucesso */
.toast-success {
  background: linear-gradient(45deg, #4CAF50, #43A047);
}

/* Erro */
.toast-error {
  background: linear-gradient(45deg, #f44336, #e53935);
}

/* Aviso */
.toast-warning {
  background: linear-gradient(45deg, #ff9800, #fb8c00);
}

/* Animação de entrada */
@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}






.site-header{

}

.site-header-wrapper{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    height: 15rem;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    /* background-color: darkgrey; */
}

.site-header__logo{
    height: 6rem;
}

.site-header__logo p{
    font-family: 'Orbitron', sans-serif;
    font-size: var(--text-5xl);
    border-bottom: 3px solid rgb(255, 115, 91);
    user-select: none;
}

.site-header__logo img{
    height: 100%;
}

.site-header__nav{
    /* background-color: green; */
}

.menu-button{
    display: none;
}

.menu-button__closed,
.menu-button__opened{
    display: none;
}

.nav-menu{
    display: flex;
    flex-direction: row;
    list-style: none;
}

.nav-menu__item{
    
}


.nav-menu__link{
    transition: all 0.5s;
    display: block;
    padding: 20px 10px;
    /* font-weight: 600; */
    border-bottom: 2px solid transparent;
    /* remove sublinhado */
}

.nav-menu__link:hover{
    border-bottom: 2px solid black;
}

.nav-menu__username{
    display: block;
    padding: 20px 10px;
    font-weight: 600;
    position: relative
}

.nav-menu__username::after {
    content: 'Sair';
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(99, 99, 99);
    opacity: 0;
    cursor: pointer;
    border-radius: .5rem;
}

.nav-menu__username:hover::after {
    opacity: 1;
}














.main{
    margin-top: 40px;
    margin-bottom: 15rem;
    width: 100%;
}

.main-wrapper{
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

















.about-section{
    font-family: monospace, sans-serif;
    padding: 2rem;
    border: 1px solid #dfdfdf;
    background-color: #fff;
}

.about-section p{
    margin-bottom: 1rem;
}

.about-section__title{
    letter-spacing: 0.7rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    margin-bottom: 3rem;
}

.about-section__p{
    line-height: 3rem;
    color:#535353
}

.about-section__about p{
    text-decoration: underline;
}

.about-section__about *{
    margin-top: 2rem;
    display: inline;
}


.post-section{
    background-color: #ffffff;
    color: #333333;
    padding: 4rem 3rem;
    /* border-radius: 1rem; */
    overflow: hidden;
    width: 100%;
    /* box-shadow: 0 0 12px rgba(0, 0, 0, 0.08); */
    border: 1px solid #dfdfdf;
}


.post-section h1{
    font-size: var(--text-4xl);
    font-weight: 600;
    color: #222222;
    text-align: center;
    margin-bottom: 3rem;
    line-height: 1.2;
}

.post-section__info{
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    font-size: var(--text-sm);
    color: #777777;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.post-section__info-author,
.post-section__info-date{
    text-transform: uppercase;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.05em;
}


.post-section p{

}

.post-section img{
    max-width: 100%;
    margin: 1rem 0;
}


/* ======== Layout lado a lado para editor e post ======== */

.editor-wrapper {
    display: flex;
    gap: 2rem;
    width: 100%;
    max-width: 100vw;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

.editor-wrapper .post-section {
    flex: 1 1 50%;
    min-width: 0; /* para evitar overflow no flex */
}

.editor-section {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: #f8f8f8;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    min-width: 0;
}

.editor-section h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.editor__title {
    padding: 0.8rem 1rem;
    font-size: 1.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
}

.editor__description {
    font-family: monospace, monospace;
    font-size: 1.4rem;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    min-height: 10rem;
    outline-offset: 0;
}

.editor__content {
    flex: 1;
    font-family: monospace, monospace;
    font-size: 1.4rem;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    min-height: 300px;
    outline-offset: 0;
}

.editor-buttons-wrapper {
    max-width: 1000px;
    margin: 2rem auto 4rem;
    padding: 0 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.buttons__send {
    background-color: #0077ff;
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.6rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.buttons__send:hover:not(:disabled) {
    background-color: #005fcc;
}

.buttons__send:disabled {
    background-color: #a0c9f7;
    cursor: not-allowed;
}

/* Responsivo - empilha no mobile menor que 900px */
@media (max-width: 900px) {
    .editor-wrapper {
        flex-direction: column;
        padding: 1rem;
    }

    .post-section,
    .editor-section {
        flex: none;
        width: 100%;
        margin-bottom: 2rem;
    }

    .editor-buttons-wrapper {
        padding: 0 1rem;
    }
}





/* ======== Estilo específico para a página de login ======== */

.login {
    max-width: 400px; /* largura máxima do formulário */
    width: 100%;
    margin: 8rem auto; /* centraliza verticalmente e horizontalmente */
    padding: 3rem 2rem;
    background-color: #fff; /* fundo branco */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* espaçamento entre os elementos */
    /* box-shadow: 0 0 10px rgba(0,0,0,0.1);  */
    /* border-radius: 10px; */
    border: 1px solid #dfdfdf;
}

.login__title {
    font-size: var(--text-4xl);
    font-weight: 600;
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
}

.login__username,
.login__password {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    font-size: var(--text-base);
    outline: none;
    transition: border-color 0.3s ease;
}

.login__username:focus,
.login__password:focus {
    border-color: #0077ff;
}

.login__submit {
    width: 100%;
    padding: 1rem 1.2rem;
    background-color: #0077ff;
    color: white;
    font-size: var(--text-base);
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login__submit:hover {
    background-color: #005fcc;
    transform: translateY(-2px);
}

.login__submit:disabled {
    background-color: #a0c9f7;
    cursor: not-allowed;
}


/* ======== Estilo específico para a página do blog ======== */


.blog-section__title {
  font-family: 'Orbitron', sans-serif;
  font-size: 3.6rem;
  margin-bottom: 1rem;
  font-weight: 400;
  color: #222;
  letter-spacing: 0.2rem;
  padding: 0 2rem;
}

.blog-section__description {
  font-size: 1.6rem;
  color: #555;
  margin-bottom: 2.5rem;
  line-height: 1.5;
  max-width: 720px;
  padding: 0 2rem;
}

/* Container dos posts como grid responsiva */

.blog-section__posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* Card do post */

.post-card {
  background-color: #fff;
  padding: 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  transition: box-shadow 0.3s ease;
  /* box-shadow: 0 0 8px rgba(0,0,0,0.05); */
  /* border-radius: 12px; */
  border: 1px solid #dfdfdf;
  overflow: hidden;
}

/* .post-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
} */

/* Título do post */

.post-card__title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: #222;
  user-select: none;
}

/* Autor */

.post-card__author {
  font-size: 1.2rem;
  font-style: italic;
  color: #777;
  margin-bottom: 1rem;
}

/* Descrição do post */

.post-card__description {
  font-size: 1.4rem;
  color: #444;
  flex-grow: 1;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

/* Botão Acessar post */

.post-card__button {
  align-self: flex-start;
  padding: 0.6rem 1.4rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: white;
  background-color: #0077ff;
  border-radius: 8px;
  text-decoration: none;
  user-select: none;
  transition: background-color 0.3s ease;
}

.post-card__button:hover {
  background-color: #005fcc;
}

/* Responsivo simples */

@media (max-width: 480px) {
  .blog-section__title {
    font-size: 2.8rem;
  }

  .blog-section__description {
    font-size: 1.4rem;
  }

  .post-card__title {
    font-size: 1.6rem;
  }

  .post-card__description {
    font-size: 1.3rem;
  }

  .post-card__button {
    font-size: 1.3rem;
    padding: 0.5rem 1.2rem;
  }
}



/* ======== Estilo específico para a página Not Found ======== */


.notfound-section {
  background-color: #ffffff;
  color: #333333;
  padding: 4rem 3rem;
  /* border-radius: 1rem; */
  overflow: hidden;
  width: 100%;
  /* box-shadow: 0 0 12px rgba(0, 0, 0, 0.08); */
  border: 1px solid #dfdfdf;
  text-align: center;
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.notfound-section__title {
  font-size: var(--text-5xl);
  font-weight: 400;
  color: #222;
  margin-bottom: 2rem;
}

.notfound-section__p {
  color: #555;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.notfound-section__p a {
  color: #0077ff;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.notfound-section__p a:hover {
  color: #005fcc;
}











/* ======== Estilo específico para a página Notes ======== */

/* 
    Por algum motivo, talvez o markdown esteja setando algum 
    elemento com position absolute ou algo do tipo, o overflo-y 
    hidden apenas no container do texto não adianta, sendo necessário 
    colocar no body.
*/
.body-fullscreen{
    width:  100%;
    height: 100vh !important;
    overflow: hidden; 
}

.main-notes-section{
    width: 100%;
    height: 100%;/* calc(100% - 15rem); 15rem = height do .site-header-wrapper */
    background-color: rgb(255, 0, 0);
}

.notes-wrapper{
    width: 100%;
    height: 100%;
    /* max-width: 1000px; */
    /* margin: 0 auto; */
    background-color: green;
}

.notes-section{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
}


/* Aplica o mesmo estilo às duas classes */
.notes-section__list-items::-webkit-scrollbar,
.file-content__text::-webkit-scrollbar {
    width: 12px;             /* largura da barra vertical */
    height: 12px;            /* altura da barra horizontal */
}

.notes-section__list-items::-webkit-scrollbar-track,
.file-content__text::-webkit-scrollbar-track {
    background: #252526;     /* cor do track (similar ao fundo do VS Code) */
}

.notes-section__list-items::-webkit-scrollbar-thumb,
.file-content__text::-webkit-scrollbar-thumb {
    background-color: #5a5a5a; /* cor do thumb */
    border-radius: 0;          /* retangular, sem arredondamento */
}

.notes-section__list-items::-webkit-scrollbar-thumb:hover,
.file-content__text::-webkit-scrollbar-thumb:hover {
    background-color: #646464; /* cor ao passar o mouse */
}
.notes-navbar__left-container{
    height: 100%;
    width: 37rem;
    max-width: 50rem;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    flex-shrink: 0;
}

.notes-section__list-items{
    z-index: 2;
    padding-top: 2rem;
    padding-bottom: 2rem;
    background-color: var(--files-list-bg-dark);
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
}


.notes-section__list-items:empty::after{
    display: block;
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    content: 'Carregando...';
    color: white;
}

.list-items__item{
    width: 100%;
    padding: .4rem 2rem; /* está sendo aplicado no js*/
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: hidden;
    cursor: pointer;
    color: white;
}

.list-items__item:hover{
    background-color: rgba(0, 0, 0, 0.301);
}

.list-items__item[data-active="true"]{
    background-color: var(--file-active-name);
}


.item-icon{
    width: 2.2rem;
    height: 2.2rem;
    margin-right: 1rem;
    transform: translateY(0.1rem);
    flex-shrink: 0;
}

.item-icon__svg{
    display: block;
    width: 100%;
    height: 100%;
    fill: white;
}

.list-items__item[data-status="open"] .item-icon__svg--closed {
    display: none !important;
}

.list-items__item[data-status="open"] .item-icon__svg--open {
    display: block !important;
}

.list-items__item[data-status="closed"] .item-icon__svg--closed {
    display: block !important;
}

.list-items__item[data-status="closed"] .item-icon__svg--open {
    display: none !important;
}

.item__name{
    white-space: nowrap;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-items__file{
}

.list-items__dir{
    /* background-color: goldenrod; */
}


.notes-section__file-container{
    display: flex;
    flex-direction: column;
    background-color: #242424;
    flex-grow: 1;
    flex-shrink: 1;
    height: 100%;
    overflow: hidden;
}

.toggle-left-menu{
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}


.left-container-open,
.left-container-closed,
.toggle-left-menu{
    display: none;
    color: white;
}

.toggle-left-menu svg{
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 950px){
    #toggle-left-container:checked ~ .notes-navbar__left-container{
        position: absolute;
        max-width: none;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 500px;
        z-index: 999;
    }

    .toggle-left-menu{
        display: grid;
    }

    #toggle-left-container:checked ~ div .left-container-open{
        display: block;
    }

    #toggle-left-container:not(:checked) ~ div .left-container-closed{
        display: block;
    }

    #toggle-left-container:not(:checked) ~ .notes-navbar__left-container{
        flex-shrink: 0;
        width: fit-content;
    }
    #toggle-left-container:not(:checked) ~ div .notes-section__list-items *{
        display: none;
    }

    #toggle-left-container:not(:checked) ~ div .notes-navbar__list{
        display: none;
    }

    #toggle-left-container:checked ~ div nav .toggle-left-menu{
        width: fit-content;
    }
}


.notes-navbar{
    display: flex;
    height: 5rem;
    background-color: var(--nav-bar-bg-dark);
    flex-shrink: 0;
}

.notes-navbar__list{
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    padding-left: 2rem;
    flex-shrink: 0;
}

.notes-navbar__item{
    padding: 5px 10px;
    border-radius: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

.notes-navbar__item a{
    color: white;
}

.notes-navbar__item:hover{
    background-color: rgba(255, 255, 255, 0.103);
}

 
.file-content__top-bar{
    flex-shrink: 0;
    width: 100%;
    height: 5rem;
    background-color: var(--top-bar-bg-dark);
    box-shadow: 0 0 .3rem black;
    z-index: 1;
}

.top-bar__file-name{
    background-color: rgba(0, 0, 0, 0.233);
    padding: 5px 20px;
    height: 100%;
    width: fit-content;
    font-weight: 500;
    user-select: none;
    border-right: 1px solid rgba(0, 0, 0, 0.137);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.file-name__p{
    color: white
}


.file-content__text{
    padding: 3rem;
    height: 100%;;
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
}

.file-content__text:empty::after{
    content: 'Selecione algum arquivo.';
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
}





















/* Footer inteiro */
.site-footer {
  background-color: #f9f9f9; /* Cor de fundo do footer */
  padding: 2rem 0;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
}

/* Wrapper centralizado */
.site-footer-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 2rem; /* Espaçamento entre os ícones */
}

/* Links do footer (os ícones) */
.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #333; /* Cor dos ícones */
  transition: transform 0.3s ease, color 0.3s ease;
}

/* SVG herda a cor do link */
.site-footer svg {
  fill: #4b4b4b;
  width: 22px;
  height: 22px;
}

/* Animação no hover */
.site-footer a:hover {
  transform: scale(1.2);
  color: #0077ff; /* Cor no hover (azul, pode trocar) */
}


@media (max-width: 700px) {
    .nav-menu{
        display: none;
    }

    #toggle-menu:not(:checked) ~ .site-header__nav .menu-button__closed,
    #toggle-menu:checked ~ .site-header__nav .menu-button__opened{
        display: block;
    }

    #toggle-menu:checked ~ .site-header__nav .menu-button__opened{
        position: absolute;
        top: 20px;
        right: 20px;;
    }

    #toggle-menu:checked + .site-header__nav{
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 40px;
        position: fixed;
        width: 400px;
        height: 100%;
        max-width: 100%;
        right: 0;
        top: 0;
        background-image: linear-gradient(rgb(255, 252, 255), rgb(255, 255, 255), rgb(241, 255, 250));
        border-left: 1px solid rgba(223, 223, 223, 0.411);
    }

    #toggle-menu:checked ~ .site-header__nav .nav-menu{
        display: block;
    }

    .menu-button{
        display: block;
    }

    .main-wrapper{
        padding-left: 0;
        padding-right: 0;
    }
    
}