Build Hokm card game: offline vs-AI + online social/gamification (mock backend)

- Pure-TS Hokm engine (deal, hakem, trump, tricks, scoring, Kot) + AI bots
- Persian-luxury RTL UI (Next 16 / React 19 / Tailwind v4 / Framer Motion / Zustand)
- Online platform behind OnlineService seam (mock now, .NET SignalR later):
  auth (phone OTP + email/Google), profiles, friends, private rooms with
  partner pick, ranked matchmaking, leaderboard, shop
- Gamification: ranks/leagues, coins, XP/levels, daily rewards, achievements
- i18n fa/en, PWA manifest, engine + gamification sims

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-04 10:11:00 +03:30
parent dff1a34f95
commit e2d0a602b6
41 changed files with 5766 additions and 93 deletions
+141 -13
View File
@@ -1,26 +1,154 @@
@import "tailwindcss";
/*
FlatRender Hokm — "Persian Luxury" theme.
Deep navy/teal table, gold filigree accents, geometric motifs.
*/
:root {
--background: #ffffff;
--foreground: #171717;
--navy-950: #060c1f;
--navy-900: #0a142e;
--navy-800: #0e1c3f;
--navy-700: #14274f;
--teal-700: #0d6b6b;
--teal-500: #14b8a6;
--teal-400: #2dd4bf;
--gold-600: #b8860b;
--gold-500: #d4af37;
--gold-400: #e6c659;
--gold-300: #f1da8a;
--cream: #f5ecd6;
--background: var(--navy-950);
--foreground: #eef2f8;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
--color-navy-950: var(--navy-950);
--color-navy-900: var(--navy-900);
--color-navy-800: var(--navy-800);
--color-navy-700: var(--navy-700);
--color-teal-700: var(--teal-700);
--color-teal-500: var(--teal-500);
--color-teal-400: var(--teal-400);
--color-gold-600: var(--gold-600);
--color-gold-500: var(--gold-500);
--color-gold-400: var(--gold-400);
--color-gold-300: var(--gold-300);
--color-cream: var(--cream);
--font-sans: var(--font-vazir), var(--font-jakarta), system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
html,
body {
height: 100%;
}
body {
background: var(--background);
background:
radial-gradient(1200px 800px at 50% -10%, rgba(20, 184, 166, 0.12), transparent 60%),
radial-gradient(900px 700px at 50% 120%, rgba(212, 175, 55, 0.08), transparent 55%),
var(--navy-950);
color: var(--foreground);
font-family: Arial, Helvetica, sans-serif;
font-family: var(--font-sans);
-webkit-font-smoothing: antialiased;
overflow: hidden;
}
/* Persian geometric motif — subtle tiled background */
.persian-pattern {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23d4af37' stroke-opacity='0.06' stroke-width='1'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z'/%3E%3Cpath d='M40 16 L64 40 L40 64 L16 40 Z'/%3E%3Ccircle cx='40' cy='40' r='6'/%3E%3C/g%3E%3C/svg%3E");
background-size: 80px 80px;
}
/* Felt table surface */
.felt {
background:
radial-gradient(ellipse at 50% 45%, rgba(45, 212, 191, 0.18), transparent 62%),
radial-gradient(ellipse at 50% 50%, var(--teal-700) 0%, #0a3a3a 45%, #06201f 100%);
box-shadow:
inset 0 0 120px rgba(0, 0, 0, 0.55),
inset 0 0 0 2px rgba(212, 175, 55, 0.25),
0 30px 80px rgba(0, 0, 0, 0.6);
}
.gold-text {
background: linear-gradient(180deg, var(--gold-300), var(--gold-500) 55%, var(--gold-600));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.gold-border {
border: 1px solid rgba(212, 175, 55, 0.45);
}
.glass {
background: rgba(10, 20, 46, 0.72);
backdrop-filter: blur(14px);
border: 1px solid rgba(212, 175, 55, 0.18);
}
.btn-gold {
background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
color: #2a1f04;
font-weight: 700;
box-shadow: 0 8px 24px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-gold:hover {
transform: translateY(-1px);
filter: brightness(1.05);
box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-gold:active {
transform: translateY(0);
}
/* Card face */
.card-face {
background: linear-gradient(160deg, #fffdf7, #f3ead2);
border: 1px solid rgba(0, 0, 0, 0.12);
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.card-back {
background:
repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.22) 0 6px, transparent 6px 12px),
linear-gradient(160deg, var(--navy-700), var(--navy-900));
border: 1px solid rgba(212, 175, 55, 0.45);
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(212, 175, 55, 0.25);
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-thumb {
background: rgba(212, 175, 55, 0.3);
border-radius: 8px;
}
[dir="rtl"] {
font-family: var(--font-vazir), system-ui, sans-serif;
}
@keyframes float-up {
from {
transform: translateY(110vh);
}
to {
transform: translateY(-20vh);
}
}
.float-suit {
animation-name: float-up;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
@media (prefers-reduced-motion: reduce) {
.float-suit {
animation: none;
display: none;
}
}