diff --git a/src/app/globals.css b/src/app/globals.css index 5b62aae..aa5e8d2 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -59,6 +59,20 @@ box-shadow: 0 0 10px rgba(212, 175, 55, 0.45); } +/* Tactile "3D press" buttons (casual card-game feel) — a solid underside that + compresses on tap. Pair with a bg/glass class for the face. */ +.press-3d { + box-shadow: 0 6px 0 0 rgba(0, 0, 0, 0.30), 0 8px 16px rgba(0, 0, 0, 0.28); + transition: transform 0.08s ease, box-shadow 0.08s ease; +} +.press-3d:active { + transform: translateY(4px); + box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.30), 0 3px 8px rgba(0, 0, 0, 0.28); +} +@media (prefers-reduced-motion: reduce) { + .press-3d, .press-3d:active { transition: none; transform: none; } +} + /* HUD text stays legible over the dynamic felt/table (game-ui best practice). */ .hud-shadow { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px rgba(0, 0, 0, 0.4); diff --git a/src/components/HomeScreen.tsx b/src/components/HomeScreen.tsx index 5eb7a63..ec9e03f 100644 --- a/src/components/HomeScreen.tsx +++ b/src/components/HomeScreen.tsx @@ -3,14 +3,16 @@ import { motion } from "framer-motion"; import { Bot, + ChevronLeft, + ChevronRight, Globe, LogIn, LogOut, + Play, ShoppingBag, Trophy, User, Users, - Wifi, } from "lucide-react"; import { useEffect, useState } from "react"; import { useGameStore } from "@/lib/game-store"; @@ -23,7 +25,7 @@ import { SUIT_SYMBOL } from "@/lib/hokm/types"; import { TopBar } from "./online/TopBar"; export function HomeScreen() { - const { t, toggle } = useI18n(); + const { t, toggle, locale } = useI18n(); const newMatch = useGameStore((s) => s.newMatch); const goGame = useUIStore((s) => s.goGame); const go = useUIStore((s) => s.go); @@ -44,6 +46,7 @@ export function HomeScreen() { }; const playOnline = () => nav(isAuthed ? "online" : "auth"); + const Chevron = locale === "fa" ? ChevronLeft : ChevronRight; return (
@@ -57,7 +60,7 @@ export function HomeScreen() {
@@ -69,15 +72,33 @@ export function HomeScreen() { - {/* primary actions */} -
- } - title={t("menu.online")} - desc={t("menu.onlineDesc")} + {/* HERO: play online */} +
+ {/* glow */} +
+ + className="press-3d btn-gold relative w-full rounded-3xl px-5 py-5 flex items-center gap-4 text-start" + > + + + + + + {t("menu.online")} + + {t("menu.onlineDesc")} + + + +
+ + {/* vs computer */} +
} title={t("menu.vsComputer")} @@ -88,10 +109,10 @@ export function HomeScreen() { {/* tiles */}
- } label={t("menu.profile")} onClick={() => nav("profile")} /> - } label={t("menu.friends")} onClick={() => nav(isAuthed ? "friends" : "auth")} /> - } label={t("menu.leaderboard")} onClick={() => nav("leaderboard")} /> - } label={t("menu.shop")} onClick={() => nav("shop")} /> + } label={t("menu.profile")} tint="teal" onClick={() => nav("profile")} /> + } label={t("menu.friends")} tint="sky" onClick={() => nav(isAuthed ? "friends" : "auth")} /> + } label={t("menu.leaderboard")} tint="gold" onClick={() => nav("leaderboard")} /> + } label={t("menu.shop")} tint="rose" onClick={() => nav("shop")} />
@@ -143,25 +164,22 @@ function PrimaryCard({ }) { return ( {icon} - + {title} @@ -173,23 +191,34 @@ function PrimaryCard({ ); } +const TILE_TINTS: Record = { + teal: "bg-teal-500/15 text-teal-400", + sky: "bg-sky-500/15 text-sky-400", + gold: "bg-gold-500/15 text-gold-400", + rose: "bg-rose-500/15 text-rose-400", +}; + function Tile({ icon, label, + tint = "gold", onClick, }: { icon: React.ReactNode; label: string; + tint?: keyof typeof TILE_TINTS; onClick: () => void; }) { return ( - {icon} - {label} + + {icon} + + {label} ); }