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

@font-face {
    font-family: 'personaP';
    src: url('fonts/dogicapixel.ttf') format('truetype');
}
#headerI{
    height: 8vh;
    border-bottom: 1px solid black;
    background: #283593;

    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: arial;
    font-weight: bold;
}

#headerI h4{
    margin: 10px;
    color: #0a103a;
    font-family: personaP;
}

html,#bodyI{
    overflow: hidden; /* Remove scrollbars */
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

#bodyI{
    background: rgb(33, 126, 233);
    background-repeat: no-repeat;

}

/*          CREATE          */


.create-cont{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 30%;
    height: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    flex-direction: column;
    background: 
      linear-gradient(  
        135deg,
        rgba(0, 128, 255, 0.95) 0%,
        rgba(34, 93, 255, 0.9) 100%
      );
    border: 1px solid #0066cc;
    border-radius: 3px;
    display: none;
    align-items: center; /* Adiciona esta linha para centralizar horizontalmente */
    justify-content: space-around; /* Mantém o espaçamento vertical */
    padding: 20px; /* Adiciona um padding para melhor espaçamento */
    font-family: "personaP"; /* Para não vazar em telas pequenas */
}

.create-cont input{
    justify-self: center;
    text-align: center;
    align-items: center;
    display: flex;
    border-radius: 5px;
    font-family: personaP;
    width: 20vw;
    transition: 0.2s ease-out;
    height: 5vh;
    border: 1px solid #030831;
    justify-content: center;
}
.create-cont input:hover{
    transform: scale(1.1);
}
#create_messager{
    font-size: 15px;
    color: red;
    margin: 5px;
    font-family: arial;
    font-weight: bold;
}
.create-cont.show{
    opacity: 1;
    display: flex;
}

.p3r-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
  }
/* ESTILO BASE DO BOTÃO */
/* FONTE E CORES AUTÊNTICAS */
@font-face {
    font-family: 'P3R';
    src: url('https://fonts.cdnfonts.com/css/simplifica') format('woff');
    /* Caso a fonte não carregue: */
    font-family: 'Arial Narrow', sans-serif;
  }
  
  /* ESTRUTURA PRINCIPAL */
  .p3r-menu-button {
    position: relative;
    background: transparent;
    border: none;
    width: 220px;
    height: 50px;
    padding: 0;
    margin: 10px 0;
    cursor: pointer;
    overflow: visible;
    font-family: 'P3R', 'Arial Narrow', sans-serif;
  }
  
  /* FUNDO DO BOTÃO (GRADIENTE E BORDAS) */
  .p3r-button-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
      linear-gradient(
        90deg,
        rgba(0, 30, 60, 0.8) 0%,
        rgba(0, 80, 120, 0.9) 50%,
        rgba(0, 30, 60, 0.8) 100%
      );
    border: 1px solid #00a2ff;
    border-radius: 2px;
    box-shadow:
      0 0 10px rgba(0, 100, 255, 0.3),
      inset 0 0 15px rgba(0, 180, 255, 0.2);
    transition: all 0.3s ease;
  }
  
  /* CONTEÚDO DO BOTÃO */
  .p3r-button-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    color: #b3e5ff;
    font-size: 18px;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(0, 200, 255, 0.7);
  }
  
  /* TEXTO */
  .p3r-button-text {
    position: relative;
    top: -1px;
  }
  
  /* SETA CARACTERÍSTICA */
  .p3r-button-arrow {
    color: #00f7ff;
    font-size: 16px;
    animation: p3r-arrow-pulse 1.5s infinite;
    filter: drop-shadow(0 0 5px #00a2ff);
  }
  
  /* LINHA INFERIOR (DESTAQUE) */
  .p3r-button-content::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 20px;
    width: calc(100% - 40px);
    height: 1px;
    background: linear-gradient(90deg, transparent, #00a2ff, transparent);
    opacity: 0.7;
  }
  
  /* ANIMAÇÕES */
  @keyframes p3r-arrow-pulse {
    0%, 100% { opacity: 0.8; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(3px); }
  }
  
  /* EFEITO HOVER (FIEL AO JOGO) */
  .p3r-menu-button:hover .p3r-button-bg {
    background: 
      linear-gradient(
        90deg,
        rgba(0, 50, 100, 0.9) 0%,
        rgba(0, 120, 180, 1) 50%,
        rgba(0, 50, 100, 0.9) 100%
      );
    box-shadow:
      0 0 15px rgba(0, 150, 255, 0.5),
      inset 0 0 20px rgba(0, 200, 255, 0.3);
  }
  
  .p3r-menu-button:hover .p3r-button-content {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(0, 230, 255, 0.9);
  }
  
  /* EFEITO DE SELEÇÃO (ACTIVE) */
  .p3r-menu-button:active .p3r-button-bg {
    box-shadow:
      0 0 5px rgba(0, 100, 255, 0.5),
      inset 0 0 25px rgba(0, 180, 255, 0.4);
  }
/*          WAVES       */

.wave-container {
    position: relative;
    background: linear-gradient(135deg, #0061ff 0%, #60efff 100%);
    min-height: 100vh;
    overflow: hidden;
  }
  
  .waves {
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 200%;
    height: 200px;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="%230069ff" opacity=".25"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" fill="%230069ff" opacity=".5"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%230069ff"/></svg>');
    animation: wave 12s linear infinite;
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
}


aside .waves{
      opacity: 1.2;
    bottom: 20px;
    height: 200px;
  }
  @keyframes wave {
    0% { transform: rotate(180deg) translateX(0) scaleY(1); }
    50% { transform: rotate(180deg) translateX(25%) translateZ(0) scaleY(0.8); }
    100% { transform: rotate(180deg) translateX(50%) scaleY(1);; }
  }

/*           Notes                */

#posts-container{
    display: flex;
    margin-top: 20px;
    max-width: 100%;
    height: 100%;
    justify-content: space-around;
    
}

.post{
    background: rgb(22, 36, 236);
    color: rgb(7, 7, 65);
    width: 20vw;
    height: 40vh;
    border-radius: 20px;
    border-right: 1px solid white;
    transition: transform 0.3s ease;
}

.post hr{

}

.post:hover{
    cursor: pointer;
    animation: selected 2s ease-in infinite;
    transform: scale(1.03);
}

.post p{
    margin-top: 10px;
    margin-left: 5px;
    color: white;
    font-size: 10px;

}
.post h3{
    font-size: 20px;
    color: #33c5ff;
    margin: 5px;
    font-family: monospace;
    font-weight: bold;

}   


.bodyview{
    height: 100vh;
    width: 100vw;
    background: linear-gradient(90deg, rgb(0, 26, 255), rgb(76, 78, 221), rgb(70, 85, 223), rgb(51, 75, 180));
    background-repeat: no-repeat;
}

#post-detalhes{
    background: rgb(31, 31, 230);
    width: 60%;
    height: 96%;
    margin: 0 auto 0;
    border: 1px solid rgb(15, 15, 66);
    border-end-end-radius: 20px;
}

#titlepost{
    color: #5867f5;
    border-end-end-radius: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgb(15, 15, 66)
}

main {
    display: flex;           /* Ativa Flexbox */
    gap: 20px;               /* Espaço entre aside e posts */
    padding: 20px;           /* Padding opcional */
    height: calc(100vh - 8vh); /* Altura total - header */
  }
  

  aside {
    background: #0050A4;
    animation: fade 30s infinite;
    flex: 0 0 250px;
    padding: 15px;
    height: 100%;
    border: 5px solid #013b79;
    transform: rotate(3deg);
    clip-path: polygon(30% 0%, 0% 100%, 100% 0%);
    position: relative; /* Permite posicionar os filhos absolutamente */
    overflow: visible;  /* Permite que conteúdo vaze para fora */
}

@keyframes fade {
    0%{transform: rotate(0deg);}
    100% { opacity: 1; transform: rotate(3deg);}
    50% { opacity: 0.2; transform: rotate(-3deg);}
  }

aside img {
    transition: opacity 0.5s ease;
    position: absolute;
    width: 300px; /* Ajuste conforme necessário */
    bottom: -30px; /* Posiciona fora do triângulo */
    left: 40%;
    filter: 
    brightness(0.7) 
    contrast(1.3) 
    hue-rotate(200deg) 
    saturate(1.8) 
    sepia(0.2)
    opacity(0.5);
    transform: translateX(-50%) rotate(30deg); /* Compensa a rotação do aside */
    z-index: 1; /* Garante que a imagem fique acima do fundo */
  }

aside img:hover{
    opacity: 0.3;
}
aside .material-symbols-rounded {
    position: absolute;
    top: 50px;
    right: 80px;
    color: rgb(81,238,252);
    font-size: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    transform: rotate(-3deg);
    text-shadow: 0 0 1px #030831, 0 0 1px #150c96, 0 0 1px #0017e6;
    opacity: 1;
    animation: none !important;
}

aside .material-symbols-rounded:hover {
    transform: scale(1.8) rotate(-3deg);
    color: red;
}

@keyframes selected {
    0%{color: red; background: red;}
    50%{color: white; background: rgb(139, 139, 139);}
    100%{color: red;  background: red;}

}
@keyframes selected2 {
    0%{color: red;}
    50%{color: white;}
    100%{color: red;}

}
#post-date{
    text-shadow: 0 0 2px #030831, 0 0 2px #150c96, 0 0 5px #0017e6;
    margin: 5px;
    color: #33c5ff;
    font-family: "personaP";
}

#post-titulo{
    font-family: personaP;
    font-size: 20px;
    margin: 10px;
    text-shadow: 0 0 3px #030831, 0 0 5px #150c96, 0 0 5px #0017e6;
}

#post-conteudo{
    color: white;
    font-family: "personaP";
    margin: 5px;
    margin-top: 20px;
    font-size: 10px;
}

.post-cont h3{
    font-size: 20px;
    margin-right: 0px;
    width: 8vw;
}
.post-cont span{
    font-size: 14px;
    color: #33c5ff;
}
.post-cont{
    display: flex;
    justify-content: space-between;
    margin: 2px;
    font-family: "personaP";
    align-items: center;
}

#posts-container {
    flex: 1;                 /* Ocupa todo espaço restante */
    display: flex;
    overflow-y: scroll;
    scrollbar-width: none;
    flex-wrap: wrap;         /* Quebra linhas se necessário */
    gap: 15px;              /* Espaço entre posts */
    justify-content: flex-start; /* Alinha posts à esquerda */
    margin: 0;              /* Remove margem anterior */
  }
/* Estilo para o conteúdo do post */
.post-content-text {
    font-family: 'personaP', monospace;
    font-size: 12px;
    color: #ffffff;
    line-height: 1.4;
    padding: 8px;
    margin: 5px 0;
    overflow: hidden;
}

/* Estilo para negrito dentro do conteúdo */
.post-content-text b,
.post-content-text strong {
    font-family: "personaP";
    font-size: 10px;
    color: #ffffff;
    font-weight: normal;
    text-shadow: 0 0 3px rgba(0, 26, 255, 0.7);
}

/* Estilo para itálico */
.post-content-text i,
.post-content-text em {
    font-style: normal;
    color: #ffffff;
}

/* Estilo para links */
.post-content-text a {
    color: #00ffff;
    text-decoration: underline;
}

/* EDITOR */



.editor-container {
    max-width: 98%;
    margin: 0 auto;
    background: rgb(31, 31, 230);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    overflow: auto;
    display: flex; /* Adicionado */
    margin-top: 20px; /* Espaço do topo */
}

.toolbar {
    padding: 10px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 5vw;
    border-radius: 5px 0 0 5px;
    position: static; /* Removido o fixed */
    align-self: flex-start; /* Alinha no topo */
}

.toolbar button, .toolbar select {
    padding: 2px 0px;
    width: 3.5vw;
    margin: 2px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem; /* Melhora legibilidade */
}

.toolbar button:focus{
    background: rgb(223, 223, 223);
}

.editor-content {
    max-height: 340px;
    padding: 20px;
    outline: none;
    overflow-x: auto;
    overflow-y: scroll;
    scrollbar-width: none;
    flex: 1; /* Ocupa todo espaço restante */
    background: rgb(255, 255, 255); /* Fundo branco para o editor */
    border-radius: 0 5px 5px 0; /* Arredonda só o lado direito */
}

.editor-content:focus {
    border: 1px solid #4CAF50;
}

/* Ajustes específicos para os botões */
#U-BTN, #fontBTN, #right-BTN {
    margin-bottom: 10px;
}


/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  /* Layout principal */
  main {
      flex-direction: column;
      height: auto;
      padding: 10px;
      gap: 10px;
  }

  aside {
      flex: 0 0 auto;
      width: 100%;
      height: 150px;
      clip-path: none;
      background: none;
      border: none;

      transform: none;
      padding-bottom: 50px;
  }

  aside img {
    display: none;
      width: 120px;
      left: 50%;
      bottom: -40px;
  }

  aside svg{
    display: none;
  }

  aside .material-symbols-rounded {
      top: 20px;
      right: 20px;
      font-size: 60px;    
      top: 50%;
      left: 63%;
      transform: translate(-50%, -50%);
  }

  /* Container de posts */
  #posts-container {
      flex-direction: column;
      align-items: center;
      overflow-y: visible;
  }

  .post {
      width: 90%;
      height: auto;
      min-height: 200px;
      margin-bottom: 15px;
  }

  /* Modal de criação */
  .create-cont {
      width: 90%;
      height: 60%;
  }

  .create-cont input {
      width: 80%;
      height: 40px;
  }

  .p3r-menu-button {
      width: 180px;
      height: 45px;
  }

  /* Header */
  #headerI {
      height: 60px;
  }

  #headerI h4 {
      font-size: 1.2rem;
  }

  /* Ajustes de texto */
  .post h3, #post-titulo {
      font-size: 1rem;
  }

  .post p, #post-conteudo {
      font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .create-cont {
      height: 70%;
  }
  
  .p3r-button-content {
      font-size: 14px;
      padding: 0 10px;
  }

  aside .material-symbols-rounded{
    left: 55%;
    animation: none;
  }
}




/*      EDITOR RES    */

/* ===== RESPONSIVIDADE PÁGINA DE DETALHES ===== */
@media (max-width: 768px) {
  .bodyview {
      padding: 10px;
      height: auto;
      min-height: 100vh;
  }
  
  #titlepost {
      flex-direction: column;
      align-items: flex-start;
      padding: 10px;
  }
  
  #post-titulo {
      font-size: 1.5rem;
      margin-bottom: 5px;
  }
  
  #post-date {
      font-size: 0.9rem;
  }
  
  .editor-container {
      max-width: 100%;
      flex-direction: column;
      margin-top: 10px;
  }
  
  .toolbar {
      width: 100%;
      padding: 10px;
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: center;
      gap: 5px;
  }
  
  .toolbar-row {
      display: flex;
      gap: 5px;
      margin: 5px 0;
  }
  
  .toolbar button, .toolbar select {
      min-width: 44px;
      min-height: 44px;
      padding: 5px;
      font-size: 0.9rem;
  }
  
  .toolbar .material-symbols-rounded {
      font-size: 1.2rem;
  }
  
  .editor-content {
      max-height: none;
      height: 60vh;
      padding: 15px;
  }
}

@media (max-width: 480px) {
  #post-titulo {
      font-size: 1.3rem;
  }
  
  .toolbar {
      padding: 5px;
  }
  
  .toolbar button, .toolbar select {
      min-width: 22px;
      min-height: 10px;
      font-size: 0.5rem;
      size: 10px;
      padding: 2px 0px;
      width: 2.5vw;
      border: 1px solid #ccc;
      background: white;
      border-radius: 8px;
      cursor: pointer;
  }
  
  .editor-content {
      padding: 10px;
      font-size: 16px; /* Melhor legibilidade em mobile */
  }
  #editor{
    width: 100%;
    height: 100vh;
  }

  .editor-container{
    height: 76vh;
  }
  .toolbar-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
  }
  
  /* Melhorias na usabilidade para mobile */
  button, select {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  select {
    max-width: 120px;
  }
  
  /* Ajuste para evitar zoom em inputs no iOS */
  .editor-content {
    font-size: 16px;
    height: 100%;
  }
  
  #titlepost{
    color: #5867f5;
    border-end-end-radius: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgb(15, 15, 66)
  }
}

/* Estilos base para a barra de ferramentas */