* {
  margin: 0;
  padding: 0;
  font-family: monospace;
  box-sizing: border-box;
}

html {
  width: 100vw;
  height: 100vh;
  padding: 1rem;
  background-color: white;
}

body {
  width: 100%;
  height: 100%;
  border-radius: 4rem;
  overflow: hidden;
}

#page-container {
  width: 100%;
  height: 100%;
  display: flex;
  border-radius: 4rem;
  overflow: hidden;
  flex-direction: column;
}

/* Header Styles */

header {
  text-align: center;
  background-color: burlywood;
  left: 0;
  right: 0;
  padding: 1.5rem;
}

header h1 {
  font-size: 2.7rem;
}

header a {
  font-size: 1.25rem;
}

/* Footer Styles */

footer {
  text-align: center;
  font-style: italic;
  background-color: burlywood;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3rem;
  padding-top: 1rem;
}

/* Text Styles */

#rule-text {
  text-align: justify;
  font-size: 1.4rem;
  line-height: 1.05;
}

#task-text {
  text-align: center;
  font-style: italic;
  font-size: 0.9em;
  margin-top: 0.75rem;
}

/* Content Container Styles */

#content-container {
  flex: 1;
  width: 100%;
  background-color: beige;
  overflow-y: scroll;
}

#centered-content-container {
  display: flex;
  flex-direction: column;
  width: 50rem;
  max-width: 100%;
  height: max-content;
  min-height: 100%;
  padding: 2rem 3rem;
  margin-left: auto;
  margin-right: auto;
  background-color: palegoldenrod;
}

/* Card Container Styles */

#card-container {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  min-width: 100%;
  justify-content: center;
  border-top-left-radius: 2rem;
  border-top-right-radius: 2rem;
  padding: 2rem 2rem 0 2rem;
  margin: 1rem auto 0 auto;
  background-color: beige;
}

/* Button Bar Styles */

.button-bar {
  width: 100%;
  line-height: 2.5rem;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

#actions-button-bar {
  border-bottom-left-radius: 2rem;
  border-bottom-right-radius: 2rem;
  margin-bottom: 2rem;
}

#options-button-bar {
  border-top-left-radius: 2rem;
  border-top-right-radius: 2rem;
}

.button {
  flex: 1;
  text-align: center;
  background-color: burlywood;
  user-select: none;
  cursor: pointer;
  transition: background-color 0.1s;
}

.button:hover {
  background-color: rgb(190, 156, 111);
}

.button:active {
  background-color: burlywood;
}

/* Info Box Styles */

.option.current {
  text-decoration: underline 2px;
  font-weight: bold;
}

#info-box {
  background-color: beige;
  border-bottom-left-radius: 2rem;
  border-bottom-right-radius: 2rem;
  padding: 1rem 2rem;
  font-size: 1.2rem;
}

#info-text {
  margin-bottom: 1rem;
}

#sources-container {
  background-color: white;
  font-size: 0.9rem;
  padding: 0.5rem;
  margin-top: 1rem;
  overflow-wrap: break-word;
  line-height: 2;
}

/* Hanging Indent Effect */
/* https://developer.mozilla.org/en-US/docs/Web/CSS/text-indent */

#sources-container .source {
  text-indent: -2em;
  margin-left: 2em;
}

#sources-container.hidden {
  display: none;
}

/* Card Styles */
/* https://www.w3schools.com/howto/howto_css_flip_card.asp */

.card {
  width: 6rem;
  height: 8rem;
  margin: 0 0.5rem 1rem 0.5rem;
  border-radius: 1rem;
  perspective: 1000px;
  user-select: none;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  border: 1px solid black;
  border-radius: 1rem;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.card-front {
  background-color: #bbb;
  color: black;
}

.card-back {
  background-color: lightcoral;
  color: white;
  transform: rotateY(180deg);
}

.card-inner.relevant .card-back {
  background-color: lightgreen;
  color: white;
}

.card-front, 
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari */
  backface-visibility: hidden;
  border-radius: inherit;
  font-weight: bold;
  line-height: 8rem;
}

.card-inner.clicked {
  outline: 5px solid dodgerblue;
}

.card-inner.flipped {
  transform: rotateY(180deg);
}
