body {
    font-family: Arial, sans-serif;
    text-align: center;
}

main {
    margin-top: 50px;
}

.guess-row {
    display: flex;
    gap: 6px;
}

.tile {
    width: 60px;
    height: 60px;

    border: 2px solid #888;

    font-size: 32px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
}

.tile.absent {
    background-color: #787c7e;
    color: white;
    border-color: #787c7e;
}

.tile.present {
    background-color: #c9b458;
    color: white;
    border-color: #c9b458;
}

.tile.correct {
    background-color: #6aaa64;
    color: white;
    border-color: #6aaa64;
}

#submit-guess {
    width: 64px;
    height: 64px;

    border: 2px solid #888;

    font-size: 24px;
    font-weight: bold;

    cursor: pointer;
}

#guess-board {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.solver-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    margin-top: 30px;
}

.game-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.recommendations {
    display: flex;
    gap: 20px;
}

.recommendation-panel {
    width: 200px;
    min-height: 300px;
    padding: 16px;

    border: 2px solid #888;
}

.recommendation-panel h2 {
    margin-top: 0;
    font-size: 18px;
}

#fallback-banner {
	padding: 12px 16px;
	margin-bottom: 20px;
	border: 2px solid #b91c1c;
	border-radius: 6px;
	background-color: #fee2e2;
	font-weight: 600;
}

#fallback-banner[hidden] {
	display: none;
}

.instructions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 20px;
}

.instructions p {
	margin: 4px 0;
}

.controls button {
	padding: 8px 14px;
	border: 1px solid #787c7e;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

.controls button:hover {
	background: #e5e5e5;
}

.controls button:active {
	transform: translateY(1px);
}

.controls {
	display: flex;
	gap: 8px;
    justify-content: center;
}

@media (max-width: 768px) {
    .solver-layout {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .recommendations {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        max-width: 390px;
    }

    .recommendation-panel {
        width: auto;
        min-width: 0;
        min-height: 0;
        padding: 10px;
    }   

    .recommendation-panel h2 {
        font-size: 16px;
    }

    #remaining-answers {
        grid-column: 1 / -1;
    }

    .tile {
        box-sizing: border-box;
        width: clamp(35px, 11vw, 50px);
        height: clamp(35px, 11vw, 50px);
        font-size: clamp(20px, 6vw, 28px);
        padding: 0;
    }

    #submit-guess {
        box-sizing: border-box;
        width: clamp(35px, 11vw, 50px);
        height: clamp(35px, 11vw, 50px);
        font-size: clamp(20px, 6vw, 28px);
        padding: 0;

        display: flex;
        align-items: center;
        justify-content: center;
    }

    .guess-row {
        gap: 5px;
    }

    main {
        margin-top: 15px;
    }

    h1 {
        margin: 0 0 12px;
        font-size: 1.75rem;
    }

    main > div:nth-child(2) p {
        margin: 4px 0;
        font-size: 0.9rem;
    }

    .controls {
        margin-top: 12px;
    }

    .solver-layout {
        margin-top: 15px;
        gap: 20px;
    }
}
