/* 侧边栏样式 */
.sidebar-bottom-btns {
    @apply mt-6;
}

.sidebar-bottom-btn {
    @apply w-full py-2.5 text-sm font-medium text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 focus:outline-none dark:focus:ring-blue-800 mb-2;
}

.sidebar-bottom-btn.bg-red-500 {
    @apply bg-red-700 hover:bg-red-800;
}

.sidebar-bottom-btn.bg-red-500:focus {
    @apply focus:ring-red-300 dark:focus:ring-red-800;
}

/* 模态框样式 */
.modal-content {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 32rem;
    margin: 1rem;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    @apply dark:bg-gray-800;
}

.modal:not(.hidden) .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* 输入框样式 */
#userInput {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-color);
    @apply transition-colors duration-300 rounded-lg border p-2 focus:outline-none focus:ring-2 focus:ring-blue-500;
    transition: border-color 0.3s ease;
    max-height: 200px; /* 添加最大高度限制 */
}

#userInput:focus {
    border-color: var(--accent-color);
}

/* 顶部模型栏样式 */
.top-bar {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    @apply transition-colors duration-300;
}

.top-bar .text-gray-600 {
    color: var(--text-secondary);
}

.top-bar button {
    color: var(--text-secondary);
}

.top-bar button:hover {
    color: var(--text-primary);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.4); /* 降低透明度 */
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.modal:not(.hidden) {
    display: flex !important;
    opacity: 1;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.message {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    @apply flex gap-4 p-4 transition-colors duration-300;
}

.animate-message {
    animation: float-in 0.3s ease-out;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

.message.user {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.message-bubble {
    @apply bg-white text-gray-800 rounded-xl p-4 shadow-md max-w-3xl;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: fit-content;
    word-wrap: break-word;
    transform-origin: center bottom;
    
}

.message-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* 思考块样式 */
.think-block {
    background: rgba(0, 0, 0, 0.03);
    border-left: 3px solid #9ca3af;
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.think-block::before {
    content: "思考过程";
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-bottom: 4px;
    font-weight: 500;
}

.message-avatar {
    @apply w-10 h-10 rounded-full flex items-center justify-center text-white flex-shrink-0 shadow-sm;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.message-avatar.user {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    margin-left: 12px;
    margin-right: 0;
}

.message-avatar.assistant {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

@keyframes float-in {
    0% {
        transform: translateY(15px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dark .message-bubble {
    @apply bg-gray-700 text-gray-100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dark .message-bubble:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}