:root {
  background: #22272e;
  color: white;
}

body {
  padding: 8px;
  /* font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; */
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
}

a {
  color: #00B7FF;
}

[data-route] {
  cursor: pointer;
}

.flex-center {
  display: flex;
  justify-content: space-around;
  text-align: center;
  flex-direction: column;
}

/* Tic Tac Toe */
table.tictactoe {
  border-collapse: collapse;
  margin: auto;
}

table.tictactoe td {
  width: min(20vw, 20vh);
  height: min(20vw, 20vh);
  border: 3px solid #666;
  background-repeat: no-repeat;
  background-size: cover;
}

table.tictactoe.active td.empty {
  cursor: pointer;
}

table.tictactoe.active td.empty:hover {
  background: rgba(255, 255, 255, 0.1);
}

table.tictactoe td.circle {
  background-image: url("/static/images/tictactoe/circle.svg");
}

table.tictactoe td.circle.win-row {
  background-color: rgba(232, 0, 36, 0.2);
}

table.tictactoe td.cross {
  background-image: url("/static/images/tictactoe/cross.svg");
}

table.tictactoe td.cross.win-row {
  background-color: rgba(0, 182, 255, 0.2);
}

#reversi #field {
  display: grid;
  grid-template-columns: auto auto auto auto auto auto auto auto;
  grid-template-rows: auto auto auto auto auto auto auto auto;
  width: min(70vh, 70vw);
  height: min(70vh, 70vw);
  grid-gap: min(.3vh, .3vw);
  background-color: #777;
  border: min(.3vh, .3vw) solid #777;
}

/* Reversi */
#reversi #status {
  height: 3em;
}

#reversi #field .cell {
  background-color: #666;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

#reversi #field.active .cell.empty {
  cursor: pointer;
}

#reversi #field .cell.white::before,
#reversi #field .cell.black::before,
#reversi #field.active .cell.empty:hover::before {
  position: absolute;
  top: min(1vw, 1vh);
  left: min(1vw, 1vh);
  right: min(1vw, 1vh);
  bottom: min(1vw, 1vh);
  content: "";
  display: inline-block;
  border-radius: 100%;
  border-style: solid;
  border-width: min(.3vh, .3vw);
}

#reversi #field .cell.white::before {
  background-color: #eee;
  border-color: #aaa;
}

#reversi #field .cell.black::before {
  background-color: #222;
  border-color: #111;
}

#reversi #field.active.aswhite .cell.empty:hover::before {
  background-color: #eeeeee40;
  border-color: #aaaaaa40;
}

#reversi #field.active.asblack .cell.empty:hover::before {
  background-color: #22222240;
  border-color: #11111140;
}

.gamelist {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 20vw, 250px), 1fr));
  grid-column-gap: 8px;
  grid-row-gap: 16px;
  padding: 0;
  max-width: 800px;
  margin: auto;
}

.image-card {
  border: 1px solid #666;
  border-radius: 8px;
  overflow: clip;
}

.image-card .card-image {
  background: #444;
  border-bottom: 1px solid #666;
  display: block;
  width: 100%;
}

.image-card .card-body {
  padding: 8px;
  font-size: 18px;
  color: #ddd;
  text-align: center;
}
