* {
    --black: #0F172A;
    --gray: #E4E4E7;
    --light-gray: #E2E8F0;
    --loader: #8A8A8E;
    --white: #FFFFFF;
    --border-radius: 6px;

    color: var(--black);
    font-family: "Fira Sans", Inter, sans-serif;
    font-size: 14px;
}

/* DEFAULT */

body {
    padding: 10px 50px 10px 50px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav > a {
    padding: 5px;
}

canvas {
    width: 100%;
    height: 100%;
}

select {
    border: 1px solid var(--gray);
    background-color: var(--white);
    padding: 11px 12px;
    border-radius: var(--border-radius);
}

button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--gray);
    background-color: var(--white);
    padding: 8px 16px;
    height: 38px;
    border-radius: var(--border-radius);
    cursor: pointer;
}

button > label {
    cursor: pointer;
    margin-top: 3px;
}

input[type='radio'] {
    accent-color: var(--black);
}

input[type='range'] {
    accent-color: var(--black);
}

h1 {
    font-weight: bolder;
    font-size: 48px;
}

h2 {
    font-weight: bold;
    font-size: 24px;
}

h3 {
    font-weight: bold;
    font-size: 20px;
}

p {
    /* font-weight: lighter; */
    font-size: 16px;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

hr {
    border: none;
    background-color: var(--light-gray);
    height: 1px;
}


/* CUSTOM */

#title {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
}

#colors {
    display: flex;
    flex-direction: column;
    padding: 30px 0;
}

#colors > div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#metrics-wrapper {
    display: flex;
    flex-direction: row;
    gap: 40px;
}

#metrics {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    flex-grow: 1;
    margin-top: 10px;
}

#stats {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 24px;
    border: 1px solid var(--gray);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* width: max-content;
    height: max-content; */
}


#stats-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 5px;
    margin-bottom: 18px;
    gap: 20px;
}

#stats-content > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

#plot {
    margin-top: 50px;
    /* margin-top: var(--space-2xl); */
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* gap: var(--space-lg); */
}

#toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

#axes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

#right {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

#loading {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}


#loading > p {
    color: var(--loader);
}

#footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px 40px;
}

.color-picker {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    /* font-weight: bold; */
    gap: 10px;
}


.echart {
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
  /* position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0; */
}


.stats-title {
    margin-top: -1px;
    font-size: 16px;
    font-weight: bold;
}

.stats-description {
    font-size: 20px;
    margin-top: -5px;
    /*margin-left: 10px;*/
    font-family: 'Fira Mono', 'Courier New', Courier, monospace;
}


.metric-wrapper {
    flex-grow: 1;
    padding: 7px;
    font-weight: bold;
    /* position: relative;
    overflow: hidden; */
}

.metric-wrapper:has(:checked) {
    outline: 1px solid var(--black);
    border-radius: var(--border-radius);
}

.metric-wrapper:last-child {
    flex-grow: 0.33;
}

.axis {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.loader {
    width: 28px;
    height: 28px;
    border: 4px solid var(--gray);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--gray);
    background-color: var(--white);
    padding: 8px 16px;
    height: 22px;
    width: max-content;
    border-radius: var(--border-radius);
}

.box > label {
    margin-top: 3px;
}

.box > input {
    width: 130px;
}

.footer-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.dataset-navbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding:0.75rem 1.5rem;;
  justify-content: flex-start;
}

.dataset-navbar a {
  color: #333;
  font-size: 0.95rem;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.dataset-navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background-color: #333;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.dataset-navbar a:hover,
.dataset-navbar a:focus {
  color: #000;
}

.dataset-navbar a:hover::after,
.dataset-navbar a:focus::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Gallery */

section.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.gallery img {
    width: 25em;
    margin: 1rem;
    transition: transform 0.3s ease;
}

.active {
    color: var(--white) !important;
    background-color: var(--black);
}

.gallery img:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
    outline: 1px solid white;
}