html, body
{
	height: 100%;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

body > .container
{
	flex: 1;
	display: flex;
	flex-direction: column;
}

main
{
	flex: 1;
	position: relative;
	min-height: 50vh;
}

.view
{
	display: none;
	opacity: 0;
	transition: opacity 200ms ease-in-out;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	padding-top: 2vh;
	text-align: center;
}

.view.active
{
	display: block;
	opacity: 1;
	position: relative;
}

summary
{
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

summary .label
{
	flex: 1;
	text-align: left;
}

summary .join-btn
{
	padding: 0.25rem 0.75rem;
	font-size: 0.9em;
}

summary .join-btn
{
	pointer-events: auto;
}

.wordList
{
	text-align: left;
	font-size: 80%;
	color: #777;
	background-color: #eee;
	padding: 0.5rem;
	margin-bottom: 2rem;
}

.bingo-card
{
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	aspect-ratio: 1 / 1;
	max-width: 95vmin;
	width: 100%;
	margin: 0 auto;
	gap: 4px;
}

.bingo-card > div
{
	height: 100%;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	border: 1px solid #ccc;
	background-color: #f5f5f5;
	padding: 4px;
	position: relative;
}

.bingo-card > div > div		/*	The word text	*/
{
	hyphens: auto;
	white-space: normal;
	word-break: normal;
	line-break: strict;
	overflow-wrap: break-word;
	overflow: hidden;
	font-size: 0.8rem;
	font-weight: bold;
	line-height: 1.2;
}

.bingo-card > div > span
{
	position: absolute;
	top: 5px;
	right: 5px;
	font-size: 1.2em;
	color: #212121;
	display: none;
}

.bingo-card > div[data-marked="true"] > span
{
	display: block;
}

.bingo-card div[data-marked="true"] {
	background-color: #00c5ff;
}

.bingo-card div[data-marked="false"]
{
}

#scores
{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.5em;
	max-width: 600px;
	margin: 1em auto;
	font-family: sans-serif;
}

#scores > div
{
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5em 0.75em;
	border: 1px solid #ccc;
	border-radius: 0.4em;
	background-color: #f9f9f9;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	min-width: 0; /* Critical: allows flex children to shrink properly */
	font-size: 80%;
}

#scores > div > span:first-child {
	font-weight: bold;
	flex-shrink: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 80%;	/* tweak this as needed */
}

#scores > div > div:last-child {
	color: #555;
	flex-shrink: 0;
	margin-left: 0.5em;
}

#scores > div > div:last-child > span:last-child {
	font-weight: bold;
}

@keyframes pulse
{
	0%   { transform: scale(1); background-color: #f9f9f9; }
	50%  { transform: scale(1.1); background-color: #ffeaa7; }
	100% { transform: scale(1); background-color: #f9f9f9; }
}

.pulsate
{
	animation: pulse 0.3s ease;
}

#leaderboard {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
	font-family: sans-serif;
}

#leaderboard th,
#leaderboard td {
	padding: 0.5em 1em;
	border-bottom: 1px solid #ccc;
}

#leaderboard th:nth-child(2),
#leaderboard th:nth-child(3),
#leaderboard td:nth-child(2),
#leaderboard td:nth-child(3) {
	text-align: center;
}

#leaderboard th:first-child,
#leaderboard td:first-child {
	text-align: left;
}

#leaderboard th {
	background-color: #f0f0f0;
	font-weight: bold;
}
