/* Hangman play — single-column board layout */

#hangman_board.hm-play-v2 {
	width: 100% !important;
	max-width: 794px;
	height: auto !important;
	background: #fff;
	border: 1.5px solid #e8eaf0;
	border-radius: 14px;
	padding: 16px;
	padding-top: 0;
	margin-top: 0;
	box-sizing: border-box;
	position: relative;
	overflow: hidden;
}

/* Top-only loader bar inside board */
#hangman_board.hm-play-v2 #loading_wait,
#hangman_board.hm-play-v2 .hm-loading {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 !important;
	opacity: 1;
	background: rgba(0, 0, 0, 0.55) !important;
	border-radius: 14px 14px 0 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: default;
	box-sizing: border-box;
}

#hangman_board.hm-play-v2 #loading_wait.hm-loading.is-hidden {
	display: none !important;
}

#hangman_board.hm-play-v2 .loading_txt {
	display: block !important;
	margin: 0 !important;
	height: auto !important;
	width: auto !important;
	font-size: 15px;
	font-weight: 600;
	font-family: 'Roboto', Helvetica, Arial, sans-serif;
	color: #fff;
	text-align: center;
	line-height: 1;
}

#hangman_board.hm-play-v2 .hm-board-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 0;
	box-sizing: border-box;
	width: 100%;
	min-height: 0;
}

#hangman_board.hm-play-v2 #img1 {
	position: static !important;
	display: block;
	width: auto;
	max-width: 230px;
	min-height: 165px;
	height: auto;
	margin: 0;
	top: auto !important;
	left: auto !important;
	object-fit: contain;
}

#hangman_board.hm-play-v2 #mylives,
#hangman_board.hm-play-v2 .hm-lives {
	position: static !important;
	float: none !important;
	right: auto !important;
	width: 100%;
	max-width: 320px;
	min-height: 38px;
	margin: 8px 0 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
}

#hangman_board.hm-play-v2 .hm-lives-bar {
	width: 100%;
	height: 10px;
	background: #eceef2;
	border-radius: 999px;
	overflow: hidden;
}

#hangman_board.hm-play-v2 .hm-lives-fill {
	height: 100%;
	width: 0%;
	background: #f88528;
	border-radius: 999px;
	transition: width 0.3s ease;
}

#hangman_board.hm-play-v2 .hm-lives-text {
	margin: 0;
	padding: 0;
	font-family: 'Roboto', Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 700;
	color: #555;
	text-align: center;
	line-height: 1.3;
}

#hangman_board.hm-play-v2 #hold {
	position: static !important;
	width: 100% !important;
	height: 44px;
	min-height: 44px;
	left: auto !important;
	top: auto !important;
	margin: 0;
	padding: 0;
	text-align: center;
}

#hangman_board.hm-play-v2 #my-word {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: flex-end;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
	height: 40px;
	min-height: 40px;
	max-height: 40px;
	width: 100%;
	text-align: center;
	line-height: 1;
	box-sizing: border-box;
}

#hangman_board.hm-play-v2 #my-word .guess {
	position: static !important;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
	min-width: 24px;
	height: 40px;
	flex-shrink: 0;
	float: none !important;
}

#hangman_board.hm-play-v2 #my-word .guess-letter {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: 34px;
	min-height: 34px;
	max-height: 34px;
	font-family: 'Roboto', Helvetica, Arial, sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
	color: transparent;
	user-select: none;
}

#hangman_board.hm-play-v2 #my-word .guess-filled .guess-letter {
	color: #1870d5;
}

#hangman_board.hm-play-v2 #my-word .guess-line {
	display: block;
	width: 28px;
	height: 4px;
	border-radius: 2px;
	background: #1a1a1a;
	margin-top: 2px;
}

#hangman_board.hm-play-v2 #my-word .guess-filled .guess-line {
	background: #1870d5;
}

#hangman_board.hm-play-v2 #my-word .guess-space .guess-letter {
	color: #1a1a1a;
	height: 34px;
	min-height: 34px;
}

#hangman_board.hm-play-v2 #my-word .guess-space .guess-line {
	display: none;
}

#hangman_board.hm-play-v2 #you_win {
	position: static !important;
	margin: 0 !important;
	font-size: 28px;
	color: #4a9e0c;
	text-align: center;
	width: 100%;
}

#hangman_board.hm-play-v2 #buttons {
	width: 100%;
	max-width: 100%;
	min-height: 96px;
	margin-top: 8px;
	box-sizing: border-box;
}

#hangman_board.hm-play-v2 #alphabet {
	position: static !important;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 !important;
	padding: 0;
	width: 100% !important;
	max-width: 100% !important;
	list-style: none;
	box-sizing: border-box;
}

#hangman_board.hm-play-v2 #alphabet li,
#hangman_board.hm-play-v2 #alphabet .hm-letter {
	float: none !important;
	margin: 0 !important;
	flex: 0 0 auto;
	width: 40px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	list-style: none;
	font-size: 16px;
	font-weight: 600;
	font-family: 'Roboto', Helvetica, Arial, sans-serif;
	color: #333;
	background: #fff !important;
	background-image: none !important;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	cursor: pointer;
	user-select: none;
	padding: 0 !important;
	box-sizing: border-box;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#hangman_board.hm-play-v2 #alphabet li:hover:not(.letter-correct):not(.letter-incorrect) {
	background: #f7f7f7 !important;
	border-color: #ccc;
}

#hangman_board.hm-play-v2 #alphabet li.letter-correct {
	background: #eefbf3 !important;
	border-color: #7ec99a !important;
	color: #2d8a54 !important;
	cursor: default;
}

#hangman_board.hm-play-v2 #alphabet li.letter-incorrect {
	background: #fff0f0 !important;
	border-color: #f5a8a8 !important;
	color: #d94545 !important;
	cursor: default;
}

/* Round complete — win/lose overlay inside board */
#hangman_board.hm-play-v2 .hm-modal {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 1005;
	margin: 0 !important;
	padding: 16px !important;
	width: 100% !important;
	height: 100% !important;
	background: rgba(0, 0, 0, 0.35);
	border-radius: 14px;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	overflow: auto;
}

#hangman_board.hm-play-v2 .hm-modal.is-open {
	display: flex !important;
}

#hangman_board.hm-play-v2 .hm-modal .hm-modal-card,
#hangman_board.hm-play-v2 .hm-modal .modal-content3 {
	position: relative;
	width: auto !important;
	height: auto !important;
	max-width: 360px;
	margin: 0 auto;
	padding: 28px 24px 24px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	text-align: center;
	animation: none;
}

#hangman_board.hm-play-v2 .hm-modal .hm-modal-close {
	position: absolute;
	top: 8px;
	right: 8px;
	margin: 0 !important;
	float: none;
}

#hangman_board.hm-play-v2 #good_work,
#hangman_board.hm-play-v2 #game_over {
	margin: 0 0 8px;
	font-family: 'Roboto', Helvetica, Arial, sans-serif;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	color: #4a9e0c !important;
}

#hangman_board.hm-play-v2 #game_over {
	color: #e64924 !important;
}

#hangman_board.hm-play-v2 #correct_word,
#hangman_board.hm-play-v2 #let_move {
	margin: 0 0 20px;
	font-family: 'Roboto', Helvetica, Arial, sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
	color: #4a9e0c !important;
}

#hangman_board.hm-play-v2 .hm-modal-btn {
	margin-top: 4px;
	border: 0;
	cursor: pointer;
}

#hangman_board.hm-play-v2.hm-round-complete .hm-board-inner {
	min-height: 0;
	gap: 10px;
}

#hangman_board.hm-play-v2.hm-round-complete #buttons {
	display: none !important;
	min-height: 0;
	height: 0;
	margin: 0;
	overflow: hidden;
}

/* Tablet */
@media only screen and (max-width: 991px) {
	#hangman_board.hm-play-v2 .hm-board-inner {
		padding: 0;
		min-height: 0;
	}

	#hangman_board.hm-play-v2 #img1 {
		max-width: 220px;
		min-height: 180px;
	}

	#hangman_board.hm-play-v2 #buttons {
		min-height: 88px;
	}

	#hangman_board.hm-play-v2 #alphabet {
		gap: 6px;
	}

	#hangman_board.hm-play-v2 #alphabet li,
	#hangman_board.hm-play-v2 #alphabet .hm-letter {
		width: 36px;
		height: 40px;
		font-size: 15px;
	}
}

/* Mobile */
@media only screen and (max-width: 639px) {
	#hangman_board.hm-play-v2 .hm-board-inner {
		padding: 0;
		min-height: 0;
	}

	#hangman_board.hm-play-v2 #img1 {
		max-width: 180px;
		min-height: 150px;
	}

	#hangman_board.hm-play-v2 #buttons {
		min-height: 80px;
	}

	#hangman_board.hm-play-v2 #alphabet li,
	#hangman_board.hm-play-v2 #alphabet .hm-letter {
		width: 32px;
		height: 36px;
		font-size: 14px;
		border-radius: 6px;
	}
}

@media only screen and (max-width: 479px) {
	#hangman_board.hm-play-v2 {
		padding: 12px;
	}

	#hangman_board.hm-play-v2 .hm-board-inner {
		min-height: 0;
	}

	#hangman_board.hm-play-v2 #img1 {
		max-width: 140px;
		min-height: 120px;
	}

	#hangman_board.hm-play-v2 #buttons {
		min-height: 72px;
	}

	#hangman_board.hm-play-v2 #alphabet {
		gap: 4px;
	}

	#hangman_board.hm-play-v2 #alphabet li,
	#hangman_board.hm-play-v2 #alphabet .hm-letter {
		width: 28px;
		height: 32px;
		font-size: 13px;
	}
}
