:root {
  --background-main-color: #161618;
  --category-title-color: #007bff;
  --category-name-color: #555;
  --hover-color: #1b1b1f;
}

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

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: var(--background-main-color);
}
body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

header {
  padding: 40px;
  border-bottom: 2px solid gray;
  color: #fff;
}
main {
  display: flex;
  flex-direction: column;
}
.btn-container {
  padding: 20px;
  align-self: center;
  justify-content: space-evenly;
  
}
button{
  padding: 12px;
  color: #fff;
  border-radius: 4px;
}
button:hover{
  cursor: pointer;
}

.word-container {
  width: 900px;
  display: flex;
  justify-content: space-evenly;
  padding: 20px;
}
#text {
  flex: 1;
  padding: 8px;
  outline: none;
  color: #fff;
}
#result {
  flex: 1;
  height: 200px;
  max-height: 200px;
  background-color: var(--hover-color);
  color: #fff;
  padding: 8px;
  overflow-y: auto;
  overflow-x: auto;
  word-break: break-word;
}

.footer {
  width: 60%;
  display: flex;
  justify-content: space-evenly;
  color: #555;
  font-weight: 600;
}
.footer-links {
  display: flex;
  list-style: none;
  gap: 8px;
}
.footer-links a:hover {
  color: rgb(18, 38, 150);
}

a {
  text-decoration: none !important;
  color: inherit;
}
/* Responsivo */

/* ---------------------
   Geral para desktops
---------------------- */
body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* evita muito espaço no topo */
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

header {
  padding: 20px 40px;
  border-bottom: 2px solid gray;
  color: #fff;
  text-align: center;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.word-container {
  display: flex;
  justify-content: space-between;
  width: 900px;
  gap: 20px;
  margin-top: 20px;
}

#text, #result {
  flex: 1;
  height: 200px;
  padding: 8px;
  overflow-y: auto;
  word-break: break-word;
}

.btn-container {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 20px;
}

/* ---------------------
   Laptops e tablets grandes
---------------------- */
@media (max-width: 1024px) {
  .word-container {
    width: 80%;
    gap: 16px;
  }

  #text, #result {
    height: 180px;
  }

  header {
    padding: 16px 24px;
  }
}

/* ---------------------
   Tablets médios
---------------------- */
@media (max-width: 768px) {
  .word-container {
    /* flex-direction: column; */
    width: 90%;
    gap: 12px;
  }

  #text, #result {
    width: 100%;
    height: 200px;
  }

  header {
    padding: 12px 16px;
  }

  .btn-container {
    flex-wrap: wrap;
    gap: 12px;
  }

  .btn-container button {
    padding: 10px;
    font-size: 0.9rem;
  }
}

/* ---------------------
   Smartphones
---------------------- */
@media(max-width:500px){
  .word-container {
    flex-direction: column;
    width: 90%;
    height: 40vh;
    gap: 12px;
  }

  #text, #result {
    width: 100%;
    height: 200px;
  }

  header {
    padding: 12px 16px;
  }

  .btn-container {
    flex-wrap: wrap;
    gap: 12px;
  }

  .btn-container button {
    padding: 10px;
    font-size: 0.9rem;
  }
  .footer{
    flex-direction: column;
    gap: 20px;
  }
  .footer-links{
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.2rem;
  }

  .word-container {
    gap: 8px;
  }

  #text, #result {
    height: 140px;
  }

  .btn-container button {
    padding: 8px;
    font-size: 0.8rem;
  }

  header {
    padding: 8px 12px;
  }
}
