body {
  line-height: 1.5;
  color: #333;
  font-size: 1.125em;
  font-family: sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0.5em 0;
  color: black;
}

h1 {
  font-size: 2.5em;
}

h2 {
  font-size: 2.0em;
}

h3 {
  font-size: 1.5em;
}

h4 {
  font-size: 1.3em;
}

h5 {
  font-size: 1.2em;
}

h6 {
  font-size: 1.1em;
}

@media (min-width: 480px) and (min-height: 300px) {

  html {
    font-size: 15px;
  }

}

@media (min-width: 640px) and (min-height: 400px) {

  html {
    font-size: 20px;
  }

}

@media (min-width: 800px) and (min-height: 500px) {

  html {
    font-size: 25px;
  }

}

@media (min-width: 960px) and (min-height: 600px) {

  html {
    font-size: 30px;
  }

}

@media (min-width: 1120px) and (min-height: 700px) {

  html {
    font-size: 35px;
  }

}

@media (min-width: 1280px) and (min-height: 800px) {

  html {
    font-size: 40px;
  }

}

@media (min-width: 1600px) and (min-height: 1000px) {

  html {
    font-size: 50px;
  }

}

@media (min-width: 2400px) and (min-height: 1500px) {

  html {
    font-size: 75px;
  }

}

@keyframes explode {

0% {
    left: 0.0rem;
    top: 0.0rem;
    height: 1rem;
    width: 1rem;
    opacity: 1;
  }
  
100% {
    left: -2.0rem;
    top: -2.0rem;
    height: 5rem;
    width: 5rem;
    opacity: 0;
  }

}

@-webkit-keyframes explode {

0% {
    left: 0.0rem;
    top: 0.0rem;
    height: 1rem;
    width: 1rem;
    opacity: 1;
  }
  
100% {
    left: -2.0rem;
    top: -2.0rem;
    height: 5rem;
    width: 5rem;
    opacity: 0;
  }

}

#app {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  position: absolute;
}

#app a {
  text-decoration: none;
  color: #09f;
}

#app a:hover {
  text-decoration: underline;
}

#main {
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: column;
  display: flex;
  witdh: 100%;
  height: 100%;
}

#content {
  padding: 0 0.3em;
}

#info {
  font-size: 0.7em;
  width: 100%;
}

#info #time {
  margin-right: 0.15em;
  float: right;
}

#info #mark-count {
  float: left;
  margin-left: 0.15em;
}

#info #smiley {
  margin-right: auto;
  margin-left: auto;
  width: 1.2rem;
  height: 1.2rem;
}

#info #smiley.play {
  background-position: 0.04999999999999993rem 0.04999999999999993rem;
  background-size: 1.1rem 1.1rem;
  background-repeat: no-repeat;
  background-image: url(../img/smiley_play.png);
}

#info #smiley.success {
  background-position: 0.04999999999999993rem 0.04999999999999993rem;
  background-size: 1.1rem 1.1rem;
  background-repeat: no-repeat;
  background-image: url(../img/smiley_success.png);
}

#info #smiley.failure {
  background-position: 0.04999999999999993rem 0.04999999999999993rem;
  background-size: 1.1rem 1.1rem;
  background-repeat: no-repeat;
  background-image: url(../img/smiley_failure.png);
}

#board {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  box-shadow: -0.05rem -0.05rem 0.05rem 0 hsla(0, 0%, 0%, 0.4) inset, calc(1px + 0.05rem) calc(1px + 0.05rem) calc(1px + 0.05rem) 0 hsla(0, 0%, 100%, 0.8) inset;
  background-color: #ddd;
  padding: 0.35rem;
  vertical-align: middle;
}

#board #table {
  display: table;
  border-collapse: collapse;
}

#board #table .row {
  display: table-row;
}

#board #table .cell {
  border: 1px solid rgba(0,0,0,0.05);
  height: 1rem;
  width: 1rem;
  position: relative;
  display: table-cell;
}

#board #table.active .tile.hidden, #board #table.active .tile.mark {
  cursor: pointer;
}

#board #table.active .tile.hidden:hover, #board #table.active .tile.mark:hover {
  background-color: #e5e5e5;
}

#board #table.active .tile.hidden:active, #board #table.active .tile.mark:active {
  box-shadow: -0.05rem -0.05rem 0.05rem 0 hsla(0, 0%, 100%, 0.8) inset, calc(1px + 0.05rem) calc(1px + 0.05rem) calc(1px + 0.05rem) 0 hsla(0, 0%, 0%, 0.4) inset;
}

.tile {
  min-width: 1rem;
  line-height: 1rem;
  width: 1rem;
  max-width: 1rem;
  height: 1rem;
  vertical-align: middle;
  text-align: center;
  position: absolute;
  min-height: 1rem;
  font-weight: bold;
  font-size: 0.75rem;
  max-height: 1rem;
}

.tile.hidden, .tile.mark, .tile.bad-mark {
  box-shadow: -0.05rem -0.05rem 0.05rem 0 hsla(0, 0%, 0%, 0.4) inset, calc(1px + 0.05rem) calc(1px + 0.05rem) calc(1px + 0.05rem) 0 hsla(0, 0%, 100%, 0.8) inset;
}

.tile.mark, .tile.bad-mark {
  background-position: 0.2rem 0.2rem;
  background-size: 0.6rem 0.6rem;
  background-repeat: no-repeat;
  background-image: url(../img/flag.png);
  color: #383;
  font-size: 0.9rem;
}

.tile.bad-mark {
  font-weight: normal;
  font-size: 1rem;
  cursor: default;
  color: #c33;
}

.tile.boom img {
  left: -0.6000000000000001rem;
  top: -0.6000000000000001rem;
  height: 2.2rem;
  width: 2.2rem;
  position: absolute;
  z-index: 1;
}

.tile.boom img.explosion {
  animation: explode 0.4s;
  -webkit-animation: explode 0.4s;
  opacity: 0;
}

.tile.hidden-mine {
  background-position: 0.2rem 0.2rem;
  background-size: 0.6rem 0.6rem;
  background-repeat: no-repeat;
  background-image: url(../img/mine.png);
}

.tile.number {
  cursor: default;
}

.tile.nr0 {
  color: #ddd;
}

.tile.nr1 {
  color: #1d1dc9;
}

.tile.nr2 {
  color: #1dc91d;
}

.tile.nr3 {
  color: #c91d1d;
}

.tile.nr4 {
  color: #1d9ec9;
}

.tile.nr5 {
  color: #8a4928;
}

.tile.nr6 {
  color: #72288a;
}

.tile.nr7 {
  color: #288a59;
}

.tile.nr8 {
  color: #8a8a28;
}

.new-game-row {
  text-align: center;
}

.new-game-row.hide {
  visibility: hidden;
}

.button {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: pointer;
  font-size: 0.7em;
  margin-top: 1em;
  padding: 0.3em 1em;
  border-radius: 0.7em;
  border: 1px solid black;
  display: inline-block;
}

.button.hidden {
  visibility: hidden;
}

.button:hover {
  background: #e8e8ff;
}

#size-form {
  font-size: 16px;
  left: 0.3em;
  top: 0.3em;
  position: absolute;
}