
@import url('https://fonts.googleapis.com/css2?family=Love+Ya+Like+A+Sister&family=Fredoka+One&display=swap');

:root {
    --main-font-family: 'Love Ya Like A Sister', cursive;
    --name-font-family: 'Love Ya Like A Sister', cursive;

    --main-font-size: 60px;
    --name-font-size: 65px;

    --font-color: #ffffff;
    --name-font-color: #ffffff;

    --outline-color: #000000;
    --outline-size: 2px;

    --line-height: 1.2;
    --row-gap: 50px;

    --animation-duration: 300ms;
    --message-duration: 15s;

    --text-align: left;
    --chat-align: flex-start;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: transparent;
}

#login-screen {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
}

.login-panel {
    padding: 30px;
    border-radius: 16px;
    background: #181818;
    color: white;
    text-align: center;
}

.login-panel button {
    padding: 12px 24px;
    border: 0;
    border-radius: 8px;
    background: #9147ff;
    color: white;
    font-family: inherit;
    font-size: 18px;
    cursor: pointer;
}

#login-status {
    margin-bottom: 20px;
}

#chat-screen {
    width: 100%;
    height: 100%;
}

.hidden {
    display: none !important;
}

#chat-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: var(--chat-align);
    padding: 20px;
    gap: var(--row-gap);
}

.chat-message {
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: var(--chat-align);
    text-align: var(--text-align);
    animation: message-in var(--animation-duration) ease-out forwards;
    overflow-wrap: anywhere;
}

.chat-message.removing {
    animation: message-out var(--animation-duration) ease-in forwards;
}

.username {
    font-family: var(--name-font-family);
    font-size: var(--name-font-size);
    line-height: var(--line-height);
    color: var(--name-font-color);
    text-align: var(--text-align);
    -webkit-text-stroke: var(--outline-size) var(--outline-color);
    paint-order: stroke fill;
}

.message-content {
    font-family: var(--main-font-family);
    font-size: var(--main-font-size);
    line-height: var(--line-height);
    color: var(--font-color);
    text-align: var(--text-align);
    -webkit-text-stroke: var(--outline-size) var(--outline-color);
    paint-order: stroke fill;
    overflow-wrap: anywhere;
    word-break: normal;
}

.badges {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    gap: 5px;
    margin-right: 8px;
}

.badge {
    width: 0.65em;
    height: 0.65em;
    object-fit: contain;
    vertical-align: middle;
}

.chat-emote {
    display: inline-block;
    height: 1.25em;
    width: auto;
    max-width: 3em;
    object-fit: contain;
    vertical-align: middle;
    margin: 0 2px;
}

.chat-message.system-message .username {
    color: #b58aff;
}

@keyframes message-in {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes message-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}
