JSFiddle - React, Tailwind, and code Playground

by Muhammad Nugroho

HTML

<style>
        @-o-viewport {
            width: device-width;
            zoom: 1;
            user-zoom: fixed;
        }
        @font-face {
            /* LCD font by Samuel Reynolds */
            /* License: http://www.spinwardstars.com/scrfonts/aaastdlicense.html */
            font-family: 'LCD';
            src: url('http://media.shinydemos.com/inbox-attack/fonts/lcd.eot') format('embedded-opentype'),
                 url('http://media.shinydemos.com/inbox-attack/fonts/lcd.woff') format('woff'),
                 url('http://media.shinydemos.com/inbox-attack/fonts/lcd.ttf') format('truetype'),
                 url('http://media.shinydemos.com/inbox-attack/fonts/lcd.svg#LCD') format('svg');
        }
        #txt_time, #txt_score, #txt_result {
            font-family: 'LCD', monospace;
        }
    </style>
    <script type="text/javascript"><![CDATA[
    function launch() {
        /*
         * Configurable options
         */
        var TOTAL_TIME = 20; // Total time (progress countdown) in seconds
        var DROP_TIME = 300; // Final mail drop time - lower is more difficult
        
        /*
         * Non-configurable stuff from here on
         */
         // Cache global variables for speed         
        var win = window;
        var doc = document;
        
        // Resize game to fit screen
        var default_width = 980;
        var default_height = 630;
        var case_ratio = default_width / default_height; // Optimal size ratio is roughly 1.55:1
        var svg = doc.getElementsByTagName('svg')[0];
        var screen_width = win.innerWidth;
        var screen_height = win.innerHeight;
        var case_width, case_height;
        
        // Ensure game is in landscape format
        var screen_ratio = screen_width / screen_height;
        if (case_ratio > screen_ratio) {
            case_width = screen_width;
            case_height = case_width / case_ratio;
        } else {
            case_width = screen_width;
           ...

CSS

HTML, BODY {
	height:100%;
	}
BODY {
	margin:0;
	padding:0;
	}
.inbox {
	position:absolute;
	top:0;
	right:0;
	bottom:0;
	left:0;