/* web/css/style.css */
@font-face {
  font-family: Source Code Pro;
  src: url("./SourceCodePro-VariableFont_wght-9y1pp3r9.ttf") format(truetype);
  font-weight: 200 900;
  font-style: normal;
}

@font-face {
  font-family: Source Code Pro;
  src: url("./SourceCodePro-Italic-VariableFont_wght-sg2thpsm.ttf") format(truetype);
  font-weight: 200 900;
  font-style: italic;
}

@font-face {
  font-family: Minecraft;
  src: url("./Monocraft-8wyg8d0d.ttf") format(truetype);
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: Minecraft;
  src: url("./Monocraft-Bold-czgz86n4.ttf") format(truetype);
  font-weight: bold;
  font-style: normal;
}

:root {
  --backgroundsel: #fff6;
  --background1st: black;
  --background2st: #262626;
  --background3st: #fff3;
  --color1st: #fff;
  --color2st: #ffffffe6;
  --color3st: #fffc;
  --border1st: 5px solid var(--background3st);
  --border2st: 3px solid var(--background2st);
  --borderRadius1st: 30px;
  --borderRadius2nd: 15px;
  --borderRadius3rd: 10px;
  --terminalWidth: 580px;
  --terminalHeight: 300px;
}

html {
  color: var(--color1st);
  background-color: var(--background1st);
  scroll-behavior: smooth;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Oxygen, Open Sans, sans-serif;
}

body, html {
  overscroll-behavior: none;
  touch-action: none;
}

h1, h3 {
  margin: 0;
}

#sidebar {
  display: flex;
  position: fixed;
  border-radius: var(--borderRadius1st);
  border: var(--border1st);
  background-color: var(--background1st);
  overflow: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-direction: column;
  gap: 15px;
  width: 270px;
  padding: 15px;
  top: 105px;
  bottom: 15px;
  left: 15px;
}

#sidebar::-webkit-scrollbar {
  display: none;
}

.sidebarItem {
  display: flex;
  background-color: var(--background2st);
  border-radius: var(--borderRadius2nd);
  text-decoration: none;
  color: var(--color2st);
  align-items:  center;
  width: calc(100% - 20px);
  height: 30px;
  padding: 10px;
}

.sidebarItem img {
  filter: invert();
  height: 80%;
}

.sidebarItem p {
  margin-left: 10px;
  font-weight: bold;
}

.active {
  background-color: var(--backgroundsel);
  color: var(--color3st);
}

#mainContent {
  display: flex;
  position: fixed;
  border-radius: var(--borderRadius1st);
  border: var(--border1st);
  background-color: var(--background1st);
  flex-direction: column;
  padding: 15px;
  inset: 105px 15px 15px 340px;
}

input[type="button"], input[type="submit"], button {
  border: var(--border2st);
  border-radius: var(--borderRadius3rd);
  background-color: var(--background2st);
  color: var(--color2st);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items:  center;
  min-width: 100px;
  min-height: 35px;
}

input[type="text"], input[type="password"] {
  border: var(--border2st);
  border-radius: var(--borderRadius3rd);
  background-color: var(--background2st);
  color: var(--color2st);
  max-width: 200px;
  min-height: 35px;
  margin-bottom: 15px;
  padding: 10px;
}

#topbar {
  display: flex;
  position: fixed;
  border-radius: var(--borderRadius1st);
  border: var(--border1st);
  background-color: var(--background1st);
  flex-direction: row;
  justify-content: flex-end;
  gap: 15px;
  height: 35px;
  padding: 15px;
  top: 15px;
  left: 15px;
  right: 15px;
}

#username {
  display: none;
  align-self:  center;
  margin-top: 0;
  margin-bottom: 0;
  margin-right: auto;
}

#serverInfo {
  display: flex;
  align-items:  center;
  margin-bottom: 25px;
}

#serverInfo #container {
  display: flex;
  align-items:  center;
}

#serverInfo #server-img {
  border: var(--border2st);
  border-radius: var(--borderRadius2nd);
  width: 80px;
  height: 80px;
  margin-right: 15px;
}

#serverInfo > span {
  flex-grow: 1;
}

#server-name {
  font-family: Minecraft;
  font-size: clamp(.5em, 2.2vw, 2em);
  font-weight: normal;
}

#server-motd {
  white-space: pre-wrap;
  font-family: Minecraft;
  font-size: clamp(.5em, 1.7vw, 1.5em);
  font-weight: normal;
}

.mc-obfuscated {
  display: inline-block;
}

#statusContainer {
  border-radius: var(--borderRadius3rd);
  background-color: var(--background2st);
  color: var(--color2st);
  display: flex;
  justify-content: space-between;
  align-items:  center;
  min-width: 80px;
  padding: 5px;
}

.dot, #statusContainer span {
  display: inline-block;
  border-radius: 50%;
  width: 15px;
  height: 15px;
}

#statusContainer p {
  margin: 0;
}

#terminal-wrapper {
  width: var(--terminalWidth);
  display: none;
  border: var(--border2st);
  border-radius: var(--borderRadius2nd);
  overflow: hidden;
  background-color: var(--background2st);
  position: relative;
  flex-direction: column;
  gap: 3px;
}

#terminal-wrapper.online {
  display: flex;
}

#terminal-expand-btn {
  position: absolute;
  z-index: 10;
  backdrop-filter: blur(5px);
  background: #ffffff0d;
  border: 1px solid #ffffff1a;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  padding: 6px;
  transition: all .2s;
  top: 10px;
  right: 10px;
}

#terminal-expand-btn:hover {
  background: #ffffff26;
}

#terminal-expand-btn img {
  filter: invert();
  opacity: .6;
  height: 100%;
  margin: 0;
}

#terminal-wrapper.fullscreen {
  position: fixed;
  z-index: 1000;
  border: none;
  border-radius: 0;
  margin: 0;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
}

#terminal-wrapper.fullscreen #terminal-container {
  border-radius: 0;
  height: calc(100vh - 50px);
}

#terminal-wrapper.fullscreen #terminal-command-sender {
  border-radius: 0;
}

#terminal-container {
  height: var(--terminalHeight);
  overflow: hidden;
  display: flex;
  border-radius: 0 0 calc(var(--borderRadius2nd)  - 3px) calc(var(--borderRadius2nd)  - 3px);
  background-color: #131729;
  flex-direction: column;
  padding: 5px;
}

#raw-logs {
  color: #fff;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-y: auto;
  border-radius: calc(var(--borderRadius2nd)  - 5px);
  margin: 0;
  font-family: Source Code Pro, monospace;
  font-size: 14px;
  line-height: 1.4;
}

#raw-logs {
  scrollbar-width: thin;
  scrollbar-color: #fff3 transparent;
}

#raw-logs::-webkit-scrollbar {
  width: 6px;
}

#raw-logs::-webkit-scrollbar-track {
  background: none;
}

#raw-logs::-webkit-scrollbar-thumb {
  background: #ffffff26;
  border-radius: 3px;
}

#raw-logs::-webkit-scrollbar-thumb:hover {
  background: #ffffff4d;
}

#terminal-command-sender {
  display: none;
  background-color: var(--background2st);
  position: relative;
  justify-content: center;
  align-items:  center;
  margin: 0;
  padding-right: 3px;
}

#command-txt {
  background-color: var(--background2st);
  border-radius: 0 0 var(--borderRadius2nd) var(--borderRadius2nd);
  color: #fff;
  outline: none;
  border: none;
  width: 100%;
  max-width: none;
  margin-bottom: 0;
  padding: 10px 15px;
  font-family: Source Code Pro, monospace;
  font-size: 14px;
}

#command-submit-btn {
  color: #ffffff4d;
  cursor: default;
  display: flex;
  background-color: #ffffff1a;
  border: none;
  border-radius: 50%;
  justify-content: center;
  align-items:  center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 6px;
  transition: background-color .2s, color .2s;
}

#command-submit-btn.active {
  color: #fff;
  cursor: pointer;
  background-color: #4caf50;
}

#command-submit-btn img {
  filter: invert();
  -webkit-user-drag: none;
  width: 16px;
  height: 16px;
}

#terminal-message {
  color: var(--color3st);
  display: none;
  margin: auto;
  font-size: 1.2em;
  font-weight: bold;
}

#terminal-container.offline {
  display: flex;
}

#terminal-container.offline #terminal-message {
  display: block;
}

#playersList {
  grid-template-columns: [one] 1fr [two] 1fr [three] 1fr [four] 1fr;
  grid-template-rows: [one] 1fr [two] 1fr [three] 1fr [four] 1fr [five] 1fr [six] 1fr [seven] 1fr [eight] 1fr;
  background-color: var(--background2st);
  border-radius: var(--borderRadius2nd);
  display: none;
  overflow: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 5px;
  height: 100%;
  padding: 5px;
}

#playersList::-webkit-scrollbar {
  display: none;
}

#playersList .playerInfo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items:  start;
  height: 100%;
}

#playersList .playerCard {
  border-radius: var(--borderRadius3rd);
  background-color: var(--background3st);
  color: var(--color3st);
  display: flex;
  justify-content: space-between;
  align-items:  start;
  padding: 10px;
}

#playersList .playerCard h1 {
  margin: 0;
  font-size: 30px;
}

#playersList .playerCard h2 {
  margin: 0;
  font-size: 20px;
}

#playersList .playerCard h3 {
  text-align: center;
  min-width: 27px;
  height: 27px;
  margin: 0;
  font-size: 20px;
}

#startBtn {
  display: none;
}

#controlsDiv {
  display: flex;
  align-items:  center;
  gap: 10px;
  margin-bottom: 15px;
}

#controlsInfomsg {
  opacity: 0;
  white-space: nowrap;
  max-width: 100%;
  transition: transform .3s, opacity .3s;
  font-size: clamp(.5em, 3vw, 1.17em);
  font-weight: bold;
  transform: translateX(-7px);
}

.loader {
  animation: spin 1s linear infinite;
  border: 3px solid #ffffff4d;
  border-top-color: #fff;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  margin: auto;
}

@keyframes spin {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media only screen and (max-width: 1080px) {
  #terminal-wrapper {
    width: auto;
    height: 100%;
  }

  #sidebar {
    width: auto;
    height: 10%;
    bottom: auto;
    right: 15px;
  }

  #mainContent {
    top: calc(10% + 160px);
    left: 15px;
  }

  #serverInfo {
    flex-direction: column;
    align-items:  start;
    gap: 10px;
  }

  #server-name {
    font-size: clamp(.5em, 3.2vw, 2em);
  }

  #server-motd {
    font-size: clamp(.5em, 2.2vw, 1.5em);
  }

  input[type="text"], input[type="password"] {
    width: 100%;
  }
}

#floating-suggestions {
  position: absolute;
  display: flex;
  overflow-x: auto;
  visibility: hidden;
  pointer-events: none;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 5px 2px;
  transition: transform .1s ease-out;
  bottom: 100%;
  left: 0;
}

#floating-suggestions::-webkit-scrollbar {
  display: none;
}

#floating-suggestions.visible {
  visibility: visible;
  pointer-events: auto;
}

.suggestion-bubble {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  background: #141928b3;
  border: 1px solid #64ff964d;
  border-radius: 20px;
  flex-shrink: 0;
  padding: 6px 14px;
  transition: background-color .2s, border-color .2s, transform .2s, box-shadow .2s;
  font-family: Source Code Pro, monospace;
  font-size: 13px;
  box-shadow: 0 4px 15px #0000004d, 0 0 10px #64ff961a;
}

.suggestion-bubble:hover {
  background: #283246cc;
  border-color: #64ff96cc;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px #0006, 0 0 15px #64ff964d;
}

.suggestion-bubble.more-btn {
  border-color: #6496ff4d;
  padding: 6px 10px;
}
