@charset "utf-8";

@font-face {
  font-family: Joystix;
  src: url('fonts/Arcadepix_Plus.ttf') format('truetype');
}

@font-face {
  font-family: Pixel;
  src: url('fonts/Pixel_Font_free.ttf') format('truetype');
}

a {
  text-decoration: none;
}

body {
  margin: 0;
  padding: 12px;
  background: #e9e9e9;
}

.app {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}

.left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pixel-font {
  font-family: Pixel;
}

#SetFen {
  margin: 0;
}

button {
  font-family: Pixel;
  margin: 8px;
  color: black;
}

button:hover {
  transition: all ease 0.2s;
  color: red;
  cursor: url('images/mouse_cursor3.png'), default;
}

.big_title {
  font-family: 'Pixel';
  padding: 9px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  /* width: 300px; */
}

#FenInDiv {
  position: relative;
  font-family: Pixel;
  color: black;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
  width: 100%;
}

#FenInDiv a:hover {
  color: green;
  cursor: url('images/mouse_cursor.png'), default;
}

.fen_link {
  align-items: center;
  text-align: start;
}

input[type='text'] {
  font-family: Joystix;
  font-size: 28px;
  color: green;
  height: 30px;
}

#BoardWrapper {
  width: min(90vw, 480px);
  aspect-ratio: 1 / 1;
}

#Board {
  width: 100%;
  height: 100%;
  position: relative;
  border: 12px double #333;
}

#EngineOutput {
  position: relative;
  top: 120px;
  font-family: Pixel;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  min-width: 220px;
}

.Square {
  width: 12.5%;
  height: 12.5%;
  position: absolute;
  cursor: url('images/mouse_cursor.png'), default;
}

.Square:hover {
  border: 3px solid #000;
  opacity: 0.8;
  transition: all ease 0.15s;
}

#ThinkTimeChoice {
  font-family: Pixel;
  color: black;
}

#ThinkTimeChoice:hover {
  color: purple;
  cursor: url('images/mouse_cursor3.png'), default;
}

.Dark {
  background-color: #6d3e17;
}

.Light {
  background-color: #f0c280;
}

.SqSelected {
  background-color: #038198;
}

.Piece {
  position: absolute;
  cursor: url('images/mouse_cursor2.png'), default;
  object-fit: contain;
}

.Piece:hover {
  opacity: 0.6;
  transition: all ease 0.15s;
}

.file1 {
  left: 0%;
}
.file2 {
  left: 12.5%;
}
.file3 {
  left: 25%;
}
.file4 {
  left: 37.5%;
}
.file5 {
  left: 50%;
}
.file6 {
  left: 62.5%;
}
.file7 {
  left: 75%;
}
.file8 {
  left: 87.5%;
}

.rank1 {
  top: 87.5%;
}
.rank2 {
  top: 75%;
}
.rank3 {
  top: 62.5%;
}
.rank4 {
  top: 50%;
}
.rank5 {
  top: 37.5%;
}
.rank6 {
  top: 25%;
}
.rank7 {
  top: 12.5%;
}
.rank8 {
  top: 0%;
}

@media (max-width: 768px) {
  body {
    padding: 8px;
  }

  .app {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .left {
    width: 100%;
    align-items: center;
  }

  #EngineOutput {
    width: 90%;
    max-width: 480px;
    top: 40px;
  }
}

@media (max-width: 560px) {
  .left {
    align-items: baseline;
  }
}

@media (max-width: 480px) {
  input[type='text'] {
    font-size: 16px;
  }

  button {
    font-size: 12px;
    margin: 4px;
  }

  #Board {
    border-width: 6px;
  }
}

@media (max-width: 380px) {
  body {
    padding: 0px;
  }
}
