@keyframes fadeinelement {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@-webkit-keyframes fadeinelement {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@-moz-keyframes fadeinelement {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeoutelement {
  0% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@-webkit-keyframes fadeoutelement {
  0% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@-moz-keyframes fadeoutelement {
  0% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes fadeinbottompane {
  0% {
    opacity: 0;
    height: 0;
  }
  to {
    opacity: 1;
    height: 25vh;
  }
}
@-webkit-keyframes fadeinbottompane {
  0% {
    opacity: 0;
    height: 0;
  }
  to {
    opacity: 1;
    height: 25vh;
  }
}
@-moz-keyframes fadeinbottompane {
  0% {
    opacity: 0;
    height: 0;
  }
  to {
    opacity: 1;
    height: 25vh;
  }
}
@keyframes fadeoutbottompane {
  0% {
    opacity: 1;
    height: 25vh;
  }
  to {
    opacity: 0;
    height: 0;
  }
}
@-webkit-keyframes fadeoutbottompane {
  0% {
    opacity: 1;
    height: 25vh;
  }
  to {
    opacity: 0;
    height: 0;
  }
}
@-moz-keyframes fadeoutbottompane {
  0% {
    opacity: 1;
    height: 25vh;
  }
  to {
    opacity: 0;
    height: 0;
  }
}
a,
body,
div,
footer,
h1,
h2,
h3,
h4,
h5,
h6,
img,
p,
table,
td,
tr {
  margin: 0 auto;
  padding: 0;
}
p {
  cursor: default;
}
body {
  font-family: "Hero Light", Arial, sans-serif;
  background-color: #000;
  color: #fff;
  text-align: center;
  position: relative;
}
a,
a:hover,
a:visited {
  text-decoration: none;
  color: inherit;
}
#ptablecontainer {
  -webkit-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
  height: 100vh;
  position: relative;
  opacity: 0;
  transition-duration: 0.5s;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode: forwards;
  -o-animation-fill-mode: forwards;
  -ms-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}
.perspective {
  -webkit-perspective: 500px;
  -moz-perspective: 500px;
  perspective: 500px;
}
#elecontainer {
  overflow: hidden;
}
#closewindow {
  padding: 1%;
  width: 20px;
  color: #e0e0e0;
  height: 4vh;
  float: right;
  cursor: pointer;
  font-size: 1.6em;
  text-align: center;
  -moz-transition-duration: 0.2s;
  -ms-transition-duration: 0.2s;
  -o-transition-duration: 0.2s;
  -webkit-transition-duration: 0.2s;
  transition-duration: 0.2s;
}
#closewindow:hover {
  color: #b1b1b1;
}
#infocontainer {
  height: 100vh;
  overflow: auto;
  width: 100%;
  left: 0;
  top: 0;
  z-index: 2;
  position: absolute;
  background-color: #1a1a1a;
  min-height: 100%;
  font-size: 16px;
  margin-left: -9999px;
  -moz-transition-duration: 0.5s;
  -ms-transition-duration: 0.5s;
  -o-transition-duration: 0.5s;
  -webkit-transition-duration: 0.5s;
  transition-duration: 0.5s;
}
#elementcontent {
  padding-top: 5vh;
  padding-bottom: 2vh;
}
#symbol-large {
  font-size: 25vmin;
  cursor: default;
  text-shadow: 3px 3px 20px #1e90ff;
  margin: 0 auto;
  padding: 10vmin;
  text-align: center;
}
#infocontainer p {
  padding: 0 5vw;
  text-align: left;
}
#infocontainer #references {
  margin: 2vh 0;
}
#infocontainer #elementcontent td {
  text-align: left;
  padding: 2px;
  cursor: default;
  word-wrap: break-word;
}
#info-table {
  padding-bottom: 2vh;
  word-wrap: break-word;
}
#description {
  margin-top: 3vh;
}
#references {
  word-wrap: break-word;
}
#weblinks {
  padding: 2vh 0;
}
#weblinks a {
  padding: 1vh 2vw;
  cursor: pointer;
  display: inline-block;
  color: #1e90ff;
}
#pageturn a,
#weblinks p {
  display: inline;
}
#pageturn {
  width: 100%;
  padding: 0 5vw;
  -webkit-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
#pageturn a {
  cursor: pointer;
  color: #1e90ff;
}
#pageturn #next {
  text-align: right;
  float: right;
}
#eledes,
.element {
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  bottom: 0;
}
.element {
  position: absolute;
  display: block;
  padding: 10px 3.5px;
  cursor: pointer;
  background-color: rgba(30, 144, 255, 0.25);
  width: 51px;
  height: 48px;
  margin: auto;
  left: 0;
  right: 0;
  top: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -ms-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
}
.elementname {
  font-size: 7px;
  font-family: "Poppins", sans-serif;
}
.elementmass,
.elementnumber,
.elementsymbol {
  font-size: 9px;
  font-family: "Poppins", sans-serif;
}
.elementnumber,
.elementsymbol {
  font-size: 22px;
}
.elementnumber {
  font-size: 7px;
}
#eledes {
  -o-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  width: 100%;
  z-index: 1;
  background-color: #1a1a1a;
  font-size: 16px;
  height: 0;
  overflow: hidden;
}
#eledes > #elementturn {
  color: #1e90ff;
  width: 100%;
  margin: 0;
  padding: 2vh;
}
#eledes #eledesinfo,
footer a,
footer p {
  font-size: 2vmin;
  font-family: "Roboto", sans-serif;
}
#eledes #eledesinfo {
  padding: 2vh 4vw;
}
#eledes a {
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
#eledes,
#key,
footer {
  position: absolute;
}
footer {
  top: 3vh;
  width: 100%;
  text-align: center;
  pointer-events: all;
  z-index: 1;
}
footer > #formcontainer > div,
footer > #github,
footer > #info {
  cursor: pointer;
  pointer-events: all;
}
footer a,
footer p {
  display: inline-block;
  margin: 0 2vw;
}
footer > #formcontainer {
  display: block;
  height: 0;
  margin-top: 1.2vh;
}
footer > #formcontainer > div {
  display: inline-block;
  font-size: 1.6vmin;
  height: 5vh;
  width: 15%;
  background-repeat: no-repeat;
  background-position: 1vmin center;
  background-size: 3vmin;
  line-height: 5vh;
  margin: 0 0.5vw;
  transition-duration: 0.1s;
  -moz-transition-duration: 0.1s;
  -webkit-transition-duration: 0.1s;
  -ms-transition-duration: 0.1s;
  -o-transition-duration: 0.1s;
}
footer > #formcontainer > div:hover {
  color: #1e90ff;
  background-color: #121212;
}
footer > #formcontainer > div:active {
  background-color: #1a1a1a;
}
footer #text {
  font-size: 2vmin;
  margin-top: 1vh;
}
.alkali {
  background-color: #ff6f00;
}
.alkaliearth {
  background-color: #388e3c;
}
.transitionmetal {
  background-color: #928828;
}
.metalloids {
  background-color: #d32f2f;
}
.noblegas {
  background-color: #9c27b0;
}
.actinides {
  background-color: #42a5f5;
}
.lanthanides {
  background-color: #d31a76;
}
.halogens {
  background-color: #5a4de4;
}
.hide {
  -webkit-animation: ease fadeoutelement 1.2s;
  -moz-animation: ease fadeoutelement 1.2s;
  animation: ease fadeoutelement 1.2s;
}
.show {
  -webkit-animation: ease fadeinelement 1.2s;
  -moz-animation: ease fadeinelement 1.2s;
  animation: ease fadeinelement 1.2s;
}
.hidebottompane {
  -webkit-animation: ease fadeoutbottompane 2s;
  -moz-animation: ease fadeoutbottompane 2s;
  animation: ease fadeoutbottompane 2s;
}
.showbottompane {
  -webkit-animation: ease fadeinbottompane 2s;
  -moz-animation: ease fadeinbottompane 2s;
  animation: ease fadeinbottompane 2s;
  -webkit-animation-fill-mode: forwards;
  -moz-animation-fill-mode: forwards;
  -o-animation-fill-mode: forwards;
  -ms-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}
#key {
  left: 400px;
  z-index: -1;
  margin-top: 100px;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
}
#key ul {
  list-style: none;
  margin-right: 40px;
  padding: 0;
  display: flex;
  flex-direction: column;
}
#key ul li {
  line-height: 1.5em;
  font-size: 0.8em;
  color: #b6b6b6;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.swatch {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border-radius: 50%;
}
.element-metal { background-color: #ff6f00; }
.element-non-metal { background-color: rgba(30, 144, 255, 0.25); }
.element-alkali-metal { background-color: #ff6f00; }
.element-alkali-earth-metal { background-color: #388e3c; }
.element-transition-metal { background-color: #928828; }
.element-lanthoid { background-color: #d31a76; }
.element-actinoid { background-color: #42a5f5; }
.element-metalloid { background-color: #d32f2f; }
.element-halogen { background-color: #5a4de4; }
.element-noble-gas { background-color: #9c27b0; }
/* Large screens (1440px and above) */
@media screen and (min-width: 1440px) {
  #key {
    grid-template-columns: repeat(4, 1fr); /* 4 columns for large screens */
  }
}

/* Medium to large screens (1200px and below) */
@media screen and (max-width: 1200px) {
  #key {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* Tablet and smaller screens (992px and below) */
@media screen and (max-width: 992px) {
  #key {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* Small tablets (768px and below) */
@media screen and (max-width: 768px) {
  #key {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* Small mobile screens (576px and below) */
@media screen and (max-width: 576px) {
  #key {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Very small screens (400px and below) */
@media screen and (max-width: 400px) {
  #key {
    grid-template-columns: 1fr;
  }
}
