@font-face {
    font-family: 'Resource Han Rounded CN Bold';
    src: local("Resource Han Rounded CN Bold"),
         url('/static/fonts/Resource-Han-Rounded-CN-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Resource Han Rounded CN Medium';
    src: local("Resource Han Rounded CN Medium"),
         url('/static/fonts/Resource-Han-Rounded-CN-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Resource Han Rounded CN Bold', 'Microsoft YaHei', sans-serif;
    font-weight: bold;
    color: white;
    overflow: hidden;
}

.danmaku-container {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 400px;
    opacity: 0;
}

.background {
    position: absolute;
    margin: 0;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 150vw;
    height: 340px;
    min-width: 1600px;
}

.avatar-name {
    position: absolute;
    margin: 0;
    width: 300px;
    left: 50%;
    top: 210px;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 28px;
    text-align: center;
    user-select: none;
    pointer-events: none;
}

.danmaku {
    position: absolute;
    width: 60vw;
    min-width: 480px;
    top: 240px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Resource Han Rounded CN Medium', 'Microsoft YaHei', serif;
    font-weight: 500;
    font-size: 22px;
    text-align: center;
    user-select: none;
    pointer-events: none;
}

#danmakuText {
    display: block;
}

.move-in {
    animation: moveIn 1.2s cubic-bezier(0, 0, 0, 1) forwards;
}

@keyframes moveIn {
    from {
        transform: translateX(20px);
    }

    to {
        transform: translateX(0);
    }
}

.visible {
    opacity: 1;
}

.invisible {
    opacity: 0;
}

.fade-in {
    opacity: 1;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-out {
    opacity: 0;
    animation: fadeOut 0.3s forwards;
}

.fade-out-slow {
    opacity: 0;
    animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.decorators {
    position: absolute;
    bottom: 20px;
    right: 19vw;
    display: flex;
    gap: 10px;
}

.auto-decorator,
.next-decorator {
    position: relative;
    cursor: pointer;
}

.decorators input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.emoji {
    height: 22px;
    width: auto;
    vertical-align: -2px;
}

.emoji-big {
    height: 60px;
    width: auto;
    vertical-align: -19px;
}
