:root {
  --text-1: #000;
  --text-2: #7e7e7e;
  --text-3: #898989;

  --bg-1: #ffffff;
  --bg-2: #fafafa;
  --bg-3: #f6f5f4;
  --bg-4: #b5b5b5;

  --selected-bg: #99c1f1;
  --selected-bg-darker: #8aaed9;

  --correct-answer: #33d17a;
  --wrong-answer: #e01b24;

  --red-bg: #f5c3dc;
  --red-text: #9a0f55;

  --blue-bg: #cdcff7;
  --blue-text: #1009ba;

  --sun-bg: #fdf0b6;
  --sun-text: #624408;

  --lime-bg: #b6fdb6;
  --lime-text: #025102;

  --pink-bg: #e1bee7;
  --pink-text: #5e35b1;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--bg-1);
}

.horizontalClamp {
  margin: 0 auto;
  display: flex;
  width: 100%;
  max-width: 500px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.date {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 500px;
}

#date_title {
  font-size: 82px;
  color: var(--text-1);
}

#comment {
  color: var(--text-2);
  margin: 0;
}
#time {
  margin: 0;
}

.answerButtonsContainer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

button {
  cursor: pointer;
}

.dowButton {
  border: none;
  padding: 15px;
  border-radius: 8px;
  width: 100%;
  background-color: var(--bg-3);
  color: var(--text-1);
}
.disabledButton {
  background-color: var(--bg-2);
  color: var(--text-3);
  cursor: default;
}

@media (max-width: 600px) {
  .answerButtonsContainer {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    width: 90%;
  }
  .date {
    height: 400px;
  }
  #date_title {
    font-size: 61px;
  }
}

.giveFeedback {
  margin-top: 10px;
  padding: 0 15px;
  display: none;
}

.algorithmSolved {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px #c6c6c6;
}

.step {
  background-color: var(--bg-3);
  border-bottom: 1px var(--bg-4) solid;
  color: var(--text-1);
  padding: 14px 20px;
}

.step.selected {
  background-color: var(--selected-bg);
  border-color: var(--selected-bg-darker);
}

.nextContainer {
  padding: 20px;
  display: none;
  align-content: space-between;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
}

.nextButton {
  background-color: #1c71d8;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: bold;
}

#open_stats.nextButton,
#download_btn.nextButton {
  background-color: var(--bg-3);
  color: var(--text-1);
}

hr {
  border-color: white;
}

h2 {
  margin: 0;
}

h2,
span,
p {
  color: var(--text-1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-1: #eee;
    --text-2: #b7b7b7;
    --text-3: #bfbfbf;

    --bg-1: #121212;
    --bg-2: #1b1b1b;
    --bg-3: #1e1e1e;
    --bg-4: #383838;

    --selected-bg: #052853;
    --selected-bg-darker: #153759;
    --correct-answer: #33d17a;
    --wrong-answer: #e01b24;

    --red-bg: #402b36;
    --red-text: #e08bb6;
    --blue-bg: #38394f;
    --blue-text: #a8a5f0;
    --sun-bg: #6a6344;
    --sun-text: #d8b97c;
    --lime-bg: #3b553b;
    --lime-text: #b2e2b2;
    --pink-bg: #403043;
    --pink-text: #af8ff1;
  }
  canvas {
    filter: invert(1);
  }

  .algorithmSolved {
    border: #2f2f2f 1px solid;
    box-shadow: none;
  }
  hr {
    border-color: #2b2b2b;
  }
}

.correctAnswer {
  background-color: var(--correct-answer);
  color: white;
}

.wrongAnswer {
  background-color: var(--wrong-answer);
  color: white;
}

.statsGrid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  padding: 5px;
}

.statsSquare {
  width: 130px;
  height: 130px;
  border-radius: 8px;
  display: flex;
  float: left;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  align-content: center;
  padding: 10px;
  box-sizing: border-box;
  margin: 5px;
}

.statsTitleOne {
  color: var(--text-1);
  align-self: baseline;
}

.statsValue {
  font-size: 2em;
  font-weight: bold;
  color: var(--text-1);
}

.statsTitleTwo {
  align-self: flex-end;
  font-weight: bold;
}

/* MLKJMLKJMLKJ */

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  animation-duration: 0.3s;
  animation-fill-mode: both;
}

.modal-content {
  background-color: var(--bg-1);
  position: relative;
  top: 50%;
  left: 50%;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 8px;
  width: 80%;
  max-height: 80%;
  box-sizing: border-box;
  animation-duration: 0.3s;
  animation-fill-mode: both;
  overflow-y: hidden;
}

@media (max-width: 767px) {
  .modal-content {
    margin: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    border: none;
    border-radius: 0;
  }
}

.modal.open {
  animation-name: modalOpen;
}

.modal-content.open {
  animation-name: modalContentOpen;
  overflow-y: auto;
}

.modal.close {
  animation-name: modalClose;
}

.modal-content.close {
  animation-name: modalContentClose;
  overflow-y: hidden;
}

.chartContainer {
  overflow: scroll;
}

@keyframes modalOpen {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalContentOpen {
  from {
    transform: translateY(-100px) translateX(-50%);
    opacity: 0;
  }
  to {
    transform: translateY(-50%) translateX(-50%);
    opacity: 1;
  }
}

@keyframes modalClose {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes modalContentClose {
  from {
    transform: translateY(-50%) translateX(-50%);
    opacity: 1;
  }
  to {
    transform: translateY(-100px) translateX(-50%);
    opacity: 0;
  }
}

#update_menu {
  margin-top: 5px;
  background: var(--lime-bg);
  padding: 10px;
  border-radius: 8px;
}
#update_menu > .nextButton {
  background: var(--lime-text);
  color: var(--bg-1);
}

table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  border: 1px solid var(--bg-4);
  padding: 8px;
  text-align: left;
  color: var(--text-1);
}

.code {
  background-color: var(--bg-4);
  font-family: monospace;
  padding: 2px 4px;
  border-radius: 2px;
}

thead > tr:nth-child(odd) {
  background-color: var(--bg-3);
}

tr:nth-child(even) {
  background-color: var(--bg-2);
}
tr:nth-child(odd) {
  background-color: var(--bg-1);
}
