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

body {
  margin: 20px auto;
  width: 50%;
}

h1::before {
  content: "";
  background-color: rebeccapurple;
  position: absolute;
  width: 50%;
  height: 10px;
  margin: -10px;
}

h1 {
  margin-bottom: 20px;
}

ul {
  margin: 20px;
  list-style-type: none;
  margin-top: 0;
}

li {
  padding: 2px 10px;
  border-radius: 10px;
  margin-top: 15px;
}

li::after {
  content: " * ";
  font-size: 2em;
  color: red;
}

li:nth-child(odd):not(:nth-child(3)) {
  /* eksludering av tredje child element for 2.4*/
  background-color: blueviolet;
  color: white;
}

li:nth-child(3) {
  /* gir tredje child element noe styling slik at den ikke stikker ut så gale*/
  background-color: cadetblue;
  color: white;
}

li:first-child {
  color: beige;
}

li:last-child {
  color: burlywood;
}

div {
  height: 150px;
  background-color: blanchedalmond;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
}

div:nth-child(2) {
  height: auto;
  padding: 10px 0;
}

/* Gjorde ikke :before og :after for å lage border rundt tekst */

textarea {
  padding: 5px;
  border-radius: 5px;
  border: 2px solid black;
  transition: 0.5s linear;
}

textarea:focus {
  outline: 4px solid red;
}

button {
  margin: 10px;
  display: block;
  padding: 10px;
  border-radius: 20px;
  background-color: whitesmoke;
  font-size: 1.2rem;
  margin-left: 20px;
  transition: 0.1s ease-in;
}

button:hover {
  box-shadow: 2px 2px 2px black;
  scale: 1.1;
}

button:active {
  background-color: aqua;
  color: red;
  box-shadow: 2px 2px 2px black;
  scale: 1.15;
  transition: 0.1s linear;
}
