:root {
  --theme-color: rgb(195, 253, 34);
  --theme-color-2: rgb(255, 141, 80);
  --tap-bar-width: calc(100% - 240px - 1px);
  /* --theme-color: rgb(173, 255, 47); */
}

* {
  -webkit-font-smoothing: antialiased;
}

@font-face {
  font-family: "Rubik";
  src: url("Rubik.ttf") format("truetype");
}

@font-face {
  font-family: "FiraCode";
  src: url("FiraCode-Regular.ttf") format("truetype");
  font-weight: normal;
}

@font-face {
  font-family: "FiraCode";
  src: url("FiraCode-Bold.ttf") format("truetype");
  font-weight: bold;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Rubik";
  background-image: url("bg.png");
  background-size: 15px;
  background-color: black;
  overscroll-behavior: none;
}

.top-bar {
  display: flex;
  position: fixed;
  width: var(--top-bar-width);
  background: #000;
  align-items: center;
  border-bottom: 1px solid rgb(50, 50, 50);
  height: 50px;
  box-sizing: border-box;
  z-index: 100;
}

.logo {
  color: rgb(170, 170, 170);
  font-size: 30px;
  padding: 0px 20px;
  letter-spacing: 5px;
  font-variation-settings: "wght" 500;
  font-style: italic;
  transition: all 500ms;
  box-sizing: border-box;
  text-align: center;
  text-shadow: 0px 0px 0px rgba(0, 0, 0, 0.5), 0px 0px 0px var(--theme-color);
}

.logo.on {
  color: var(--theme-color);
  text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5), 0px 0px 10px var(--theme-color);
  letter-spacing: 4.4px;
  font-variation-settings: "wght" 700;
}

.top-bar .menu-button {
  padding: 5px 10px;
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.8);
  background: rgb(20, 20, 20);
  border: 1px solid rgb(50, 50, 50);
  border-radius: 5px;
  font-size: 14px;
  position: relative;
  box-sizing: border-box;
}

.top-bar .disabled.menu-button {
  opacity: 0.5;
}

.top-bar .menu-button.active {
  /* background: rgb(50, 50, 50); */
  border: 1px solid rgb(90, 90, 90);
  color: rgba(255, 255, 255, 1);
  height: 38px;
  transform: translateY(5px);
  box-sizing: border-box;
  /* font-variation-settings: "wght" 800; */
  /* color: var(--theme-color); */
}

.top-bar .menu-button:not(.active) .menu {
  display: none;
}

.top-bar .menu {
  position: absolute;
  top: 33px;
  left: -1px;
  color: white;
  /* background: rgb(50, 50, 50); */
  /* border: 1px solid rgb(90, 90, 90); */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(40, 40, 40, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);

  border-radius: 0 5px 5px 5px;
  font-size: 16px;
  box-sizing: border-box;
  box-shadow: 0px 10px 30px -10px rgba(0, 0, 0, 1);
  /* overflow: hidden; */
  padding-top: 4px;
  padding-bottom: 4px;
}

.top-bar #file.menu {
  min-width: 210px;
}

.top-bar #edit.menu {
  min-width: 160px;
}

.top-bar #selection.menu {
  min-width: 240px;
}

.top-bar #view.menu {
  min-width: 220px;
}

.top-bar #simulation.menu {
  min-width: 240px;
}

.top-bar #help.menu {
  min-width: 190px;
}

.menu .menu-item {
  font-size: 14px;
  padding: 6px 10px;
  transition: all 200ms;
  font-variation-settings: "wght"400;
  position: relative;
}

.menu .menu-item:last-child {
  border: none;
}

.menu :not(.disabled).menu-item:hover {
  font-variation-settings: "wght"800;
  color: var(--theme-color);
  background: rgba(255, 255, 255, 0.1);
}

.menu .disabled.menu-item {
  opacity: 0.3;
}

.menu .menu-item .command {
  float: right;
  font-variation-settings: "wght"400;
  margin-left: 10px;
  min-width: 12px;
}

.menu .separator {
  height: 1px;
  width: calc(100% - 12px);
  background-color: rgb(90, 90, 90);
  margin: 4px 6px;
}

.menu .menu-label {
  font-size: 12px;
  padding: 3px 10px 2px 10px;
  transition: all 200ms;
  font-variation-settings: "wght" 600;
  position: relative;
  /* text-align: center; */
  opacity: 0.6;
}

.menu .radio.menu-item {
  padding-left: 25px;
  position: relative;
}

.menu .checked.radio.menu-item::before {
  content: "✓";
  display: inline-block;
  position: absolute;
  font-variation-settings: initial !important;
  left: 10px;
}

.breadboard-context-menu.menu {
  position: absolute;
  color: white;
  width: 200px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(40, 40, 40, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);

  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
  box-shadow: 0px 10px 30px -10px rgba(0, 0, 0, 1);
  /* overflow: hidden; */
  padding-top: 4px;
  padding-bottom: 4px;
  z-index: 11;
}



.breadboard-navigation {
  position: fixed;
  left: 0px;
  top: 50px;
  user-select: none;
  padding: 5px 10px 7px 10px;
  margin: 10px;
  border-radius: 5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.breadboard-navigation .breadboard-name {
  font-family: "Rubik";
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  display: inline-block;
  font-variation-settings: "wght"400;
  transition: all 200ms;
}

.breadboard-navigation .breadboard-name:not(:first-child) {
  padding-left: 21px;
  background-image: url("navigation-arrow.svg");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: 5px center;
}

.breadboard-navigation .breadboard-name:not(:last-child):hover {
  color: var(--theme-color);
  font-variation-settings: "wght"800;
}

canvas {
  display: block;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}

.panel-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 200ms;
}

.panel-container.closed {
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 200ms 200ms;
}

.panel-container .panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 400px;
  /* min-height: 300px; */
  background-color: rgb(50, 50, 50);
  color: white;
  border-radius: 10px;
  border: 1px solid rgb(80, 80, 80);
  padding: 20px;
}

.panel-container.closed .panel {
  animation: shutdown 400ms;
  transition: opacity 0ms;
  transition-delay: 400ms;
  opacity: 0;
}


@keyframes shutdown {
  0% {
    transform: scale(1, 1);
    filter: contrast(1) brightness(1);
  }

  50% {
    transform: scale(0.8, 0.01);
    filter: contrast(0.3) brightness(3);
  }

  90% {
    transform: scale(0.02, 0.01);
    filter: contrast(0.1) brightness(3);
  }

  100% {
    transform: scale(0, 0);
    filter: contrast(0) brightness(0);
  }
}

.panel-container .panel .title {
  font-family: Rubik;
  font-variation-settings: "wght" 700;
  letter-spacing: 2px;
  text-align: center;
  margin-top: 5px;
  margin-bottom: 20px;
  font-size: 20px;
  text-transform: uppercase;
  font-style: italic;
  color: var(--theme-color);
}

.panel-container .panel .footer {
  margin-top: 20px;
  text-align: right;
}

.panel-container .panel .button {
  display: inline-block;
  padding: 5px 10px;
  margin-left: 5px;
  color: white;
  background: rgb(50, 50, 50);
  border: 1px solid rgb(80, 80, 80);
  border-radius: 5px;
  font-size: 16px;
  position: relative;
  box-sizing: border-box;
  min-width: 80px;
  text-align: center;
}

.panel-container .panel .button:hover {
  background: rgb(80, 80, 80);
  border: 1px solid rgb(90, 90, 90);
}

.not-compatible-container {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.not-compatible-container .panel {
  width: 400px;
  color: white;
  background-color: rgb(30, 30, 30);
  padding: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 50px;
  margin-bottom: 50px;
  cursor: default;
}

.not-compatible-container .panel .title {
  color: var(--theme-color);
  font-weight: 600;
  /* text-align: center; */
  margin-bottom: 20px;
  font-size: 20px;
}

.not-compatible-container .pj-logo {
  width: 50px;
  height: 50px;
  background-image: url("built-in-images/pj-logo-green.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 0 5px var(--theme-color));
}

.splash-screen {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.animated-logo span {
  font-style: italic;
  transition: all 500ms;
  box-sizing: border-box;
  text-align: center;

  text-shadow: 0px 0px 0px rgba(0, 0, 0, 0.5), 0px 0px 0px rgba(0, 0, 0, 0);
  color: rgb(0, 0, 0);
  letter-spacing: 15px;
  font-variation-settings: "wght" 400;
  font-size: 25px;
}

.animated-logo span:nth-child(1) {
  animation: logo-letter-blink 1s linear 250ms infinite;
}

.animated-logo span:nth-child(2) {
  animation: logo-letter-blink 1s linear 500ms infinite;
}

.animated-logo span:nth-child(3) {
  animation: logo-letter-blink 1s linear 750ms infinite;
}

.animated-logo span:nth-child(4) {
  animation: logo-letter-blink 1s linear 1000ms infinite;
}

@keyframes logo-letter-blink {
  0% {
    color: rgb(50, 50, 50);
  }
  
  20% {
    color: rgb(170, 170, 170);
  }

  40%, 100% {
    color: rgb(50, 50, 50);
  }
}

@keyframes logo-appear {
  0% {
    text-shadow: 0px 0px 0px rgba(0, 0, 0, 0.5), 0px 0px 0px rgba(0, 0, 0, 0);
    color: rgb(50, 50, 50);
    letter-spacing: 15px;
    font-variation-settings: "wght" 400;
    font-size: 25px;
    opacity: 1;
  }

  40% {
    text-shadow: 0px 0px 0px rgba(0, 0, 0, 0.5), 0px 0px 0px rgba(0, 0, 0, 0);
    color: rgb(170, 170, 170);
    letter-spacing: 15px;
    font-variation-settings: "wght" 300;
    font-size: 70px;
  }

  50%, 80% {
    color: var(--theme-color);
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.4), 0px 0px 25px var(--theme-color);
    letter-spacing: 10px;
    font-variation-settings: "wght" 700;
    font-size: 70px;
    opacity: 1;
  }

  100% {
    color: var(--theme-color);
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.4), 0px 0px 25px var(--theme-color);
    letter-spacing: 10px;
    font-variation-settings: "wght" 700;
    font-size: 70px;
    opacity: 0;
  }
}

.version-number {
  font-size: 14px;
  color: rgb(0, 0, 0);
  font: Rubik;

}

@keyframes version-appear {
  from {
    color:rgb(0, 0, 0)
  }

  20%, 80% {
    color: rgb(80, 80, 80);
  }

  to {
    color:rgb(0, 0, 0)
  }
}

.splash-screen.loading-done {
  animation: dissolve 500ms ease-in-out 2s;
  animation-fill-mode: forwards;
}

.splash-screen.loading-done .animated-logo span {
  animation: logo-appear 2s ease-in-out;
  animation-fill-mode: forwards;
}

.splash-screen.loading-done .version-number {
  animation: version-appear 1.5s ease-in-out 0.5s;
  animation-fill-mode: forwards;
}

@keyframes dissolve {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.hidden {
  display: none !important;
}

.no-select {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}