@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600&family=Orbitron:wght@700&display=swap');

body {
	background-image: linear-gradient(95.2deg, #66a6ff4d 25%, #89f7fe 100%);
}

/* Privacy mode */
input.text-hidden {
	-webkit-text-security: disc;
}

/* Word/pack mode switch */
.switch-sm {
	width: 36px;
	height: 20px;
}
.switch-sm .slider:before {
	height: 14px;
	width: 14px;
	left: 3px;
	bottom: 3px;
}
.switch-sm input:checked + .slider:before {
	transform: translateX(16px);
}
.switch-sm .slider {
	background-color: var(--bs-primary);
}

/* Heading */

.heading-childish {
	font-family: 'Fredoka', sans-serif;
}

.heading-robo {
	font-family: 'Orbitron', sans-serif;
	letter-spacing: 3px;
	text-transform: uppercase;
}

/* Bee */
.bee-wrapper-init {
	bottom: 0;
	left: 50%;
	transform: translate(-50%, calc(100% + 32px));
}
.bee-wrapper-game {
	bottom: 0;
	left: 50%;
	transform: translate(-50%, calc(100% + 32px));
}

.bee {
	width: 200px;
	height: 200px;
	object-fit: contain;
	animation: fly-up-down 2s ease-in-out infinite;

	pointer-events: none;
	user-select: none;
	-moz-user-select: none;
}

@keyframes fly-up-down {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-20px);
	}
}

/* Honeycomb */

.honeycomb {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.svg-honeycomb {
	width: 100%;
	max-width: 280px;
	height: auto;
}

.hex-cell {
	fill: #f5b942;
	stroke: #c48a10;
	stroke-width: 2;
	transition: opacity 0.4s ease;
}

.hex-cell.hex-gone {
	opacity: 0;
	pointer-events: none;
}

/* Flower */

.flower {
	display: flex;
	justify-content: center;
}

.svg-flower {
	width: 100%;
	max-width: 220px;
	height: auto;
}

.flower-stem {
	fill: #66bb6a;
	stroke: #43a047;
	stroke-width: 2;
}

.flower-leaf {
	fill: #81c784;
	stroke: #43a047;
	stroke-width: 2;
}

.petal {
	fill: #f48fb1;
	stroke: #ec407a;
	stroke-width: 2;
	transform-box: fill-box;
	transform-origin: center bottom;
	transition:
		transform 0.5s ease,
		fill 0.5s ease,
		opacity 0.5s ease;
}

.petal.petal-wilt {
	fill: #a1887f;
	stroke: #795548;
	opacity: 0.9;
	transform: scale(0.55) rotate(20deg);
}

.flower-center {
	fill: #ffca28;
	stroke: #f9a825;
	stroke-width: 2;
}

/* RoboBee */

.robo {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.robo-head {
	position: relative;
	width: 110px;
	height: 90px;
	background: linear-gradient(180deg, #cfd8dc, #90a4ae);
	border: 3px solid #546e7a;
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.robo-antenna {
	position: absolute;
	top: -16px;
	width: 4px;
	height: 16px;
	background: #546e7a;
}

.robo-antenna::before {
	content: '';
	position: absolute;
	top: -6px;
	left: -3px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ef5350;
}

.robo-eyes {
	display: flex;
	gap: 14px;
}

.robo-eye {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #3faef1;
	box-shadow: 0 0 2px #3faef1;
	transition:
		background 0.3s ease,
		box-shadow 0.3s ease;
}

.robo-eye.eye-correct {
	background: #66bb6a;
	box-shadow: 0 0 5px #66bb6a;
}

.robo-eye.eye-wrong {
	background: #ef5350;
	box-shadow: 0 0 5px #ef5350;
}

.robo-mouth {
	width: 44px;
	height: 8px;
	background: repeating-linear-gradient(90deg, #546e7a 0 4px, transparent 4px 8px);
	border-radius: 2px;
}

.robo-torso {
	display: flex;
	align-items: center;
	gap: 6px;
}

.robo-arm {
	width: 16px;
	height: 54px;
	background: linear-gradient(180deg, #cfd8dc, #90a4ae);
	border: 3px solid #546e7a;
	border-radius: 8px;
}

.robo-legs {
	display: flex;
	gap: 12px;
}

.robo-leg {
	width: 16px;
	height: 36px;
	background: linear-gradient(180deg, #cfd8dc, #90a4ae);
	border: 3px solid #546e7a;
	border-radius: 6px;
}

.circuit-board {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	background: #1b3a2f;
	border: 2px solid #0d251c;
	border-radius: 10px;
	padding: 12px;
}

.circuit-light {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #43e97b;
	box-shadow: 0 0 2px #43e97b;
	transition:
		background 0.4s ease,
		box-shadow 0.4s ease,
		opacity 0.4s ease;
}

.circuit-light.circuit-off {
	background: #2e3d38;
	box-shadow: none;
}

/* Word display */

.word-display {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.word {
	display: flex;
	gap: 4px;
}

.letter {
	display: inline-flex;
	align-items: flex-end;
	justify-content: center;
	min-width: 28px;
	height: 40px;
	border-bottom: 3px solid #333;
	font-size: 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
}

.word-space {
	width: 16px;
}

/* Keyboard */

.keyboard {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 5px;
	max-width: 520px;
	margin: 0 auto;
}

.key {
	width: 40px;
	height: 40px;
	border: 2px solid #9e9e9e;
	border-radius: 8px;
	background: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition:
		background 0.15s,
		border-color 0.15s,
		color 0.15s;
}

.key:hover:not(.key-used) {
	background: #e3f2fd;
	border-color: #1976d2;
}

.key.key-used {
	background: #e0e0e0;
	border-color: #bdbdbd;
	color: #9e9e9e;
	cursor: default;
}

.key.key-used.key-correct {
	background: #c8e6c9;
	border-color: #43a047;
	color: #2e7d32;
}

.key.key-used.key-wrong {
	background: #ffcdd2;
	border-color: #e53935;
	color: #c62828;
}

/* Pack list */

.pack-item {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 10px 14px;
	margin-bottom: 8px;
}

/* Game over emoji */

.game-over-emoji {
	font-size: 4rem;
	line-height: 1;
}

/* Favourite word buttons */

.fav-btn {
	font-size: 0.8rem;
}
