::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  cursor: pointer;
  background: #000;
}

* {
  font: 16px arial, helvetica, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  color: #373737;
  background: rgb(255, 255, 255);
  background: rgba(255, 255, 255, 0.3);
  background: transparent;
}

body {
  font-size: 14px;
  overflow-x: hidden;
  width: 100vw;
  min-height: 100vh;
}

h1,
h2 {
  line-height: inherit;
  text-transform: capitalize;
}

h1 {
  color: #070707;
  font-size: 1.5em;
  line-height: 1.5em;
}

h2 {
  color: #171717;
  font-size: 1.8em;
}

h3 {
  font-size: 0.8em;
  line-height: 1.4;
  color: #272727;
}

html {
  -webkit-font-smoothing: antialiased;
}

img {
  width: 100%;
  vertical-align: middle;
}

table {
  table-layout: fixed;
  border-collapse: collapse;
}

td {
  padding: 8px;
}

section {
  padding: 0;
}

.status {
  margin: 16px;
  flex-wrap: wrap;
}

.boards-wrapper {
  margin: 0.8em auto;
  max-width: 960px;
  flex-wrap: wrap;
}

.notification {
  background: #f8f8f8;
  padding: 0.5em;
  min-width: 360px;
}

.table-container {
  margin: 16px;
  min-height: 340px;
  min-width: 340px;
  max-width: 50%;
}

.table {
  margin: 0;
  cursor: default;
  display: inline-block;
}

.cell {
  border: 1px solid #b4b4ff;
  padding: 0;
  height: 2em;
  width: 2em;
  position: relative;
}

.cell.attacked::before,
.cell.missed::before {
  content: '';
  top: 0;
  left: 0;
  width: 2em;
  height: 2em;
  position: absolute;
}

.cell.attacked::before {
  z-index: 2;
  background-image: radial-gradient(
    circle,
    #fff,
    #f0dcfa,
    #f4b3e5,
    #fd85bb,
    #ff517f,
    #ff375f,
    #ff1a3a,
    #f00,
    #f00,
    #f00,
    #f00,
    #f00
  );
  opacity: 0.7;
}

.cell.missed::before {
  background-image: radial-gradient(
    circle,
    #fff,
    #cacaca,
    #979797,
    #676767,
    #3b3b3b,
    #3b3b3b,
    #3b3b3b,
    #3b3b3b,
    #676767,
    #979797,
    #cacaca,
    #fff
  );
}

.ships {
  margin: 16px;
  max-width: 50%;
}

.ships .info {
  padding-bottom: 16px;
}

.ship {
  height: 2em;
  border: 2px solid #00f;
  background: rgba(0, 0, 255, 0.05);
  background-size: cover;
  cursor: move;
  position: absolute;
  box-sizing: content-box;
  top: 0;
  left: 0;
  margin: -2px;
  z-index: 1;
}

.ship.error {
  border-color: rgb(200, 0, 0);
}

.port {
  height: 2em;
  border: 1px dotted #b2b2b9;
  position: relative;
  box-sizing: content-box;
}

.ship-group .port {
  margin: 8px;
}

.carrier,
.carrier-port {
  width: 10em;
}

.battleship,
.battleship-port {
  width: 8em;
}

.cruiser,
.cruiser-port {
  width: 6em;
}

.submarine,
.submarine-port {
  width: 6em;
}

.destroyer,
.destroyer-port {
  width: 4em;
}

.destroyer {
  background-image: url(../image/destroyer.svg);
}

.rotate.ship {
  width: 2em;
}

.carrier {
  background-image: url(../image/carrier.svg);
}

.carrier.rotate {
  height: 10em;
  background-image: url(../image/carrier_rotate.svg);
}

.battleship {
  background-image: url(../image/battleship.svg);
}

.battleship.rotate {
  height: 8em;
  background-image: url(../image/battleship_rotate.svg);
}

.cruiser {
  background-image: url(../image/cruiser.svg);
}

.cruiser.rotate {
  height: 6em;
  background-image: url(../image/cruiser_rotate.svg);
}

.submarine {
  background-image: url(../image/submarine.svg);
}

.submarine.rotate {
  height: 6em;
  background-image: url(../image/submarine_rotate.svg);
}

.destroyer.rotate {
  height: 4em;
  background-image: url(../image/destroyer_rotate.svg);
}

.control-panel {
  margin: 8px 2px;
  flex-wrap: wrap;
}

.button {
  margin: 2px 4px;
  cursor: pointer;
  border: none;
  background: none;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 1px 5px 0 rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: box-shadow;
  padding: 8px 8px;
  font-size: 0.9em;
  border-radius: 4px;
}

.button:hover {
  box-shadow: 0 4px 0 -2px rgba(0, 0, 0, 0.2), 0 3px 2px 0 rgba(0, 0, 0, 0.14),
    0 2px 3px 0 rgba(0, 0, 0, 0.12);
  background-color: rgb(200, 200, 200);
  background-color: rgba(200, 200, 200, 0.3);
}

.button[disabled],
.button[disabled]:hover {
  cursor: not-allowed;
  box-shadow: initial;
  background-color: rgba(0, 0, 250, 0.3);
  background-color: rgb(250, 250, 250);
}

.input.computer {
  background-color: rgba(255, 255, 255);
  background-color: rgba(255, 255, 255, 0.8);
}

.choice {
  margin: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice span {
  margin: 2px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: 0.3s;
  transition: 0.3s;
  border-radius: 40%;
}

.slider::before {
  position: absolute;
  content: '';
  height: 8px;
  width: 8px;
  border-radius: 50%;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: 0.3s;
  transition: 0.3s;
}

input:checked + .slider {
  background-color: #2196f3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

#no,
#yes {
  color: red;
}

input:checked + .slider::before {
  -webkit-transform: translateX(8px);
  -ms-transform: translateX(8px);
  transform: translateX(12px);
}

/* Modal */

.pop-up {
  display: none;
  flex-direction: column;
  position: fixed;
  z-index: 3;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

.pop-up.show {
  display: flex;
  padding: 1em;
  animation: 0.4s ease-in popupshow;
}

.game-info {
  background-color: #eee;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 1px 5px 0 rgba(0, 0, 0, 0.12);
  padding: 1em;
  border: 1px solid rgba(255, 255, 255, 85);
  border-radius: 4px;
  margin: 2% auto;
  justify-self: center;
  width: 100%;
  max-width: 480px;
  max-height: max-content;
  position: relative;
  animation: 0.4s ease-in popupformshow;
  line-height: 1.7;
}

@keyframes popupformshow {
  0% {
    top: -300px;
    opacity: 0;
  }

  50% {
    top: -150px;
    opacity: 0.5;
  }

  80% {
    top: 10px;
    opacity: 1;
  }

  100% {
    top: 0;
    opacity: 1;
  }
}

.game-info .button {
  width: 80%;
  font-size: 1.2em;
  padding: 8px;
  background-color: #fff;
}

.game-info .button:hover {
  background-color: #f05;
}

.close {
  color: #aaa;
  position: absolute;
  margin: 0;
  top: 8px;
  right: 8px;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.game-info .heading {
  text-align: center;
}

.game-info .text {
  margin: 8px 2px;
  line-height: 1.7;
}

.game-info .text.link,
.game-info .text.link a {
  margin: 16px 2px;
  line-height: 1.7;
  font-weight: bold;
  text-decoration: none;
}

strong {
  font-weight: bold;
  color: #f55;
}

.demo {
  width: 8em;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.info-table {
  background-color: #fff;
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  border: 2px solid purple;
}

.info-table caption {
  padding: 8px;
  font-style: italic;
  color: #666;
  text-align: center;
  letter-spacing: 1px;
}

.info-table thead .number {
  width: 15%;
}

.info-table thead .name {
  width: 35%;
}

.info-table thead .image {
  width: 35%;
}

.info-table thead .size {
  width: 15%;
}

.info-table th,
.info-table td {
  padding: 0.2em;
  letter-spacing: 0.1em;
}

@media (min-width: 420px) {
  .info-table th,
  .info-table td {
    padding: 1em;
  }
}

.info-table tbody td {
  text-align: center;
}

.info-table thead th {
  border: 2px solid purple;
}

.info-table thead th:first-of-type {
  border-left: none;
}

.info-table thead th:last-of-type {
  border-right: none;
}

.info-table tbody tr:nth-child(odd) {
  background-color: #f2f2f2;
  border-bottom: 2px solid #020202;
}

.info-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
  border-bottom: 2px solid #090909;
}

.info-table tbody tr:last-of-type {
  border: none;
}

.info-table tbody tr td:nth-child(3) {
  background-color: #fff;
}
