<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="main.js" defer></script>
    <style>
        body {
            margin: 0;
            padding: 0;
            color: #fff;
            background-color: #000;
            font-family: Verdana, Geneva, Tahoma, sans-serif
        }

        input {
            margin: 5px;
            width: 100%;
            box-sizing: border-box;
            padding: 5px 10px;
        }
        
        button {
            padding: 10px 25px;
            font-weight: bold;
            font-family: inherit;
            margin: 10px 5px 5px;
            background-color: #222;
            color: inherit;
            width: 100%;
            cursor: pointer;
        }

        .wrapper {
            min-height: 100vh;
            max-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        .messages-area {
            overflow-x: hidden;
            display: flex;
            flex-direction: column-reverse;
            align-items: flex-start;
            flex-grow: 2;
            padding: 15px;
        }

        .inputs-area {
            background-color: #333;
            display: flex;
            padding: 10px;
            align-items: center;
        }

        .inputs-container {
            display: flex;
            flex-direction: column;
            margin-right: 65px;
        }

        .add {
            font-weight: bold;
            font-size: 45px;
            text-shadow: 2px -2px 0 rgb(243, 165, 63)
        }

        .message {
            display: flex;
            flex-direction: column;
            margin-bottom: 10px;
            padding: 7px;
            background-color: #767676;
            border-radius: 5px;
            max-width: 50%;
        }

        .message .nickname {
            font-weight: bold;
            margin-bottom: 3px;
        }

        .message .message-text {
            margin-bottom: 5px;
        }

        .message .time {
            font-size: 0.8em;
            opacity: 0.6;
        }

    </style>
</head>
<body>
    <div class="wrapper">
        <div class="inputs-area">
            <div class="inputs-container">
                <label>
                    Nickname:
                    <input id="nickname" type="text">
                </label>
                
                <label>
                    Message:
                    <input id="messageText" type="text">
                </label>

                <button id="send">SEND</button>
            </div>
            <div class='add'>ЗДЕСЬ МОГЛА БЫТЬ ВАША РЕКЛАМА</div>
        </div>

        <div style="overflow-y: auto">
            <div class="messages-area" id="messagesArea"></div>
        </div>

        <template id="messageTemplate">
            <div class="message">
                <span class="nickname"></span>
                <span class="message-text"></span>
                <span class="time"></span>
            </div>
        </template>
    </div>   
</body>
</html>