.container{ display: flex; flex-direction: column; gap: 0.75rem; margin-top:1.25rem; margin-bottom: 2rem; } .game_top_nav_wrap{ display: flex; align-items: center; justify-content: space-between; width: 100%; & .brand_con{ display: flex; //font-size: 1rem; color: var(--text); gap: 0.25rem; & .brand{ color: var(--header); } } } .game_area{ display: flex; flex-direction: column; //width: 100%; transition: all .3s; &.movie_mode{ // Movie Mode:靠 WDGame 容器去掉 page-max-width-wrap 来释放 1430px 限制, // 这里只控制内部的水平安全边距(避免贴到 sidebar / 滚动条)。 width: 100%; padding-left: 12px; padding-right: 12px; } } .game_action_wrap{ display: flex; align-items: center; justify-content: space-between; padding: 0 .625rem; height: 3.375rem; background-color: var(--body); &_top{ border-bottom: 1px solid rgba(105,112,122,.5); } &_bottom{ border-top: 1px solid rgba(105,112,122,.5); } & .action_item_con{ display: flex; align-items: center; justify-content: center; gap: 0.25rem; } & .action_item{ display: flex; align-items: center; justify-content: center; gap: 0.25rem; height: 2.75rem; min-width: 2.75rem; color: var(--text); font-weight: 500; border-radius: var(--border-radius); background-color: transparent; padding: 0 .5rem; & .icon{ width: 1.4em; height: 1.4em; fill: var(--text); transition: all .3s ease-in-out; } &:hover{ background-color: var(--nav-item-hover) !important; color: var(--header); & .icon{ transform: scale(1.15); fill: var(--header); } } &.active{ & .icon{ fill: var(--primary-color); } } &.active_star{ & .icon{ fill:#ffdf46; } } } } .game_main{ position: relative; width: 100%; // 默认按 1624:750 比例,但加最小高度,避免在 16:9/16:10 桌面上 iframe 太矮、 // 下面留一大片空白;min 取 72vh,并夹在 420px ~ 860px 之间。 aspect-ratio: 1624/750; min-height: clamp(420px, 72vh, 860px); max-height: calc(100vh - 200px); // 顶部导航 + 面包屑 + 底部工具条 安全余量 background-color: var(--body); } // Movie Mode:放弃比例约束,按视口高度撑开 iframe,但留出顶部 navbar(~64) + // 面包屑(~38) + 底部工具条(~54) + 上下安全余量(~50),整体扣 ~200px, // 避免出现页面纵向滚动条。 .movie_mode .game_main{ aspect-ratio: auto; height: calc(100vh - 200px); max-height: calc(100vh - 200px); min-height: 480px; } .game_iframe_wrap{ position:relative; width: 100%; height: 100%; background-color: #000000; iframe{ position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: none; z-index: 1; } & .loading_wrap{ position: absolute; height: 100%; width: 100%; left: 0; top: 0; text-align: center; font-size: 0; padding: 0; margin: 0; overflow: hidden; z-index: 2; & .loading_bg{ position: absolute; z-index: 1; width: 100%; height: auto; animation: imgscale 5s linear infinite; } & .loading{ position: absolute; z-index: 2; inset: 0; display: flex; align-items: center; justify-content: center; } } } @keyframes imgscale{ 0% { transform: scale(1); opacity: .75 } 50% { transform: scale(1.05); opacity: 1 } to { transform: scale(1); opacity: .75 } } /* 桌面正常模式下,游戏 iframe 下方的"MOST POPULAR"推荐游戏轮播 */ .recommend_wrap{ display: flex; flex-direction: column; gap: 0.75rem; width: 100%; padding-top: 0.75rem; flex-shrink: 0; } .recommend_title{ color: var(--header); font-size: 1rem; font-weight: 700; letter-spacing: 0.04em; } .recommend_swiper{ width: 100%; :global(.swiper-slide){ height: auto; } } .recommend_item{ display: block; width: 100%; aspect-ratio: 384 / 516; border-radius: 0.5rem; overflow: hidden; background: var(--darkColor1, #272D39); border: 0; padding: 0; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; img{ display: block; width: 100%; height: 100%; object-fit: cover; } &:hover{ transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.45); } } .share_box{ width: 100%; height: 100%; & .title{ display: flex; align-items: center; justify-content: center; font-size: 1.125rem; color: var(--header); text-align: center; font-weight: 600; } & .content{ padding: 2rem 0rem; display: flex; //flex-direction: column; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: center; & .share_btn{ width: 2.5rem; height: 2.5rem; img{ width: 100%; height: 100%; } } } }