@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --accent: #7c7;
    color-scheme: dark;
}

body {
    background: #222;
    color: #fff;
    font-family: "Space Mono", monospace;
    margin: 0;
}

main {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh;
}

.messages-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 8px;
}

#messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: scroll;
    padding-right: 8px;
}

.message-content {
    flex: 1;
    width: 100%;
}

.message-content > p {
    word-break: break-word;
}

#messages > p {
    margin: 0;
}

.sidebar {
    background: #383;
    width: 160px;
    padding: 12px;
}

.sidebar p {
    margin: 0;
}

.message {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.message * {
    margin: 0;
}

.message img {
    height: 48px;
    aspect-ratio: 1/1;
}

form {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

form input[type="text"] {
    flex: 1;
}

#room-name {
    cursor: pointer;
    background: #0003;
    padding: 4px;
    border-radius: 4px;
    word-break: auto-phrase;
}

.index {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.index h1 {
    filter: drop-shadow(0 0 8px #383);
}

.index img {
    max-width: 80%;
}

footer {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 12px;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 100;
    width: 100%;
    background: #0003;
}

footer img {
    height: 48px;
}

footer * {
    margin: 0;
}

footer a {
    color: #ccc;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.button {
    padding: 4px;
    border-radius: 4px;
    background: #0004;
    text-decoration: none;
    color: #fff;
    border: 1px solid #000;
}

.button:hover {
    background: #0006;
    border: 1px solid #3a3;
}

#initial-messages {
    color: #999;
}
