:root {
  --white: #AEB2B2;
  --black: #1C1C1C;
  --red: #FE5658;
  --blue: #6F8FF0;
  --green: #1E5128;
  --orange: #413C26;
  --yellow: #FDE87B;
}

body {
  background-color: var(--black);
  color: var(--white);
  font-family: 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#infos {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 0 0 25% 0;
  color: var(--black);
  font-size: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.3s ease;
}

#infos:hover {
  color: var(--black);
  transform: scale(1.2);
  cursor: pointer;
}

#infos:hover ~ #main {
  visibility: visible;
  opacity: 1;
}

#main:hover {
  visibility: visible;
  opacity: 1;
}

#main {
  position: absolute;
  top: 40px;
  left: 40px;
  border-radius: 20px;
  visibility: hidden;
  opacity: 0;
  background-color: var(--white);
  color: var(--black);
  width: 90%;
  transition: all 0.3s ease;
  z-index: 10;
  text-align: justify;
}

#main *:not(a) {
  margin: 0;
  padding: 20px;
  font-size: 1.2em;
}

a {
  text-decoration: none;
  color: var(--black);
  font-weight: bold;
  transition: all 0.3s ease;
}

#midiConnection {
  position: absolute;
  top: -100px;
  width: fit-content;
  height: 50px;
  right: auto;
  border-radius: 0 0 25px 25px;
  font-size: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  padding: 20px;
}

.connected {
  background: var(--green);
  color: var(--white);
}

.disconnected {
  background: var(--red);
  color: var(--black);
}

.pending {
  background: var(--orange);
  color: var(--white);
}

#container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 20px;
  height: calc(100vh - 40px);
  max-width: 100vw;
  box-sizing: border-box;
}

#circle {
  aspect-ratio: 1/1;
  width: 100%;
  height: auto;
  margin: auto;
}

#table-container {
  display: flex;
  aspect-ratio: 1 / 1;
  width: 500px;
  height: 500px;
  max-width: 500px;
  max-height: 500px;
  margin: auto;
  align-items: center;
  justify-content: center;
}

table {
  width: 500px;
  height: 500px;
  border-collapse: collapse;
  table-layout: fixed;
}

td {
  border: 1px solid var(--white);
  padding: 0px;
  text-align: center;
  color: var(--white);
  font-size: 3em;
  position: relative;
  overflow: hidden;
}

td > p {
  text-align: center;
  color: var(--white);
  font-size: 1em;
  margin: auto;
  padding: 0;
  overflow: hidden;
  width: fit-content;
}

#waveform {
  position: absolute;
  /* background: var(--black); */
  aspect-ratio: 1/1;
  width: 100%;
  height: 90px;
  bottom: 0;
  right: 0;
  z-index: 0;
}

.freq {
  color: var(--white);
  margin: auto;
  font-weight: bold;
  border-radius: 5px;
  width: fit-content;
}

.freq:hover {
  background-color: var(--blue);
  color: var(--black);
  cursor: pointer;
}

.key {
  position: absolute;
  color: var(--white);
  font-weight: bold;
  top:0;
  right:0;
  padding: 3px;
  border-left: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}

.freq, .key {
  font-size: inherit;
}

footer {
  display: flex;
}

#form {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  background-color: var(--black);
  align-items: center;
  margin-top: -10px;
  border: 1px solid var(--white);
  padding: 5px;
  gap: 10px;
  border-radius: 5px;
  width: 100%;
  z-index: 10;
  transition: width 0.3s ease;
}

#form > * {
  transition: width 0.3s ease;
}

input[type="number"] {
  background-color: var(--black);
  color: var(--white);
  border: 1px solid var(--white);
  border-radius: 5px;
  padding: 5px;
  width: 50px;
  text-align: center;
  font-size: 1.2em;
}

input[type="number"]:focus {
  outline: none;
  border-color: var(--blue);
}

select {
  background-color: var(--black);
  color: var(--white);
  border: 1px solid var(--white);
  border-radius: 5px;
  padding: 5px;
  font-size: 1.2em;
}

