:root { --header-height: 140px; --footer-height: 80px; } html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } body { align-items: center; background-color: #6b0f1a; background-image: linear-gradient(315deg, #6b0f1a 0%, #b91372 74%); display: flex; height: 100dvh; justify-content: center; margin: 0; position: relative; } .container { height: 100%; height: 100dvh; overflow: hidden; position: relative; width: 100%; } .safe-area { align-items: center; display: flex; height: 100dvh; justify-content: center; padding-bottom: var(--footer-height); padding-top: var(--header-height); position: relative; width: 100%; } .wrapper { /* aspect-ratio set dynamically */ max-height: 100%; width: 100%; } #game { border-top: 4px solid rgba(255, 255, 255, 0.2); border-bottom: 4px solid rgba(255, 255, 255, 0.2); } .ui { inset: 0; opacity: 0; pointer-events: none; position: absolute; transform: translate3d(0, 10%, 0); transition: 500ms opacity, 500ms transform cubic-bezier(0.34, 1.56, 0.64, 1); } body.game-started .ui { opacity: 1; transform: translate3d(0, 0%, 0); }