* {
  --sidebar-width: 225px;
  --bar-height: calc(var(--sidebar-width) / 3);
  --content-width: calc(100% - var(--sidebar-width));
  --content-height: calc(100vh - (2 * var(--bar-height)));
  --accent-color: #1e1e1e;
  --accent-hover: #353535;
  --text: #fff;
  --transition-duration: 0.3s;
  --game-btn-width: 256px;
  --game-btn-height: 56px;
  --dropdown-width: calc((var(--game-btn-width) * .85) * 1.15);
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

.loader#loadermain {
  z-index: 999;
}

.sidebar,
.topbar,
.bottombar,
.bg {
  background-color: var(--accent-color);
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  padding-top: calc(var(--bar-height) + 16px);
  display: flex;
  flex-direction: column;
}

.sidebar > * {
  flex: 0 0 auto;
}

.topbar,
.bottombar,
.bg {
  max-width: 100%;
  right: 0;
  background-color: var(--accent-color);
}

.topbar,
.bottombar {
  height: var(--bar-height);
  display: flex;
  align-items: center;
}

.topbar {
  top: 0;
  height: var(--bar-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  padding-left: 20px;
}

.bottombar {
  top: calc(100vh - var(--bar-height));
}

.bg {
  top: var(--bar-height);
  height: var(--content-height);
  background-image: url(../../api/bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg #loadergame {
  height: var(--content-height);
  width: var(--content-width);
  display: none;
  z-index: 2;
}

.content {
  width: var(--content-width);
  height: 100vh;
  position: absolute;
  left: var(--sidebar-width);
  top: 0;
}

.game-button {
  width: var(--game-btn-width);
  font-size: 20px;
  font-weight: bold;
  font-family: 'Minecraft 10';
  text-shadow: 0 2px 0 black;
  color: var(--text);
  height: var(--game-btn-height);
  position: absolute;
  cursor: pointer;
  outline: none;
  z-index: 3;
  bottom: calc((var(--bar-height) / 2) - (var(--game-btn-height) / 2));
  /*calc((var(--bar-height) / 2) - 12px)*/
  left: calc((100% - var(--game-btn-width)) / 2);
  transition: transform var(--transition-duration), bottom var(--transition-duration);
  clip-path: polygon(0px calc(100% - 4px),
      4px calc(100% - 4px),
      4px 100%,
      calc(100% - 4px) 100%,
      calc(100% - 4px) calc(100% - 4px),
      100% calc(100% - 4px),
      100% 4px,
      calc(100% - 4px) 4px,
      calc(100% - 4px) 0px,
      4px 0px,
      4px 4px,
      0px 4px);
}

.game-button:hover {
  font-size: 21px;
}

.game-button.play {
  border-top: #64cb55;
  border-right: #316c42;
  border-bottom: #204c2d;
  border-left: #316c42;
  border-width: 4px;
  border-style: solid;
  background-color: #3f8e4f;
}

.game-button.play:hover {
  border-top: #6fda63;
  border-right: #3c7b50;
  border-bottom: #2c5b3c;
  border-left: #3c7b50;
  border-width: 4px;
  border-style: solid;
  background-color: #479b5c;
}

.game-button.stop {
  border-top: #bb3931;
  border-right: #731d16;
  border-bottom: #4a0f0d;
  border-left: #721c15;
  border-width: 4px;
  border-style: solid;
  background-color: #89211b;
}

.game-button.stop:hover {
  border-top: #d54038;
  border-right: #92261d;
  border-bottom: #671513;
  border-left: #8e241a;
  border-width: 4px;
  border-style: solid;
  background-color: #a62821;
}

.game-button.relaunch {
  border-top: #ffd93b;
  border-right: #b89e29;
  border-bottom: #8c791d;
  border-left: #b89e29;
  border-width: 4px;
  border-style: solid;
  background-color: #e3b900;
}

.game-button.relaunch:hover {
  border-top: #ffea57;
  border-right: #c9ae32;
  border-bottom: #a1851c;
  border-left: #c9ae32;
  border-width: 4px;
  border-style: solid;
  background-color: #f4c400;
}


@keyframes drop {
  0% {
    transform: translateY(-300px) scaleY(0.9);
    opacity: 0;
  }

  5% {
    opacity: .7;
  }

  50% {
    transform: translateY(0) scaleY(1);
    opacity: 1;
  }

  65% {
    transform: translateY(-17px) scaleY(.9);
    opacity: 1;
  }

  75% {
    transform: translateY(-22px) scaleY(.9);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scaleY(1);
    opacity: 1;
  }
}

.title {
  --title-width: 524px;
  width: var(--title-width);
  position: absolute;
  top: calc(var(--bar-height) + 16px);
  animation: drop .5s linear forwards;
  left: calc((100% - var(--title-width)) / 2);
  z-index: 1;
  pointer-events: none;
  display: none;
}

.game_frame {
  width: 100%;
  height: var(--content-height);
  border: none;
  position: absolute;
  top: var(--bar-height);
  right: 0;
  z-index: 3;
  overflow: hidden;
  display: none;
}

.game_frame.active {
  display: flex;
}

.sidebar .sidebar-user {
  position: absolute;
}

.sidebar .sidebar-user {
  top: 0;
}

.sidebar .sidebar-user,
.sidebar .sidebar-item,
.sidebar .sidebar-settings {
  display: flex;
  align-items: center;
  --padding: 16px;
  gap: var(--padding);
  padding: var(--padding);
  color: var(--text);
  font-size: calc(var(--sidebar-width) / 10);
  font-weight: bold;
}

.sidebar .sidebar-item {
  font-size: calc(var(--sidebar-width) / 12);
  cursor: pointer;
  transition: background-color var(--transition-duration), padding-left var(--transition-duration), border-left 0.1s;
}

.sidebar .sidebar-item .text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar .sidebar-item .text a {
  font-size: calc(var(--sidebar-width) / 14.5);
}

.sidebar .sidebar-item .text a:not(:first-child) {
  font-weight: normal;
}

.sidebar .sidebar-item:hover {
  background-color: var(--accent-hover);
}

.sidebar-item.active {
  border-left: var(--text) 2px solid;
  padding-left: calc(var(--padding) * 1.5);
}

.sidebar .sidebar-user img {
  width: calc(var(--sidebar-width) / 4.5);
}

.sidebar .sidebar-item img {
  width: calc(var(--sidebar-width) / 5);
}

.sidebar .sidebar-user img {
  border-radius: 50%;
}

.sidebar-item.round img {
  border-radius: 25%;
}

.sidebar-item.round2 img {
  border-radius: 50%;
}

.sidebar .sidebar-avdertisement {
  width: 100% !important;
  flex: 1 0 auto !important;
}

.sidebar .sidebar-avdertisement ins {
  display: block !important;
  --margin: 15px;
  margin: var(--margin) !important;
  width: calc(100% - calc(var(--margin) * 2)) !important;
  height: calc(100% - calc(var(--margin) * 2)) !important;
  border: 1px #aaa solid !important;
  box-sizing: border-box !important;
}

.version {
  padding-left: 10px;
  font-size: 18px;
  color: #888;
}

.dropdown-selector,
.dropdown-version {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-direction: row;
}

.dropdown-selector {
  width: var(--dropdown-width);
  margin-left: 5px;
  padding: 6px;
  border-radius: 4px;
  align-items: center;
  position: relative;
  transition: background-color var(--transition-duration);
  cursor: default;
}

.dropdown-selector:hover {
  background-color: var(--accent-hover);
}

.dropdown-selector img,
.dropdown-icon {
  width: 40px;
  border-radius: 0;
  border: none;
}

.version-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--text);
}

.version-info a:first-child {
  font-weight: bold;
}

.chevron-down {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(45deg) translateY(-50%);
  position: absolute;
  right: 20px;
}

@keyframes dropdown {
  0% {
    opacity: 0;
    bottom: calc(var(--bar-height) / 2);
  }

  100% {
    opacity: 1;
    bottom: var(--bar-height);
  }
}

.dropdown {
  position: absolute;
  background-color: #131313;
  animation: dropdown var(--transition-duration) forwards;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  z-index: 4;
  max-height: calc(var(--content-height) * 0.85);
  overflow-y: auto;
}

.dropdown .dropdown-version {
  padding: 16px;
  width: var(--dropdown-width);
}

.dropdown .dropdown-version:hover {
  background-color: #3a8349;
}

.dropdown-version {
  cursor: default;
}


@keyframes topbar-expand {
  0% {
    left: 50%;
    width: 0;
  }

  100% {
    left: calc(50% - 12.5px);
    width: 25px;
  }
}

.topbar-buttons {
  display: flex;
  flex-direction: row;
  gap: 15px;
  align-items: center;
}

.topbar a:not(.ver) {
  margin-left: 1%;
  margin-right: 1.5%;
  cursor: pointer;
  color: grey;
  transition: 0.2s ease-in-out;
}

.topbar a:not(.ver):hover {
  color: var(--text);
}

.topbar a::after {
  content: "";
  display: none;
  height: 4px;
  background-color: #087400;
  position: relative;
  left: 25%;
  top: 5px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  animation: topbar-expand 0.075s linear forwards;
}

.topbar a.active {
  cursor: default;
  color: #fff;
}

.topbar a.active::after {
  display: block;
  opacity: 1;
}

.topbar .ver {
  color: var(--text);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: bold;
}

.flip {
  transform-style: preserve-3d;
  transition: transform 0.3s ease-in-out !important;
}

.btns {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 5px;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: var(--bar-height);
  right: 0;
  z-index: 3;
}

.btns button {
  visibility: visible;
  opacity: 1;
  background-color: #333333;
  color: white;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #aeaeae;
  width: 40px;
  height: 40px;
  transition: background-color var(--transition-duration), opacity var(--transition-duration);
}

.btns button:hover {
  background-color: #808080;
}

.btns button svg {
  padding: 0;
  width: 15px;
  height: 15px;
}

.game-fs .game_frame {
  z-index: 5;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.game-fs .btns,
.game-fs .btns button {
  z-index: 6;
}

.game-fs .btns button:not(#fullscreen-btn) {
  display: none;
}

.game-fs .btns #fullscreen-btn {
  position: fixed;
  bottom: 5px;
  right: 5px;
}

.section {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  position: absolute;
  top: var(--bar-height);
  left: 0;
  height: calc(100vh - var(--bar-height));
  width: 100%;
  background-color: #333333;
  z-index: 3;
  overflow-y: auto;
  overflow-x: hidden;
  color: var(--text);
  padding: 5px;
}

.section.active {
  display: flex;
}

.section.console .success {
  color: #077d07;
}

.section.console .warn {
  color: #ffa500;
}

.section.console .error {
  color: #ff0000;
}

.section.console .launcher {
  font-weight: bold;
}

.section.installations {
  padding: 20px;
}

.section.installations .newInstall {
  background-color: #333333;
  color: var(--text);
  border: 1px #717171 solid;
  padding: 10px 20px;
  cursor: pointer;
}

.section.installations .newInstall:hover {
  border: 1px #8d8d8d solid;
  background-color: #5c5c5c;
}

.section.installations .installCreation {
  background-color: #222222;
  padding: 40px;
  padding-top: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: absolute;
  gap: 10px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.section.installations .installCreation input,
.section.installations .installCreation .createInstall {
  padding: 10px 20px;
  text-align: center;
  border-radius: 10px;
  color: var(--text);
}

.section.installations .installCreation input {
  background-color: #111111;
  border: 1px #111111 solid;
  width: 300px;
}

.section.installations .installCreation input::placeholder {
  color: #888888;
}

.section.installations .installCreation .createInstall {
  background-color: #0b59e0;
  border: none;
  font-weight: bold;
  width: 150px;
  cursor: pointer;
  transition: background-color var(--transition-duration);
}

.section.installations .installCreation .createInstall:hover {
  background-color: #0748b9;
}

.installList {
  list-style-type: none;
  padding: 0;
}

.installList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #333;
  margin-top: 10px;
  border-radius: 5px;
}

.installList li img {
  width: 30px;
  height: 30px;
}

.installList li .actions {
  display: flex;
  gap: 10px;
}

.installList li .actions button {
  background-color: #4caf50;
  border: none;
  color: var(--text);
  padding: 5px 10px;
  cursor: pointer;
}

.installList li .actions button:hover {
  background-color: #45a049;
}

.installList li .actions .deleteBtn {
  background-color: #f44336;
}

.installList li .actions .deleteBtn:hover {
  background-color: #da190b;
}

.installList li .actions .editBtn {
  background-color: #ffa500;
}

.installList li .actions .editBtn:hover {
  background-color: #ff8c00;
}

.installList li .actions .upBtn,
.actions .downBtn {
  background-color: #888;
}

.installList li .actions .upBtn:hover,
.actions .downBtn:hover {
  background-color: #aaa;
}

.notification-container {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  right: 0;
  padding: 20px;
  z-index: 3;
  gap: 10px;
}

@keyframes notif {
  0% {
    transform: translateY(-500%);
  }

  100% {}
}

.notification-container .notif {
  color: var(--text);
  background-color: #111;
  min-width: 200px;
  width: fit-content;
  padding: 10px 20px;
  text-align: left;
  border-radius: 10px;
  border: 1px var(--text) solid;
  display: flex;
  flex-direction: column;
  gap: 5px;
  animation: 0.5s notif;
  cursor: pointer;
  transition: 0.5s opacity;
}

.notification-container .notif.removed {
  opacity: 0;
}

.notification-container .notif>* {
  padding: 0;
  margin: 0;
}

.section.side {
  height: 100%;
  top: 0;
  z-index: 4;
}

.changelog,
.settings {
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.changelog-major:first-child .changelog-minor:last-child h2 {
  color: gold;
}

.changelog-minor h2 {
  font-size: 30px;
}

.changelog-minor a,
.changelog-minor ul {
  font-size: 15px;
}

.changelog-minor ul {
  text-align: left;
}

.indented {
  list-style-type: none;
  padding-left: 40px;
}

.changelog-major {
  padding: 0 20px;
  margin: 30px;
}

.changelog-minor:not(:last-child),
.section.settings .setting:not(:last-child) {
  border-bottom: 2px #a5a5a5 solid;
}

.section.settings .setting:not(:first-child) {
  padding-top: 16px;
}

.changelog-minor:first-child {
  padding-top: 0;
}

.changelog-minor:last-child {
  padding-bottom: 0;
}

.changelog-date {
  color: #888;
}

.section.settings {
  padding-top: 108px;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
}

.section.settings .setting {
  margin: 0;
}

.setting label:has(input[type="text"]) {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 10px;
}

.setting label input[type="text"] {
  text-align: center;
}

.status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: absolute;
  right: 25px;
  font-size: 15px;
  font-weight: bold;
  color: #fff;
}

@keyframes dropdown2 {
  0% {
    opacity: 0;
    top: calc(var(--bar-height) + (var(--content-height) * .15) + (var(--bar-height) / 2));
  }

  100% {
    opacity: 1;
    top: calc(var(--bar-height) + (var(--content-height) * .15));
  }
}

@media screen and (max-aspect-ratio: 1/1) {
  html {
    height: 100vh;
    width: 100vw;
  }

  body {
    width: 100vh;
    height: 100vw;
    transform-origin: top left;
    transform: rotate(-90deg) translate(-100%, 0);
  }

  * {
    --content-width: calc(100vh - var(--sidebar-width));
    --content-height: calc(100vw - (2 * var(--bar-height)));
    --dropdown-width: calc((var(--game-btn-width) * .85));
  }

  .game-button {
    bottom: unset;
    transform: translateX(5%);
  }

  .dropdown {
    animation: dropdown2 var(--transition-duration) forwards;
  }

  .section.side {
    height: 100vw;
  }
}