body {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}

#canvas {
  background-color: #a3e84f;
  font-weight: bold;
  font-size: 25px;
}

#main-toolbar #activity-button {
  background-image: url(../activity/activity-icon.svg);
}

#main-toolbar #undo-button {
  background-image: url(../icons/edit-undo.svg);
}

#main-toolbar #color-button {
  background-image: url(../icons/switch-color.svg);
}

#main-toolbar #new-button {
  background-image: url(../icons/new-game.svg);
}

#main-toolbar #level-button {
  background-image: url(../icons/robot.svg);
}

#main-toolbar #clock-button {
  background-image: url(../icons/timer-0.svg);
}

#main-toolbar #help-button {
  background-image: url(../icons/help.svg);
}

#main-toolbar #network-button {
  background-image: url(../lib/sugar-web/graphics/icons/actions/zoom-home.svg);
}

#private-button {
  background-image: url(../lib/sugar-web/graphics/icons/actions/zoom-home.svg);
  width: 47px;
  height: 47px;
  margin: 4px 2px;
  color: white;
  color: transparent;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border: 0;
  border-radius: 5.5px;
}

#shared-button {
  background-image: url(../lib/sugar-web/graphics/icons/actions/zoom-neighborhood.svg);
  width: 47px;
  height: 47px;
  margin: 4px 2px;
  color: white;
  color: transparent;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border: 0;
  border-radius: 5.5px;
}

#fullscreen-button {
  background-image: url(../icons/view-fullscreen.svg);
}

#unfullscreen-button {
  background-image: url(../icons/view-return.svg);
  border: 0;
  border-radius: 0px;
  margin: 1px;
  width: 45px;
  height: 45px;
  top: 5px;
  right: 3%;
  position: fixed;
  visibility: hidden;
  z-index: 3;
}

#chess-container {
  position: relative;
  width: 100%;
  height: 100%;
}

#play-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  width: 100%;
  height: 97%;
  text-align: center;
  padding-top: 5px;
  vertical-align: middle;
}

#board {
  width: 50%;
}

#chess-panel {
  width: 35%;
  position: relative;
  height: 40vw;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.5);
  transition: 0.3s;
  background-color: #b58863;
  margin-left: 1%;
  margin-top: 0px;
}

#info-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 50%;
  width: 90%;
  margin: 5%;
}

#moves-container {
  height: 50%;
  width: 90%;
  overflow: auto;
  margin: 5%;
  background-color: #f0d9b5;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.5);
  padding-left: 20px;
}

#moves-container li {
  background-repeat: no-repeat;
  background-size: 40px;
  background-position: left;
  z-index: -1;
  height: 40px;
  line-height: 40px;
}

.bB {
  background-image: url(../img/chesspieces/wikipedia/bB.png);
}

.bK {
  background-image: url(../img/chesspieces/wikipedia/bK.png);
}

.bN {
  background-image: url(../img/chesspieces/wikipedia/bN.png);
}

.bP {
  background-image: url(../img/chesspieces/wikipedia/bP.png);
}

.bQ {
  background-image: url(../img/chesspieces/wikipedia/bQ.png);
}

.bR {
  background-image: url(../img/chesspieces/wikipedia/bR.png);
}

.wB {
  background-image: url(../img/chesspieces/wikipedia/wB.png);
}

.wK {
  background-image: url(../img/chesspieces/wikipedia/wK.png);
}

.wN {
  background-image: url(../img/chesspieces/wikipedia/wN.png);
}

.wP {
  background-image: url(../img/chesspieces/wikipedia/wP.png);
}

.wQ {
  background-image: url(../img/chesspieces/wikipedia/wQ.png);
}

.wR {
  background-image: url(../img/chesspieces/wikipedia/wR.png);
}

#opponent-clock {
  height: 30%;
  display: flex;
  flex-direction: row;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.5);
}

#flagDiv {
  background-color: #f0d9b5;
  height: 30%;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

#player-clock {
  height: 30%;
  display: flex;
  flex-direction: row;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.5);
  border-style: solid;
}

.usrlogo {
  width: 30%;
  background-image: url(../icons/computer-icon.svg);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.usrtime {
  background-color: #f0d9b5;
  width: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutPiece {
  background-size: 50px;
  background-position: center;
  background-repeat: no-repeat;
  height: 50px;
}

#gameover-container {
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

@media screen and (orientation: portrait) {
  #canvas {
    font-size: 18px;
  }

  #play-container {
    flex-direction: column;
  }

  #board {
    width: 50vw;
  }

  #chess-panel {
    width: 50vw;
    height: 30%;
    flex-direction: row;
    margin-top: 1%;
    margin-left: 0px;
  }

  #info-container {
    height: 85%;
    width: 50%;
    margin: 3.5% 2%;
  }

  #moves-container {
    height: 85%;
    width: 50%;
    margin: 3.5% 2%;
  }

  #moves-container li {
    background-size: 30px;
    font-size: 14px;
  }

  #clock-box {
    display: flex;
    flex-direction: column;
  }
}

@media screen and (orientation: landscape) {
  #board {
    width: 85vh;
  }

  #chess-panel {
    height: 85vh;
  }

  #clock-box {
    display: flex;
    flex-direction: row;
  }
}

@media screen and (max-height: 600px) {
  #canvas {
    font-size: 15px;
  }
}

#color-button {
  display: none;
}

@media only screen and (min-width: 600px) {
  #color-button {
    display: inline-block;
  }
}

.palette-item {
  cursor: pointer;
  padding: 2px;
}

.selected {
  background-color: #808080;
}

.palette-item:hover {
  background-color: #808080;
}

.tutorial-icon-button {
  border-radius: 22px;
  margin-top: 5px;
  height: 35px;
  background-color: #808080;
  border: 2px solid #808080;
}

/* UI styling for introJs-tutorial */

.introjs-overlay {
  background-color: #000 !important;
  opacity: .8 !important;
}

.introjs-tooltip {
  font-family: "Helvetica Neue",Helvetica,Arial,sans-serif!important;
  border-radius: 6px !important;
  padding: 2px 1px !important;
  font-size: 14px !important;
}

.introjs-helperLayer{
  background: inherit !important;
  opacity: 0.6 !important;
}

.customTooltip .introjs-tooltip-header {
  font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
  color : #ffffff;
  text-shadow: none;
  background-color: #808080;
  margin: 0;
  padding: 0px 10px;
  border-bottom: 1px solid #ebebeb;
  border-radius: 5px 5px 0 0;
}

.customTooltip .introjs-tooltip-title {
  font-size: 14px;
  padding: 0px 8px;
  font-weight: 800;
}

.customTooltip .introjs-tooltiptext {
  color: #000000;
  line-height: 1.42857143;
}

.customTooltip .introjs-skipbutton {
  float: right;
  cursor: pointer;
  background-image: url(../icons/dialog-cancel.svg);
  width: 25px;
  height: 25px;
  background-size: 25px 25px;
  margin-top: 2px;
  padding: 0px;
  white-space: nowrap;
  color: transparent;
  line-height: 27px;
}

.customTooltip .introjs-nextbutton::before {
  content: "";
  margin-right: 6px;
  background-image: url(../icons/go-right.svg);
  width: 20px;
  height: 20px;
  background-size: 20px 20px;
}

.customTooltip .introjs-prevbutton::before {
  content: "";
  margin-right: 6px;
  background-image: url(../icons/go-left.svg);
  width: 20px;
  height: 20px;
  background-size: 20px 20px;
}

.customTooltip .introjs-tooltipbuttons {
  display: flex;
  flex-wrap:wrap;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-top: 0px;
  padding: 0px;
  text-align: center;
  white-space: normal;
}

.customTooltip .introjs-button {
  text-shadow: none;
  border-radius: 22px;
  margin: 5px 8px 8px 8px;
  width: fit-content;
  background-color: #808080 !important;
  display: flex !important;
  align-items: center !important;
  color: white !important;
  padding: 6px 20px 6px 10px;
  border: 0px;
}

.customTooltip .introjs-button:focus {
  -webkit-box-shadow: 0 0 0 0rem rgba(158, 158, 158, .5);
  box-shadow: 0 0 0 0rem rgba(158, 158, 158, .5);
  border: 0px;
  background-color: #808080 !important;
}

.customTooltip .introjs-disabled {
  color: black !important;
  border: 0px;
  opacity: .65;
}

.customTooltip .introjs-disabled:focus {
  -webkit-box-shadow: 0 0 0 0rem rgba(158, 158, 158, .5);
  box-shadow: 0 0 0 0rem rgba(158, 158, 158, .5);
  border: 0px;
}

.promotion-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.promotion-content {
  background: white;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  min-width: 300px;
}

.dialog-header {
  background:#9e9e9e;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  border-radius: 8px 8px 0 0;
}

.dialog-header h3 {
  margin: 0;
  font-size: 16px;
  color: #ffffff;
  font-weight: 500;
  font-family: "Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif;
  }

  .promotion-pieces {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px;
    padding: 10px;
  }
  
  .piece {
    font-size: 96px;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
  }
  
  .piece:hover {
    background: #eee;
  }

  .tutMedia {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 20px;
  width: 250px;
  height: 250px;
}

.pawn_tutorial {
  background-image: url(../img/gifs/pawn_tutorial.gif);
}

.knight_tutorial {
  background-image: url(../img/gifs/knight_tutorial.gif);
}
.rook_tutorial {
  background-image: url(../img/gifs/rook_tutorial.gif);
}

.bishop_tutorial {
  background-image: url(../img/gifs/bishop_tutorial.gif);
}
.queen_tutorial {
  background-image: url(../img/gifs/queen_tutorial.gif);
}
.king_tutorial {
  background-image: url(../img/gifs/king_tutorial.gif);
}