📄 GameScreen.svelte
<script lang="ts">
	interface Props {
		color: string;
		isMaster: boolean;
		onTap?: () => void;
	}

	let { color = '', isMaster = false, onTap }: Props = $props();

	function handleClick() {
		if (color && onTap) {
			onTap();
		}
	}

	function handleKeydown(event: KeyboardEvent) {
		if (event.key === 'Enter' || event.key === ' ') {
			handleClick();
		}
	}
</script>

<div
	class="game-screen"
	style="background-color: {color || '#000000'}"
	onclick={handleClick}
	onkeydown={handleKeydown}
	role="button"
	tabindex="0"
>
	{#if color}
		<div class="tap-indicator">TAP!</div>
	{/if}
</div>

<style>
	.game-screen {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		display: flex;
		justify-content: center;
		align-items: center;
		cursor: pointer;
		user-select: none;
		-webkit-tap-highlight-color: transparent;
	}

	.tap-indicator {
		font-size: 4rem;
		font-weight: bold;
		color: rgba(255, 255, 255, 0.9);
		text-shadow:
			0 0 10px rgba(0, 0, 0, 0.5),
			0 0 20px rgba(0, 0, 0, 0.3);
		animation: pulse 0.5s ease-in-out infinite alternate;
	}

	@keyframes pulse {
		from {
			transform: scale(1);
			opacity: 0.8;
		}
		to {
			transform: scale(1.1);
			opacity: 1;
		}
	}
</style>