.lm-fe82c22c-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: #D7AE70;
    padding-top: 60px; /* Increased top spacing */
    min-height: 100vh;
}

.lm-fe82c22c-main-heading {
    font-family: 'Playfair Display', serif;
    font-size: 2.5em; /* Adjusted font size */
    font-weight: 600; /* Semi-bold */
    color: #1E315A;
    text-align: center; /* Centered */
    margin: 0 0 30px 0;
    padding: 0 20px;
}

.lm-fe82c22c-container {
	position: relative;
	width: 100%;
    flex: 1;
	display: flex;
    flex-direction: column;
	align-items: center;
	font-family: sans-serif;
    padding-bottom: 40px;
}

.lm-fe82c22c-start-screen,
.lm-fe82c22c-win-screen {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background-color: rgba(0, 0, 0, 0.85);
	color: #D7AE70;
	z-index: 10;
	text-align: center;
}

.lm-fe82c22c-win-screen {
	display: none;
}

.lm-fe82c22c-win-screen.active {
	display: flex;
	animation: flashLights 1s infinite alternate;
}

@keyframes flashLights {
	0% { box-shadow: inset 0 0 50px rgba(255, 0, 0, 0.5); }
	100% { box-shadow: inset 0 0 50px rgba(0, 0, 255, 0.5); }
}

.lm-fe82c22c-start-screen h2,
.lm-fe82c22c-win-screen h2 {
	margin-bottom: 10px;
	font-size: 2.5rem;
	color: #D7AE70;
}

.lm-fe82c22c-settlement-amount {
    font-size: 3rem;
    color: #D7AE70;
    margin-bottom: 30px;
    font-weight: bold;
}

.lm-fe82c22c-start-screen p {
	margin-bottom: 30px;
	font-size: 1.2rem;
	color: #D7AE70;
    max-width: 80%;
}

.lm-fe82c22c-start-btn,
.lm-fe82c22c-restart-btn {
	padding: 15px 30px;
	font-size: 1.2rem;
	background-color: #D7AE70;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	transition: background-color 0.3s;
}

.lm-fe82c22c-start-btn:hover,
.lm-fe82c22c-restart-btn:hover {
	background-color: #D7AE70;
}

.lm-fe82c22c-maze-board {
	display: grid;
	width: 80vmin; /* Slightly smaller to fit controls */
	height: 80vmin;
    max-width: 600px;
    max-height: 600px;
	background-color: #f0f0f0;
	border: 2px solid #333;
    margin-bottom: 20px;
}

.lm-fe82c22c-cell {
	background-color: #f0f0f0; /* Default path */
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
}

.lm-fe82c22c-cell.wall {
	background-color: #333;
}

.lm-fe82c22c-player {
	width: 90%;
	height: 90%;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	z-index: 5;
	transition: transform 0.1s;
	position: absolute;
}

.lm-fe82c22c-goal {
	width: 90%;
	height: 90%;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	z-index: 1;
	animation: pulse 1s infinite alternate;
    position: absolute;
}

/* Mobile Controls */
.lm-fe82c22c-mobile-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    z-index: 5;
}

.lm-fe82c22c-ctrl-row {
    display: flex;
    gap: 10px;
}

.lm-fe82c22c-ctrl-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #1E315A;
    color: white;
    font-size: 24px;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.lm-fe82c22c-ctrl-btn:active {
    background-color: #3b5082;
    transform: translateY(2px);
    box-shadow: 0 2px 3px rgba(0,0,0,0.3);
}

@keyframes pulse {
	0% { transform: scale(1); }
	100% { transform: scale(1.1); filter: brightness(1.2); }
}

@media screen and (min-width: 1024px) {
    .lm-fe82c22c-mobile-controls {
        display: none; /* Hide on large screens assuming keyboard is present */
    }
}
