/* Reset e configurações básicas */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: hsl(240, 5%, 12%);
  --bg-secondary: hsl(240, 6%, 15%);
  --accent: rgba(192, 192, 192, 0.301);
  --text-primary: hsl(0, 0%, 95%);
  --text-secondary: hsl(0, 0%, 70%);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background: linear-gradient(
    135deg,
    hsl(240, 5%, 12%) 0%,
    hsl(240, 5%, 16%) 100%
  );
  color: #e0e0e0;
  font-family: Arial, sans-serif; /* Fonte atualizada para Arial */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Cabeçalho e layout da toolbar */
header {
  background-color: #151515;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  transition: transform 0.3s ease;
}
/* Container para logo e título */
.header-left {
  display: flex;
  align-items: center;
  margin-left: 20px;
}
.logo {
  height: 40px;
  margin-right: 10px;
}
header h1 {
  font-size: 1.6em;
}
/* Botão de menu (hambúrguer) - visível apenas em telas pequenas */
#menuToggleBtn {
  display: none;
  background: none;
  border: none;
  color: #e0e0e0;
  font-size: 1.5em;
  cursor: pointer;
}
/* Toolbar com os botões das funções (desktop) */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar button {
  background-color: #333;
  border: none;
  color: #e0e0e0;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  font-size: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toolbar button:hover {
  background-color: #555;
  transform: scale(1.05);
}

#showToolbarBtn {
  display: none;
  position: fixed;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #e0e0e0;
  font-size: 1.5em;
  cursor: pointer;
  z-index: 1000;
}

/* Área principal */
main {
  flex: 1;
  padding: 10px;
  overflow: auto;
}
/* Área de texto premium */
textarea {
  display: block;
  width: 100%;
  height: calc(100vh - 140px);
  background: linear-gradient(145deg, var(--bg-primary, #1e1e1e), hsl(240, 5%, 14%));
  color: var(--text-primary, #e0e0e0);
  border: none;
  padding: 2rem;
  font-size: 1.1em;
  font-family: Arial, sans-serif;
  line-height: 1.7;
  resize: none;
  outline: none;
  border-radius: 20px;
  margin: 1rem auto;
  max-width: 1200px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

textarea:focus {
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 2px var(--accent);
}

/* Scrollbar personalizada */
textarea::-webkit-scrollbar {
  width: 8px;
}

textarea::-webkit-scrollbar-track {
  background: hsla(0, 0%, 0%, 0.1);
}

textarea::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

/* Footer Minimalista */
footer {
  background: #151515;
  border-top: 1px solid hsla(0, 0%, 100%, 0.08);
  padding: 1.5rem 2rem;
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.9em;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 1200px;
  width: 100%;
  justify-content: space-between;
}

footer a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

footer a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.footer-social {
  display: flex;
  gap: 1.25rem;
}

/* Responsividade do Footer */
@media (max-width: 768px) {
  footer {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  footer {
    font-size: 0.85em;
  }

  .footer-social {
    gap: 1rem;
  }
}

/* Responsividade: em telas pequenas, exibe o menu hambúrguer e oculta a toolbar com animação */
@media (max-width: 600px) {
  /* Exibe o botão de menu */
  #menuToggleBtn {
    display: block;
  }
  /* Ajusta o cabeçalho e o título */
  header h1 {
    font-size: 1.5em;
  }
  /* Toolbar como menu suspenso com animação */
  .toolbar {
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 10px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 4px;
    gap: 10px;
    z-index: 100;
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .toolbar.active {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
  }
  .toolbar button {
    font-size: 0.9em;
    padding: 12px 10px;
  }
  textarea {
    font-size: 16px;
  }
}
