:root {
	--bodyBg: #f5f6fb;
	--boxBg: white;
	--boxShadow: 0 3px 10px rgba(0, 0, 0, .12);
	--oCol: #ff9800;
	
	--xCol: #3f51b5;
	
	--h1Bg: #3f51b5;
	--h1Col: white;
	--toggleIconBg: #3f51b5;
	--toggleIconCol: white;
	--emojiCol: #3f51b5;
	--textCol: #3f51b5;
}

.lightMode {
	--bodyBg: #1f2c8f;
	
	--h1Bg: white;
	--h1Col: #3f51b5;
	--oCol: #ffca28;
	--xCol: white;
	--toggleIconBg: white;
	--toggleIconCol: #3f51b5;
	--boxBg: #3f51b5;
	--emojiCol: white;
	--textCol: white;
	--boxShadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

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

html,
body {
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: var(--bodyBg);
	font-family: "QuickSand", sans-serif;
	transition: all 0.5s ease 0.05s;
	user-select: none;
}

header {
	width: 100%;
	padding: 15px;
	display: flex;
	justify-content: space-evenly;
	align-items: center;
	transform: translateX(-15px);
}

#stats {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	transform: scale(0.9);
}

#controls {
	display: flex;
	align-items: center;
	gap: 10px;
}

#stats p {
	font-weight: bold;
	display: flex;
	flex-direction: column;
	color: var(--textCol);
}

.lightMode #stats p {
	color: white;
}

.turn {
	animation: flash 1s ease-in-out 0.01s infinite;
}

@keyframes flash {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

#separator {
	width: 2px;
	height: 80px;
	display: inline-block;
	color: transparent;
	transform: translateY(7px);
	background: linear-gradient(to top, var(--oCol), var(--xCol));
	opacity: 0.7;
}

.o,
.x {
	display: inline-block;
	font-weight: 900;
}

.o {
	font-size: 2.9rem;
	color: var(--oCol);
	font-family: "Poppins", sans-serif;
}

.x {
	font-size: 2.5rem;
	color: var(--xCol);
	font-family: "Sigmar", sans-serif;
}

.hoverEffect {
	transition: opacity 0.5s ease 0.05s;
}

.hoverEffect:hover {
	opacity: 0.7;
}

h1 {
	font-size: 1.5rem;
	border-radius: 10px;
	padding: 7px 10px;
	background: var(--h1Bg);
	box-shadow: var(--boxShadow);
	letter-spacing: 2px;
	white-space: nowrap;
}

h1 a {
	text-decoration: none;
	color: var(--h1Col);
}

#toggleTheme,
#toggleSound {
	border-radius: 10px;
	background: var(--toggleIconBg);
	padding: 10px;
	display: flex;
	justify-content: center;
	align-items: center;
	color: var(--toggleIconCol);
	font-size: 1.5rem;
	cursor: pointer;
}

#sun,
#moon,
#soundOn,
#soundOff {
	transition: font-size 0.5s ease 0.05s;
}

#moon,
#soundOff {
	font-size: 0;
}

#gameCont {
	width: fit-content;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: 5%;
	margin: 15px auto;
	position: relative;
}

.box {
	width: clamp(70px, 20vmax, 100px);
	height: clamp(70px, 20vmax, 100px);
	border-radius: 15px;
	background: var(--boxBg);
	box-shadow: var(--boxShadow);
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
}

@keyframes error {

	
	to {
		background: red;
	}
}

#wonLine {
	font-size: 0;
	position: absolute;
	left: 10%;
	z-index: 10;
	width: 0;
	height: 5px;
	border-radius: 50px;
	transition: width 0.3s ease 0.05s;
	background: linear-gradient(45deg, var(--xCol), var(--oCol));
}

#buttonCont {
	margin-top: 70px;
	width: 100%;
	text-align: center;
}

.restart {
	background: var(--oCol);
	color: var(--toggleIconCol);
	padding: 10px 20px;
	font-weight: bold;
	border: 0;
	border-radius: 15px;
	font-family: "QuickSand", sans-serif;
	font-size: 1rem;
	letter-spacing: 1px;
	cursor: pointer;
	transform: translateX(17px);
	margin-bottom: 50px;
}

aside {
	position: absolute;
	z-index: 10;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-radius: 20px;
	background: var(--boxBg);
	padding: 20px 30px;
	width: clamp(200px, 80vw, 400px);
	text-align: center;
	display: none;
}

aside p {
	font-weight: bold;
	font-size: 1.5rem;
	color: var(--textCol);
	margin-bottom: 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-direction: column;
	gap: 7px;
}

.emoji {
	font-size: 4rem;
	color: var(--emojiCol);
}
