* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  font-family:  monospace;
  padding: 0;
  margin: 0;
  background: #1C3003;
  color: #B0E562;
}

button {
  font-family:  monospace;
  background: transparent;
  color: #B0E562;
}

h3 {
  font-size: 24px;
  font-weight: normal;
  margin: 0;
  line-height: 48px;
}

#body-wrapper {
  max-width: 320px;
  margin: 0 auto;
}

.board {
  height: 100%;
  width: 100%;
  border: 1px solid rgba(175, 228, 90, 0.3);
  border-width: 0 0 1px 1px;
}

.board div.square {
  float: left;
  width: 10%;
  height: 10%;
  text-align: center;
  font-family: monospace;
  line-height: 230%;
  overflow: hidden;
  box-shadow:0 0 10px rgba(175, 228, 90, 0.2);
  border: 1px solid rgba(175, 228, 90, 0.3);
  border-width: 1px 1px 0 0;
  background-repeat: no-repeat;
}

#controls {
  width: 100%;
  display: -moz-box;
  display: -webkit-box;
}

#controls button {
  display: none;
  -moz-box-flex: 1;
  -webkit-box-flex: 1;
  padding: 5px;
  border: 0;
  font-size: 16px;
}

#vignette {
  position: absolute;
  height: 100%;
  width: 100%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}

.destroyer { background-image: url(img/destroyer.png); }
.sub { background-image: url(img/sub.png); }
.battleship { background-image: url(img/battleship.png); }
.carrier { background-image: url(img/carrier.png); }
.patrol { background-image: url(img/patrol.png); }

.ship {
  position: absolute;
  background-repeat: no-repeat;
  pointer-events: none;
}

.choosing-positions .ship {
  opacity: 0.5;
}

.choosing-positions .ship.selected {
  opacity: 1;
}

.vertical {
  transform-origin: 0 0;
  transform: rotate(90deg);
  -webkit-transform: rotate(90deg);
  -webkit-transform-origin: 0 0;
}

.hit {
  background-image: url(img/hit.png);
  background-size: 100%;
}

.miss {
  background-image: url(img/miss.png);
  opacity: 0.7;
  background-size: 100%;
}

#board-mine, #board-opponent {
  display: none;
}

.choosing-positions #rotate-ship,
.choosing-positions #random-positions,
.choosing-positions #start-game  {
  display: block;
}

.player1-turn #restart-game, .player2-turn #restart-game {
  display: block;
}

.player-won #new-game, .player-lost #new-game {
  display: block;
}

#game-status {
  text-align: center;
}

#board-view {
  display: -moz-box;
  display: -webkit-box;
  width: 100%;
}

#board-view button {
  display: block;
  -moz-box-flex: 1;       /* Mozilla */
  -webkit-box-flex: 1;    /* WebKit */
  padding: 5px;
  border: 0;
  opacity: 0.5;
  font-size: 16px;
}

#board-view button.selected {
  opacity: 1;
}

#present {
  display: none;
  position: absolute;
  top: 50px;
  left: 50px;
  background: url(img/missile.svg);
  background-size: 100%;
  background-position: center center;
  height: 24px;
  width: 24px;
  z-index: 500;
  transition: all 0.5s ease-in;
  -webkit-transition: all 0.5s ease-in;
}

#battleships {
  position: relative;
  overflow: hidden;
}

#lineytheline {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1px;
  box-shadow: 0 0 25px 5px rgba(175, 228, 90, 0.2);
  border-top: 1px solid rgba(175, 228, 90, 0.6);
  animation: lineygoroundround 4s infinite linear;
  transform-origin: 0% 0%;
  -webkit-animation: lineygoroundround 4s infinite linear;
  -webkit-transform-origin: 0% 0%;
}

@keyframes lineygoroundround {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@-webkit-keyframes lineygoroundround {
  0%   { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

