:root {
  /* declare a variable with `--` syntax */
  --header-bg-color: #13293d;
  --header-text-color: white;
  --text-color: black;
  --bg-color: #c0c0c0;
  --box-shadow-color: #646464;
  --section-bg-color: #f5f5f5;
  --border-radius: 10px;
  --button-border-radius: 5px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Arial;
  margin: 0;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  font-size: 16px;
  line-height: 1.5;
}

header {
  padding: 5px;
  text-align: left;
  color: var(--section-bg-color);
  background-color: var(--header-bg-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav ul {
  display: flex;
  justify-content: space-between;
  min-width: 300px;
}

nav a {
  padding: 14px 20px;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  color: var(--section-bg-color);
  transition: all 0.3s ease;
}

nav a:hover {
  text-decoration: underline;
  transition: all 0.3s ease;
}

h1 {
  font-size: 200%;
}

h2 {
  font-size: 150%;
  text-decoration: underline;
}

h3 {
  font-size: 125%;
}

h4 {
  font-size: 100%;
}

main {
  display: flex;
  flex-wrap: wrap;
  padding: 12px 12px 12px 12px;
  flex-direction: column;
}

section {
  padding: 20px;
  color: var(--text-color);
  background-color: var(--section-bg-color);
  text-align: center;
  display: block;
}

section p {
  text-align: center;
  margin: 8px 8px 8px 8px;
}

.hidden {
  display: none;
}

.shown {
  visibility: visible;
}

#CodingQuiz {
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

section ol {
  width: fit-content;
  list-style: upper-roman;
  margin-left: 25%;
  margin-right: 25%;
}

section li {
  color: var(--header-text-color);
  margin-left: 35px;
  background-color: var(--header-bg-color);
  padding: 5px;
  margin: 5px;
  border-radius: var(--button-border-radius);
  text-align: left;
  cursor: pointer;
}

section li:hover {
  box-shadow: 2px 2px 5px var(--box-shadow-color);
}

#info {
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  flex-direction: row;
  justify-content: space-evenly;
}

#viewHighScores:hover {
  text-decoration: underline;
}

button {
  background-color: var(--header-bg-color);
  border-radius: var(--button-border-radius);
  color: var(--header-text-color);
  cursor: pointer;
  padding: 5px;
}

button:hover {
  box-shadow: 2px 2px 5px var(--box-shadow-color);
}

#submitButton {
  background-color: var(--header-bg-color);
  border-radius: var(--button-border-radius);
  color: var(--header-text-color);
  cursor: pointer;
  padding: 5px;
}

#submitButton:hover {
  box-shadow: 2px 2px 5px var(--box-shadow-color);
}

#playerName {
  padding: 6px;
  margin-top: 10px;
  font-size: 1em;
  border: 1px solid var(--header-bg-color);
  border-radius: var(--button-border-radius);
}

#pResult {
  font-style: italic;
}

footer {
  padding: 5px;
  text-align: left;
  color: var(--header-text-color);
  background-color: var(--header-bg-color);
}

footer a {
  color: var(--header-text-color);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Tablets - header changes color */
@media screen and (max-width: 992px) {
  #CodingQuiz ol {
    margin-left: 15%;
    margin-right: 15%;
  }
}

/* Large smartphones - header changes color */
@media screen and (max-width: 768px) {
  #CodingQuiz ol {
    margin-left: 1%;
    margin-right: 1%;
  }
}
