@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");

html,
body {
  font-family: "JetBrains Mono", monospace;
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  color: white;
  background-color: black;
  display: flex;
  flex-direction: column;
}

#fpsCounter {
  z-index: 50;
  font-size: 20px;
  padding: 20px;
  position: fixed;
  user-select: none;
  top: 0;
  right: 0;
}

#game {
  --r: 16 / 9;
  aspect-ratio: var(--r);
  width: 90vw;
  max-width: 960px;
  transform-origin: center;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  flex: 1;
  position: relative;
  background-color: black;
  overflow: hidden;
}

#gameCanvas {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  max-width: 100%;
  max-height: 100%;
}

#game:-webkit-full-screen,
#game:-moz-full-screen,
#game:-ms-fullscreen,
#game:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  object-fit: contain;
  margin: 0;
}

#game:-webkit-full-screen #gameCanvas,
#game:-moz-full-screen #gameCanvas,
#game:-ms-fullscreen #gameCanvas,
#game:fullscreen #gameCanvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* This should scale the game to make it more playable for people on resolutions 1440p and up
* not sure if thats a call i should make though since i dont have any displays with that resolution
@media (min-width: 2560px), (min-height: 1440px) {
  #game {
    zoom: 130%;
  }
}

@media (max-width: 960px), (max-height: 540px) {
  #game {
    zoom: 50%;
  }
}
*/

#startButton {
  font-family: "JetBrains Mono", monospace;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  padding: 15px 30px;
  font-size: 1em;
  background: #202020;
  color: white;
  border: 2px solid #404040;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#startButton:hover {
  background: #303030;
  border-color: #505050;
}

#fullscreenButton {
  font-family: "JetBrains Mono", monospace;
  position: absolute;
  top: 5%;
  right: 5%;
  font-size: 1em;
  z-index: 10;
  padding: 5px 10px;
  background: rgba(32, 32, 32, 0.6);
  color: white;
  border: 1px solid rgba(64, 64, 64, 0.8);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

#fullscreenButton:hover {
  background: rgba(48, 48, 48, 0.7);
  border-color: rgba(80, 80, 80, 0.9);
}

#unfocusedNotice {
  display: none;
  font-family: "JetBrains Mono", monospace;
  font-weight: bold;
  position: absolute;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  color: white;
  padding: 20px;
  width: 300px;
  border-radius: 8px;
  border: 3px solid crimson;
}

#unfocusedNotice h1 {
  margin: 0;
  font-size: 24px;
}

#unfocusedNotice p {
  margin-top: 10px;
  font-size: 14px;
}

#applySettingsButton {
  font-family: "JetBrains Mono", monospace;
  margin: auto;
  max-width: 30%;
  max-height: 30%;
  padding: 10px 20px;
  background: #202020;
  color: white;
  border: 2px solid #404040;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#applySettingsButton:hover {
  background: #303030;
  border-color: #505050;
}

#settings {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background-color: #202020;
  padding: 10px;
  border-radius: 8px;
  width: 60%;
  margin: 20px auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#settings input[type="range"] {
  appearance: none;
  background-color: #606060;
  height: 5px;
  border-radius: 5px;
  cursor: pointer;
}

#settings input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: #ecf0f1;
  cursor: pointer;
}

#settings input[type="text"] {
  color: white;
  background-color: #404040;
  width: 10%;
  padding: 3px;
  border: 1px solid #606060;
  border-radius: 5px;
  resize: vertical;
}

#settings label {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: #ecf0f1;
}

#settings label span {
  display: flex;
  align-items: center;
  gap: 16px;
}

.label-info-icon {
  width: 18px;
  height: 18px;
  margin: 0;
}

.info-label .label-info-icon {
  pointer-events: auto;
  cursor: pointer;
}

.info-label .label-info-icon[title]:hover::after {
  content: none;
}

.info-label .label-info-icon[title] {
  pointer-events: auto;
}
.info-label .label-info-icon[title]:hover::after {
  content: none !important;
}

#customAlertOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

#customAlertBox {
  background-color: #151515;
  color: #ecf0f1;
  font-family: "JetBrains Mono", monospace;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  max-width: 80%;
  text-align: center;
}

#customAlertText {
  margin-bottom: 20px;
}

#customAlertClose {
  font-family: "JetBrains Mono", monospace;
  padding: 8px 15px;
  background: #202020;
  color: white;
  border: 2px solid #303030;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#customAlertClose:hover {
  background: #353535;
  border-color: #454545;
}

footer {
  display: flex;
  background-color: #151515;
  color: #808080;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  margin: auto;
  width: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  position: fixed;
  bottom: 20px;
  left: 20px;
}

#icon-links {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
}

#icon-links a svg {
  transition: transform 0.2s ease-in-out;
}

#icon-links a:hover svg {
  transform: scale(1.1);
}
