<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Character Assassin</title>
    <style>
        body {
            height: 100%;
            background: #4C3325 url("/static/noise.gif") repeat;
        }
        #bgCover {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            background: radial-gradient(ellipse at center, rgba(185, 128, 95, 1) 0%,rgba(185, 128, 95, 0) 100%);
            z-index: -1000;
        }
        #gameCanvas {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
        }
        .inputHolder {
            position: absolute;
            top: calc(50% + 220px);
            left: 0;
            right: 0;
        }
        #messageInput {
            display: none;
            margin: auto;
            font-size: 25px;
            background-color: #444;
            border: solid 1px black;
            font-family: monospace;
            color: #FFF;
            padding: 5px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            outline: none;
        }
        #messageInput:disabled {
            box-shadow: inset 0 1px 5px rgba(0,0,0,0.4);
            background-color: #7f7f7f;
        }
        #sight {
            position: fixed;
            z-index: 10;
            backface-visibility: hidden;
            display: none;
            top: 50%;
            left: 50%;
            transition: transform 0.1s;
            width: 58px;
            height: 58px;
        }
        #sight.grow {
            transform: scale(1.2);
        }
        #sightImg {
            width: 58px;
            height: 58px;
            animation: rotation 3s infinite linear;
        }
        @keyframes rotation {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(359deg);
            }
        }
        .messageBox {
            position: absolute;
            width: 700px;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            z-index: 20;
            background-color: rgba(255,255,255,0.95);
            border-radius: 5px;
            padding: 20px;
            font-family: Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 22px;
            line-height: 1.3;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
            display: none;
        }
        .titleText {
            margin: 15px 0;
            font-family: 'Do Hyeon', sans-serif;
            color: #CC0000;
            font-size: 80px;
            text-align: center;
            line-height: 0.8;
        }
        .button {
            display: block;
            width: 150px;
            background-color: #4C3325;
            color: #FFF;
            padding: 5px 10px;
            margin: 20px auto;
            font-size: 24px;
            text-align: center;
            border-radius: 5px;
            cursor: pointer;
        }
        .button:hover {
            background-color: #573b28;
        }
        .waitingMessage {
            display: none;
            text-align: center;
            margin: 30px 0;
            color: #666;
            font-size: 18px;
        }
        #urlInstruction {
            position: absolute;
            top: 10px;
            left: 20%;
            width: 450px;
            display: none;
        }
        .centerBox {
            text-align: center;
        }
        .messageTitle {
            margin: 15px 0;
            font-family: 'Do Hyeon', sans-serif;
            font-size: 60px;
            text-align: center;
            line-height: 0.8;
        }
        .green {
            color: #00bf09;
        }
        .red {
            color: #CC0000;
        }
    </style>
    <link href="https://fonts.googleapis.com/css?family=Do+Hyeon" rel="stylesheet">
</head>
<body>
    <div id="bgCover"></div>
    <img id="urlInstruction" src="/static/url.svg">
    <canvas id="gameCanvas" width="854" height="480"></canvas>
    <div class="inputHolder">
        <input id="messageInput" type="text">
    </div>
    <div id="sight">
        <img id="sightImg" src="/static/sight.svg">
    </div>
    <div class="messageBox" id="assassinIntroBox">
        <div class="titleText">Character<br>Assassin</div>
        Congratulations on getting hired as an assassin. Here at the United States TLGO (Totally Legitimate Government Organization), we'll need your help to eliminate spies who pose a national
        security risk.<br><br>
        But you can't do it alone. You'll need someone to help relay information. Choose wisely, and send them this URL.<br><br>
        They will use their radio to send a description
        of the target. High interference means bandwidth is severely limited, so brevity will be key.
        <div class="button startButton">READY</div>
        <div class="waitingMessage">Waiting for other player...</div>
    </div>
    <div class="messageBox" id="controllerIntroBox">
        <div class="titleText">Character<br>Assassin</div>
        Your friend needs your help. Here at the United States TLGO (Totally Legitimate Government Organization), they'll be working to eliminate spies who pose a national
        security risk.<br><br>
        You will use your radio to send them a description of the target, but high interference means bandwidth is severely limited. You will only be able to send a very short message.<br><br>
        Keep in mind that they won't always be seeing the suspects in the same order as you, so "the one on the left" isn't very helpful.
        <div class="button startButton">READY</div>
        <div class="waitingMessage">Waiting for other player...</div>
    </div>
    <div class="messageBox centerBox" id="successBox">
        <div class="messageTitle green centerBox">Mission Complete</div>
        Good teamwork. Ready for the next mission?
        <div class="button" id="continueButton">NEXT</div>
        <div class="waitingMessage">Waiting for other player...</div>
    </div>
    <div class="messageBox centerBox" id="completeBox">
        <div class="messageTitle green centerBox">All Missions Complete</div>
        Thanks to you two, our nation will no longer be tormented by square people with ugly hair. Congratulations!
    </div>
    <div class="messageBox" id="failedBox">
        <div class="messageTitle red">Mission Failed!</div>
        The blood of an innocent man is on your hands. And clothes.
        <div class="button" id="restartButton">RESTART</div>
    </div>
    <script src="/static/tweenjs.min.js"></script>
    <script>
        let gameId = "{{ gameId }}";
    </script>
    <script src="/static/game.js"></script>
</body>
</html>