body {
	margin: 0;
	padding: 0;
	background: grey;
	display: grid;
	font-size: 15px;
	font-family: "Tahoma", sans-serif;
	grid-template-columns: 20% 60% 20%;
	grid-template-rows: 0.5fr 2.75fr 0.5fr 0.5fr 0.5fr 1fr;
	grid-template-areas: "header header header"
						 "blue-team gameboard red-team"
						 "blue-team instructions red-team"
						 "blue-team hint red-team"
						 "spectators spectators spectators"
						 "chat chat chat";
}

body h3 {
	margin: 10px;
}

@media only screen and (max-width: 480px) {
	body {
		grid-template-columns: 100%;
		grid-template-rows: 100px 120px 40px minmax(110px, 1fr) 40px 60px 340px 60px 40px minmax(110px, 1fr) 40px 350px;
		grid-template-areas:"header"
							"spectators"
							"blue-spy"
							"blue-team"
							"blue-guesser"
							"instructions"
							"gameboard"
							"hint"
							"red-guesser"
							"red-team"
							"red-spy"
							"chat";
		font-size: 11px;
	}
}


.hide {
	display: none;
}

.btn:hover {
	background-color: white !important;
}

/* default color of cards */
#game-board .default {
	border: 4px solid black;
	background-color: lightgrey;
}

/* color of cards for guessers when clicked */
#game-board .red, #game-board .blue, #game-board .yellow { border: 4px solid black }

#game-board .red { background-color: #db3328 }
#game-board .blue { background-color: #1c64ff }
#game-board .yellow { background-color: #fff68f }
#game-board .black { background-color: black; border:2px solid grey }
#game-board .black p { color: grey }


/* color of cards for spymasters when clicked */
#game-board .red2, 
#game-board .blue2, 
#game-board .yellow2, 
#game-board .black2 { 
	background-color: white;
	text-decoration: line-through;
}

#game-board .red2 { border: 10px solid #db3328 }
#game-board .blue2 { border: 10px solid #1c64ff }
#game-board .yellow2 { border: 10px solid #fff68f }
#game-board .black2 { 
	border: 10px solid rgb(65, 65, 65); 
	color: white;
	background: black;
}

/* Header Styles 
--------------------------------------------*/
header {
	grid-area: header;
	background-color: lightgrey;
	text-align: center;
	border-bottom: 5px solid black;
	padding-top: 15px;
}
header h1 {
	display: inline;
	margin: 0;
	font-size: 36px;
}
@media only screen and (max-width: 480px) {
	header h1 { font-size: 20px; display: block }
}

#start-game, #restart-game {
	margin: 0 5px;
	padding: 10px;
	width: 200px;
	border-radius: 10px;
	position: relative;
	top: -8px;
	font-size: 24px;
}
@media only screen and (max-width: 480px) {
	#start-game, #restart-game { 
		width: 120px; 
		font-size: 12px;
		top: 8px; 
	}
}

#start-game {
	background-color: grey;
	color: black;
	border: 3px solid black;
}

#restart-game {
	background-color: black;
	color: grey;
	border: 3px solid grey;
}

#blue-score, #red-score {
	text-align: center;
}
@media only screen and (max-width: 480px) {
	#blue-score, #red-score {
		margin-right: 15px;
	}
}

#blue-score h4, #red-score h4 {
	display: inline-block;
	padding: 7px 17px;
	border: 2px solid black;
	border-radius: 10px;
	margin: 0;
}

#blue-score h4 {
	background-color: lightblue;
	color: #1c64ff;
}

#red-score h4 {
	background-color:pink;
	color:#db3328;
}

/* Gameboard 
--------------------------------------------*/
#game-board {
	grid-area: gameboard;
	background-color: black;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
	grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
}
@media only screen and (max-width: 480px) {
	#game-board {
		border: 5px solid black;
	}
}

.card {
	border: 4px solid black;
	border-radius: 10px;
	background-color: lightgrey;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: -webkit-transform 1s;
}
.card:hover {
	cursor:pointer;
}

.rotate {
	transform: rotateY(360deg);
}

@media only screen and (max-width: 480px) {
	.card { max-width: 85px }
}

/* Blue Team
--------------------------------------------*/
#blue-team {
	grid-area: blue-team;
	background-color: #1c64ff;
	text-align: center;
	border-right: 5px solid black;
	color: lightblue;
	overflow-wrap: break-word;
}

#blue-spy {
	border: 2px solid grey;
	padding: 10px;
	color: grey;
	background-color: lightblue;
}

#blue-spy-message, #blue-guesser {
	text-align: center;
	border: 3px solid black;
	background-color: lightblue;
	display: flex;
	align-items: center;
	justify-content: center;
}

#blue-spy-message {
	color: blue;
	grid-column: 1/2;
	grid-row: 4/5;
}
@media only screen and (max-width: 480px) {
	#blue-spy-message {
		grid-area: blue-spy;
	}
}

#blue-guesser {
	color: grey;
	grid-column: 1/2;
	grid-row: 3/4;
}
@media only screen and (max-width: 480px) {
	#blue-guesser {
		grid-area: blue-guesser;
	}
}

#blue-spy-message span { color: black }
#blue-guess-name, #blue-guess-word { color: blue }

@media only screen and (max-width: 480px) {
	#blue-team h1 { display: inline-block }
	#blue-spy { margin-left: 10px } 

	#blue-players { text-align: left }
	#blue-players h3 { margin: 5px 10px; display: inline-block; }
}
/* Red Team
--------------------------------------------*/
#red-team {
	grid-area: red-team;
	background-color: #db3328;
	text-align: center;
	border-left: 5px solid black;
	color: pink;
	overflow-wrap: break-word;
}
@media only screen and (max-width: 480px) {
	#red-team h1 { display: inline-block }
	#red-spy { margin-left: 10px } 
}

#red-spy {
	border: 2px solid grey;
	padding: 10px;
	color: grey;
	background-color: pink;
}

#red-spy-message, #red-guesser {
	text-align: center;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: pink;
	border: 3px solid black;
}

#red-spy-message {
	color: red;
	grid-column: 3/4;
	grid-row: 4/5;
}
@media only screen and (max-width: 480px) {
	#red-spy-message {
		grid-area: red-spy;
	}
}

#red-guesser {
	color: grey;
	grid-column: 3/4;
	grid-row: 3/4;
}
@media only screen and (max-width: 480px) {
	#red-guesser {
		grid-area: red-guesser;
	}
}

#red-spy-message span { color: black }
#red-guess-name, #red-guess-word { color: red }

@media only screen and (max-width: 480px) {
	#red-team h1 { display: inline-block }
	#red-spy { margin-left: 10px } 

	#red-players { text-align: left }
	#red-players h3 { margin: 5px 10px; display: inline-block; }
}

/* Spectators 
--------------------------------------------*/
#spectators {
	grid-area: spectators;
	background-color: green;
	text-align: center;
	padding-bottom: 15px;
}
#spectators li { display: inline-block }

#red-join-btn, #blue-join-btn {
	border: 2px solid black;
	padding: 10px;
	border-radius: 10px;
	width: 130px;
}
#red-join-btn {
	color: red;
	background-color: pink;
	float: right;
}
#blue-join-btn {
	color: blue;	
	background-color: lightblue;
	float: left;
}

#name-input {
	height: 30px;
	padding-left: 5px;
}

#name-btn {
	border: 2px solid black;
	padding: 10px;
	color: green;
}

#players h3 {
	display: inline;
	color: white;
}

/* Instructions 
--------------------------------------------*/ 
#instructions {
	grid-area: instructions;
	background-color: orange;
	border: 2px solid black;
	text-align: center;
	padding: 0 20px;
}

.blue-word { color: #1c64ff }
.red-word{ color: #db3328 }

/* Chat
--------------------------------------------*/
#chat {
	grid-area: chat;
	display: flex;
	background: white;
	position: relative;
	width: 100%;
	overflow: hidden;
}

.chatbox {
	flex-basis: 50%;
	display: flex;
	flex-direction: column;
	max-height: 160px;
	border: 5px solid black;
	border-radius: 10px;
}

.message-box {
	overflow-y: scroll;
	height: 140px;
	max-height: 160px;
	padding: 10px;
}

#input-box textarea, #team-input-box textarea {
	box-sizing: border-box;
	width: 100%;
	border-radius: 2px 2px 0 0;
	background-color: rgb(233, 233, 233);
}
#input-box, #team-input-box { width: 100% }

.team-chat-blue, .team-chat-red { border-radius: 10px }
.team-chat-blue { border: 5px solid #1c64ff }
.team-chat-red { border: 5px solid #db3328 }

.chat-message {
	padding-top: 0;
	margin: 0 0 2px 0;
}
.highlight-chatter { color:green }

@media only screen and (max-width: 480px) {
	#chat {
		flex-direction: column;
	}
}

/* Hints
--------------------------------------------*/
#hint {
	grid-area: hint;
	border: 2px solid black;
	background-color: #fff68f;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0 20px;
}

#input-hint {
	padding: 10px;
	border: 2px solid black;
	border-radius: 10px;
	width: 100px;
}
#hint-btn {
	color: purple;
	padding: 10px;
	border: 2px solid black;
	border-radius: 10px;
}
#hint-word, #hint-number { color: grey }

/* dropdown menu with browser support*/
body select { 
	display: inline-block; 
	padding: 10px 30px 10px 13px !important;
	margin-bottom:10px;
	height: auto !important; 
	border: 2px solid black; 
	border-radius: 10px; 
	background: url("download.png") right center no-repeat; 
	background-size: 15px;
	background-color: #fff; 
	color: purple; 
	font-size: 12px; 
	line-height: 16px !important; 
	appearance: none; 
	-webkit-appearance: none; 
	-moz-appearance: none; 
} 
 
body select option { padding: 0 4px } 
select::-ms-expand { display: none } 
select:disabled::-ms-expand { background: #f60 }

@media only screen and (max-width: 480px) {
	#hint-input-container {
		margin-top: 10px;
	}
}
