.aichat {
    background: linear-gradient(180deg,#fff,#f7f1e3 40%);
    -webkit-filter: drop-shadow(-6px 0 20px rgba(61,64,75,.2));
    filter: drop-shadow(-6px 0 20px rgba(61,64,75,.2));
    pointer-events: auto;
    width: 510px !important;
    border-radius: 0 20px 20px 0;
}

.video-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aichat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    padding: 20px;
    position: relative;
    border-radius: 0 20px 20px 0;
    overflow: hidden;
}

.aichat-header {
    flex-shrink: 0;
    height: 70px;
    display: flex;
    align-items: center
}

    .aichat-header .avatar {
        width: 36px;
        height: 36px
    }

    .aichat-header .avatar-name {
        margin-left: 10px
    }

.aichat-body {
    flex: 1;
    -ms-overflow-style: none;
    overflow-y: scroll;
    position: relative;
    scrollbar-width: none;
    width: 100%
}

.aichat-list {
    font-size: 14px;
    color: #333;
    line-height: 1.75;
    list-style: none
}

    .aichat-list .aichat-item + .aichat-item {
        margin-top: 20px
    }

.aichat-item:first-child .response {
    margin-top: 0
}

.aichat-item .request {
    width: fit-content;
    width: -moz-fit-content;
    width: -webkit-fit-content;
    margin-left: auto;
    padding: 15px 20px 15px;
    border-radius: 20px 0 20px 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
    background-image: linear-gradient(-145deg,#feebe7,#f0e7fc 65%)
}
.loading-indicator {
    weight: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.aichat-item .response {
    margin-top: 20px;
    padding: 15px 20px 15px;
    border-radius: 0 20px 20px 20px;
    /*    box-shadow: 0 4px 8px rgba(0,0,0,.1);*/
    background-image: linear-gradient(145deg,#feebe7,#f0e7fc 65%)
}

.aichat-item p {
    margin: unset
}

.aichat-footer {
    position: relative
}

.aichat-textarea-box {
    background: #fff;
    border: 1px solid transparent;
    border-radius: 10px;
    box-sizing: border-box;
    height: 130px;
    margin-top: 10px;
    padding: 10px 13px 38px;
    position: relative;
    width: 100%;
    transition: border .2s ease-in-out
}

    .aichat-textarea-box.active {
        border: 1px solid #7D352B;
        box-shadow: 0 0 8px rgba(125, 53, 43, 0.5);
    }

.aichat-textarea {
    outline: 0;
    border: 0;
    -ms-overflow-style: none;
    font-size: 14px;
    height: 100%;
    line-height: 20px;
    resize: none;
    width: 100%
}

.aichat-textarea-limit {
    bottom: 10px;
    color: #afb3c3;
    font-size: 12px;
    left: 15px;
    line-height: 17px;
    position: absolute
}

.aichat-submit {
    border-radius: 50%;
    bottom: 8px;
    cursor: no-drop;
    height: 28px;
    line-height: 28px;
    position: absolute;
    right: 10px;
    text-align: center;
    transition: .2s;
    width: 28px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease-in-out;
    pointer-events: none
}

    .aichat-submit.enabled {
        pointer-events: auto;
        cursor: pointer;
        opacity: 1;
        color: #FFFFFF;
        background-color: #7D352B;
        box-shadow: 0 0 8px rgba(125, 53, 43, 0.5);
    }

    .aichat-submit.loading {
        pointer-events: none;
        color: #2b63cc;
        cursor: wait;
        pointer-events: none;
    }

        .aichat-submit.loading i {
            animation: spin 1s linear infinite;
            font-size: 18px;
        }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.aichat-voice {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgb(255, 255, 255);
    box-shadow: 0px 0px 0px 4px rgba(180, 160, 255, 0.253);
    cursor: pointer;
    line-height: 28px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    margin: 0 auto;
    text-align: center;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition-duration: 0.8s;
    overflow: hidden;
    position: relative;
}

    .aichat-voice.active {
        width: 140px;
        border-radius: 50px;
        background: linear-gradient(45deg, #afb3c3 0%, #7475b7 100%);
        align-items: center;
    }

        .aichat-voice.active i {
            transition-duration: .8s;
            transform: translateY(-200%);
        }

.recording-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: white;
    transform: translateY(200%);
    opacity: 0;
    transition: all .8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.aichat-voice.active .recording-text {
    transform: translateY(0);
    opacity: 1;
}

.cl_1 {
    width: 20px;
    height: 20px;
    border: 2px solid #b79add;
    border-top-color: transparent;
    border-radius: 100%;
    animation: cl_1 infinite 0.75s linear;
}

@keyframes cl_1 {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(360deg);
    }
}



.aichat-close {
    width: 38px;
    height: 38px;
    position: absolute;
    bottom: 10%;
    right: -38px;
    border-radius: 0 100px 100px 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center
}

    .aichat-close:hover {
        background: var(--bs-color-l)
    }

.answer-container pre {
    overflow: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .answer-container pre::-webkit-scrollbar {
        height: 0;
    }
.recommendations-container {
    padding: 16px;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.8);
    margin: 24px 0 18px;
    animation: fadeIn 0.5s ease-in-out;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.5); 
    overflow: hidden;
    position: relative;
}

    .recommendations-container::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
        opacity: 0.3;
        pointer-events: none;
    }

.recommendations-header {
    color: #5d6d7c;
    font-size: 13px;
    margin-bottom: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-left: 12px;
}

    .recommendations-header::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 16px;
        width: 3px;
        background: linear-gradient(to bottom, #6c8aec, #92a7ef);
        border-radius: 2px;
    }

.recommendations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recommendation {
    padding: 7px 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    font-size: 13px;
    color: #5a6a80;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    word-break: break-word;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

    .recommendation::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
        z-index: -1;
    }

    .recommendation:hover {
        color: #4361ee;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
        /* 悬停时的动态边框色 */
        border: 1px solid rgba(67, 97, 238, 0.2);
        /* 微妙的光晕效果 */
        animation: glow 1.5s infinite alternate;
    }

/* 点击效果动画 */
.pulse {
    animation: pulseEffect 0.5s ease-out;
}

@keyframes pulseEffect {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.98);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 0 rgba(67, 97, 238, 0.1), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    }

    100% {
        box-shadow: 0 0 6px rgba(67, 97, 238, 0.2), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 点击效果动画 */
.pulse {
    animation: pulseEffect 0.5s ease-out;
}

@keyframes pulseEffect {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.2);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}
