html, body {
    height: 100%;
    font-size: 15px;
    color: #000;
}
*::-webkit-scrollbar {
    width: 0;
}

input, textarea {
    outline: none;
    resize: none;
}

.container-fluid {
    padding: 0;
}

@font-face {
    font-family: 'iconfont';
    src: url('//at.alicdn.com/t/c/font_4079339_kwjc3biydvp.woff2?t=1686109388104') format('woff2'),
    url('//at.alicdn.com/t/c/font_4079339_kwjc3biydvp.woff?t=1686109388104') format('woff'),
    url('//at.alicdn.com/t/c/font_4079339_kwjc3biydvp.ttf?t=1686109388104') format('truetype');
}

.iconfont {
    font-family: iconfont;
    cursor: pointer;
    border-radius: .5rem;
    padding: 0.1rem 0.35rem;
}

.iconfont-bg:active, .iconfont-bg:hover, .iconfont-bg.selected {
    color: #209d44;
    background-color: #eee;
}

.slide-in {
    animation: slideInFromRight 0.1s ease-in-out;
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(0);
    }
}

.slide-out {
    animation: slideOutToRight 0.1s ease-in-out;
}

@keyframes slideOutToRight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100%);
    }
}

.slide-up {
    animation: slideUp 0.1s forwards;
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-tools-item {
    font-size: 1.38rem;
    cursor: pointer;
    color: #666;
    display: inline-block;
    margin: .5rem 1rem;
    padding: 0 .2rem !important;
}

[v-cloak] {
    display: none;
}

.params-box, .api-key-box {
    position: absolute;
    bottom: 200px;
    background-color: #fff;
    padding: 1rem;
    border-radius: .5rem;
    max-width: 100%;
}

.center-box {
    position: absolute;
    width: 400px;
    background-color: #fff;
    border-radius: .5rem;
    top: 50%;
    left: 50%;
    margin-left: -200px;
    margin-top: -250px;
    padding: 2rem;
    max-width: 100%;
}

.more-box {
    position: absolute;
    bottom: 50px;
    left: 0;
    background-color: #fff;
    width: 250px;
}

.send-btn {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
}

.send-method-box {
    position: absolute;
    bottom: 200px;
    right: 0;
    background-color: #fff;
    padding: 0.6rem;
    border-radius: .5rem;
    cursor: pointer;
    max-width: 100%;
}

.dropdown-item {
    padding: .25rem 1rem .25rem 1rem;
}

.dropdown-item:active {
    background-color: #e9ecef;
    color: #209d44;
}

.dropdown-item.selected::before {
    content: "✓";
}

.left-bar {
    height: 100%;
    border-right:1px solid #ddd;
    width: 250px;
}
.chat-list {
    height: calc(100% - 64px - 50px);
    overflow-y: scroll;
    overflow-x: hidden;
    padding-bottom: 1rem;
}
.chat-list .item {
    padding: 0.6rem 0.8rem;
    display: flex;
    justify-content: space-between;
    user-select: none;
}

.chat-list .selected {
    background-color: #f2f3f5;
}

.shadow-selected {
    box-shadow: 1px 1px 10px #ddd;
}

.chat-list .desc {
    color: #6c757d;
    font-size: 0.8rem;
}

.chat-list-footer {
    height: 50px;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-box {
    height: 100%;
    width: calc(100% - 250px);
}

.chat-box .header {
    height: 62px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    padding: 0 1rem;
    border-bottom: 1px solid #ddd;
}

.chat-box .body {
    height: calc(100% - 262px);
    background-color: #f2f3f5;
    position: relative;
}

.message-list {
    padding: 0 1rem;
}

.message-list li.d-flex:first-child {
    margin-top: 2rem !important;
}

.message-list li:last-child {
    margin-bottom: 2.5rem;
}

.chat-box .body .stop-btn {
    position: absolute;
    bottom: .25rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
}

.chat-box .footer {
    height: 200px;
    border-top: 1px solid #ddd;
    overflow: hidden;
}

.chat-box .footer .tools {
    height: 50px;
    user-select: none;
}

.chat-box .footer textarea {
    width: 100%;
    padding: 0 1rem;
    border: 0;
}

.f23 {
    font-size: 1.53rem;
}

.f20 {
    font-size: 1.33rem;
}

.f18 {
    font-size: 1.2rem;
}

.f12 {
    font-size: 0.8rem;
}

.f15 {
    font-size: 1rem;
}

.f16 {
    font-size: 1.07rem;
}

.cursor-pointer {
    cursor: pointer;
}

.avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 3rem;
    background-color: #ddd;
}

/* 拷贝 */
.block-copy, .block-copy:before, .block-copy:hover, .block-copy:active:before {
    content: '\e711';
    cursor: pointer;
    border-radius: .5rem;
    padding: .25rem .15rem;
}
.block-copy:hover {
    background-color: #eee;
}
.block-copy:active:before {
    background-color: #eee;
    content: '\e742';
}

.markdown-body {
    overflow-wrap: anywhere !important;
}

.markdown-body>p>img {
    margin-top: .5rem;
    margin-bottom: .5rem;
    border-radius: .25rem;
}

.markdown-body pre>code {
    white-space: pre-wrap !important;
}

/* 消息 */
.alert {
    padding: .5rem 1rem;
    color: #383d41 !important;
    min-height: 2.5rem;
}
.alert-secondary {
    background-color: #ededed;
}

/* 闪烁的光标 */
.animate-blink {
    animation: blink 1.2s infinite steps(1,start);
}
@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


/* loading 动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 5px;
    opacity: 0.3;
    animation: pulse 0.5s ease-in-out infinite alternate;
}
.dot1 {
    animation-delay: 0s;
}
.dot2 {
    animation-delay: 0.2s;
}
.dot3 {
    animation-delay: 0.4s;
}
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 1;
    }
}


/* 图片预览浮层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.overlay>img {
    max-width: 95%;
    max-height: 95%;
}
.overlay .close {
    position: absolute;
    top: 0.67rem;
    right: 0.67rem;
    color: #fff;
    cursor: pointer;
}
/* end */


@media (max-width: 768px) {
    .center-box, .params-box, .api-key-box {
        width: 96% !important;
        margin:0;
        left: initial !important;
        top: initial !important;
    }
    .center-box {
        position: relative;
    }
    .params-box, .api-key-box {
        bottom: 120px;
    }
    .chat-box .header {
        height: 50px;
    }
    .chat-box .footer {
        height: 120px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
    }
    .chat-box .body {
        height: calc(100% - 50px - 120px);
    }
    .left-bar {
        width: 100%;
    }
    .more-box {
        width: 100%;
    }
    .chat-box .avatar {
        width: 2.5rem;
        height: 2.5rem;
    }
    .chat-list {
        height: calc(100% - 64px);
    }
    .chat-list-footer {
        display: none;
    }
    .markdown-body {
        font-size: 1rem !important;
    }
    html, body {
        height: 100%;
        font-size: 17px;
    }
}