@import url("https://fonts.googleapis.com/css2?family=Luckiest+Guy&family=Rubik&display=swap");

body {
	margin: 0;
	font-family: "Rubik", sans-serif;
	background: #fffbe3;
	background-attachment: fixed;
	color: #222;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100vh;
	text-align: center;
}

h1 {
	font-family: "Luckiest Guy", cursive;
	font-size: 3.5em;
	color: #4a4a4a;
	text-shadow: 1px 1px 0 #eee;
	margin-bottom: 30px;
}

.mode-btn {
	display: inline-block;
	padding: 18px 36px;
	margin: 20px;
	font-size: 1.3em;
	border: none;
	border-radius: 10px;
	background: linear-gradient(
		45deg,
		#d6cfc4,
		#b2aaa1
	); /* muted beige tones */
	color: #333;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
	font-weight: 600;
}

.mode-btn:hover {
	background: linear-gradient(45deg, #b2aaa1, #958f89);
	transform: scale(1.05);
	color: #000;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.top-container {
	text-align: center;
	margin-top: 30px;
}

#instructionBox {
	font-size: 1.3em;
	margin: 10px 0 20px;
	font-weight: bold;
	color: #555;
	animation: fadeIn 0.4s ease-in-out;
}

.game-container {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 40px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	animation: fadeIn 0.8s ease;
}

.grid {
	display: grid;
	grid-template-columns: repeat(4, 80px);
	grid-template-rows: repeat(4, 120px);
	gap: 10px;
	padding: 10px;
	background: #fff9ee;
	border-radius: 16px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cell {
	border: 2px dashed #aaa;
	background: #fff;
	border-radius: 8px;
	transition: background 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cell:hover {
	background: #f9f9f9;
}

.card-bank {
	display: flex;
	flex-wrap: wrap;
	width: 340px;
	gap: 10px;
	justify-content: center;
	background: #fff;
	border-radius: 16px;
	padding: 10px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card {
	width: 70px;
	height: 100px;
	object-fit: contain;
	cursor: grab;
	border-radius: 6px;
	transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
	transform: scale(1.05);
	box-shadow: 0 0 12px rgba(255, 174, 0, 0.5);
}

.card.selected {
	outline: 3px solid #ff9900;
	box-shadow: 0 0 14px #ffcc00;
	z-index: 1;
}

.winner {
	background: #fff9b0 !important;
	border-color: #f1c40f;
}

#message {
	font-weight: bold;
	font-size: 1.6em;
	margin-top: 20px;
	color: #9b3e00;
	text-shadow: none;
}

#playAgainBtn {
	display: none;
	margin: 25px auto;
	padding: 12px 24px;
	font-size: 1.1em;
	background: linear-gradient(
		45deg,
		#d6cfc4,
		#b2aaa1
	); /* muted beige tones */
	color: #333;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	transition: background 0.3s;
}

#playAgainBtn:hover {
	background: linear-gradient(45deg, #b2aaa1, #958f89);
	transform: scale(1.05);
	color: #000;
}
