/* Card container */
.card-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	min-height: 120px;
}

/* Consolidated card styles */
.piece-card {
	width: 18%;
	/* Desktop size */
	height: 110px;
	/* Desktop size */
	border: 2px solid #333;
	border-radius: 8px;
	margin: 5px;
	padding: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	background-color: #f5f5f5;
	transition: transform 0.2s, box-shadow 0.2s, all 0.2s ease;
}

.piece-card:hover {
	border-color: #2196f3;
	/* Highlight border color */
	transform: scale(1.08);
	box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
	z-index: 2;
	transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

/* Add hover effect from .card */
.piece-card:hover:not(.disabled) {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Update the disabled card style */
.piece-card.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: #ddd;
	filter: grayscale(100%);
	position: relative;
}

/* Add a diagonal line through disabled cards */
.piece-card.disabled::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to top right,
			transparent calc(50% - 1px), rgba(255, 0, 0, 0.5),
			transparent calc(50% + 1px));
}

/* Card content - adding this for better control */
.card-content {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.piece-image {
	max-width: 80%;
	height: auto;
}

/* Keep card back styling */
.card-back {
	background-color: #ddd;
	color: #888;
	cursor: default;
}

.card-back .card-inner {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;
	font-size: 24px;
	font-weight: bold;
}