@media (prefers-color-scheme: light) {
    :root {
        --foreground: black;
        --background: white;
        --accent1: #007f7f;
        --accent2: #7f7fff;
        --accent3: #c0c0c0;
        --confirm: #adebb3;
        --lift: yellow;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --foreground: white;
        --background: black;
        --accent1: #7f7fff;
        --accent2: #007f7f;
        --accent3: #404040;
        --confirm: #007f00;
        --lift: #7f7f00;
    }
}

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

body {
    min-height: 100vh;      /* Ensures body takes full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--foreground);
    background-color: var(--background);
    padding: 0 3rem;
}

body.card {
    align-items: inherit;
}

button {
    display: flex;
    color: var(--foreground);;
    background-color: var(--background);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    align-items: center;
    gap: 10px;
}

figure h1 {
    margin: 0;
}

button.start {
    border: 1px solid var(--foreground);
    background-color: var(--confirm);
}

button.rest {
    border: 1px solid var(--foreground);
    background-color: var(--confirm);
}

button.lift {
    border: 1px solid var(--foreground);
    background-color: var(--lift);
}

button.done {
    border: 1px solid var(--foreground);
    background-color: var(--accent1);
}

main.card input {
    margin-bottom: 1rem;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

header img {
    border-radius: 100%;
    margin-bottom: 1rem;
}

header h1 {
    display: flex;
    align-items: center;
}

header h1 span.display_name {
    color: var(--accent1);
    text-decoration: underline dashed;
}

header h1 form {
    display: inline;
}

header h1 input#display_name_patch {
    font-size: 2rem;
    width: 20rem;
    padding: 0px 4px;
    display: inline;
    border: 4px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

header h1 input#display_name_patch:focus {
    border: 4px solid var(--accent2);
}

header.insights{
    margin-top: 1rem;
}


nav { 
    margin-bottom: 1.5rem;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-items: center;
}

main > h1 {
    margin-bottom: 1rem;
}

main.user {
    align-items: normal;
}

main.card {
    border: 1px solid var(--foreground);
    border-radius: 1rem;
    padding: 3rem 2rem;
}

main.card span.field {
    display: flex;
    align-items: center;
}

main.card h2 {
    padding: 0 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

main section.history {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

main section.history a {
    font-size: larger;
    color: blue;
    text-decoration: none;
}

article.history {
    display: flex;
    flex-direction: column;
}

main figure {
    display: flex;
    padding: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    justify-content: center;
    border: 0.20rem solid var(--foreground);
    border-radius: 1rem;
    transition: box-shadow 0.25s;
}

main figure:hover {
    box-shadow: 0.5rem 0.5rem 0 0 var(--accent2);
}

a { 
    color:blue;
    text-decoration: none;
}

table {
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--foreground);
    box-shadow: 0.5rem 0.5rem 0 0 var(--accent3);
}

header.history {
    margin: 2rem 0;
}

table thead th {
    border: 0.5px solid var(--foreground);
    border-top: 0px;
}

table thead th:first-child {
    border-top: 0px;
    border-left: 0px;
}

table thead th:last-child {
    border-top: 0px;
    border-right: 0px;
}

table tbody > tr > td{
    border: 0.5px solid var(--foreground);
}

table th {
    padding: 0.25rem 1rem;
    background-color: var(--accent2);
}

table td {
    border: 0.0px solid var(--foreground);
    padding: 0.25rem 1rem;
}

h3.end {
    text-align: center;
    color: red;
    margin-bottom: 2rem;
}

dl.record {
  margin-bottom: 20px; /* Add space below the entire list */
}

dl.record dt {
  font-weight: bold; /* Make the term stand out */
  color: var(--foreground); /* Set a specific color for the term */
  margin-top: 10px; /* Add space above each term */
}

dl.record dd {
  margin-left: 20px; /* Indent the definition */
  color: var(--foreground); /* Set a specific color for the definition */
  line-height: 1.5; /* Improve readability of the definition */
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--accent3);
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: var(--background);
  -webkit-transition: .4s;
  transition: .4s;
}

span.setting {
    display: flex;
    flex-direction: row;
    align-items: center;
}

input:checked + .slider {
  background-color: var(--accent2);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--accent2);
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

span.selected {
    color: var(--accent1);
    font-weight: bold;
}

article.graph {
    border: 1px solid var(--foreground);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 1rem;
}

article.graph svg {
    border: 1px solid var(--foreground);
    padding-bottom: 1rem;
    box-shadow: 0.25rem 0.25rem 0 0 var(--foreground);
}

article.body {
    display: flex;
    flex-direction: row;
    border: 2px solid var(--foreground);
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

article.body {
    section.front, section.back {
        display: flex;
        flex-direction: column;
        align-items: center;
        svg {
            margin-bottom: 1rem;
        }
    }
}