body {
	background-color: #121213;
	font-family: Arial;
}

#scottle-play-area {
	display: flex;
	flex-direction: column;
	width: 330px;
	gap: 5px;
	margin: 0 auto;
	padding-top: 100px;
}

#scottle-message-area {
	position: absolute;
	top: 30px;
	left: 0;
  	right: 0;
	text-align: center;
}

#scottle-message-area .message {
	display: inline;
	background-color: #FFF;
	border-radius: 4px;
	color: #000;
	padding: 5px 10px;
	font-size: 22px;
	font-weight: bold;
}

#scottle-play-area .row {
	display: flex;
	flex-direction: row;
	gap: 5px;
}

#scottle-play-area .row.illegal-word {
	animation: shake-horizontal 0.5s ease-in-out 1;
}

#scottle-play-area .row .letter {
	border: 2px solid #3a3a3c;
	width: 62px;
	height: 62px;
	color: #FFF;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 34px;
	font-weight: bold;

	transition: transform 0.4s;
}

#scottle-play-area .row .letter.start-animation {
	transform: rotateX(90deg);
}

#scottle-play-area .row .letter.finish-animation {
	transform: rotateX(0deg);
}

#scottle-play-area .row .letter.has-letter {
	border-color: #565758;
  	animation: grow-pulse 0.1s ease-in-out 1;
}

#scottle-play-area .row .letter.evaluated {
	background-color: #3a3a3c;
	border-color: #3a3a3c;
}

#scottle-play-area .row .letter.correct-letter {
	background-color: #538d4e;
	border-color: #538d4e;
}

#scottle-play-area .row .letter.wrong-spot-letter {
	background-color: #b59f3b;
	border-color: #b59f3b;
}

#scottle-play-area .row .letter.winner {
	animation: up-down .3s ease-in-out 1;
}

#scottle-keyboard {
	max-width: 500px;
	margin: 30px auto 0;
	padding: 0 8px 8px;
	user-select: none;
}

#scottle-keyboard .row {
	display: flex;
	gap: 6px;
	margin-bottom: 8px;
	touch-action: manipulation;
}

#scottle-keyboard .spacer {
	flex: 0.5;
}

#scottle-keyboard .key {
	flex: 1;
	height: 58px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background-color: #818384;
	color: #FFF;
	font-family: inherit;
	font-size: 20px;
	font-weight: bold;
	text-transform: uppercase;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

#scottle-keyboard .key.wide {
	flex: 1.5;
	font-size: 12px;
}

#scottle-keyboard .key.evaluated {
	background-color: #3a3a3c;
}

#scottle-keyboard .key.wrong-spot-letter {
	background-color: #b59f3b;
}

#scottle-keyboard .key.correct-letter {
	background-color: #538d4e;
}

/* Shrink the board on short screens so the keyboard fits */
@media (max-height: 800px) {
	#scottle-play-area {
		width: 290px;
		padding-top: 80px;
	}

	#scottle-play-area .row .letter {
		width: 52px;
		height: 52px;
		font-size: 28px;
	}

	#scottle-keyboard {
		margin-top: 20px;
	}
}

@media (max-height: 680px) {
	#scottle-message-area {
		top: 15px;
	}

	#scottle-play-area {
		width: 250px;
		padding-top: 60px;
	}

	#scottle-play-area .row .letter {
		width: 44px;
		height: 44px;
		font-size: 24px;
	}

	#scottle-keyboard .key {
		height: 50px;
	}
}

@media (max-height: 600px) {
	#scottle-play-area {
		width: 230px;
		padding-top: 50px;
	}

	#scottle-play-area .row .letter {
		width: 40px;
		height: 40px;
		font-size: 22px;
	}

	#scottle-keyboard {
		margin-top: 15px;
	}

	#scottle-keyboard .key {
		height: 46px;
	}
}

@keyframes grow-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shake-horizontal {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-6px); }
  30%, 60%, 90% { transform: translateX(6px); }
}

@keyframes up-down {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-8px); /* Negative moves it UP; positive moves it DOWN */
  }
}