:root {
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

body {
  background-color: light-dark(#fafafa, #18181b);
  font-family: monospace;
  padding: .5em;
  margin: 0;
  position: relative;
}

#changeIpBtn {
  position: absolute;
  left: .5em;
  top: .5em;
  width: 1em;
  height: 1em;
  opacity: .3;
}

#mainCont {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
  padding: 1em;
}

section {
  width: 30em;
  max-width: 100%;
  padding: 1em;
  border: .08em solid light-dark(#ABABAB, #646464);
  border-radius: 1em;
  background-color: light-dark(#ffffff, #222225);
  box-shadow: .2em .2em .5em light-dark(rgba(0, 0, 0, .3), rgba(255, 255, 255, .05));
}

section h2 {
  display: flex;
  gap: .5em;
  margin: 0 0 1em 0;
  font-size: 1.1em;
}

section p:last-of-type {
  margin-bottom: 0;
}

section.ipPicker .inputWrap {
  display: flex;
  gap: .5em;
  width: 100%;
  margin-top: 1.5em;
}

section.ipPicker .inputWrap .ipInput {
  flex-grow: 1;
  padding: .25em .5em;
  background-color: light-dark(#f7f7f7, #3B3B3B);
  border: 1px solid light-dark(#ABABAB, #646464);
  border-radius: .25em;
  transition: 250ms ease-out;
  outline: none;
}

section.ipPicker .inputWrap .ipInputOk {
  background-color: light-dark(#f7f7f7, #3B3B3B);
  border: 1px solid light-dark(#ABABAB, #646464);
  border-radius: .25em;
  transition: 250ms ease-out;
}

section.ipPicker .inputWrap .ipInputOk:hover,
section.ipPicker .inputWrap .ipInput:focus,
section.ipPicker .inputWrap .ipInput:hover {
  filter: brightness(1.1);
}

section.ipPicker hr {
  margin: 1.5em 0;
}

section.ipPicker .ip {
  display: flex;
  align-items: center;
  gap: .5em;
  margin-bottom: .5em;
}

section.ipPicker .ip .icon {
  opacity: .5;
  font-size: .8em;
}

section.ipPicker .ip span {
  cursor: pointer;
}

section.live {
  display: flex;
  flex-direction: column;
}

section.live .innerWrap {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  flex-grow: 1;
  gap: 1em;
}

section.live .powerCont .inner {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: .25em;
  
  font-size: 3em;
  padding: 0 0 .5em 0;
}

section.live .powerCont .unit {
  opacity: .7;
  font-size: .8em;
}

section.live table {
  width: 100%;
  font-size: 1.2em;
}

section.live table td .inner {
  text-align: right;
  display: flex;
  justify-content: right;
  align-items: baseline;
  gap: .25em;
}

section.live table td .inner .unit {
  opacity: .7;
  font-size: .8em;
}

section.history .chart {
  height: 17em;
}
