* {
  box-sizing: border-box;
}

:root {
  --fundo-claro: white;
  --texto-claro: black;
  --fundo-escuro: black;
  --texto-escuro: white;
  --cor-link-claro: black;
  --cor-link-escuro: white;
  --link-clicado: white;
}

@font-face {
  font-family: "APhont";
  src: url("./fontes/aphont/APHont-Regular_q15c.ttf") format("truetype");
  font-display: swap;
}

body {
  padding: 0 20px;
  margin: 20px auto 20px auto;
  max-width: 720px;
  font-family: "APhont", sans-serif;
  font-size: 18px;
  transition: background-color 0.5s, color 0.3s;
}

body.modo-escuro {
  background-color: var(--fundo-escuro);
  color: var(--texto-escuro);
}

body.modo-escuro p {
  color: var(--texto-escuro);
}

body {
  background-color: var(--fundo-claro-body);
  color: var(--texto-claro);
  transition: background-color 0.5s, color 0.3s;
}

p {
  color: var(--texto-claro);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

a {
  all: unset;
  cursor: pointer;
  text-decoration: underline;
}

#contraste {
  cursor: pointer;
}

hr {
  border-top: 1px dotted;
}

nav {
  padding: 10px;
  margin: 0 auto;
  text-align: center;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

blockquote {
  padding-left: 20px;
  font-style: italic;
  text-align: right;
}

article {
  margin: 20px 0;
  line-height: 1.5;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

img {
  max-width: 100%;
}

/* Estilo geral do formulário */
form {
  display: flex;
  flex-direction: column;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

/* Estilo dos campos de entrada */
form input {
  margin: 10px 0;
  padding: 10px;
  width: 100%;
}

/* Estilo do botão de envio */
form button {
  margin: 20px 0;
  padding: 10px;
}

footer, #data {
  text-align: center;
}

p.descricao {
  border-right: 1px solid;
  text-align: center;
  margin: 0 auto;
  white-space: nowrap;
  overflow: hidden;
  padding: 10px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
  animation: piscaCursor 500ms steps(40) infinite normal,
    digitando 4s steps(40) 1s normal both;
}

@keyframes digitando {
  from {
    width: 2em;
  }

  to {
    width: 28em;
  }
}

@keyframes piscaCursor {
  from {
    border-right-color: var(--fundo-escuro);
  }

  to {
    border-right-color: var(--fundo-claro);
  }
}

/* Adicionado consulta de mídia para telas de celulares */
@media (max-width: 600px) {
  p.descricao {
    white-space: normal;
  }

  @keyframes digitando {
    to {
      width: 100%;
    }
  }
}

/* Estilos específicos para telas de celular */
@media (max-width: 600px) {
  form {
    padding: 20px;
  }
  nav {
    padding: 20px;
  }
  ul {
    flex-direction: column;
    align-items: center;
  }
  ul li {
    margin-bottom: 10px;
  }
}
