Index.cshtml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. @{
  2. ViewData["Title"] = "LotteryV2 - Trang Chủ";
  3. }
  4. @using LotteryWebApp.Languages;
  5. @using LotteryWebApp.Controllers;
  6. @using LotteryWebApp.Common;
  7. <!-- Tailwind CSS isolated loaded specifically for this Page -->
  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. <div class="main-container animate__animated animate__fadeIn">
  12. <div class="relative w-full flex flex-col items-center pt-3">
  13. <a href="@Url.Action("ChooseApp", "Account", new { area = "" })" class="absolute left-4 top-4 z-20 w-10 h-10 bg-white/20 backdrop-blur-md rounded-full flex items-center justify-center text-white border border-white/20 hover:bg-white/30 transition-all shadow-lg active:scale-90">
  14. <i class="fas fa-chevron-left text-lg"></i>
  15. </a>
  16. <!-- Logo -->
  17. <div class="w-56 z-10 filter drop-shadow-md">
  18. <img src="/LotteryV2/img/logo.png" alt="Logo" class="w-full h-auto object-contain">
  19. </div>
  20. <!-- Banner Illustration sits absolute layered or under -->
  21. <div class="w-full -mt-12">
  22. <img src="/LotteryV2/img/top_banner.png" alt="Top Banner" class="w-full h-auto object-cover">
  23. </div>
  24. </div>
  25. <!-- Game List Section -->
  26. <div class="px-3 -mt-24 relative z-30">
  27. <div class="flex flex-col gap-3">
  28. <!-- Game Card 1: Basic Pick 10 -->
  29. <div class="relative w-full h-[120px] rounded-2xl overflow-hidden shadow-2xl transform active:scale-[0.98] transition-all duration-300 cursor-pointer animate__animated animate__slideInUp card-red" onclick="changeGame()">
  30. <!-- 1. Premium Gradient Border -->
  31. <div class="absolute inset-0 rounded-2xl border-[1.5px] border-white/40 pointer-events-none z-20"></div>
  32. <!-- 2. Decorative Highlights -->
  33. <img src="/LotteryV2/img/decorations/ellipse_1183.png" class="absolute -left-[80px] -top-[130px] w-[220px] h-[220px] pointer-events-none z-10 mix-blend-screen opacity-90 scale-y-[-1]" alt="highlight">
  34. <img src="/LotteryV2/img/decorations/ellipse_1181.png" class="absolute -right-[60px] -top-[20px] w-[200px] h-[200px] pointer-events-none z-10 mix-blend-screen opacity-90" alt="highlight">
  35. <div class="absolute inset-0 grid grid-cols-12 items-center px-3 z-20 gap-0">
  36. <!-- Left: Basic Pick + Ball (4 columns) -->
  37. <div class="col-span-4 flex items-center gap-1 pl-1">
  38. <div class="flex flex-col leading-none">
  39. <!-- <span class="text-white font-black italic text-[14px]">@Lang.Basic</span> -->
  40. <span class="text-yellow-400 font-black italic text-[22px] -mt-1 shadow-sm">@Lang.Pick</span>
  41. </div>
  42. <div class="w-8 h-8 bg-gradient-to-br from-yellow-300 to-yellow-500 rounded-full border-[2px] border-white flex items-center justify-center shadow-xl transform rotate-12 flex-shrink-0">
  43. <span class="text-red-700 font-black text-xl">10</span>
  44. </div>
  45. </div>
  46. <!-- Center: Jackpot info (4 columns) -->
  47. <div class="col-span-4 flex flex-col items-center justify-center text-center px-1">
  48. <div class="text-[10px] font-bold text-white mb-0.5 whitespace-nowrap opacity-90 leading-none uppercase">@Lang.jackpot_prize</div>
  49. <div class="flex items-start gap-0.5">
  50. <span class="text-[22px] font-black text-[#FBF3A7] leading-none" style="text-shadow: 0 4px 8px rgba(0,0,0,0.3)">1.000.000</span>
  51. <span class="text-[8px] font-bold text-white uppercase opacity-90 mt-1">HTG</span>
  52. </div>
  53. <div class="text-[10px] text-white/90 font-medium whitespace-nowrap mt-1">@Lang.next : <span class="font-black text-yellow-300 countdown-timer">00:00:00</span></div>
  54. </div>
  55. <!-- Right: Action Section (4 columns) -->
  56. <div class="col-span-4 flex flex-col items-center justify-end h-full pb-4 relative cursor-pointer group">
  57. <img src="/LotteryV2/img/gold.png" alt="Chest" class="absolute bottom-[40px] w-16 h-18 object-contain filter drop-shadow-lg z-10 group-active:scale-95 transition-transform">
  58. <button class="bg-gradient-to-b from-yellow-300 to-white text-black font-black px-2 w-full max-w-[110px] py-1.5 rounded-[12px] text-[13px] shadow-xl border border-white/50 group-hover:brightness-110 group-active:scale-95 transition-all relative z-0" id="MEGA_LOTO_ID" value="@Constants.MEGA_LOTO_Pick10">@Lang.rule_play_now</button>
  59. </div>
  60. </div>
  61. </div>
  62. <!-- Card 2 and 3 commented out by user previously -->
  63. <!-- Game Card 2: Millions -->
  64. <div class="card-blue relative w-full h-[120px] rounded-2xl overflow-hidden shadow-2xl transform active:scale-[0.98] transition-all duration-300 cursor-pointer animate__animated animate__slideInUp animate__delay-1s"
  65. onclick="goMillionsGameHome('@Constants.Millions_CODE')">
  66. <!-- 1. Premium Gradient Border -->
  67. <div class="absolute inset-0 rounded-2xl border-[1.5px] border-white/30 pointer-events-none z-20"></div>
  68. <!-- 2. Decorative Highlights -->
  69. <div class="absolute -left-[70px] -top-[108px] w-[193px] h-[193px] bg-gradient-to-br from-white/30 to-transparent rounded-full blur-3xl pointer-events-none"></div>
  70. <div class="absolute inset-0 grid grid-cols-12 items-center px-3 z-20 gap-0 text-white">
  71. <!-- Left: Millionair text content (4 columns) -->
  72. <div class="col-span-4 flex items-center h-full relative pl-1 z-10">
  73. <img src="/LotteryV2/img/m1.png" alt="Icon" class="absolute left-[-2px] bottom-[-8px] h-[105px] object-contain z-10">
  74. <!-- 2 quả bóng trang trí -->
  75. <img src="/LotteryV2/img/ball_86.png" class="absolute left-[-12px] top-[15px] w-[32px] h-[32px] object-contain z-0 drop-shadow-md transform -rotate-[15deg]">
  76. <img src="/LotteryV2/img/ball_88.png" class="absolute left-[63px] top-[40px] w-[26px] h-[26px] object-contain z-0 drop-shadow-md transform rotate-[10deg]">
  77. <!-- Chấm bi trang trí -->
  78. <div class="absolute left-[38px] top-[18px] w-1.5 h-1.5 bg-[#fff04c] rounded-full z-20"></div>
  79. <div class="absolute left-[18px] bottom-[15px] w-[9px] h-[9px] bg-white rounded-full z-20"></div>
  80. <div class="absolute left-[45px] bottom-[22px] w-[6px] h-[6px] bg-white rounded-full z-20"></div>
  81. <div class="absolute left-[8px] bottom-[22px] z-30 text-[18px] font-black italic tracking-widest text-[#d5fbff] leading-none" style="text-shadow: -1.5px -1.5px 0 #00459c, 1.5px -1.5px 0 #00459c, -1.5px 1.5px 0 #00459c, 1.5px 1.5px 0 #00459c, 0px 3px 0px #002251, 0 4px 5px rgba(0,0,0,0.4);">
  82. @Lang.millionair
  83. </div>
  84. </div>
  85. <!-- Center: Jackpot info (4 columns) -->
  86. <div class="col-span-4 flex flex-col items-center justify-center text-center px-1">
  87. <div class="text-[10px] uppercase font-bold text-gray-200 mb-0.5 whitespace-nowrap opacity-90 leading-none">@Lang.jackpot_prize</div>
  88. <div class="flex items-start gap-0.5">
  89. <span class="text-[23px] font-black text-[#FBF3A7] leading-none" style="text-shadow: 0 4px 8px rgba(0,0,0,0.3)">30.000.000</span>
  90. <span class="text-[8px] font-bold text-white uppercase opacity-90 mt-1">HTG</span>
  91. </div>
  92. <div class="text-[10px] text-white/90 font-medium whitespace-nowrap mt-1">@Lang.next : <span class="font-black text-yellow-300 countdown-timer">00:00:00</span></div>
  93. </div>
  94. <!-- Right: Action Section (4 columns) -->
  95. <div class="col-span-4 flex flex-col items-center justify-end h-full pb-3 relative px-1 group z-20">
  96. <!-- Ghép 2 ảnh: Dola xếp sau, Icon vàng xếp trước và căn giữa tuyệt đối theo nút -->
  97. <div class="absolute bottom-[30px] left-1/2 transform -translate-x-1/2 w-[70px] h-[72px] pointer-events-none group-active:scale-95 transition-transform z-10">
  98. <img src="/LotteryV2/img/millionair_guy.png" alt="Dola" class="absolute top-0 right-[-6px] w-[56px] h-[56px] object-contain filter drop-shadow-md z-0">
  99. <img src="/LotteryV2/img/play_millionair.png" alt="Money" class="absolute bottom-1 left-[-6px] w-[62px] h-[62px] object-contain filter drop-shadow-lg z-10">
  100. </div>
  101. <button class="bg-gradient-to-b from-[#ffef7c] via-[#fed444] to-[#fdb514] text-black font-black px-2 w-full max-w-[90px] py-[6px] rounded-full text-[14px] shadow-[0_4px_10px_rgba(0,0,0,0.25)] border-[1.5px] border-white/60 group-hover:brightness-110 group-active:scale-95 transition-all relative z-0 flex items-center justify-center"
  102. onclick="event.stopPropagation(); goMillionsGameHome('@Constants.Millions_CODE')">
  103. @Lang.rule_play_now
  104. </button>
  105. </div>
  106. </div>
  107. </div>
  108. <!-- Game Card 3: Mega Bet - Blurred/Faded State -->
  109. <div class="card-orange relative w-full h-[120px] rounded-2xl overflow-hidden shadow-md opacity-25 grayscale blur-[1px] pointer-events-none animate__animated animate__slideInUp animate__delay-2s">
  110. <!-- 1. Premium Gradient Border -->
  111. <div class="absolute inset-0 rounded-2xl border-[1.5px] border-white/20 pointer-events-none z-20"></div>
  112. <!-- 2. Decorative Highlights -->
  113. <div class="absolute -left-[70px] -top-[108px] w-[193px] h-[193px] bg-gradient-to-br from-white/30 to-transparent rounded-full blur-3xl pointer-events-none"></div>
  114. <div class="absolute inset-0 grid grid-cols-12 items-center px-3 z-20 gap-0 text-white">
  115. <!-- Left: Mega Bet text content (4 columns) -->
  116. <div class="col-span-4 flex flex-col items-start justify-center pl-2">
  117. <div class="relative">
  118. <div class="text-[14px] font-black italic tracking-wider text-white">@Lang.MEGA</div>
  119. <div class="text-[15px] font-black italic tracking-wider text-red-200 -mt-1">@Lang.Bet</div>
  120. <div class="absolute left-10 top-1 flex shadow-lg">
  121. <span class="w-6 h-6 rounded-full bg-white text-gray-800 text-[11px] font-bold flex items-center justify-center border border-gray-300 -mr-1">88</span>
  122. <span class="w-6 h-6 rounded-full bg-red-500 text-white text-[11px] font-bold flex items-center justify-center border border-white">99</span>
  123. </div>
  124. </div>
  125. </div>
  126. <!-- Center: Jackpot info (4 columns) -->
  127. <div class="col-span-4 flex flex-col items-center justify-center text-center px-1">
  128. <div class="text-[10px] uppercase font-bold text-gray-200 mb-0.5 whitespace-nowrap opacity-90 leading-none">@Lang.jackpot_prize</div>
  129. <div class="flex items-start gap-0.5">
  130. <span class="text-[23px] font-black text-[#FBF3A7] leading-none" style="text-shadow: 0 4px 8px rgba(0,0,0,0.3)">800.000</span>
  131. <span class="text-[8px] font-bold text-white uppercase opacity-90 mt-1">HTG</span>
  132. </div>
  133. <div class="text-[10px] text-white/90 font-medium whitespace-nowrap mt-1">@Lang.next : <span class="font-black text-yellow-300 countdown-timer">00:00:00</span></div>
  134. </div>
  135. <!-- Right: Action Section (4 columns) -->
  136. <div class="col-span-4 flex flex-col items-center justify-end h-full pb-4 relative px-1">
  137. <img src="/LotteryV2/img/illustration3.png" alt="Car" class="absolute bottom-[40px] w-16 h-18 object-contain filter drop-shadow-lg z-10 orientation-flip">
  138. <button class="bg-gradient-to-b from-yellow-300 to-white text-black font-black px-2 w-full max-w-[110px] py-1.5 rounded-[12px] text-[13px] shadow-xl border border-white/50 group-hover:brightness-110 group-active:scale-95 transition-all relative z-0">@Lang.rule_play_now</button>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. <script>
  146. function changeGame() {
  147. var termType = $("#MEGA_LOTO_ID").val();
  148. location.href = subDomain + '@Url.Action("GameHome", "Home", new { area = "LotteryV2" })?termType=' + termType;
  149. }
  150. function goMillionsGameHome(termType) {
  151. location.href = subDomain + '@Url.Action("GameHome", "Home", new { area = "Millions" })?termType=' + termType;
  152. }
  153. function startCountdown() {
  154. const targetHour = 20; // 20:00 (8 PM) Haiti time
  155. const timeZone = 'America/Port-au-Prince';
  156. const timers = document.querySelectorAll('.countdown-timer');
  157. // Server time string has no offset => must be interpreted in Haiti timezone
  158. const serverTimeStr = '@Model.serverTime.ToString("yyyy-MM-ddTHH:mm:ss")';
  159. const startBrowser = moment();
  160. const baseServer = moment.tz(serverTimeStr, 'YYYY-MM-DDTHH:mm:ss', timeZone);
  161. function update() {
  162. const elapsedMs = moment().diff(startBrowser);
  163. const now = baseServer.clone().add(elapsedMs, 'milliseconds'); // Haiti time
  164. let target = now.clone().hour(targetHour).minute(0).second(0).millisecond(0);
  165. if (now.isSameOrAfter(target)) target.add(1, 'day');
  166. const dur = moment.duration(target.diff(now));
  167. const h = Math.max(0, Math.floor(dur.asHours()));
  168. const m = Math.max(0, dur.minutes());
  169. const s = Math.max(0, dur.seconds());
  170. const timeStr = `${h.toString().padStart(2, '0')}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;
  171. timers.forEach(t => t.innerText = timeStr);
  172. }
  173. update();
  174. setInterval(update, 1000);
  175. }
  176. document.addEventListener('DOMContentLoaded', startCountdown);
  177. </script>