GameHome.cshtml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. @model LotteryWebApp.Models.HomeIndex_ViewModel
  2. @{
  3. ViewData["Title"] = "LotteryV2 - Game Home";
  4. Layout = "~/Areas/LotteryV2/Views/Shared/_Layout.cshtml";
  5. }
  6. @using LotteryWebApp.Languages;
  7. @section Styles {
  8. <script src="https://cdn.tailwindcss.com"></script>
  9. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  10. <link rel="stylesheet" href="/LotteryV2/css/site.css" />
  11. }
  12. <div class="main-container animate__animated animate__fadeIn bg-[#F5F5F5] min-h-screen">
  13. <!-- Top Account Profile Bar / Backgound Red header -->
  14. <div class="w-full bg-[#EE0033] p-4 text-white rounded-b-0xl shadow-md">
  15. <!-- Row 1: Profile Info -->
  16. <div class="flex items-center gap-4">
  17. <div class="w-16 h-16 rounded-full border-2 border-white/60 overflow-hidden bg-[#FFE] shadow-sm">
  18. <img src="https://api.dicebear.com/7.x/avataaars/svg?seed=Ngan" alt="Avatar" class="w-full h-full object-cover">
  19. </div>
  20. <div>
  21. <div class="font-bold text-sm tracking-wide opacity-90">@(Model?.profile?.fullName ?? "User")</div>
  22. <div class="flex items-center gap-1 mt-0.5">
  23. <span class="text-3xl font-black text-[#FBF3A7]" style="text-shadow: 0 1px 2px rgba(0,0,0,0.2)">@(Model?.userStatus?.cash_coin ?? "0")</span>
  24. <span class="text-xs font-bold text-[#FBF3A7] uppercase mt-1">htg</span>
  25. </div>
  26. </div>
  27. </div>
  28. <!-- Row 2: Pill Actions Full Width Split -->
  29. <div class="grid grid-cols-2 gap-3 mt-4">
  30. <button class="btn-pulse border border-white/50 rounded-xl py-2 px-3 flex items-center justify-center gap-1 text-xs font-extrabold bg-white/10 hover:bg-white/20 transition-all">
  31. <span class="text-yellow-300 text-xl">⚡</span> @Lang.quick_pick
  32. </button>
  33. <button class="btn-pulse border border-white/50 rounded-xl py-2 px-3 flex items-center justify-center gap-1 text-xs font-extrabold bg-white/10 hover:bg-white/20 transition-all">
  34. <span>🎫</span> @Lang.my_ticket
  35. </button>
  36. </div>
  37. <!-- Row 3: Withdraw Button Full Width -->
  38. <div class="w-full mt-3">
  39. <button class="btn-pulse w-full text-black font-black py-3 rounded-2xl text-[18px] flex items-center justify-center gap-2 shadow-lg transition-all" style="background: linear-gradient(118deg, #19EF4B 0%, #C0FF4B 100%);">
  40. <span>@Lang.tranfer_win_money</span>
  41. <img src="/LotteryV2/img/gold_wallet.png" alt="Wallet" class="w-6 h-6 object-contain">
  42. </button>
  43. </div>
  44. </div>
  45. <!-- Countdown Timer Bar with Scalloped bottom divider background -->
  46. <div class="relative w-full" style="background-image: url('/LotteryV2/img/wavy_border.svg'); background-size: 100% 100%; background-repeat: no-repeat; height: 114px;">
  47. <!-- Inner Absolute centering to match SVG border limits correctly -->
  48. <div class="absolute inset-0 flex items-start justify-between px-6 pt-6 text-gray-800">
  49. <div class="flex items-center gap-2">
  50. <div class="bg-red-50 p-1.5 rounded-lg text-[#EE0033]">
  51. <img src="/LotteryV2/img/icon_calendar.svg" alt="Calendar" class="w-5 h-5">
  52. </div>
  53. <div>
  54. <div class="text-[10px] text-gray-400 font-bold">@Lang.next_draw</div>
  55. <div class="text-xs font-black text-gray-800" id="draw-date">Friday, Mar 20, 2026</div>
  56. </div>
  57. </div>
  58. <!-- Timer Boxes -->
  59. <div class="flex gap-3 text-center">
  60. <div class="flex flex-col"><span class="text-xl font-black text-gray-800" id="countdown-hours">00</span><span class="text-[8px] text-gray-400 font-extrabold uppercase mt-0.5">@Lang.hours</span></div>
  61. <div class="text-gray-400 font-bold pt-1">:</div>
  62. <div class="flex flex-col"><span class="text-xl font-black text-gray-800" id="countdown-minutes">00</span><span class="text-[8px] text-gray-400 font-extrabold uppercase mt-0.5">@Lang.mins</span></div>
  63. <div class="text-gray-400 font-bold pt-1">:</div>
  64. <div class="flex flex-col"><span class="text-xl font-black text-gray-800" id="countdown-seconds">00</span><span class="text-[8px] text-gray-400 font-extrabold uppercase mt-0.5">@Lang.seconds</span></div>
  65. </div>
  66. </div>
  67. </div>
  68. <!-- Card list items with accurate illustrations -->
  69. <div class="px-3 flex flex-col gap-3 pb-40 relative z-10 mt-[5px]">
  70. <!-- Game item 1: Basic Pick 10 -->
  71. <div class="w-full bg-[#E11D48] p-3.5 rounded-2xl relative overflow-hidden card-shadow text-white border border-white/10 filter brightness-105">
  72. <div class="absolute -left-6 -top-6 w-16 h-16 bg-white/10 rounded-full blur-xl"></div>
  73. <div class="grid grid-cols-10 items-center">
  74. <div class="col-span-3 flex flex-col items-start">
  75. <div class="text-[12px] font-black italic tracking-wider">@Lang.basic_account</div>
  76. <div class="text-xs font-black italic tracking-wider text-yellow-300 -mt-0.5 flex items-center gap-1">
  77. <span>Pick</span>
  78. <img src="/LotteryV2/img/ball_10.png" alt="10" class="w-5 h-5 object-contain">
  79. </div>
  80. </div>
  81. <div class="col-span-4 flex flex-col items-center text-center">
  82. <div class="text-[12px] uppercase font-bold text-white/80">@Lang.jackpot_prize</div>
  83. <div class="text-xl font-extrabold text-[#FBF3A7] tracking-wider">100.000 <span class="text-[10px] font-bold">HTG</span></div>
  84. <div class="text-[8px] mt-1 flex gap-1 items-center">@Lang.next_round <span class="font-bold text-yellow-300">05:00</span></div>
  85. </div>
  86. <div class="col-span-3 flex flex-col justify-end items-center h-full relative">
  87. <img src="/LotteryV2/img/gold_chest.png" alt="Chest" class="w-14 h-14 object-contain filter drop-shadow-md">
  88. <button class="bg-gradient-to-b from-yellow-300 to-yellow-400 text-red-700 font-extrabold px-3 py-1 rounded-xl text-[12px] shadow-sm transform active:scale-95 transition-all mt-1">@Lang.play</button>
  89. </div>
  90. </div>
  91. </div>
  92. <!-- Game item 2: Big/Small -->
  93. <div class="w-full p-3.5 rounded-2xl relative overflow-hidden card-shadow text-white border border-white/10" style="background-color: rgb(38 163 30);">
  94. <div class="absolute -left-6 -top-6 w-16 h-16 bg-white/10 rounded-full blur-xl"></div>
  95. <div class="grid grid-cols-10 items-center">
  96. <div class="col-span-3 flex flex-col items-start">
  97. <div class="text-[12px] font-black italic tracking-wide">@Lang.small_big</div>
  98. <div class="flex items-center gap-1 mt-1">
  99. <img src="/LotteryV2/img/ball_88.png" alt="88" class="w-5 h-5 object-contain">
  100. </div>
  101. </div>
  102. <div class="col-span-4 flex flex-col items-center text-center">
  103. <div class="text-[12px] uppercase font-bold text-white/80">@Lang.jackpot_prize</div>
  104. <div class="text-xl font-extrabold text-[#FBF3A7] tracking-wider">100 <span class="text-[10px] font-bold">HTG</span></div>
  105. <div class="text-[8px] mt-1 flex gap-1 items-center">@Lang.next_round <span class="font-bold text-yellow-300">05:00</span></div>
  106. </div>
  107. <div class="col-span-3 flex flex-col justify-end items-center h-full relative">
  108. <img src="/LotteryV2/img/gold_bag.png" alt="Bag" class="w-14 h-14 object-contain filter drop-shadow-md">
  109. <button class="bg-gradient-to-b from-yellow-300 to-yellow-400 text-emerald-800 font-extrabold px-3 py-1 rounded-xl text-[12px] shadow-sm transform active:scale-95 transition-all mt-1">@Lang.play</button>
  110. </div>
  111. </div>
  112. </div>
  113. <!-- Game item 3: @Lang.odd_even -->
  114. <div class="w-full p-3.5 rounded-2xl relative overflow-hidden card-shadow text-white border border-white/10" style="background-color: rgb(213 45 233);">
  115. <div class="absolute -left-6 -top-6 w-16 h-16 bg-white/10 rounded-full blur-xl"></div>
  116. <div class="grid grid-cols-10 items-center">
  117. <div class="col-span-3 flex flex-col items-start">
  118. <div class="text-[12px] font-black italic tracking-wide">@Lang.odd_even</div>
  119. <div class="flex items-center gap-1 mt-1">
  120. <img src="/LotteryV2/img/ball_3.png" alt="3" class="w-4 h-4 object-contain">
  121. <img src="/LotteryV2/img/ball_20.png" alt="20" class="w-5 h-5 object-contain -ml-1">
  122. </div>
  123. </div>
  124. <div class="col-span-4 flex flex-col items-center text-center">
  125. <div class="text-[12px] uppercase font-bold text-white/80">@Lang.jackpot_prize</div>
  126. <div class="text-xl font-extrabold text-[#FBF3A7] tracking-wider">200 <span class="text-[10px] font-bold">HTG</span></div>
  127. <div class="text-[8px] mt-1 flex gap-1 items-center">@Lang.next_round <span class="font-bold text-yellow-300">05:00</span></div>
  128. </div>
  129. <div class="col-span-3 flex flex-col justify-end items-center h-full relative">
  130. <img src="/LotteryV2/img/gold_wallet.png" alt="Wallet" class="w-14 h-14 object-contain filter drop-shadow-md">
  131. <button class="bg-gradient-to-b from-yellow-300 to-yellow-400 text-blue-800 font-extrabold px-3 py-1 rounded-xl text-[12px] shadow-sm transform active:scale-95 transition-all mt-1">@Lang.play</button>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <!-- Banner Info Section centered red text bar -->
  137. <div class="fixed bottom-[74px] left-1/2 -translate-x-1/2 w-full max-w-[414px] bg-[#EE0033] text-white py-2 text-center text-[12px] font-bold tracking-wide z-40 flex flex-col items-center justify-center overflow-hidden h-auto shadow-md">
  138. <div class="flex flex-col items-center w-full animate-slide-up">
  139. <!-- Row 1 -->
  140. <div class="opacity-90">@Lang.have_chance_to_get</div>
  141. <!-- Row 2 -->
  142. <div class="text-[18px] font-black text-[#FBF3A7] mt-0.5">
  143. 100.000 HTG today !
  144. </div>
  145. </div>
  146. </div>
  147. <!-- Bottom Navbar shared component -->
  148. <partial name="_BottomNavbar" />
  149. </div>
  150. @section Scripts {
  151. <script>
  152. function startCountdown() {
  153. const targetHour = 20; // 20:00 (8h tối)
  154. const now = new Date();
  155. let target = new Date();
  156. target.setHours(targetHour, 0, 0, 0);
  157. // Nếu giờ hiện tại đã qua 20h tối, mốc đếm ngược sẽ nhảy sang 20h tối ngày mai
  158. if (now >= target) {
  159. target.setDate(target.getDate() + 1);
  160. }
  161. // Định dạng ngày hiển thị (VD: Friday, Mar 20, 2026)
  162. const options = { weekday: 'long', month: 'short', day: 'numeric', year: 'numeric' };
  163. const dateText = target.toLocaleDateString('en-US', options);
  164. document.getElementById('draw-date').innerText = dateText;
  165. function updateTime() {
  166. const current = new Date();
  167. const diff = target - current;
  168. if (diff <= 0) {
  169. target.setDate(target.getDate() + 1);
  170. const updatedDateText = target.toLocaleDateString('en-US', options);
  171. document.getElementById('draw-date').innerText = updatedDateText;
  172. updateTime();
  173. return;
  174. }
  175. const hours = Math.floor((diff / (1000 * 60 * 60)));
  176. const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
  177. const seconds = Math.floor((diff % (1000 * 60)) / 1000);
  178. document.getElementById('countdown-hours').innerText = hours.toString().padStart(2, '0');
  179. document.getElementById('countdown-minutes').innerText = minutes.toString().padStart(2, '0');
  180. document.getElementById('countdown-seconds').innerText = seconds.toString().padStart(2, '0');
  181. }
  182. updateTime();
  183. setInterval(updateTime, 1000);
  184. }
  185. document.addEventListener('DOMContentLoaded', startCountdown);
  186. </script>
  187. }