@@ -68,7 +68,9 @@ export default function App() {
6868 const [ turn , setTurn ] = useState < Player > ( ( ) => initialGameState ?. turn ?? INITIAL_STARTER ) ;
6969 const [ scores , setScores ] = useState ( ( ) => initialGameState ?. scores ?? { P : 0 , C : 0 } ) ;
7070 const [ gameOver , setGameOver ] = useState ( false ) ;
71- const [ lastLineId , setLastLineId ] = useState < string | null > ( ( ) => initialGameState ?. lastLineId ?? null ) ;
71+ const [ lastLineId , setLastLineId ] = useState < string | null > (
72+ ( ) => initialGameState ?. lastLineId ?? null ,
73+ ) ;
7274 const [ toast , setToast ] = useState < { message : string ; isVisible : boolean } > ( ( ) => {
7375 if ( initialGameState ) {
7476 return { message : 'Game loaded!' , isVisible : true } ;
@@ -275,39 +277,45 @@ export default function App() {
275277
276278 return (
277279 < div
278- className = { `min-h-screen ${ theme . appBg } ${ theme . appText } flex flex-col items-center p-4 font-sans transition-colors duration-500` }
280+ className = { `h-full w-full overflow-hidden ${ theme . appBg } ${ theme . appText } flex flex-col items-center p-4 font-sans transition-colors duration-500` }
279281 >
280282 < h1 className = "sr-only" > One Little Mistake - Dots and Boxes Game</ h1 >
281283 < motion . div
282284 initial = { { opacity : 0 } }
283285 animate = { { opacity : 1 } }
284- className = "flex w-full max-w-[512px ] flex-1 flex-col items-center justify-center pb-12 "
286+ className = "flex min-h-0 w-full max-w-[500px ] flex-1 flex-col items-center justify-between pb-2 "
285287 >
286- < ScoreBoard
287- scores = { scores }
288- turn = { turn }
289- gameOver = { gameOver }
290- onReset = { ( ) => resetGame ( ) }
291- theme = { theme }
292- themeName = { themeName }
293- onThemeChange = { setThemeName }
294- onInfoOpen = { ( ) => setIsInfoOpen ( true ) }
295- />
296-
297- < div className = "mt-4 flex aspect-square w-full max-w-[512px] items-center justify-center" >
298- < GameBoard
299- gridSize = { gridSize }
300- lines = { lines }
301- squares = { squares }
302- onLineClick = { handleLineClick }
288+ < div className = "w-full shrink-0" >
289+ < ScoreBoard
290+ scores = { scores }
303291 turn = { turn }
292+ gameOver = { gameOver }
293+ onReset = { ( ) => resetGame ( ) }
304294 theme = { theme }
305- lastLineId = { lastLineId }
295+ themeName = { themeName }
296+ onThemeChange = { setThemeName }
297+ onInfoOpen = { ( ) => setIsInfoOpen ( true ) }
306298 />
307299 </ div >
308300
301+ < div className = "my-2 flex min-h-0 w-full flex-1 items-center justify-center" >
302+ < div className = "relative aspect-square h-full max-w-full" >
303+ < div className = "absolute inset-0" >
304+ < GameBoard
305+ gridSize = { gridSize }
306+ lines = { lines }
307+ squares = { squares }
308+ onLineClick = { handleLineClick }
309+ turn = { turn }
310+ theme = { theme }
311+ lastLineId = { lastLineId }
312+ />
313+ </ div >
314+ </ div >
315+ </ div >
316+
309317 < div
310- className = { `mt-8 flex items-center justify-center gap-6 font-mono text-xs ${ theme . mutedText } transition-colors duration-500` }
318+ className = { `flex shrink-0 items-center justify-center gap-6 font-mono text-xs ${ theme . mutedText } transition-colors duration-500` }
311319 >
312320 { LEVELS . map ( ( size ) => {
313321 const isUnlocked = size <= maxUnlocked ;
0 commit comments