header {
  display: flex;
  flex-direction: row;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;

  background: #16161e;
}

.video-container {
  position: absolute;
  filter: blur(3px) grayscale(0%) brightness(0.8);
  background-color: #16161e !important;
  width: 100%;
  height: 100%;

  & video {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
  }
}

.app-menu {
  display: flex;
  align-items: center;
  height: 3rem;
  margin-left: 2rem;
}

.app-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.app-menu>ul>li {
  position: relative;
  padding: 10px 15px;
  cursor: pointer;
  color: rgb(96, 96, 109);
}

.app-menu ul li .submenu {
  display: none;
  position: absolute;
  padding: 0.5rem 0;
  left: 0;
  top: 100%;
  width: max-content;
  background: #1b1b27;
}

.app-menu ul li .submenu li {
  padding: 5px 15px;
  background: none;
  color: rgb(96, 96, 109);
}

.app-menu ul li:hover .submenu {
  display: block;
}

.app-menu>ul>li:hover,
.app-menu ul li .submenu li:hover {
  color: var(--pirate-gold);
}

#coinSymbolBox {
  text-transform: uppercase;
}

.set-coin {
  display: flex;
  flex-wrap: wrap;
  position: absolute;
  top: 0;
  right: 3rem;
  width: 18rem;
  margin-top: 0.7rem;
  border-radius: 0.3rem;
  background: rgb(22 22 30);
  z-index: 9;
}

input#coin {
  width: 100%;
  padding: 0.3rem;
  padding-left: 0.5rem;

  border: none;
  font-size: 0.9rem;
  background: #252534;
  color: var(--pirate-gold);

  &:active {
    color: var(--pirate-gold);
  }
}

input#coin:active,
input#coin:focus,
input#coin:focus-within {
  border: none;
}

button:disabled {
  background-color: #bb9645;
  color: #111;
  cursor: not-allowed !important;
  /*opacity: 0.4;*/
}

button#getStats {
  background-color: #bb9645;
  width: 45%;
  border: none;
  color: #111;
  cursor: pointer;
  border: 1px solid #16161e;
}

.coin-select-box {
  display: flex;
  width: 100%;
  border-radius: 0.2rem;
  overflow: hidden;
  background: #252533;
}

.coin-select {
  max-height: 70dvh;
  width: 100%;
  overflow-y: auto;
  background: rgb(34 34 49);
  margin-top: 0.75rem;
  padding: 0.7rem;
}

ul.suggestions {
  display: inline;
  margin: 0;
  padding: 0;
}

li.suggestion-item {
  list-style: none;
  color: var(--pirate-gold);

  &:hover {
    cursor: pointer;
    color: #fff;
  }
}

footer {
  display: flex;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #16161e;
  height: 2rem;
  z-index: 99;
}

.wrapper {
  width: 100%;
  height: 100%;
  /*backdrop-filter: blur(5px) brightness(0.7);*/
  overflow: hidden;
}

.hasStyle .wrapper {
  backdrop-filter: blur(0px);
}

.container-wrapper {
  display: flex;
  position: relative;
  margin: 0 auto;
  text-align: center;
  border: 1rem solid rgb(22 22 30);
  height: calc(100dvh + -2rem);
  z-index: 2;
}

#container {
  width: 100%;
}

canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

#piratePanelWrapper {
  position: absolute;
  will-change: transform;
  width: 18%;
  min-width: 300px;
  max-width: 400px;
  overflow: hidden;
  z-index: 9;
  top: 6rem;
  left: 4rem;
  border-radius: 0.5rem;
  transform: scale(0.85);
  transform-origin: top left;
  box-shadow: 4px 10px 20px -4px rgb(0 0 0 / 57%);
}

#piratePanel {
  width: 100%;
  height: auto;
  will-change: transform;
  cursor: grab;
}

#piratePanel:active {
  cursor: grabbing;
}

/* Add this to the JS */

.scale-active {
  outline: 2px solid var(--pirate-gold);
}

.drag-active {
  background: rgb(27 27 39 / 92%) !important;
}

.drag-inactive {
  background: rgb(27 27 39 / 100%) !important;
}

#resizer {
  width: 2rem;
  height: 4rem;
  background-color: rgba(118, 118, 138, 0.23);
  position: absolute;
  bottom: -1.3rem;
  right: -1rem;
  cursor: nwse-resize;
  z-index: 9;
  rotate: 45deg;
  transform-origin: center;
}

#resizer:active {
  background: var(--pirate-gold);
}

.scale-active {
  cursor: none !important;
  user-select: none !important;
}

.no-drag {
  cursor: default;
}

#piratePanelWrapper {
  will-change: transform, top, left, background;
}

#resizer,
#piratePanel {
  will-change: transform;
}

.ARRRcontrols {
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 1.5dvh, 1.2rem);
  padding: clamp(0.8rem, 2dvw, 1.7rem);
  font-family: arial;
  color: #fff;
  font-size: 1.5rem;
  text-align: left;
  /* height: calc(100% - 2.2rem);*/
}

.ARRRcontrols>div:last-child {
  margin-top: auto;
}

.pc-app-logo-area {
  pointer-events: none;
  margin-top: 0.3rem;
  margin-bottom: clamp(0.5rem, 1.5dvh, 2.5rem);
}

.pc-app-logo {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

.pirate-img {
  max-width: 45%;
  margin-left: 0.3rem;
}

.pc-app-logo-txt {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #ababab;
  background: #2f2f45;
  height: 2.2rem;
  padding: 0.1rem 0.8rem 0.1rem 0.6rem;
  margin-left: 0.5rem;
  top: -0.41rem;
  font-family: roboto;
  font-weight: 300;
  font-size: 1.8rem;
  letter-spacing: -2px;
  border-radius: 0.2rem;
  transform: rotate(-18deg);
}

.pc-tagline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: clamp(0.9rem, 0.9dvw, 1.2rem);
  color: #857757;
  background: rgb(37 37 51 / 73%);
  padding: 0.1rem 0.3rem;
  width: max-content;
  border-radius: 0.2rem;
}

.coin-img {
  display: flex;
  width: clamp(0.8rem, 0.9dvw, 1.2rem);
  height: 100%;
  aspect-ratio: 1 / 1;
  align-self: center;
}

#coinThumbBoxNav {
  align-self: center;
  height: auto;
  padding: 0.1rem 0.3rem;
  padding-right: 0;
  aspect-ratio: 1 / 1;
}

/* Theme-controls with transition */

.theme-controls {
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 1.5dvh, 1.2rem);
  padding: 1px;
  max-height: 0rem;
  height: auto;
  opacity: 1;
  visibility: hidden;
  transform: translatex(-24rem);
  transition: max-height 0.5s 0.4s, min-height 0.5s 0.4s ease, scale 0.5s ease, opacity 0.5s ease, visibility 0.5s ease,
    transform 0.5s ease;
}

.theme-controls.show {
  max-height: 26rem;
  height: auto;
  opacity: 1;
  visibility: visible;
  transform: translatex(0);
  overflow: hidden;
  transition: max-height 0.5s 0.1s ease, min-height 0.5s 0.4s ease, scale 0.5s ease, opacity 0.5s ease,
    visibility 0.5s ease, transform 0.5s 0.4s ease;
}

/* Theme on/off */

.theme-switcher {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-top: 0.5rem;
  margin-bottom: -0.5rem;
  color: #6e6e6e;
}

.theme-switcher label {
  margin: 0;
}

.theme-switcher-txt {
  display: flex;
  align-items: center;
  height: .9rem;
  line-height: 1;
  margin-left: .8rem;
  margin-right: 1.5rem;
}

button#togglePlayPause {
  display: flex;
}

button#toggleMusicMute {
  display: none;
}

button#togglePlayPause,
button#toggleMusicMute {

  margin-left: .5rem;
  padding-left: 0.6rem;
  width: 2.1rem;
  padding-bottom: 0.08rem;
  background: #24243a;
  border: none;
  font-weight: 900;
  line-height: 1.5rem;
  letter-spacing: 2;
  text-align: center;
  color: var(--pirate-gold);
  border-radius: 0.2rem;
  justify-content: center;

  &:hover {
    background: #31314e;
    cursor: pointer;
  }
}

.switch {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 0.7rem;
  background-color: #333;
  border-radius: 0.7rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #393a3f;
  transition: 0.4s;
  border-radius: 0.7rem;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.1rem;
  width: 1.1rem;
  left: 0rem;
  bottom: -0.2rem;
  background-color: var(--pirate-gold);
  transition: 0.4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--pirate-blue);
}

input:checked+.slider:before {
  background-color: #3c3c49;
  transform: translateX(2.3rem);
}

#themeSwitch:checked+.slider:hover:before {
  background: #474756;
}

.pirateForm {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-weight: 600;
  font-family: arial;
}

#textInput {
  min-width: 9rem;
  width: 100%;
  margin: 0;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.4rem 0.4rem 1rem;
  border: none;
  outline: 1px solid #333249;
  background: rgb(198 198 255 / 6%);
  border-radius: 0.21em;
  color: var(--pirate-txt);
  font-size: 1rem;
}

.selection-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.35rem, 1dvh, 0.7rem);
  text-align: left;
  user-select: none;
}

.view-selection {
  padding: clamp(0.5rem, 1.6dvh, 2rem) 0.2rem;
  background: #24243a;
  color: #bb9645;
  border-radius: 0.2rem;
  box-shadow: var(--pirate-bs-1);
  background-image: var(--pirate-g-1);
  font-size: 0.8rem;
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;

  &:hover {
    /*color: #24243a;
    background: #bb9645;*/
    outline: 1px solid var(--pirate-gold);
    cursor: pointer;
  }
}

.theme-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
}

.default-theme-buttons {
  flex-direction: row;
  display: flex;
  gap: 0.5rem;
  padding-right: 1rem;
  cursor: pointer;
}

#videoTheme,
#blackTheme,
#goldTheme {
  border-radius: 50%;
  width: 1rem;
  height: 1rem;
  aspect-ratio: 1/1;

  &:hover {
    transform: scale(1.1);
  }
}

#videoTheme {
  display: flex;
  color: var(--pirate-gold);
  font-size: .6rem;
  text-align: center;
  background: var(--pirate-blue);
  border: 0.1rem solid var(--pirate-gold);
  flex-direction: column;
  justify-content: center;
}

#goldTheme {
  background: var(--pirate-gold);
  border: 0.1rem solid #555;
}

#blackTheme {
  background: var(--pirate-blue);
  border: 0.1rem solid #bb9645;
}

.theme-actions {
  display: flex;
}

button#copy {
  padding: 0.2rem 0.4rem;
  background: #252533;
  color: var(--pirate-txt);
  border: none;
  border-radius: 0.1rem;
  width: 100%;
  cursor: pointer;

  &:hover {
    background: #232336;
    color: #909099;
  }

  &:active {
    background: #2c2c37;
    transition-duration: 0.05s;
    scale: 0.98;
  }
}

.all-colour-pickers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.pc-colour-picker {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.5rem;
  background: rgb(34 34 47 / 44%);
  border-radius: 0.3rem;
  width: 100%;
  box-shadow: var(--pirate-bs-1);
  overflow: hidden;
}

.pc-colour-picker input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  height: 100%;
  border: none;
  cursor: pointer;
  aspect-ratio: 1/1;
}

.pc-colour-picker input::-webkit-color-swatch {
  border-radius: 50%;
  border: 0.15rem solid var(--pirate-gold);
}

.pc-colour-picker input::-moz-color-swatch {
  border-radius: 50%;
  border: 0.15rem solid var(--pirate-gold);
}

*/ .colourInfo h3 {
  font-size: 1rem;
  font-weight: 100;
}

.colourInfo,
.colour-picker-title {
  width: 100%;
  padding: 0.4rem 0.1rem;
  text-align: center;
}

.colour-picker-title {
  color: #686877;
  background: var(--pirate-blue);
  font-size: 1rem;
}

.pc-colour-picker:hover.pc-colour-picker .colour-picker-title {
  filter: brightness(1.8);
}

.colourInfo {
  border-top: 1px solid #2b2b2b;
  padding-top: 0.6rem;
}

.selected-colour {
  font-size: 0.8rem;
  color: var(--pirate-gold);
  height: 100%;
  width: 100%;
}

.pc-sliders {
  display: flex;
  gap: .7rem;
  flex-direction: row;
  margin-top: 1rem;
}

.size-slider,
.opacity-slider {
  width: 100%;
}

.pc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin: 0;
  margin-top: 0.2rem;
  margin-bottom: 0.5rem;
  background: transparent;
}

.pc-sliders label {
  padding-bottom: 0.4rem;
}

/* WebKit (Chrome, Safari) */

.pc-slider::-webkit-slider-runnable-track {
  height: 0.7rem;
  background: #252534;
  border-radius: 4px;
}

.pc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 1.25rem;
  width: 1.25rem;
  margin-top: -0.3rem;
  background: #3c3c49;
  cursor: pointer;
  border-radius: 50%;
}

.pc-slider::-webkit-slider-thumb:hover {
  background: #474756;
}

.pc-slider::-webkit-slider-thumb:active {
  background: var(--pirate-gold);
}

.pc-slider:focus::-webkit-slider-runnable-track,
.pc-slider:active::-webkit-slider-runnable-track,
.pc-slider:focus-within::-webkit-slider-runnable-track {
  background: #252534;
}

/* Mozilla (Firefox) */

.pc-slider::-moz-range-track {
  height: 0.7rem;
  background: #252534;
  border-radius: 4px;
}

.pc-slider::-moz-range-thumb {
  height: 1.25rem;
  width: 1.25rem;
  margin-top: -0.3rem;
  background: #3c3c49;
  cursor: pointer;
  border-radius: 50%;

  border: none;
}

.pc-slider::-moz-range-thumb:active {
  background: var(--pirate-gold) !important;
}

.pc-advanced-controls {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.4rem;
}

.pc-wireframe,
.pc-other {
  display: flex;
  gap: 0.2rem;
  color: var(--pirate-txt);
}

.pc-wireframe {
  align-items: flex-start;
}

.v-number {
  width: 100%;
}

input#vNumber:focus-visible,
input#vNumber:active,
input#vNumber:focus-visible {
  outline: 1px solid #ccc;
}

#wfCheckbox:checked+.v-number {
  display: flex;
}

#wfCheckbox.wf-checkbox {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #3c3c49;
  width: 1rem;
  height: 1rem;
  top: -0.19rem;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  border: none;
}

#wfCheckbox.wf-checkbox:checked::before {
  content: "✔";
  color: var(--pirate-gold);
  position: absolute;
  left: 4px;
  top: 0;
  font-size: 0.7rem;
}

input[type="range"] {
  width: 100%;
}

label {
  display: flex;
  margin-bottom: 0.3rem;
  color: var(--pirate-txt);
}

label,
.theme-switcher-txt {
  font-size: 1rem;
}

.pc-note-box {
  display: none;
  flex-direction: column;
  gap: clamp(0.4rem, 1.5dvh, 1.2rem);
}

.pc-note-box h3 {
  margin-top: 0.5rem;
}

.pc-note {
  color: var(--pirate-txt);
  font-weight: 100;
  font-size: 0.8rem;
  max-width: max-content;
  text-align: left;
  background: rgb(55 55 61 / 26%);
  border-radius: 0.2rem;
  padding: 0.6rem;
  padding-bottom: 0rem;

  & p {
    line-height: 1.3;
  }

  &:hover {
    color: #999;
  }
}

.credits {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  position: absolute;
  bottom: 0;
  left: 0;
  padding-bottom: 0.3rem;
  padding-left: 1.5rem;
  padding-right: 1rem;
  padding-top: 0;
  width: auto;
  color: var(--pirate-darker-txt);
  background: #16161e;
  letter-spacing: -0.3;
  font-size: 0.8rem;
  border-radius: 0 0.3rem 0 0;
  will-change: transform;
  transition: all 0.2s ease !important;

  & p {
    margin: 0;
  }

  &:hover {
    padding-bottom: 1.2rem;
    padding-top: 0.8rem;
    color: #616273;
    transition: all 0.2s ease !important;
  }
}

.credits a {
  transition: all 0.2s 0.2s ease !important;
}

.credits:hover a,
.credits:hover .version-num {
  color: var(--pirate-gold);
  transition: all 0.2s 0.2s ease !important;
}

.coin-api {
  margin-left:.5rem;
}
.credits #cgLogo {
  filter: brightness(30%);
  margin-top: 2px;
}

.credits:hover #cgLogo {
  filter: brightness(90%);
}

.credits:hover #discordLogo {
  filter: brightness(2);
}

a.version-link .version-num,
a.version-link {
  text-decoration: none;
}

a.version-link:hover .version-num {
  text-decoration: none !important;
  color: var(--pirate-gold) !important;
}

.version-num {
  display: inline-flex;
  margin-bottom: 0.15rem;
  padding: 0.1rem 0.3rem;
  border-radius: 0.2rem;
  font-size: 0.7rem;
  background: var(--pirate-blue);
  color: var(--pirate-txt);
}

.angled-note {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pirate-gold);
  position: absolute;
  bottom: -0.9rem;
  left: calc(100% + 2.9rem);
  width: 18rem;
  height: 4rem;
  background: rgb(29 29 37);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transform: rotate(-45deg) translate(-50%, -50%);
  transform-origin: 0 100%;
  z-index: 1;
}

.angled-note-txt {
  position: relative;
  top: -0.65rem;
  transition-duration: 0s;

  &:hover {
    transition-duration: 0s;
  }
}

.angled-note:hover {
  background: var(--pirate-gold);
  color: rgb(22, 22, 30);
}

@media only screen and (max-width: 650px) {
  header {
    height: 2.5rem;
    background: none;
    z-index: 9999;
  }

  #piratePanelWrapper {
    display: flex;
    position: absolute;
    margin: 0 auto;
    width: 82%;
    scale: 0.6;
    top: 2.7rem;
    left: 50dvw;
    transform: translatex(-50%);
  }

  .app-menu {
    display: none;
  }

  .set-coin {
    top: 0.49rem;
    width: calc(100dvw - 6rem);
    margin: 0 auto;
    border: 1px solid #1b1b26;
    overflow: hidden;
  }

  .container-wrapper {
    border: none;
  }

  .pirate-img {
    max-width: 50%;
  }

  .pc-app-logo-area {
    margin-bottom: 0;
  }

  .angled-note-box {
    display: none;
  }

  canvas {
    margin-top: 6rem;
  }
}

/* Customizes the scrollbar */

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--pirate-gold);
}