@import url("https://fonts.googleapis.com/css?family=Alegreya:500,800&display=swap");

:root {
	--seaBlue: #69d6f4;
	--darkBlue: #1291a6;
	--orange: #ff6460;
	--gray: #cfe0e3;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	width: 100%;
}

body > * {
	flex-shrink: 0;
}

.wrapper {
	height: 100%;
	width: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.boats {
	display: flex;
	width: 100%;
	justify-content: space-between;
}

#homeShipOne {
	width: 10%;
	align-self: center;
	margin-bottom: -25px;
	-webkit-animation: mover 2s infinite alternate;
	animation: motion 2s infinite alternate;
	margin-top: 30px;
	margin-left: 250px;
}

#homeShipTwo {
	width: 10%;
	align-self: center;
	margin-bottom: -55px;
	-webkit-animation: mover 2s infinite alternate;
	animation: motion 2s infinite alternate;
	margin-top: 30px;
	margin-right: 220px;
}

@-webkit-keyframes motion {
	0% {
		transform: translateY(0);
	}
	100% {
		transform: translateY(-25px) rotate(0.1deg);
	}
}
@keyframes motion {
	0% {
		transform: translateY(0);
	}
	100% {
		transform: translateY(-5px) rotate(0.1deg);
	}
}

.waves {
	width: 100%;
	height: 5%;
	position: relative;
	overflow: hidden;
	z-index: 1;
	margin-bottom: -2px;
}
.wave {
	width: 200%;
	height: 100%;
	display: block;
	position: absolute;
	left: 0;
	bottom: 0;
	background-repeat: repeat-x;
	background-position: left bottom;
	-webkit-transform-origin: 0 100% 0;
	-ms-transform-origin: 0 100% 0;
	transform-origin: 0 100% 0;
	background-size: 350px 100%;

	-webkit-animation: move linear infinite;
	-moz-animation: move linear infinite;
	animation: move linear infinite;
}

#wave1 {
	background-image: url("./battleship-assets/wave1.svg");
	-webkit-animation-delay: -2s;
	-webkit-animation-duration: 12s;
	-moz-animation-delay: -2s;
	-moz-animation-duration: 12s;
	animation-delay: -2s;
	animation-duration: 12s;
}
#wave2 {
	background-image: url("./battleship-assets/wave2.svg");
	-webkit-animation-delay: -2s;
	-webkit-animation-duration: 5s;
	-moz-animation-delay: -2s;
	-moz-animation-duration: 5s;
	animation-delay: -2s;
	animation-duration: 5s;
}
#wave3 {
	background-image: url("./battleship-assets/wave3.svg");
	-webkit-animation-delay: -1s;
	-webkit-animation-duration: 3s;
	-moz-animation-delay: -1s;
	-moz-animation-duration: 3s;
	animation-delay: -1s;
	animation-duration: 3s;
}

@-webkit-keyframes move {
	0% {
		-webkit-transform: translate(-175px, 0px) scale(1, 1);
		transform: translate(-175px, 0px) scale(1, 1);
	}
	50% {
		-webkit-transform: translate(-87px, 0px) scale(1, 0.5);
		transform: translate(-87px, 0px) scale(1, 0.5);
	}
	100% {
		-webkit-transform: translate(0px, 0px) scale(1, 1);
		transform: translate(0px, 0px) scale(1, 1);
	}
}

@-moz-keyframes move {
	0% {
		-webkit-transform: translate(-175px, 0px) scale(1, 1);
		transform: translate(-175px, 0px) scale(1, 1);
	}
	50% {
		-webkit-transform: translate(-87px, 0px) scale(1, 0.5);
		transform: translate(-87px, 0px) scale(1, 0.5);
	}
	100% {
		-webkit-transform: translate(0px, 0px) scale(1, 1);
		transform: translate(0px, 0px) scale(1, 1);
	}
}

@keyframes move {
	0% {
		-webkit-transform: translate(-175px, 0px) scale(1, 1);
		transform: translate(-175px, 0px) scale(1, 1);
	}
	50% {
		-webkit-transform: translate(-87px, 0px) scale(1, 0.5);
		transform: translate(-87px, 0px) scale(1, 0.5);
	}
	100% {
		-webkit-transform: translate(0px, 0px) scale(1, 1);
		transform: translate(0px, 0px) scale(1, 1);
	}
}

.content {
	height: 100%;
	margin: -2px 0;
	position: relative;
	display: flex;

	align-items: center;
	background-color: var(--seaBlue);

	z-index: 2;
	flex-direction: column;
	justify-content: space-between;
}

.logo {
	font-family: "Alegreya", serif;
	color: white;
	text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
	font-size: 2.5em;
	margin-top: 25px;
}

.step {
	display: none;
}

.playerNameInput {
	margin-top: 15px;
	padding: 15px 10px;
	border-radius: 10px;
	width: 13em;
	border: 2px solid #1291a6;
	font-family: "Alegreya", serif;
	font-weight: 500;
	font-size: 18px;
}

.invalid {
	border: 2px solid #f85838;
}

form {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

input {
	transition: 0.2s ease-in-out;
}

input:focus {
	-webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25);
	-moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25);
	box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25);
	transition: 0.2s ease-in-out;
}

.btn {
	padding: 5px 20px;
	border: none;
	border-radius: 5px;
	font-family: "Alegreya", serif;
	font-weight: 800;
	font-size: 1.5em;
	background-color: #1291a6;
	color: white;
	margin-top: 20px;
	cursor: pointer;
	-webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25);
	-moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25);
	box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25);
	transition: 0.2s ease-in-out;
}

.btn:hover {
	-webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.5);
	-moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.5);
	box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.5);
	transition: 0.2s ease-in-out;
}

.orange {
	background-color: var(--orange) !important;
}

.footer {
	font-family: "Alegreya", serif;
	margin-bottom: 10px;
}

.footer a {
	text-decoration: none;
	color: black;
	font-weight: 800;
}

.selectArea {
	display: flex;
	flex-direction: column;
	width: 100%;
	background-color: var(--seaBlue);
	height: 100%;
}

.selectArea h1 {
	margin-left: 50px;
	margin-top: 20px;
}

.board {
	position: relative;
	display: grid;
	grid-template-columns: repeat(11, 50px);
	font-family: "Alegreya", serif;
	color: white;
	font-weight: 800;
	text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
	font-size: 1.5em;
}

.boardCell {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	/*background: #f6f8f9;*/
	background: white;
	border: 1px solid #ddd;
	width: 50px;
	height: 50px;
}

.unselectable {
	user-drag: none;
	user-select: none;
	-moz-user-select: none;
	-webkit-user-drag: none;
	-webkit-user-select: none;
	-ms-user-select: none;
}

.letter {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 50px;
	height: 50px;
}

.number {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 50px;
	height: 50px;
}

.boards {
	margin-top: 10px;
	margin-bottom: 25px;
	text-align: center;
	display: flex;
	justify-content: center;
	overflow: hidden;
}

.title {
	font-family: "Alegreya", serif;
	font-weight: 800;
	color: white;
	text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
	font-size: 2em;
	text-align: center;
}

.subTitle {
	color: white;
	font-size: 1em;
	text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.25);
	margin-top: 45px;
}

.selected {
	background: #6b9ac4;
	border: 1px solid #2b4162;
}

.nonDraggable {
	-webkit-user-drag: none;
	-khtml-user-drag: none;
	-moz-user-drag: none;
	-o-user-drag: none;
	user-drag: none;
}

.remaining {
	margin-left: 40px;
	font-family: "Alegreya", serif;
	font-size: 18px;
}

.remainingText {
	font-family: "Alegreya", serif;
	font-size: 18px;
	margin-top: 1em;
}

#remainingTable {
	margin-top: 10px;
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	overflow: hidden;
	text-align: center;
}

#remainingTable td,
#remainingTable th {
	padding: 10px;
}

#remainingTable td {
	border-left: 1px solid #ecf0f1;
	border-right: 1px solid #ecf0f1;
}

#remainingTable th {
	background-color: var(--orange);
	color: white;
	border: 2px solid var(--orange);
}

#remainingTable tr td {
	background-color: white;
	border: 2px solid var(--orange);
}
/*
#remainingTable tr:nth-of-type(even) td {
	background-color: #76def6;
}

#remainingTable tr:nth-of-type(odd) td {
	background-color: white;
}
*/
.center {
	align-self: center;
}

.unavailable {
	opacity: 0.7;
	pointer-events: none;
}

.inactive {
	opacity: 0.7;
}

.flexGapRight {
	margin-right: 50px;
}

.flexGapLeft {
	margin-left: 50px;
}

.destroyed {
	background-color: #ff4833;
}

.missed {
	opacity: 0.6;
}

#winScreen {
	display: none;
	position: fixed;
	z-index: 1;
	padding-top: 100px;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.winScreenContent {
	background-color: #fefefe;
	margin: auto;
	padding: 20px;
	border: 1px solid #888;
	width: 40%;
	border-radius: 10px;
	border: none;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.trophy {
	width: 50px;
}

.winTitle {
	display: flex;
	justify-content: center;
	align-items: center;
}

.winTitle h1 {
	margin: 0 20px;
	padding: 0;
	font-family: "Alegreya", serif;
	font-size: 36px;
}

.winScreenContent h2,
.winScreenContent h3 {
	margin-top: 30px;
	font-family: "Alegreya", serif;
	font-size: 46px;
}

.winScreenContent h3 {
	margin: 0;
	font-size: 36px;
}

.boardGroup {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
