* {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  height: 100%;
  margin: 0;
  background: rgb(180, 141, 58);
  background: linear-gradient(
    135deg,
    rgba(180, 141, 58, 1) 0%,
    rgba(253, 29, 29, 1) 50%,
    rgba(252, 69, 191, 1) 100%
  );
  display: flex;
  flex-direction: column;
}

main {
  background-color: line;
  flex-grow: 1;
}

header {
  height: 10%;
  background: rgb(131, 58, 180);
  background: linear-gradient(
    90deg,
    rgba(131, 58, 180, 1) 0%,
    rgba(253, 29, 29, 1) 50%,
    rgba(252, 176, 69, 1) 100%
  );
  padding-bottom: 2em;
  padding-top: 0.2em;
}

footer {
  height: 5%;
  background: rgb(201, 146, 27);
  background: linear-gradient(
    90deg,
    rgba(201, 146, 27, 1) 0%,
    rgba(233, 154, 86, 1) 100%
  );
  padding-left: 1.5em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}

.limiter {
  width: 90%;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  height: 100%;
  max-width: 1800px;
  min-width: 500px;
  padding-left: 20px;
}

.controls {
  width: 80%;
  margin: 1em auto;
  display: flex;
  justify-content: center;
}

button {
  margin: 1em;
  width: 20%;
  height: 3em;
  margin-inline: 6em;
  border-radius: 0.3em;
  border: 1px solid black;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.fields {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.field {
  background-color: white;
  width: max(30vw, 400px);
  height: max(30vw, 400px);
  border: 2px solid black;
  margin: 1em;
  flex-grow: 0;
  flex-shrink: 0;
}

.infoText {
  background-color: white;
  width: 70%;
  height: 4em;
  border: 2px solid black;
  margin: 1em;
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  border-radius: 0.6em;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-align-last: center;
}

.cell {
  box-shadow: inset 0px 0px 0px 0.7px black;

  width: calc(10%);
  height: calc(10%);
  float: left;
  background-image: url("images/backgrounds.svg");
  background-size: 500% 400%;
}

.water {
  background-color: lightblue;
  background-position: -100% 0;
}

.left {
  background-color: lightblue;
  background-position: 0 -100%;
}

.horizontal {
  background-color: lightblue;
  background-position: -100% -100%;
}

.top {
  background-color: lightblue;
  background-position: -400% 0;
}

.bottom {
  background-color: lightblue;
  background-position: -400% -200%;
}

.vertical {
  background-color: lightblue;
  background-position: -400% -100%;
}

.right {
  background-color: lightblue;
  background-position: -200% -100%;
}

table,
th,
td {
  text-align: left;
  margin: 2em;
  font-size: 1.1em;
}

td {
  text-align: center;
}

.ship {
  height: 32px;
  width: 32px;
  background-image: url("images/backgrounds.svg");
  background-size: 500% 400%;
}

.battleshipDescription {
  text-align: left;
}

.h.battleship {
  background-position: 0 -200%;
}

.v.battleship {
  background-position: 0 -300%;
}

.h.cruiser {
  background-position: -100% -200%;
}

.v.cruiser {
  background-position: -100% -300%;
}

.h.destroyer {
  background-position: -200% -200%;
}

.v.destroyer {
  background-position: -200% -300%;
}

.h.submarine {
  background-position: -300% -200%;
}

.v.submarine {
  background-position: -300% -300%;
}

.loadingField {
  background-color: lightgray;
}
.loadingCell {
  background-image: none;
  background-color: rgb(255, 196, 0);
}

.shipHit {
  background-position: -200% 0%;
  background-color: rgb(179, 13, 14);
}

.waterHit {
  background-position: -100% 0%;
  background-color: rgb(107, 76, 245);
}

.shipSunk {
  background-position: -200% 0%;
  background-color: darkorange;
}

.selectable:hover {
  background-color: orange;
  cursor: pointer;
}

.usable {
  background-color: lightgreen;
}

.disabled {
  background-color: grey;
}

.outofstock {
  background-color: grey;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  text-align: center;
}
.dialog {
  justify-content: center;
  background-color: #fff;
  padding: 4vw;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.dialog-button {
  margin-top: 10vw;
  width: 80%;
  margin: auto;
}

h2 {
  margin-bottom: 2vw;
  font-size: 3em;
}
