Download src/components/HomeView.tsx from xx911121/sdex: direct link, hf CLI and curl.
- Browser
- Download file 38.4 kB
-
https://huggingface.co/spaces/xx911121/sdex/resolve/main/src/components/HomeView.tsx
- Command line
-
hf download hf://spaces/xx911121/sdex/src/components/HomeView.tsx
-
curl -L -o HomeView.tsx https://huggingface.co/spaces/xx911121/sdex/resolve/main/src/components/HomeView.tsx
38.4 kB
| import React, { useState } from "react"; | |
| import { ScreenId, AppState } from "../types"; | |
| import { | |
| Volume2, ArrowRight, X, ShieldAlert, | |
| Landmark, Share2, Headset, Eye, RefreshCw | |
| } from "lucide-react"; | |
| import { BrandLogo } from "./BrandLogo"; | |
| import { translations } from "../lib/translations"; | |
| import electronicLogo from "../assets/images/home-categories/home-category-electronic.png"; | |
| import sportsLogo from "../assets/images/home-categories/home-category-sports.png"; | |
| import lotteryLogo from "../assets/images/home-categories/home-category-lottery.png"; | |
| import fishingLogo from "../assets/images/home-categories/home-category-fishing.png"; | |
| import markSixLogo from "../assets/images/home-categories/home-category-mark-six.png"; | |
| import moviesLogo from "../assets/images/home-categories/home-category-movies.png"; | |
| import liveLogo from "../assets/images/home-categories/home-category-live.png"; | |
| interface HomeViewProps { | |
| state: AppState; | |
| onNavigate: (screen: ScreenId) => void; | |
| onSetState: (updater: (prev: AppState) => AppState) => void; | |
| } | |
| const CategoryLogo: React.FC<{ src: string; alt: string; className?: string }> = ({ src, alt, className = "" }) => ( | |
| <img | |
| src={src} | |
| alt={alt} | |
| className={`select-none pointer-events-none ${className}`} | |
| draggable={false} | |
| /> | |
| ); | |
| export const HomeView: React.FC<HomeViewProps> = ({ state, onNavigate, onSetState }) => { | |
| const [showInstallBanner, setShowInstallBanner] = useState(true); | |
| const t = translations[state.language || "zh"]; | |
| const displayUsername = state.username.length > 6 ? `${state.username.slice(0, 5)}...` : state.username; | |
| return ( | |
| <div className="bg-[#000B14] text-[#d1e4ff] min-h-screen pb-24 font-sans select-none overflow-x-hidden"> | |
| {/* Hero Section */} | |
| <section className="relative w-full h-[245px] overflow-hidden"> | |
| <img | |
| alt="Shengda casino lobby" | |
| className="w-full h-full object-cover object-center" | |
| src="https://images.unsplash.com/photo-1596838132731-3301c3fd4317?auto=format&fit=crop&w=900&q=80" | |
| referrerPolicy="no-referrer" | |
| /> | |
| <div className="absolute inset-0 bg-gradient-to-r from-black/55 via-black/20 to-black/10" /> | |
| <div className="absolute inset-x-0 bottom-8 px-4"> | |
| <div className="max-w-md mx-auto"> | |
| <h2 className="text-2xl font-black text-white leading-tight drop-shadow-[0_2px_4px_rgba(0,0,0,0.85)]"> | |
| {t.entityBacking} | |
| </h2> | |
| <p className="mt-1.5 text-sm font-bold text-white drop-shadow-[0_2px_4px_rgba(0,0,0,0.85)]"> | |
| {t.realPersonVideo} | |
| </p> | |
| <div className="cert-badge-pulse mt-4 inline-flex items-center gap-1.5 rounded-lg border border-[#FFD700]/70 bg-black/45 px-2.5 py-1 shadow-lg backdrop-blur-sm"> | |
| <ShieldAlert className="w-3.5 h-3.5 text-[#FFD700]" /> | |
| <span className="text-[11px] font-black tracking-widest text-[#FFD700]"> | |
| {state.language === "zh" ? "认证:" : "Certified:"} SDYL.PH | |
| </span> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| {/* User Stats / Actions Bar */} | |
| <section className="px-4 -mt-8 relative z-10"> | |
| <div className="bg-[#0b2135]/95 border border-white/5 rounded-xl p-4 flex items-center justify-between shadow-xl backdrop-blur-md"> | |
| {state.isLoggedIn ? ( | |
| <div | |
| onClick={() => onNavigate(ScreenId.PROFILE)} | |
| className="w-[43%] pr-3 border-r border-[#414755]/60 flex flex-col cursor-pointer group" | |
| > | |
| <div className="flex items-center gap-1.5 min-w-0"> | |
| <span className="max-w-[62px] truncate text-sm font-bold text-[#c1c6d7]"> | |
| {displayUsername} | |
| </span> | |
| <span className="rounded-full bg-[#528dff]/30 border border-[#afc6ff]/25 px-2 py-0.5 text-[10px] font-black text-[#d1e4ff] whitespace-nowrap"> | |
| VIP {state.vipLevel} | |
| </span> | |
| <Eye className="w-4 h-4 text-[#afc6ff] shrink-0" /> | |
| </div> | |
| <div className="mt-2 flex items-center gap-1.5"> | |
| <span className="text-[24px] leading-none font-black tracking-tight text-white"> | |
| {state.balance.toFixed(2)} | |
| </span> | |
| <RefreshCw className="w-4 h-4 text-[#afc6ff] shrink-0" /> | |
| </div> | |
| </div> | |
| ) : ( | |
| <div | |
| onClick={() => onNavigate(ScreenId.LOGIN)} | |
| className="flex flex-col gap-1 cursor-pointer group" | |
| > | |
| <h2 className="text-sm font-bold text-[#FFD700] group-hover:underline flex items-center gap-1"> | |
| {state.language === "zh" ? "您还未登录" : "You are guest"} | |
| </h2> | |
| <p className="text-xs text-[#c1c6d7]"> | |
| {state.language === "zh" ? "登录/注册后查看 >" : "Login/Register to view >"} | |
| </p> | |
| </div> | |
| )} | |
| <div className={`flex ${state.isLoggedIn ? "flex-1 justify-around pl-3 gap-1" : "gap-4"}`}> | |
| <div | |
| onClick={() => onNavigate(ScreenId.FINANCE)} | |
| className="flex flex-col items-center gap-1 group cursor-pointer" | |
| > | |
| <div className="w-10 h-10 rounded-full bg-[#22364c] flex items-center justify-center text-[#afc6ff] group-active:scale-90 transition-transform border border-white/5 shadow-inner"> | |
| <Landmark className="w-5 h-5 text-[#afc6ff]" /> | |
| </div> | |
| <span className="text-[10px] text-[#c1c6d7]"> | |
| {state.language === "zh" ? "财务" : "Finance"} | |
| </span> | |
| </div> | |
| <div | |
| onClick={() => onNavigate(ScreenId.REVENUE_DASHBOARD)} | |
| className="flex flex-col items-center gap-1 group cursor-pointer" | |
| > | |
| <div className="w-10 h-10 rounded-full bg-[#22364c] flex items-center justify-center text-[#afc6ff] group-active:scale-90 transition-transform border border-white/5 shadow-inner"> | |
| <Share2 className="w-5 h-5 text-[#afc6ff]" /> | |
| </div> | |
| <span className="text-[10px] text-[#c1c6d7]"> | |
| {state.language === "zh" ? "我的收入" : "Agency"} | |
| </span> | |
| </div> | |
| <div | |
| onClick={() => onNavigate(ScreenId.CUSTOMER_SUPPORT)} | |
| className="flex flex-col items-center gap-1 group cursor-pointer" | |
| > | |
| <div className="w-10 h-10 rounded-full bg-[#22364c] flex items-center justify-center text-[#afc6ff] group-active:scale-90 transition-transform border border-white/5 shadow-inner"> | |
| <Headset className="w-5 h-5 text-[#afc6ff]" /> | |
| </div> | |
| <span className="text-[10px] text-[#c1c6d7]"> | |
| {state.language === "zh" ? "在线客服" : "Support"} | |
| </span> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| {/* Marquee Announcement */} | |
| <section className="mt-4 px-4 bg-gradient-to-r from-transparent via-[#0b2135]/50 to-transparent"> | |
| <div className="bg-[#071d31] rounded-full h-8 flex items-center px-4 overflow-hidden border border-[#414755]/20"> | |
| <Volume2 className="text-[#afc6ff] w-4 h-4 mr-2 shrink-0" /> | |
| <div className="flex-1 overflow-hidden relative w-full"> | |
| <div className="whitespace-nowrap text-xs text-[#c1c6d7] inline-block animate-[scroll-left_25s_linear_infinite]"> | |
| 来到 盛大娱乐城 游戏平台 — 在这里,您可以畅玩最热门的棋牌、电子、捕鱼、真人视讯、体育竞技等海量精彩游戏! 业内公平背书,充提秒级到账,祝您好运连连! | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| {/* Main Categories Grid (Asymmetric Bento) */} | |
| <section className="mt-6 px-4"> | |
| <div className="grid grid-cols-2 gap-3"> | |
| {/* Large Feature: Live Casino (视讯) */} | |
| <div | |
| onClick={() => onNavigate(ScreenId.GAME_CATEGORIES)} | |
| className="row-span-2 relative rounded-2xl overflow-hidden bg-[#071726] border border-[#afc6ff]/10 shadow-[0_8px_24px_rgba(0,0,0,0.5)] group active:scale-[0.98] transition-all cursor-pointer h-[190px]" | |
| > | |
| <img | |
| alt="Live Casino" | |
| className="w-full h-full object-cover opacity-35 group-hover:scale-105 transition-transform duration-700 brightness-[0.5] contrast-[1.1]" | |
| src="https://images.unsplash.com/photo-1596838132731-3301c3fd4317?auto=format&fit=crop&w=500&q=80" | |
| referrerPolicy="no-referrer" | |
| /> | |
| <CategoryLogo | |
| src={liveLogo} | |
| alt="视讯" | |
| className="absolute inset-0 h-full w-full scale-[1.4] object-cover object-center opacity-95 drop-shadow-[0_8px_18px_rgba(0,0,0,0.65)] group-hover:scale-[1.44] transition-transform duration-500" | |
| /> | |
| {/* Elegant overlay with bottom glassmorphism badge */} | |
| <div className="absolute inset-0 bg-gradient-to-t from-[#000F20] via-[#000F20]/30 to-transparent"> | |
| <div className="absolute left-4 bottom-5 flex items-center justify-between"> | |
| <div className="bg-[#0b2135]/80 backdrop-blur-md px-3.5 py-1.5 rounded-xl border border-white/10 shadow-lg flex items-center gap-1.5"> | |
| <span className="w-1.5 h-1.5 rounded-full bg-amber-400"></span> | |
| <h3 className="text-sm font-black tracking-widest text-[#fff1be] uppercase font-sans">视讯</h3> | |
| </div> | |
| <div className="w-7 h-7 rounded-full bg-amber-400/10 border border-amber-400/30 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300"> | |
| <ArrowRight className="w-4 h-4 text-amber-400" /> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| {/* Lottery (彩票) */} | |
| <div | |
| onClick={() => onNavigate(ScreenId.GAME_CENTER)} | |
| className="relative rounded-2xl overflow-hidden bg-[#071726] border border-[#afc6ff]/10 shadow-[0_4px_16px_rgba(0,0,0,0.4)] group active:scale-[0.98] transition-all cursor-pointer h-[90px]" | |
| > | |
| <img | |
| alt="Lottery" | |
| className="w-full h-full object-cover opacity-30 group-hover:scale-105 transition-transform duration-700 brightness-[0.4] contrast-[1.1]" | |
| src="https://images.unsplash.com/photo-1606167668584-78701c57f13d?auto=format&fit=crop&w=500&q=80" | |
| referrerPolicy="no-referrer" | |
| /> | |
| <CategoryLogo | |
| src={lotteryLogo} | |
| alt="彩票" | |
| className="absolute inset-0 h-full w-full scale-[1.1] object-cover object-center opacity-95 drop-shadow-[0_8px_18px_rgba(0,0,0,0.65)] group-hover:scale-[1.14] transition-transform duration-500" | |
| /> | |
| {/* Custom interactive Gold/Glass Lottery Draw Machine (抽奖滚筒) SVG element */} | |
| <svg viewBox="0 0 160 90" className="hidden" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <defs> | |
| <linearGradient id="cageGold" x1="0%" y1="0%" x2="100%" y2="100%"> | |
| <stop offset="0%" stopColor="#FFF9D2" /> | |
| <stop offset="40%" stopColor="#D4AF37" /> | |
| <stop offset="80%" stopColor="#A87E15" /> | |
| <stop offset="100%" stopColor="#634503" /> | |
| </linearGradient> | |
| <linearGradient id="marbleBlue" x1="0%" y1="0%" x2="100%" y2="100%"> | |
| <stop offset="0%" stopColor="#E3F2FD" /> | |
| <stop offset="50%" stopColor="#1E88E5" /> | |
| <stop offset="100%" stopColor="#0B3C5D" /> | |
| </linearGradient> | |
| <linearGradient id="marbleGoldOnly" x1="0%" y1="0%" x2="100%" y2="100%"> | |
| <stop offset="0%" stopColor="#FFFFEE" /> | |
| <stop offset="40%" stopColor="#F39C12" /> | |
| <stop offset="100%" stopColor="#874C08" /> | |
| </linearGradient> | |
| <radialGradient id="glassSphereShine" cx="35%" cy="35%" r="65%"> | |
| <stop offset="0%" stopColor="#FFFFFF" stopOpacity="0.9" /> | |
| <stop offset="40%" stopColor="#FFFFFF" stopOpacity="0.1" /> | |
| <stop offset="100%" stopColor="#FFFFFF" stopOpacity="0" /> | |
| </radialGradient> | |
| </defs> | |
| {/* The gold circular rail loop surrounding the drawing machine */} | |
| <circle cx="115" cy="42" r="26" stroke="url(#cageGold)" strokeWidth="0.75" strokeDasharray="2 3" opacity="0.4" /> | |
| {/* Pedestal Stand (Base) */} | |
| <rect x="92" y="73" width="46" height="5" rx="1.5" fill="url(#cageGold)" stroke="#5E430B" strokeWidth="0.5" /> | |
| <path d="M 95 73 L 102 42" stroke="url(#cageGold)" strokeWidth="2.5" strokeLinecap="round" /> | |
| <path d="M 135 73 L 128 42" stroke="url(#cageGold)" strokeWidth="2.5" strokeLinecap="round" /> | |
| {/* Central spinning axle bearing hub */} | |
| <circle cx="115" cy="42" r="3.5" fill="url(#cageGold)" /> | |
| <circle cx="115" cy="42" r="1.5" fill="#3D2904" /> | |
| {/* Hexagonal Gold Cage Drum */} | |
| <polygon points="115,16 135,26 135,58 115,68 95,58 95,26" fill="#1A2F4D" fillOpacity="0.15" stroke="url(#cageGold)" strokeWidth="1.2" /> | |
| {/* Inner wires crossing to form the gold wire cage */} | |
| <line x1="115" y1="16" x2="115" y2="68" stroke="url(#cageGold)" strokeWidth="0.5" opacity="0.7" /> | |
| <line x1="95" y1="26" x2="135" y2="58" stroke="url(#cageGold)" strokeWidth="0.5" opacity="0.7" /> | |
| <line x1="95" y1="58" x2="135" y2="26" stroke="url(#cageGold)" strokeWidth="0.5" opacity="0.7" /> | |
| <line x1="95" y1="42" x2="135" y2="42" stroke="url(#cageGold)" strokeWidth="0.5" opacity="0.7" /> | |
| {/* Bouncing colorful lottery balls inside the spinning drum */} | |
| {/* Ball 1: Gold ball bottom left */} | |
| <circle cx="106" cy="51" r="5" fill="url(#marbleGoldOnly)" /> | |
| <circle cx="106" cy="51" r="5" fill="url(#glassSphereShine)" /> | |
| <text x="106" y="53" fontFamily="sans-serif" fontSize="5.5" fontWeight="900" fill="#111" textAnchor="middle">8</text> | |
| {/* Ball 2: Blue ball top right */} | |
| <circle cx="123" cy="34" r="4.5" fill="url(#marbleBlue)" /> | |
| <circle cx="123" cy="34" r="4.5" fill="url(#glassSphereShine)" /> | |
| <text x="123" y="36.2" fontFamily="sans-serif" fontSize="5" fontWeight="950" fill="#FFF" textAnchor="middle">6</text> | |
| {/* Ball 3: Gold ball at the center bottom */} | |
| <circle cx="115" cy="56" r="4.5" fill="url(#marbleGoldOnly)" /> | |
| <text x="115" y="58.2" fontFamily="sans-serif" fontSize="5" fontWeight="950" fill="#111" textAnchor="middle">2</text> | |
| {/* The Gold Ball Slide release chute track going down to left */} | |
| <path d="M 115 62 Q 105 70 80 70 A 5 5 0 0 1 73 75 M 105 60 L 100 68" stroke="url(#cageGold)" strokeWidth="1.2" strokeLinecap="round" opacity="0.8" /> | |
| {/* Gold Ball currently rolling down the tray (number 28) */} | |
| <g transform="translate(73, 67)"> | |
| <circle cx="0" cy="0" r="5.5" fill="url(#marbleGoldOnly)" className="filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.5)]" /> | |
| <circle cx="0" cy="0" r="5.5" fill="url(#glassSphereShine)" /> | |
| <circle cx="-0.5" cy="-0.5" r="2.5" fill="#FFFFFF" /> | |
| <text x="-0.5" y="1.2" fontFamily="sans-serif" fontSize="5.5" fontWeight="950" fill="#111" textAnchor="middle">28</text> | |
| </g> | |
| {/* Tiny shiny stars */} | |
| <polygon points="144,22 146,26 144,30 142,26" fill="#FFF9D2" /> | |
| <polygon points="84,40 85.5,43 84,46 82.5,43" fill="#FFF9D2" /> | |
| </svg> | |
| {/* Elegant overlay with floating badge */} | |
| <div className="absolute inset-0 bg-gradient-to-t from-[#000F20]/90 via-[#000F20]/20 to-transparent"> | |
| <div className="absolute left-4 bottom-3 flex items-center justify-between"> | |
| <div className="bg-[#0b2135]/80 backdrop-blur-md px-3.5 py-1.5 rounded-xl border border-white/10 shadow-lg flex items-center gap-1.5"> | |
| <span className="w-1.5 h-1.5 rounded-full bg-amber-400"></span> | |
| <h3 className="text-sm font-black tracking-widest text-[#fff1be] uppercase font-sans">彩票</h3> | |
| </div> | |
| <div className="w-7 h-7 rounded-full bg-amber-400/10 border border-amber-400/30 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300"> | |
| <ArrowRight className="w-4 h-4 text-amber-400" /> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| {/* Slots (电子) */} | |
| <div | |
| onClick={() => onNavigate(ScreenId.PG_SOFT_GAMES)} | |
| className="relative rounded-2xl overflow-hidden bg-[#071726] border border-[#afc6ff]/10 shadow-[0_4px_16px_rgba(0,0,0,0.4)] group active:scale-[0.98] transition-all cursor-pointer h-[90px]" | |
| > | |
| <img | |
| alt="Slots" | |
| className="w-full h-full object-cover opacity-30 group-hover:scale-105 transition-transform duration-700 brightness-[0.4] contrast-[1.1]" | |
| src="https://images.unsplash.com/photo-1518133910546-b6c2fb7d79e3?auto=format&fit=crop&w=500&q=80" | |
| referrerPolicy="no-referrer" | |
| /> | |
| <CategoryLogo | |
| src={electronicLogo} | |
| alt="电子" | |
| className="absolute inset-0 h-full w-full scale-[1.1] object-cover object-center opacity-95 drop-shadow-[0_8px_18px_rgba(0,0,0,0.65)] group-hover:scale-[1.14] transition-transform duration-500" | |
| /> | |
| {/* Custom interactive Golden Slot Machine (777 老虎机) SVG element */} | |
| <svg viewBox="0 0 160 90" className="hidden" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <defs> | |
| <linearGradient id="slotsGold" x1="0%" y1="0%" x2="100%" y2="100%"> | |
| <stop offset="0%" stopColor="#FFF1BE" /> | |
| <stop offset="40%" stopColor="#D4AF37" /> | |
| <stop offset="100%" stopColor="#8A640F" /> | |
| </linearGradient> | |
| <linearGradient id="screenGrad" x1="0%" y1="0%" x2="0%" y2="100%"> | |
| <stop offset="0%" stopColor="#0A1826" /> | |
| <stop offset="100%" stopColor="#01060D" /> | |
| </linearGradient> | |
| </defs> | |
| {/* Slot machine housing center-aligned on the right */} | |
| <g transform="translate(68, 5)"> | |
| {/* Gold cabinet border */} | |
| <rect x="20" y="8" width="46" height="74" rx="4" fill="url(#slotsGold)" stroke="#5A430B" strokeWidth="1" className="filter drop-shadow-[0_4px_8px_rgba(0,0,0,0.6)]" /> | |
| {/* Neon header */} | |
| <rect x="24" y="12" width="38" height="11" rx="1.5" fill="url(#screenGrad)" stroke="url(#slotsGold)" strokeWidth="0.75" /> | |
| {/* Twinkling mini bulb ticks */} | |
| <circle cx="27" cy="17.5" r="0.75" fill="#FFD700" /> | |
| <circle cx="33" cy="17.5" r="0.75" fill="#FF4500" /> | |
| <circle cx="39" cy="17.5" r="0.75" fill="#FFD700" /> | |
| <circle cx="45" cy="17.5" r="0.75" fill="#FF4500" /> | |
| <circle cx="51" cy="17.5" r="0.75" fill="#FFD700" /> | |
| <circle cx="57" cy="17.5" r="0.75" fill="#FF4500" /> | |
| <text x="43" y="20.5" fontFamily="sans-serif" fontSize="6" fontWeight="950" fill="#FFD700" letterSpacing="0.4" textAnchor="middle" className="animate-pulse">777</text> | |
| {/* Main Reels Screen */} | |
| <rect x="24" y="27" width="38" height="24" rx="1.5" fill="url(#screenGrad)" stroke="#1a2f4d" strokeWidth="1.2" /> | |
| {/* Reels divides */} | |
| <line x1="36" y1="28" x2="36" y2="50" stroke="url(#slotsGold)" strokeWidth="0.75" opacity="0.6" /> | |
| <line x1="49" y1="28" x2="49" y2="50" stroke="url(#slotsGold)" strokeWidth="0.75" opacity="0.6" /> | |
| {/* Classic 7-7-7 Jackpot Combination */} | |
| <g transform="translate(24, 27)"> | |
| <text x="6" y="16" fontFamily="sans-serif" fontSize="10" fontWeight="950" fill="#E74C3C" textAnchor="middle">7</text> | |
| <text x="18.5" y="16" fontFamily="sans-serif" fontSize="10" fontWeight="950" fill="#F1C40F" textAnchor="middle" className="animate-bounce">7</text> | |
| <text x="31" y="16" fontFamily="sans-serif" fontSize="10" fontWeight="950" fill="#E74C3C" textAnchor="middle">7</text> | |
| </g> | |
| {/* Coin output slot */} | |
| <rect x="25" y="56" width="36" height="11" rx="2" fill="#0C1F32" stroke="url(#slotsGold)" strokeWidth="0.75" /> | |
| <path d="M29 61.5 L57 61.5" stroke="url(#slotsGold)" strokeWidth="1" opacity="0.4" /> | |
| {/* Lever Arm & Ruby lever sphere */} | |
| <path d="M66 45 L77 24" stroke="url(#slotsGold)" strokeWidth="2.5" strokeLinecap="round" /> | |
| <circle cx="77" cy="22" r="4.5" fill="#C0392B" className="filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.5)]" /> | |
| <circle cx="75" cy="20" r="1.2" fill="#E74C3C" /> | |
| </g> | |
| {/* Stars decorations */} | |
| <polygon points="120,12 123,16 120,20 117,16" fill="url(#slotsGold)" opacity="0.8" /> | |
| </svg> | |
| {/* Elegant overlay with floating badge */} | |
| <div className="absolute inset-0 bg-gradient-to-t from-[#000F20]/90 via-[#000F20]/20 to-transparent"> | |
| <div className="absolute left-4 bottom-3 flex items-center justify-between"> | |
| <div className="bg-[#0b2135]/80 backdrop-blur-md px-3.5 py-1.5 rounded-xl border border-white/10 shadow-lg flex items-center gap-1.5"> | |
| <span className="w-1.5 h-1.5 rounded-full bg-amber-400"></span> | |
| <h3 className="text-sm font-black tracking-widest text-[#fff1be] uppercase font-sans">电子</h3> | |
| </div> | |
| <div className="w-7 h-7 rounded-full bg-amber-400/10 border border-amber-400/30 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300"> | |
| <ArrowRight className="w-4 h-4 text-amber-400" /> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| {/* Small 4-column Grid */} | |
| <div className="grid grid-cols-4 gap-2.5 mt-3 animate-fade-in-up"> | |
| <div | |
| onClick={() => onNavigate(ScreenId.GAME_RECOMMENDATIONS)} | |
| className="flex flex-col items-center justify-center aspect-square gap-1.5 p-1 rounded-xl bg-[#0b2135]/65 border border-white/5 active:scale-95 hover:border-amber-400/30 transition-all cursor-pointer" | |
| > | |
| <CategoryLogo | |
| src={sportsLogo} | |
| alt="体育" | |
| className="w-14 h-14 sm:w-20 sm:h-20 md:w-24 md:h-24 rounded-md object-cover drop-shadow-[0_4px_8px_rgba(0,0,0,0.55)] active:rotate-12 transition-transform duration-300" | |
| /> | |
| {/* Custom Interactive Gold-Sapphire Soccer Ball (体育) SVG */} | |
| <svg viewBox="0 0 32 32" className="hidden" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <defs> | |
| <linearGradient id="vectorBallGold" x1="0%" y1="0%" x2="100%" y2="100%"> | |
| <stop offset="0%" stopColor="#FFF9D2" /> | |
| <stop offset="40%" stopColor="#D4AF37" /> | |
| <stop offset="100%" stopColor="#7E520A" /> | |
| </linearGradient> | |
| <radialGradient id="ballShineBlue" cx="30%" cy="30%" r="70%"> | |
| <stop offset="0%" stopColor="#1E5285" /> | |
| <stop offset="60%" stopColor="#0B233D" /> | |
| <stop offset="100%" stopColor="#020C17" /> | |
| </radialGradient> | |
| </defs> | |
| <circle cx="16" cy="16" r="14" fill="url(#ballShineBlue)" stroke="url(#vectorBallGold)" strokeWidth="1" /> | |
| {/* Gold pentagons/hexagons panel outlines */} | |
| <polygon points="16,11 20,14 18.5,19 13.5,19 12,14" fill="#0A1E30" stroke="url(#vectorBallGold)" strokeWidth="0.8" /> | |
| <path d="M 16 11 L 16 5 M 20 14 L 24.5 12 M 18.5 19 L 23 21 M 13.5 19 L 9 21 M 12 14 L 7.5 12" stroke="url(#vectorBallGold)" strokeWidth="0.8" /> | |
| <path d="M 16 5 L 11 2 L 6.5 5 L 7.5 12 M 16 5 L 21 2 L 25.5 5 L 24.5 12" stroke="url(#vectorBallGold)" strokeWidth="0.8" /> | |
| <path d="M 9 21 L 11 27 L 16 25.5 L 21 27 L 23 21 M 16 25.5 L 16 30" stroke="url(#vectorBallGold)" strokeWidth="0.8" /> | |
| <path d="M 11 27 L 6 26.5 M 21 27 L 26 26.5" stroke="url(#vectorBallGold)" strokeWidth="0.8" /> | |
| {/* Specular gloss highlight */} | |
| <circle cx="12" cy="12" r="8" fill="#FFFFFF" fillOpacity="0.15" /> | |
| </svg> | |
| <span className="text-[10px] text-[#c1c6d7] font-semibold">体育</span> | |
| </div> | |
| <div | |
| onClick={() => onNavigate(ScreenId.PROVIDERS)} | |
| className="flex flex-col items-center justify-center aspect-square gap-1.5 p-1 rounded-xl bg-[#0b2135]/65 border border-white/5 active:scale-95 hover:border-amber-400/30 transition-all cursor-pointer" | |
| > | |
| <CategoryLogo | |
| src={fishingLogo} | |
| alt="捕鱼" | |
| className="w-14 h-14 sm:w-20 sm:h-20 md:w-24 md:h-24 rounded-md object-cover drop-shadow-[0_4px_8px_rgba(0,0,0,0.55)] hover:scale-105 transition-transform" | |
| /> | |
| {/* Custom Interactive Gold Shark popping out of waves (捕鱼) SVG */} | |
| <svg viewBox="0 0 32 32" className="hidden" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <defs> | |
| <linearGradient id="vectorSharkGold" x1="0%" y1="0%" x2="100%" y2="100%"> | |
| <stop offset="0%" stopColor="#FFF9D2" /> | |
| <stop offset="30%" stopColor="#E5B23D" /> | |
| <stop offset="70%" stopColor="#9C701A" /> | |
| <stop offset="100%" stopColor="#5E430B" /> | |
| </linearGradient> | |
| <linearGradient id="vectorWavesBlue" x1="0%" y1="100%" x2="0%" y2="0%"> | |
| <stop offset="0%" stopColor="#081E33" /> | |
| <stop offset="100%" stopColor="#2A73BA" /> | |
| </linearGradient> | |
| </defs> | |
| {/* Splashing Waves */} | |
| <path d="M2,23 C8,21 14,26 20,23 C24,21 28,24 30,23 L30,30 L2,30 Z" fill="url(#vectorWavesBlue)" opacity="0.9" /> | |
| <path d="M2,24 C10,21 17,27 25,24 T30,25" stroke="#4dabf7" strokeWidth="0.75" opacity="0.6" /> | |
| {/* Golden Shark leaping */} | |
| <g transform="translate(1, -1)"> | |
| <path d="M5,19 C10,13 18,10 26,14 C21,17 15,20 9,21 Z" fill="url(#vectorSharkGold)" stroke="#4E3400" strokeWidth="0.5" /> | |
| <path d="M4,17 C3,14 2,21 4,19 Z" fill="url(#vectorSharkGold)" stroke="#4E3400" strokeWidth="0.5" /> | |
| <path d="M13,13 C14,8 17,9 18,13 Z" fill="url(#vectorSharkGold)" stroke="#4E3400" strokeWidth="0.5" /> | |
| <path d="M20,14 C23,17 19,19 18,16 Z" fill="#422200" /> | |
| <circle cx="19.5" cy="11.5" r="1" fill="#FFFFFF" /> | |
| <circle cx="19.7" cy="11.2" r="0.5" fill="#111111" /> | |
| </g> | |
| <circle cx="7" cy="21" r="0.75" fill="#E3F2FD" opacity="0.8" /> | |
| <circle cx="23" cy="20" r="0.75" fill="#E3F2FD" opacity="0.8" /> | |
| </svg> | |
| <span className="text-[10px] text-[#c1c6d7] font-semibold">捕鱼</span> | |
| </div> | |
| <div | |
| onClick={() => onNavigate(ScreenId.ANNOUNCEMENTS)} | |
| className="flex flex-col items-center justify-center aspect-square gap-1.5 p-1 rounded-xl bg-[#0b2135]/65 border border-white/5 active:scale-95 hover:border-amber-400/30 transition-all cursor-pointer" | |
| > | |
| <CategoryLogo | |
| src={markSixLogo} | |
| alt="香港六合彩" | |
| className="w-14 h-14 sm:w-20 sm:h-20 md:w-24 md:h-24 rounded-md object-cover drop-shadow-[0_4px_8px_rgba(0,0,0,0.55)]" | |
| /> | |
| {/* Custom Interactive Crowned Dolphin and Mark Six lucky balls (香港六合彩) SVG */} | |
| <svg viewBox="0 0 32 32" className="hidden" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <defs> | |
| <linearGradient id="vectorLottoGold" x1="0%" y1="0%" x2="100%" y2="100%"> | |
| <stop offset="0%" stopColor="#FFF9D2" /> | |
| <stop offset="40%" stopColor="#E5B23D" /> | |
| <stop offset="100%" stopColor="#7E520A" /> | |
| </linearGradient> | |
| <radialGradient id="ballGlowSmall" cx="30%" cy="30%" r="70%"> | |
| <stop offset="0%" stopColor="#FFFFFF" stopOpacity="0.8" /> | |
| <stop offset="100%" stopColor="#000000" stopOpacity="0" /> | |
| </radialGradient> | |
| </defs> | |
| {/* Crowned Dolphin */} | |
| <g transform="translate(3, 1)"> | |
| <path d="M6,17 C1,15 2,8 10,8 C17,8 21,13 22,17 C17,18 12,19 6,17 Z" fill="url(#vectorLottoGold)" stroke="#523903" strokeWidth="0.5" /> | |
| <path d="M21,15 Q24,12 21,19" fill="url(#vectorLottoGold)" stroke="#523903" strokeWidth="0.5" /> | |
| {/* Royal Crown */} | |
| <path d="M7,7 L6,4 L8,5 L10,3 L12,5 L14,4 L13,7 Z" fill="url(#vectorLottoGold)" /> | |
| <circle cx="6" cy="4" r="0.4" fill="#FFFFFF" /> | |
| <circle cx="10" cy="3" r="0.4" fill="#FFFFFF" /> | |
| <circle cx="14" cy="4" r="0.4" fill="#FFFFFF" /> | |
| <circle cx="8.5" cy="11.5" r="1" fill="#4E3400" /> | |
| {/* Question mark on whale body */} | |
| <path d="M13,11 C14,10 15.5,10 15.5,12 C15.5,13.2 14.5,13.5 14.5,14.5 L14.5,15" stroke="#3D2900" strokeWidth="1" strokeLinecap="round" /> | |
| <circle cx="14.5" cy="16.5" r="0.6" fill="#3D2900" /> | |
| </g> | |
| {/* Floating numbered spheres: 2, 9, 9 */} | |
| <g transform="translate(6, 23)"> | |
| <circle cx="0" cy="0" r="4.5" fill="url(#vectorLottoGold)" stroke="#523903" strokeWidth="0.4" /> | |
| <circle cx="0" cy="0" r="4.5" fill="url(#ballGlowSmall)" /> | |
| <circle cx="-0.5" cy="-0.5" r="2.2" fill="#FFFFFF" /> | |
| <text x="-0.5" y="0.6" fontFamily="sans-serif" fontSize="3" fontWeight="950" fill="#111" textAnchor="middle">2</text> | |
| </g> | |
| <g transform="translate(16, 25)"> | |
| <circle cx="0" cy="0" r="5" fill="url(#vectorLottoGold)" stroke="#523903" strokeWidth="0.4" /> | |
| <circle cx="0" cy="0" r="5" fill="url(#ballGlowSmall)" /> | |
| <circle cx="-0.5" cy="-0.5" r="2.5" fill="#FFFFFF" /> | |
| <text x="-0.5" y="0.8" fontFamily="sans-serif" fontSize="3.5" fontWeight="950" fill="#111" textAnchor="middle">9</text> | |
| </g> | |
| <g transform="translate(25, 21)"> | |
| <circle cx="0" cy="0" r="4" fill="url(#vectorLottoGold)" stroke="#523903" strokeWidth="0.4" /> | |
| <circle cx="0" cy="0" r="4" fill="url(#ballGlowSmall)" /> | |
| <circle cx="-0.5" cy="-0.5" r="2" fill="#FFFFFF" /> | |
| <text x="-0.5" y="0.5" fontFamily="sans-serif" fontSize="3" fontWeight="950" fill="#111" textAnchor="middle">9</text> | |
| </g> | |
| </svg> | |
| <span className="text-[10px] text-[#c1c6d7] whitespace-nowrap font-semibold">香港六合彩</span> | |
| </div> | |
| <div | |
| onClick={() => onNavigate(ScreenId.GAME_CENTER)} | |
| className="flex flex-col items-center justify-center aspect-square gap-1.5 p-1 rounded-xl bg-[#0b2135]/65 border border-white/5 active:scale-95 hover:border-amber-400/30 transition-all cursor-pointer" | |
| > | |
| <CategoryLogo | |
| src={moviesLogo} | |
| alt="影视" | |
| className="w-14 h-14 sm:w-20 sm:h-20 md:w-24 md:h-24 rounded-md object-cover drop-shadow-[0_4px_8px_rgba(0,0,0,0.55)] active:scale-105 transition-transform" | |
| /> | |
| {/* Custom Interactive Movie Film Clapperboard (影视) SVG */} | |
| <svg viewBox="0 0 32 32" className="hidden" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <defs> | |
| <linearGradient id="vectorClapGold" x1="0%" y1="0%" x2="100%" y2="100%"> | |
| <stop offset="0%" stopColor="#FFF9D2" /> | |
| <stop offset="40%" stopColor="#D4AF37" /> | |
| <stop offset="100%" stopColor="#7E520A" /> | |
| </linearGradient> | |
| <linearGradient id="vectorClapDark" x1="0%" y1="0%" x2="0%" y2="100%"> | |
| <stop offset="0%" stopColor="#0E233B" /> | |
| <stop offset="100%" stopColor="#020810" /> | |
| </linearGradient> | |
| </defs> | |
| <rect x="5" y="11" width="22" height="15" rx="1.5" fill="url(#vectorClapDark)" stroke="url(#vectorClapGold)" strokeWidth="0.8" /> | |
| {/* Clapper board upper bars */} | |
| <rect x="5" y="11" width="22" height="3" fill="url(#vectorClapGold)" /> | |
| <path d="M8,11 L10,14 M14,11 L16,14 M20,11 L22,14 M25,11 L27,14" stroke="#111" strokeWidth="1" /> | |
| {/* Hinged arm open! */} | |
| <g transform="rotate(-18 5 11)"> | |
| <rect x="5" y="5" width="22" height="4.5" rx="0.5" fill="url(#vectorClapGold)" /> | |
| <path d="M8,5 L10,9.5 M13,5 L15,9.5 M18,5 L20,9.5 M23,5 L25,9.5" stroke="#111" strokeWidth="1.2" /> | |
| </g> | |
| {/* Play symbol on clapperboard body */} | |
| <polygon points="13,16 13,22 19,19" fill="url(#vectorClapGold)" stroke="#5E430B" strokeWidth="0.5" /> | |
| </svg> | |
| <span className="text-[10px] text-[#c1c6d7] font-semibold">影视</span> | |
| </div> | |
| </div> | |
| </section> | |
| {/* Install Banner */} | |
| {showInstallBanner && ( | |
| <section className="mt-6 px-4"> | |
| <div className="bg-[#528dff]/20 border border-[#afc6ff]/20 rounded-2xl p-4 flex items-center justify-between gap-4 shadow-sm animate-fade-in"> | |
| <div className="flex items-center gap-3"> | |
| <div className="w-10 h-10 rounded-xl bg-slate-900 border border-blue-500/30 p-1 flex items-center justify-center shadow-lg"> | |
| <BrandLogo className="w-8 h-8" iconOnly={true} /> | |
| </div> | |
| <span className="text-xs font-semibold text-white">添加 盛大娱乐城 到手机主屏幕</span> | |
| </div> | |
| <X | |
| onClick={() => setShowInstallBanner(false)} | |
| className="text-[#c1c6d7] w-5 h-5 cursor-pointer hover:text-white" | |
| /> | |
| </div> | |
| </section> | |
| )} | |
| {/* Floating Recharge Access FAB */} | |
| <div className="fixed bottom-5 left-1/2 -translate-x-1/2 z-[60]"> | |
| <div className="relative"> | |
| <div className="absolute -inset-1 bg-[#afc6ff]/35 blur-xl rounded-full animate-pulse"></div> | |
| <button | |
| onClick={() => onNavigate(ScreenId.DEPOSIT)} | |
| className="w-14 h-14 bg-gradient-to-b from-[#528dff] to-[#afc6ff] text-[#002d6c] rounded-full shadow-[0_4px_16px_rgba(82,141,255,0.4)] border-4 border-[#0b2135] flex flex-col items-center justify-center active:scale-90 transition-transform relative hover:brightness-105 cursor-pointer" | |
| > | |
| <Landmark className="w-5 h-5 mx-auto" /> | |
| <span className="text-[10px] font-bold mt-0.5"> | |
| {state.language === "zh" ? "充值" : "Recharge"} | |
| </span> | |
| </button> | |
| </div> | |
| </div> | |
| {/* Bottom Nav Bar */} | |
| <nav className="bg-[#22364c] border-t border-[#414755] fixed bottom-0 left-0 w-full z-50 rounded-t-xl shadow-xl flex justify-around items-center h-16 px-1"> | |
| <a | |
| onClick={() => onNavigate(ScreenId.HOME)} | |
| className="flex flex-col items-center justify-center text-[#afc6ff] font-bold drop-shadow-[0_0_8px_rgba(175,198,255,0.5)] scale-105 cursor-pointer flex-1" | |
| > | |
| <span className="text-xl"> | |
| {translations[state.language || "zh"].home} | |
| </span> | |
| <span className="text-[10px] tracking-wide mt-1">Home</span> | |
| </a> | |
| <a | |
| onClick={() => onNavigate(ScreenId.GAME_CENTER)} | |
| className="flex flex-col items-center justify-center text-[#c1c6d7] hover:text-[#afc6ff] transition-colors cursor-pointer flex-1" | |
| > | |
| <span className="text-sm font-semibold"> | |
| {state.language === "zh" ? "游戏" : "Games"} | |
| </span> | |
| <span className="text-[9px] mt-0.5">Games</span> | |
| </a> | |
| <div className="w-16"></div> {/* Spacer for FAB */} | |
| <a | |
| onClick={() => onNavigate(ScreenId.PROMOTIONS)} | |
| className="flex flex-col items-center justify-center text-[#c1c6d7] hover:text-[#afc6ff] transition-colors cursor-pointer flex-1" | |
| > | |
| <span className="text-sm font-semibold"> | |
| {state.language === "zh" ? "活动" : "Promos"} | |
| </span> | |
| <span className="text-[9px] mt-0.5">Promos</span> | |
| </a> | |
| <a | |
| onClick={() => onNavigate(ScreenId.PROFILE)} | |
| className="flex flex-col items-center justify-center text-[#c1c6d7] hover:text-[#afc6ff] transition-colors cursor-pointer flex-1" | |
| > | |
| <span className="text-sm font-semibold"> | |
| {translations[state.language || "zh"].mine} | |
| </span> | |
| <span className="text-[9px] mt-0.5">Profile</span> | |
| </a> | |
| </nav> | |
| </div> | |
| ); | |
| }; | |