diff --git a/client/src/pages/GameRoom.jsx b/client/src/pages/GameRoom.jsx index 6c85da9..5870a17 100644 --- a/client/src/pages/GameRoom.jsx +++ b/client/src/pages/GameRoom.jsx @@ -327,7 +327,7 @@ const GameRoom = () => { ), }, - ]); + ]); } }); @@ -475,60 +475,55 @@ const GameRoom = () => { return ; } -if (gameOver) { - return ( -
- - -
-

Game Over!

- -
-

- LEADERBOARD -

- {leaderboard.map((p, i) => ( -
-
-
- - {p.name} - + if (gameOver) { + return ( +
+ +
+

Game Over!

+
+

+ LEADERBOARD +

+ {leaderboard.map((p, i) => ( +
+
+
+ + {p.name} + +
+ {p.score} pts
- {p.score} pts -
- ))} -
- - +
-
- ); -} - - + ); + } return ( -
-
+
+

LEADERBOARD

-
+
{players .sort((a, b) => (b.score || 0) - (a.score || 0)) .map((p, i) => ( @@ -580,7 +575,7 @@ if (gameOver) { key={type} onClick={() => handleVote(type)} disabled={hintsUsed[type] || roundEnded} - className={`w-full flex items-center justify-between p-3 rounded-lg transition-all duration-300 ${ + className={`w-full flex items-center justify-between p-3 rounded-lg transition-all duration-300 text-sm lg:text-base ${ voteCounts[type] > 0 ? "bg-[#FFFB00] text-black shadow-glow-yellow" : hintsUsed[type] || roundEnded @@ -594,7 +589,7 @@ if (gameOver) { alt={`${type} icon`} className="w-5 h-5 object-contain" /> - {labels[type]} + {labels[type]} {voteCounts[type] > 0 && ( @@ -608,7 +603,7 @@ if (gameOver) {
-
+
{showPlayButton && ( -
- -
-)} +
+ +
+ )}
-

+

{roundEnded ? `Round Over - Next in ${countdown}s` : `Round ${round} - ${timer}s left`}

-
-
-
- Movie - - {roundEnded ? `${song.song}` : "Hidden"} - {/* {roundEnded && ( - {song.movie} - )} */} - -
-
+
+
+ Movie + + {roundEnded ? `${song.song}` : "Hidden"} + +
+
Blurred cover
@@ -667,7 +658,7 @@ if (gameOver) { src={song?.cover} alt="Album cover" crossOrigin="anonymous" - className={`w-[180px] h-[180px] object-cover shadow-2xl rounded-md transition-all duration-500 ${ + className={`w-[150px] h-[150px] lg:w-[180px] lg:h-[180px] object-cover shadow-2xl rounded-md transition-all duration-500 ${ hintRevealed.cover ? "grayscale-0 blur-0" : "grayscale blur-md" }`} /> @@ -682,17 +673,15 @@ if (gameOver) { >
Movie - - {hintRevealed.movie - ? song.movie - .replace(/\s*[\--]?\s*\(.*?(original motion picture soundtrack|ost|from.*?)\)/gi, "") // remove entire (Original Motion Picture Soundtrack) - .replace(/\s*[\--]?\s*(original motion picture soundtrack|ost|from.*)/gi, "") // fallback for non-parentheses versions - .replace(/\s*\)+$/, "") // remove leftover closing parenthesis - .trim() - : "Hidden"} - - - + + {hintRevealed.movie + ? song.movie + .replace(/\s*[\--]?\s*\(.*?(original motion picture soundtrack|ost|from.*?)\)/gi, "") // remove entire (Original Motion Picture Soundtrack) + .replace(/\s*[\--]?\s*(original motion picture soundtrack|ost|from.*)/gi, "") // fallback for non-parentheses versions + .replace(/\s*\)+$/, "") // remove leftover closing parenthesis + .trim() + : "Hidden"} +
@@ -718,19 +707,19 @@ if (gameOver) {
-
+

GUESS — BOX

-
+
{chat.map((message, i) => (