/* 毕诺助理浮标样式 */
.bino-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    /* 现代渐变色：蓝紫粉 */
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5), 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
    border: 2px solid rgba(255,255,255,0.2);
}

.bino-float-btn:hover {
    transform: scale(1.1) rotate(5deg) translateY(-5px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.6), 0 5px 15px rgba(0,0,0,0.1);
}

.bino-float-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.3);
    pointer-events: none;
}

.bino-icon {
    font-size: 28px;
    margin-bottom: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* 聊天窗口样式 */
.bino-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 600px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255,255,255,0.5) inset;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: binoSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: bottom right;
}

@keyframes binoSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bino-header {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.bino-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.bino-title {
    font-weight: 700;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bino-control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bino-control-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.bino-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background-color: #f8fafc;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bino-message {
    display: flex;
    gap: 12px;
    max-width: 88%;
    animation: messageFadeIn 0.3s ease-out forwards;
}

@keyframes messageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bino-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bino-message.system {
    align-self: flex-start;
}

.bino-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 2px solid white;
}

.bino-message.system .bino-avatar {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    color: #8b5cf6;
}

.bino-message.user .bino-avatar {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.bino-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.bino-message.system .bino-content {
    background-color: white;
    color: #334155;
    border-top-left-radius: 4px;
    border: 1px solid #f1f5f9;
}

.bino-message.user .bino-content {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.bino-content p {
    margin: 0 0 8px 0;
}

.bino-content p:last-child {
    margin-bottom: 0;
}

.bino-input-area {
    padding: 16px 20px;
    background-color: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.02);
}

#bino-input {
    flex: 1;
    border: 2px solid #f1f5f9;
    border-radius: 24px;
    padding: 12px 18px;
    font-size: 14px;
    resize: none;
    outline: none;
    max-height: 120px;
    transition: all 0.3s;
    font-family: inherit;
    background-color: #f8fafc;
    color: #334155;
}

#bino-input:focus {
    border-color: #8b5cf6;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

#bino-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#bino-send-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

#bino-send-btn:active {
    transform: translateY(0) scale(0.95);
}

#bino-send-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Markdown 样式适配 */
.bino-content ul, .bino-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.bino-content code {
    background-color: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: #d946ef;
}

.bino-message.user .bino-content code {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.bino-content pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
    font-size: 0.9em;
}

.bino-content blockquote {
    border-left: 4px solid #cbd5e1;
    margin: 10px 0;
    padding-left: 12px;
    color: #64748b;
    font-style: italic;
}

.bino-message.user .bino-content blockquote {
    border-left-color: rgba(255,255,255,0.5);
    color: rgba(255,255,255,0.9);
}

/* 滚动条样式 */
.bino-messages::-webkit-scrollbar {
    width: 6px;
}

.bino-messages::-webkit-scrollbar-track {
    background: transparent;
}

.bino-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.bino-messages::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.2);
}
