* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: system-ui, sans-serif;
	background: #1c1c24;
	color: #f2f2f5;
}

.site-header {
	padding: 1rem 1.5rem;
	border-bottom: 1px solid #33333f;
}

.site-title {
	color: inherit;
	text-decoration: none;
	font-weight: 700;
	font-size: 1.25rem;
}

main {
	max-width: 640px;
	margin: 0 auto;
	padding: 2rem 1.5rem;
	text-align: center;
}

.game-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 1rem;
	margin-top: 1.5rem;
}

.game-card {
	display: block;
	padding: 1.5rem 1rem;
	background: #2a2a35;
	border-radius: 0.75rem;
	color: inherit;
	text-decoration: none;
	font-weight: 600;
	transition: transform 0.15s ease, background 0.15s ease;
}

.game-card:hover {
	background: #34343f;
	transform: translateY(-2px);
}

#create,
#join {
	padding: 0.5rem 1.25rem;
	border-radius: 0.5rem;
	border: none;
	background: #4a4af0;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

#create:hover,
#join:hover {
	background: #5a5af7;
}

#join-box {
	margin-top: 1.5rem;
}

.room-line {
	font-size: 0.95rem;
	color: #c7c7d6;
	word-break: break-all;
}

.ttt-board {
	display: grid;
	grid-template-columns: repeat(3, 96px);
	grid-template-rows: repeat(3, 96px);
	gap: 6px;
	justify-content: center;
	margin: 1.5rem auto;
}

.ttt-cell {
	background: #2a2a35;
	border: none;
	border-radius: 0.5rem;
	font-size: 2.5rem;
	font-weight: 700;
	color: inherit;
	cursor: pointer;
}

.ttt-cell:hover:not(:disabled) {
	background: #34343f;
}

.ttt-cell:disabled {
	cursor: default;
}

.ttt-status {
	font-size: 1.1rem;
	min-height: 1.5em;
}

#reset {
	padding: 0.5rem 1.25rem;
	border-radius: 0.5rem;
	border: none;
	background: #4a4af0;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

#reset:hover {
	background: #5a5af7;
}
