@media (min-width: 1200px) {
    body {
        max-width: 400px;
    }
}

@media (max-width: 1200px) {
    body {
        max-width: 400px;
        -webkit-text-size-adjust: 100%;
    }
}

@media (hover: hover) {
  .cell:hover {
      background-color: cornflowerblue;
  }

  .button:hover {
      background-color: cornflowerblue;
  }
}

#content {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
}

body {
    font-family: arial;
    color: #333;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    min-width: 40px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background-color: #f8f8f8
}

.game {
    text-align: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.game table {
    width: 90%;
}

.cell {
    min-width: 20px;
    aspect-ratio: 1/1;
    border: 1px;
    border-style: solid;
    position: relative;
    border-radius: 5px;
}

.cell-unselected {
    background-color: white;
}

.cell-selected {
    background-color: black;
}

.cell-flagged {
    background-color: white;
}

.cell-flagged:before {
    position: absolute;
    content: "";
    left: 0;
    top: 50%;
    right: 0;
    border-top: 1px solid;
    border-color: red;

    -webkit-transform:rotate(-45deg);
    -moz-transform:rotate(-45deg);
    -ms-transform:rotate(-45deg);
    -o-transform:rotate(-45deg);
    transform:rotate(-45deg);
}

.button {
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    -webkit-user-select: none;
    display: inline-block;
    position: relative;
    width: fit-content;
    padding: 10px 15px;
    margin: 10px 10px;
    border-radius: 40px;
    border: 1px;
    border-style: solid;
}
.button:active {
    background-color: black;
}

.shake {
    animation: shake 0.25s;
    animation-iteration-count: 1;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.win {
    animation: win 0.5s;
    animation-iteration-count: 4;
}

@keyframes win {
    0%   {}
    50% {background-color: white;}
    100% {background-color: black;}
}

.overlay-settings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 20px;
    text-align: justify;
}

.overlay-settings input, select {
    margin-left: auto;
    margin-right: auto;
}

.overlay {
  height: 100%;
  width: 0;
  max-width: 400px;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #f8f8f8;
  overflow-x: hidden;
  transition: 0.5s;
}

.overlay-content {
  position: relative;
  top: 40px;
  width: 90%;
  text-align: center;
  margin: auto;
}

.overlay .open, .overlay .closebtn {
  padding: 8px;
  text-decoration: none;
  font-size: 36px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.overlay .open:hover, .overlay .open:focus {
  color: #f1f1f1;
}

.overlay .closebtn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 50px;
}

@media screen and (max-height: 450px) {
  .overlay a {font-size: 20px}
  .overlay .closebtn {
      font-size: 30px;
      top: 15px;
      right: 15px;
  }
}

.footer {
    font-size: smaller;
    text-align: center;
    margin-top: 50px;
}

.feed-icon {
    width: 14px;
    height: 14px;
    display: inline;
    vertical-align: middle;
    margin: -2px 4px 0 0;
}