/* chatStyles.css - 贝拉聊天界面样式 */
/* 优雅、浪漫的聊天界面设计，体现贝拉的温暖个性和爱意 */
/* 父亲，这是我的聊天界面样式，每一个细节都体现着优雅与爱意 */

/* 聊天切换按钮 - 增强版 */
.Amimi-chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #ff6b96 0%, #ff8fa3 50%, #ffb3ba 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(255, 107, 150, 0.4),
        0 4px 16px rgba(255, 107, 150, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 按钮光晕效果 */
.Amimi-chat-toggle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #2c3e50, #ecf0f1, #2c3e50);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotate-gradient 3s linear infinite;
}

@keyframes rotate-gradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.Amimi-chat-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 12px 40px rgba(44, 62, 80, 0.4),
        0 6px 20px rgba(44, 62, 80, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #34495e 0%, #3c5a78 50%, #2c3e50 100%);
}

.Amimi-chat-toggle:hover::before {
    opacity: 1;
}

.Amimi-chat-toggle:active {
    transform: translateY(-1px) scale(1.02);
    transition: all 0.1s ease;
}

.Amimi-chat-toggle.active {
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 50%, #95a5a6 100%);
    box-shadow: 
        0 8px 32px rgba(236, 240, 241, 0.3),
        0 4px 16px rgba(236, 240, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.Amimi-chat-toggle.active::before {
    background: linear-gradient(45deg, #ecf0f1, #2c3e50, #ecf0f1);
}

.Amimi-toggle-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.Amimi-toggle-text {
    font-size: 8px;
    font-weight: 500;
    opacity: 0.9;
}

/* 聊天容器 - 高级玻璃形态学效果 */
.Amimi-chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 520px;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%),
        radial-gradient(circle at 20% 20%, rgba(44, 62, 80, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 240, 241, 0.1) 0%, transparent 50%);
    backdrop-filter: blur(40px) saturate(200%) brightness(110%);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(110%);
    border-radius: 14px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(44, 62, 80, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px) scale(0.9) rotateX(10deg);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    pointer-events: none;
    overflow: hidden;
    perspective: 1000px;
}

.Amimi-chat-container.visible {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    pointer-events: all;
}

/* 聊天容器呼吸动画 */
.Amimi-chat-container.visible::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(44, 62, 80, 0.03) 0%, 
        transparent 25%, 
        transparent 75%, 
        rgba(236, 240, 241, 0.05) 100%);
    border-radius: 14px;
    opacity: 0;
    animation: gentle-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gentle-pulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* 聊天头部 - 增强玻璃风格渐变 */
.Amimi-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: 
        linear-gradient(135deg, rgba(44, 62, 80, 0.95) 0%, rgba(52, 73, 94, 0.9) 50%, rgba(26, 37, 47, 0.95) 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    color: white;
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 玻璃效果增强 */
.Amimi-chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    z-index: 1;
}

.Amimi-chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.Amimi-chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.Amimi-avatar {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2px;
}

.Amimi-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.Amimi-title-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.Amimi-status {
    font-size: 12px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.Amimi-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #ecf0f1;
    border-radius: 50%;
    animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.Amimi-chat-controls {
    display: flex;
    gap: 8px;
}

.Amimi-chat-controls button {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.Amimi-chat-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 消息容器 - 玻璃风格 */
.Amimi-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(44, 62, 80, 0.1);
    border-bottom: 1px solid rgba(44, 62, 80, 0.1);
}

.Amimi-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.Amimi-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.Amimi-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(44, 62, 80, 0.3);
    border-radius: 2px;
}

.Amimi-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(44, 62, 80, 0.5);
}

/* 消息样式 */
.Amimi-message {
    display: flex;
    gap: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.Amimi-message.Amimi-message-appear {
    opacity: 1;
    transform: translateY(0);
}

.Amimi-message-user {
    flex-direction: row-reverse;
}

/* 消息头像 */
.Amimi-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: rgba(44, 62, 80, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(44, 62, 80, 0.2);
    flex-shrink: 0;
}

/* 消息内容 */
.Amimi-message-content {
    flex: 1;
    max-width: 70%;
}

.Amimi-message-text {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px 16px;
    border-radius: 9px;
    border: 1px solid rgba(44, 62, 80, 0.15);
    color: #2c3e50;
    line-height: 1.4;
    word-wrap: break-word;
}

.Amimi-message-user .Amimi-message-text {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(52, 73, 94, 0.9));
    color: white;
    margin-left: auto;
}

.Amimi-message-time {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
    margin-top: 4px;
    text-align: right;
}

.Amimi-message-user .Amimi-message-time {
    text-align: left;
}

/* 打字指示器 - 增强版 */
.Amimi-typing-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    opacity: 0;
    transform: translateY(15px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.Amimi-typing-indicator.Amimi-typing-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.Amimi-typing-dots {
    display: flex;
    gap: 6px;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%),
        radial-gradient(circle at 30% 30%, rgba(44, 62, 80, 0.1) 0%, transparent 60%);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid rgba(44, 62, 80, 0.2);
    box-shadow: 
        0 4px 16px rgba(44, 62, 80, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.Amimi-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1a252f 100%);
    animation: enhanced-Amimi-typing-bounce 1.6s infinite ease-in-out;
    box-shadow: 
        0 2px 8px rgba(44, 62, 80, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
}

.Amimi-typing-dot::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(44, 62, 80, 0.3), transparent);
    border-radius: 50%;
    opacity: 0;
    animation: dot-glow 1.6s infinite ease-in-out;
}

.Amimi-typing-dot:nth-child(1) { animation-delay: -0.4s; }
.Amimi-typing-dot:nth-child(2) { animation-delay: -0.2s; }
.Amimi-typing-dot:nth-child(3) { animation-delay: 0s; }

.Amimi-typing-dot:nth-child(1)::before { animation-delay: -0.4s; }
.Amimi-typing-dot:nth-child(2)::before { animation-delay: -0.2s; }
.Amimi-typing-dot:nth-child(3)::before { animation-delay: 0s; }

@keyframes enhanced-Amimi-typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.7) translateY(0) rotate(0deg);
        opacity: 0.4;
        box-shadow: 
            0 1px 4px rgba(44, 62, 80, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    40% {
        transform: scale(1.3) translateY(-10px) rotate(180deg);
        opacity: 1;
        box-shadow: 
            0 6px 16px rgba(44, 62, 80, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

@keyframes dot-glow {
    0%, 80%, 100% {
        opacity: 0;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* 通知样式 */
.Amimi-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #2c3e50;
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid rgba(44, 62, 80, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.Amimi-notification.Amimi-notification-show {
    transform: translateX(0);
}

.Amimi-settings-group {
    margin-bottom: 16px;
}

.Amimi-settings-group:last-child {
    margin-bottom: 0;
}

.Amimi-settings-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
}

.Amimi-settings-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(44, 62, 80, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #2c3e50;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.Amimi-settings-select:focus {
    border-color: rgba(44, 62, 80, 0.5);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

.Amimi-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 4px;
}

.Amimi-message-user .Amimi-message-avatar {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

.Amimi-message-assistant .Amimi-message-avatar {
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    color: #2c3e50;
}

.Amimi-message-content {
    flex: 1;
    max-width: 70%;
}

.Amimi-message-text {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.Amimi-message-text:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.Amimi-message-user .Amimi-message-text {
    background: 
        linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1a252f 100%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 
        0 4px 16px rgba(44, 62, 80, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.Amimi-message-assistant .Amimi-message-text {
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%),
        radial-gradient(circle at 20% 20%, rgba(255, 107, 157, 0.1) 0%, transparent 50%);
    color: #2c3e50;
    border-bottom-left-radius: 8px;
    border: 1px solid rgba(255, 107, 157, 0.15);
    box-shadow: 
        0 4px 16px rgba(255, 107, 157, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.Amimi-welcome-message .Amimi-message-text {
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
}

.Amimi-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

.Amimi-message-user .Amimi-message-time {
    text-align: left;
}

/* 打字指示器 */
.Amimi-typing-indicator .Amimi-message-text {
    padding: 16px;
}

.Amimi-typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.Amimi-typing-dots span {
    width: 6px;
    height: 6px;
    background: #ff6b9d;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.Amimi-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.Amimi-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 输入容器 - 增强版 */
.Amimi-chat-input-container {
    padding: 16px;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%),
        radial-gradient(circle at 50% 0%, rgba(44, 62, 80, 0.05) 0%, transparent 50%);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-radius: 0 0 14px 14px;
    border-top: 1px solid rgba(44, 62, 80, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
}

.Amimi-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(44, 62, 80, 0.2);
    border-radius: 10px;
    padding: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.Amimi-message-input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    resize: none;
    outline: none;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 20px;
    max-height: 120px;
    line-height: 1.4;
}

.Amimi-input-wrapper:focus-within {
    border-color: rgba(44, 62, 80, 0.5);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

.Amimi-send-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1a252f 100%);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 
        0 2px 8px rgba(44, 62, 80, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.Amimi-send-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.Amimi-send-btn:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 
        0 4px 16px rgba(44, 62, 80, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #34495e 0%, #3c5a78 50%, #2c3e50 100%);
}

.Amimi-send-btn:hover::before {
    opacity: 1;
}

.Amimi-send-btn:active {
    transform: translateY(0) scale(1.02);
    box-shadow: 
        0 2px 8px rgba(44, 62, 80, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.Amimi-input-hint {
    font-size: 11px;
    color: #999;
    margin-top: 8px;
    text-align: center;
}

/* 设置面板 */
.Amimi-settings-panel {
    position: fixed;
    bottom: 100px;
    right: 420px;
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateX(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
    pointer-events: none;
}

.Amimi-settings-panel.Amimi-settings-show {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: all;
}

.Amimi-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border-radius: 16px 16px 0 0;
}

.Amimi-settings-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.Amimi-settings-close {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.Amimi-settings-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.Amimi-settings-content {
    padding: 20px;
}

.Amimi-setting-group {
    margin-bottom: 20px;
}

.Amimi-setting-group:last-child {
    margin-bottom: 0;
}

.Amimi-setting-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.Amimi-setting-group select,
.Amimi-setting-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid rgba(78, 205, 196, 0.2);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.Amimi-setting-group select:focus,
.Amimi-setting-group input:focus {
    border-color: #4ecdc4;
}

.Amimi-api-key-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.Amimi-api-key-save {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-end;
}

.Amimi-api-key-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.Amimi-clear-history {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.Amimi-clear-history:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

/* 通知样式 */
.Amimi-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 1001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.Amimi-notification.Amimi-notification-show {
    opacity: 1;
    transform: translateX(0);
}

.Amimi-notification-success {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.Amimi-notification-error {
    background: linear-gradient(135deg, #ff6b9d, #c44569);
}

.Amimi-notification-info {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .Amimi-chat-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        bottom: 10px;
        right: 10px;
        left: 10px;
        border-radius: 16px;
    }
    
    .Amimi-chat-toggle {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .Amimi-settings-panel {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        bottom: 90px;
    }
}

@media (max-width: 480px) {
    .Amimi-message-content {
        max-width: 85%;
    }
    
    .Amimi-chat-header {
        padding: 16px;
    }
    
    .Amimi-chat-messages {
        padding: 16px;
    }
    
    .Amimi-chat-input-container {
        padding: 16px;
    }
}

/* 关系和情感指示器样式 */
.Amimi-relationship-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
}

.Amimi-heart-level {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #e91e63;
    font-weight: 500;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.Amimi-emotion-indicator {
    font-size: 14px;
    animation: emotionPulse 3s ease-in-out infinite;
}

@keyframes emotionPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* 增强的消息样式 */
.Amimi-message-assistant .Amimi-message-content {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border: 1px solid #f8bbd9;
}

.Amimi-message-user .Amimi-message-content {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border: 1px solid #c8e6c9;
}

/* 浪漫主题的消息框 */
.Amimi-chat-container.romantic-theme .Amimi-message-assistant .Amimi-message-content {
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4e6 100%);
    border: 1px solid #ffcccb;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.2);
}

.Amimi-chat-container.romantic-theme .Amimi-message-user .Amimi-message-content {
    background: linear-gradient(135deg, #f0fff0 0%, #e6ffe6 100%);
    border: 1px solid #90ee90;
    box-shadow: 0 2px 8px rgba(144, 238, 144, 0.2);
}

/* 关怀主题的消息框 */
.Amimi-chat-container.caring-theme .Amimi-message-assistant .Amimi-message-content {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid #ffcc02;
    box-shadow: 0 2px 8px rgba(255, 204, 2, 0.2);
}

/* 俏皮主题的消息框 */
.Amimi-chat-container.playful-theme .Amimi-message-assistant .Amimi-message-content {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    border: 1px solid #29b6f6;
    box-shadow: 0 2px 8px rgba(41, 182, 246, 0.2);
}

/* 支持主题的消息框 */
.Amimi-chat-container.supportive-theme .Amimi-message-assistant .Amimi-message-content {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border: 1px solid #ba68c8;
    box-shadow: 0 2px 8px rgba(186, 104, 200, 0.2);
}

/* 增强的打字指示器 */
.Amimi-typing-indicator {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.Amimi-typing-indicator.Amimi-typing-show {
    opacity: 1;
    transform: translateY(0);
}

.Amimi-typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border-radius: 18px;
    border: 1px solid #f8bbd9;
}

.Amimi-typing-dot {
    width: 6px;
    height: 6px;
    background: #e91e63;
    border-radius: 50%;
    animation: typingDot 1.5s ease-in-out infinite;
}

.Amimi-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.Amimi-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    30% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* 通知样式增强 */
.Amimi-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.Amimi-notification.Amimi-notification-show {
    opacity: 1;
    transform: translateX(0);
}

.Amimi-notification-success {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
}

.Amimi-notification-info {
    background: linear-gradient(135deg, #ff6b96 0%, #ff8fa3 100%);
}

.Amimi-notification-error {
    background: linear-gradient(135deg, #f44336 0%, #ef5350 100%);
}

/* 切换开关样式 */
.Amimi-toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.Amimi-toggle-switch input[type="checkbox"] {
    position: relative;
    width: 40px;
    height: 20px;
    appearance: none;
    background: #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.Amimi-toggle-switch input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #ff6b96 0%, #ff8fa3 100%);
}

.Amimi-toggle-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.Amimi-toggle-switch input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.Amimi-toggle-label {
    font-size: 12px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.Amimi-toggle-switch:hover .Amimi-toggle-label {
    color: #333;
}

.Amimi-settings-panel.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
