styles.module.scss 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. .container{
  2. display: flex;
  3. flex-direction: column;
  4. gap: 0.75rem;
  5. margin-top:1.25rem;
  6. margin-bottom: 2rem;
  7. }
  8. .game_top_nav_wrap{
  9. display: flex;
  10. align-items: center;
  11. justify-content: space-between;
  12. width: 100%;
  13. & .brand_con{
  14. display: flex;
  15. //font-size: 1rem;
  16. color: var(--text);
  17. gap: 0.25rem;
  18. & .brand{
  19. color: var(--header);
  20. }
  21. }
  22. }
  23. .game_area{
  24. display: flex;
  25. flex-direction: column;
  26. //width: 100%;
  27. transition: all .3s;
  28. &.movie_mode{
  29. // Movie Mode:靠 WDGame 容器去掉 page-max-width-wrap 来释放 1430px 限制,
  30. // 这里只控制内部的水平安全边距(避免贴到 sidebar / 滚动条)。
  31. width: 100%;
  32. padding-left: 12px;
  33. padding-right: 12px;
  34. }
  35. }
  36. .game_action_wrap{
  37. display: flex;
  38. align-items: center;
  39. justify-content: space-between;
  40. padding: 0 .625rem;
  41. height: 3.375rem;
  42. background-color: var(--body);
  43. &_top{
  44. border-bottom: 1px solid rgba(105,112,122,.5);
  45. }
  46. &_bottom{
  47. border-top: 1px solid rgba(105,112,122,.5);
  48. }
  49. & .action_item_con{
  50. display: flex;
  51. align-items: center;
  52. justify-content: center;
  53. gap: 0.25rem;
  54. }
  55. & .action_item{
  56. display: flex;
  57. align-items: center;
  58. justify-content: center;
  59. gap: 0.25rem;
  60. height: 2.75rem;
  61. min-width: 2.75rem;
  62. color: var(--text);
  63. font-weight: 500;
  64. border-radius: var(--border-radius);
  65. background-color: transparent;
  66. padding: 0 .5rem;
  67. & .icon{
  68. width: 1.4em;
  69. height: 1.4em;
  70. fill: var(--text);
  71. transition: all .3s ease-in-out;
  72. }
  73. &:hover{
  74. background-color: var(--nav-item-hover) !important;
  75. color: var(--header);
  76. & .icon{
  77. transform: scale(1.15);
  78. fill: var(--header);
  79. }
  80. }
  81. &.active{
  82. & .icon{
  83. fill: var(--primary-color);
  84. }
  85. }
  86. &.active_star{
  87. & .icon{
  88. fill:#ffdf46;
  89. }
  90. }
  91. }
  92. }
  93. .game_main{
  94. position: relative;
  95. width: 100%;
  96. // 默认按 1624:750 比例,但加最小高度,避免在 16:9/16:10 桌面上 iframe 太矮、
  97. // 下面留一大片空白;min 取 72vh,并夹在 420px ~ 860px 之间。
  98. aspect-ratio: 1624/750;
  99. min-height: clamp(420px, 72vh, 860px);
  100. max-height: calc(100vh - 200px); // 顶部导航 + 面包屑 + 底部工具条 安全余量
  101. background-color: var(--body);
  102. }
  103. // Movie Mode:放弃比例约束,按视口高度撑开 iframe,但留出顶部 navbar(~64) +
  104. // 面包屑(~38) + 底部工具条(~54) + 上下安全余量(~50),整体扣 ~200px,
  105. // 避免出现页面纵向滚动条。
  106. .movie_mode .game_main{
  107. aspect-ratio: auto;
  108. height: calc(100vh - 200px);
  109. max-height: calc(100vh - 200px);
  110. min-height: 480px;
  111. }
  112. .game_iframe_wrap{
  113. position:relative;
  114. width: 100%;
  115. height: 100%;
  116. background-color: #000000;
  117. iframe{
  118. position: absolute;
  119. left: 0;
  120. top: 0;
  121. width: 100%;
  122. height: 100%;
  123. border: none;
  124. z-index: 1;
  125. }
  126. & .loading_wrap{
  127. position: absolute;
  128. height: 100%;
  129. width: 100%;
  130. left: 0;
  131. top: 0;
  132. text-align: center;
  133. font-size: 0;
  134. padding: 0;
  135. margin: 0;
  136. overflow: hidden;
  137. z-index: 2;
  138. & .loading_bg{
  139. position: absolute;
  140. z-index: 1;
  141. width: 100%;
  142. height: auto;
  143. animation: imgscale 5s linear infinite;
  144. }
  145. & .loading{
  146. position: absolute;
  147. z-index: 2;
  148. inset: 0;
  149. display: flex;
  150. align-items: center;
  151. justify-content: center;
  152. }
  153. }
  154. }
  155. @keyframes imgscale{
  156. 0% {
  157. transform: scale(1);
  158. opacity: .75
  159. }
  160. 50% {
  161. transform: scale(1.05);
  162. opacity: 1
  163. }
  164. to {
  165. transform: scale(1);
  166. opacity: .75
  167. }
  168. }
  169. /* 桌面正常模式下,游戏 iframe 下方的"MOST POPULAR"推荐游戏轮播 */
  170. .recommend_wrap{
  171. display: flex;
  172. flex-direction: column;
  173. gap: 0.75rem;
  174. width: 100%;
  175. padding-top: 0.75rem;
  176. flex-shrink: 0;
  177. }
  178. .recommend_title{
  179. color: var(--header);
  180. font-size: 1rem;
  181. font-weight: 700;
  182. letter-spacing: 0.04em;
  183. }
  184. .recommend_swiper{
  185. width: 100%;
  186. :global(.swiper-slide){
  187. height: auto;
  188. }
  189. }
  190. .recommend_item{
  191. display: block;
  192. width: 100%;
  193. aspect-ratio: 384 / 516;
  194. border-radius: 0.5rem;
  195. overflow: hidden;
  196. background: var(--darkColor1, #272D39);
  197. border: 0;
  198. padding: 0;
  199. cursor: pointer;
  200. transition: transform .18s ease, box-shadow .18s ease;
  201. img{
  202. display: block;
  203. width: 100%;
  204. height: 100%;
  205. object-fit: cover;
  206. }
  207. &:hover{
  208. transform: translateY(-2px);
  209. box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  210. }
  211. }
  212. .share_box{
  213. width: 100%;
  214. height: 100%;
  215. & .title{
  216. display: flex;
  217. align-items: center;
  218. justify-content: center;
  219. font-size: 1.125rem;
  220. color: var(--header);
  221. text-align: center;
  222. font-weight: 600;
  223. }
  224. & .content{
  225. padding: 2rem 0rem;
  226. display: flex;
  227. //flex-direction: column;
  228. gap: 1rem;
  229. flex-wrap: wrap;
  230. align-items: center;
  231. justify-content: center;
  232. & .share_btn{
  233. width: 2.5rem;
  234. height: 2.5rem;
  235. img{
  236. width: 100%;
  237. height: 100%;
  238. }
  239. }
  240. }
  241. }