:root {
    --primary-color: #4e6ef2;
    --secondary-color: #6c5ce7;
    --bg-light: #f8f9fa;
    --bg-dark: #343a40;
    --text-dark: #212529;
    --text-light: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --sidebar-width: 300px;
    --sidebar-width-mobile: 85%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

/* Register page scoped styles */
.register-page {
    background: linear-gradient(135deg, #e8f0ff 0%, #ffffff 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.register-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 24px rgba(25, 40, 90, 0.08);
    border: 1px solid #eef2ff;
    max-width: 520px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.register-card h2 {
    text-align: center;
    color: #1f2937;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.register-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.avatar-upload {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#avatarUpload {
    display: none;
}


.register-card .avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    border: 3px dashed #ddd;
    transition: all 0.3s ease;
}

.register-card .avatar-container:hover {
    border-color: #7aa2ff;
    background: #f5f8ff;
    transform: scale(1.03);
}

#avatarPreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.register-card .avatar-placeholder {
    color: #999;
    text-align: center;
}

.register-card .avatar-placeholder i {
    font-size: 48px;
    margin-bottom: 8px;
    display: block;
}

.register-card .avatar-hint {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Form styles */
.register-card .form-group {
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

.register-card .form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.register-card .form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.register-card .form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.register-card .form-group:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.register-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 14px;
}

.input-with-icon input[type="text"],
.input-with-icon input[type="password"] {
    width: 100%;
    padding: 12px 14px 12px 38px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.input-with-icon input[type="text"]:focus,
.input-with-icon input[type="password"]:focus {
    border-color: #4e6ef2;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(78, 110, 242, 0.12);
}

.input-with-action {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #8b94a7;
    padding: 6px 10px;
    border-radius: 6px;
}

.toggle-password:hover {
    color: #4e6ef2;
}

/* Submit button */
#registerBtn {
    width: 100%;
    padding: 12px 14px;
    background: linear-gradient(135deg, #3a7bd5 0%, #396afc 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.05s ease;
    margin-top: 6px;
}

/* keep button animation simplified for business look */

#registerBtn:hover {
    background: #3556e0;
}

#registerBtn:active {
    transform: scale(0.995);
}

/* Error + link */
.error {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
    min-height: 0;
    display: none;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 500px) {
    .register-card {
        padding: 22px;
    }

    .register-card .avatar-container {
        width: 100px;
        height: 100px;
    }

    .register-card h2 {
        font-size: 20px;
    }
}

.container {
    display: flex;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    margin: 0;
    box-shadow: none;
    background: #ffffff;
    position: relative;
}

/* 侧边栏模态框样式 */
.sidebar-modal {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--text-dark);
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: left 0.3s ease;
}

body:not(.dark) .sidebar-modal {
    background: var(--sidebar-bg);
    color: var(--text-dark);
    border-right: 1px solid var(--border-color);
}
body:not(.dark) .sidebar-modal .logo-area { border-bottom: 1px solid var(--border-color); }
body:not(.dark) .sidebar-modal .btn {
    background: var(--ai-message-bg);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}
body:not(.dark) .sidebar-modal .btn:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
body:not(.dark) .sidebar-modal .toggle-container {
    background: var(--ai-message-bg);
    border: 1px solid var(--border-color);
}
body:not(.dark) .sidebar-modal .history-item {
    background: var(--ai-message-bg);
    border: 1px solid var(--border-color);
}
body:not(.dark) .sidebar-modal .history-item:hover { box-shadow: 0 0 0 2px var(--border-color) inset; }
body:not(.dark) .sidebar-modal .history-delete-btn { color: var(--text-dark); opacity: 0.6; }
body:not(.dark) .sidebar-modal .history-delete-btn:hover { color: var(--error-color); }

/* 确保controls容器正确伸展 */
.controls {
    padding: 20px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-modal.active {
    left: 0;
}

/* 遮罩层 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.modal-backdrop.active {
    display: block;
}

@media (min-width: 992px) {
    .sidebar-modal { left: -100%; }
    .modal-backdrop, .modal-backdrop.active { display: none; }
    .sidebar-modal.active + .main-content { margin-left: var(--sidebar-width); }
}

/* 菜单按钮样式 */
.menu-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.menu-btn:hover {
    background: rgba(78, 110, 242, 0.1);
}

#sidebarToggle { color: #8b94a7; }
#sidebarToggle:hover { color: var(--primary-color); }
.sidebar-icon { width: 24px; height: 34px; display: block; }

/* 机器人头像样式 */
.robot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

.logo-area {
    text-align: center;
    padding: 15px 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
body:not(.dark) .logo-area { border-bottom: 1px solid #e5e7eb; }

.user-profile { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-radius: 10px; margin: 10px 0 12px; background: var(--ai-message-bg); border: 1px solid var(--border-color); color: var(--text-dark); position: relative; }
body:not(.dark) .user-profile { background: var(--ai-message-bg); border: 1px solid var(--border-color); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.user-name { font-size: 14px; font-weight: 600; color: var(--text-dark); }

.logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo i {
    background: var(--primary-color);
    padding: 10px;
    border-radius: 50%;
}

.controls {
    padding: 20px 0;
    flex-grow: 1;
}

.control-group {
    margin-bottom: 10px;
}

.control-group h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 18px;
}

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--ai-message-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    text-align: left;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 历史记录列表样式 */
.history-list {
    height: auto;
    max-height: none;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 5px;
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.1);
}

/* 历史记录列表滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.history-item {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 5px;
    background: var(--ai-message-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.controls .control-group:last-child {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.history-item:hover {
    box-shadow: 0 0 0 2px var(--border-color) inset;
}

.history-item-content {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.history-item-title {
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-time {
    font-size: 11px;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-delete-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    opacity: 0.6;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0;
    margin-left: 8px;
    flex-shrink: 0;
}

.history-item:hover .history-delete-btn {
    opacity: 1;
}

.history-delete-btn:hover {
    background: transparent;
    color: var(--error-color);
    transform: scale(1.1);
}

.history-delete-btn:active {
    transform: scale(0.95);
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 10px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--success-color);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* 主聊天区域样式 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* 聊天内容包装器 */
.chat-content-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.chat-header {
    padding: 10px 15px;
    background: white;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.new-chat-btn {
    width: auto;
    padding: 8px 15px;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 14px;
}

.new-chat-btn:hover {
    background: #ccc;
    transform: none;
}

.chat-title {
    font-size: 20px;
    font-weight: 600;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid #eaeaea;
    background: #f7f7f7;
    color: #555;
}

.user-role-teacher {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.user-role-student {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-right .toggle-container { background: transparent; border: none; padding: 0; }
.header-right .toggle-label { color: #6c757d; }

#toolRow #docToggle { margin-left: auto; }

.status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c757d;
    font-size: 14px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success-color);
}

.chat-container {
    flex: 1;
    padding: 24px 28px;
    overflow-y: auto;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.message {
    max-width: 720px;
    padding: 14px 18px;
    border-radius: 18px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

.ai-message {
    align-self: flex-start;
    background: white;
    border: 1px solid #eaeaea;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.ai-message .message-header {
    color: var(--primary-color);
}

.user-message .message-header {
    color: rgba(255, 255, 255, 0.9);
}

.message-content {
    line-height: 1.6;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* 确保所有内部元素不溢出 */
.message-content * {
    max-width: 100%;
    box-sizing: border-box;
}

/* 增量占位：灰色闪烁方块 */
.incremental-placeholder {
    display: inline-block;
    width: 10px;
    height: 1em;
    margin-left: 4px;
    border-radius: 3px;
    background: #e5e7eb;
    animation: placeholder-blink 1s infinite ease-in-out;
    vertical-align: -2px;
}

@keyframes placeholder-blink {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

/* Markdown样式增强 */
.message-content h1,
.message-content h2,
.message-content h3 {
    margin: 10px 0;
    color: var(--text-dark);
}

.message-content p {
    margin-bottom: 10px;
}

.message-content ul,
.message-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.message-content code {
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

.message-content pre {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 10px;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-all;
}

.message-content .code-block {
    background: #f6f8fa;
    border: 1px solid #e6e8eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.message-content .mermaid-block {
    background: #f6f8fa;
    border: 1px solid #e6e8eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.message-content .mermaid-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #f1f3f5;
    border-bottom: 1px solid #e6e8eb;
}

.message-content .mermaid-block-title {
    font-size: 12px;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: #4b5563;
}

.message-content .mermaid-block-copy {
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.message-content .mermaid-block-copy:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #374151;
}

.message-content .mermaid-block-body {
    padding: 10px 12px;
    overflow-x: auto;
}

.message-content .mermaid-diagram .mermaid:not([data-mermaid-has-svg="1"]):empty::before {
    content: "渲染中…";
    color: #6b7280;
    font-size: 13px;
}

.message-content .mermaid-block-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-content .mermaid-block-mode {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.message-content .mermaid-block-mode.active {
    background: rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.message-content .mermaid-block-download {
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.message-content .mermaid-block-download:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #374151;
}

.message-content .mermaid-block[data-mode="diagram"] .mermaid-code {
    display: none;
}

.message-content .mermaid-block[data-mode="code"] .mermaid-diagram {
    display: none;
}

.message-content .mermaid-code-pre {
    margin: 0;
    background: transparent;
    padding: 0;
    white-space: pre;
    word-break: normal;
}

.message-content .mermaid-code-pre code {
    display: block;
    background: transparent;
    padding: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.6;
}

.message-content .mermaid-source {
    display: none;
}

.message-content .code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #f1f3f5;
    border-bottom: 1px solid #e6e8eb;
}

.message-content .code-block-lang {
    font-size: 12px;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: #4b5563;
}

.message-content .code-block-copy {
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.message-content .code-block-copy:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #374151;
}

.message-content .code-block-body {
    display: flex;
    overflow-x: auto;
}

.message-content .code-block-gutter {
    flex: 0 0 auto;
    padding: 10px 8px 10px 12px;
    border-right: 1px solid #e6e8eb;
    color: #9aa4b2;
    text-align: right;
    user-select: none;
    white-space: pre;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.6;
}

.message-content .code-block-pre {
    flex: 1 1 auto;
    margin: 0;
    padding: 10px 12px;
    background: transparent;
    border-radius: 0;
    white-space: pre;
    word-break: normal;
    overflow: visible;
}

.message-content .code-block-pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.6;
}

.message-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    margin-left: 0;
    color: #6c757d;
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 18px;
    border: 1px solid #eaeaea;
    align-self: flex-start;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 2px;
    animation: bounce 1.5s infinite ease-in-out;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 确保聊天容器始终显示滚动条 */
.chat-container {
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

#chatContainer {
    padding-bottom: calc(var(--chat-padding, 24px) + 140px);
}

.input-area {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 20px 16px;
    background: transparent;
    margin-bottom: 0;
    z-index: 40;
}

.tool-row {
    display: flex;
    align-items: center;
    gap: 8px;
    /* padding: 6px 6px; */
    margin-bottom: 0;
    /* border: 1px solid #e6ebf1; */
    border-radius: 12px;
    /* background: rgba(250, 250, 250, 0.9); */
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 10px);
    z-index: 30;
}

.tool-row.collapsed .tool-bubble-btn:not(.tool-bubble-toggle) {
    display: none;
}

.tool-row::-webkit-scrollbar {
    height: 6px;
}

.tool-row::-webkit-scrollbar-track {
    background: transparent;
}

.tool-row::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.tool-bubble-btn {
    border: 1px solid #e6ebf1;
    background: #ffffff;
    color: #334155;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 0 0 auto;
    user-select: none;
    -webkit-user-select: none;
    font-size: 13px;
    line-height: 1;
}

.tool-bubble-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.tool-bubble-btn.active {
    border-color: var(--primary-color);
    background: rgba(78, 110, 242, 0.08);
    color: var(--primary-color);
}

.tool-bubble-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.tool-bubble-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.tool-bubble-text {
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 新的按钮容器样式 */
.input-action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

/* 上传文件按钮样式 */
.icon-btn.stretched {
    flex: 0;
    width: auto;
    height: 40px;
    border-radius: 22px;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

#toolRow .tool-row-doc-toggle {
    position: sticky;
    right: 0;
    z-index: 31;
}
.input-actions .send-btn { margin-left: auto; }
.input-box { min-height: 40px; }

.icon-btn.stretched:hover {
    background: #e4e6eb;
    color: var(--primary-color);
}

/* 新建对话按钮样式 */
.icon-btn.new-chat {
    width: 120px;
    height: 44px;
    border-radius: 22px;
    background: #f0f2f5;
    color: #555;
    font-size: 16px;
}

.icon-btn.new-chat:hover {
    color: white;
    background: #5d73d3;
    transform: none;
}

/* 图标按钮样式 */

/* 复制按钮样式 */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 工作流按钮样式（放在复制按钮左侧） */
.workflow-btn {
    position: absolute;
    top: 10px;
    right: 44px;
    /* 留出与复制按钮的间距 */
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.workflow-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 代码块复制按钮样式 */
.code-copy-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.code-copy-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 确保代码块容器相对定位 */
pre {
    position: relative;
}

/* 复制通知样式 */
.copy-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 10002;
    transition: opacity 0.3s ease;
}

/* 淡出动画 */
.fade-out {
    opacity: 0;
}

/* 推荐问题样式 */
.suggested-questions-container {
    padding: 15px;
    background: white;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.suggested-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.suggested-question-btn {
    padding: 8px 15px;
    background: #f0f2f5;
    border: none;
    border-radius: 18px;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.suggested-question-btn:hover {
    background: #e4e6eb;
    color: var(--primary-color);
}

.task-items-container {
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.012);
    border: 1px solid rgba(0, 0, 0, 0.045);
    border-radius: 10px;
    margin: 6px 0 0;
    box-shadow: none;
    font-size: 12px;
    color: #6b7280;
}

.task-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-items-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.task-items-label {
    letter-spacing: 0.2px;
}

.task-items-progress {
    font-size: 11px;
    font-weight: 500;
    color: #9aa0a6;
}

.task-items-toggle {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9aa0a6;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.task-items-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #6b7280;
}

.task-items-caret {
    display: inline-block;
    transition: transform 0.2s ease;
}

.task-items-toggle.collapsed .task-items-caret {
    transform: rotate(-90deg);
}

.task-items-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 8px;
}

.task-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.task-item-icon {
    width: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.task-status {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-sizing: border-box;
    color: #fff;
}

.task-status.status-todo {
    border: 1.5px solid #b0b0b0;
    background: transparent;
    color: transparent;
}

.task-status.status-running {
    border: 1.5px dashed #9aa0a6;
    background: transparent;
    color: transparent;
}

.task-status.status-done {
    border: 1.5px solid #22c55e;
    background: #22c55e;
    color: #fff;
}

.task-item-text {
    flex: 1;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
    word-break: break-word;
}

.task-item.state-2 .task-item-text {
    color: #9aa0a6;
    text-decoration: line-through;
}

.think-panel {
    padding: 6px 8px;
    margin: 6px 0 0;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.045);
    background: rgba(0, 0, 0, 0.012);
}

.think-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.think-panel-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.think-panel-toggle {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9aa0a6;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.think-panel-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #6b7280;
}

.think-panel-caret {
    display: inline-block;
    transition: transform 0.2s ease;
}

.think-panel-toggle.collapsed .think-panel-caret {
    transform: rotate(-90deg);
}

.think-panel-body {
    font-size: 12px;
    line-height: 1.1;
    color: #9aa0a6;
    white-space: pre-wrap;
    word-break: break-word;
}

.xz-html-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 8px 0 0;
    width: 100%;
}

.xz-html-inline {
    display: block;
    width: 100%;
    margin: 8px 0;
}

.xz-html-frame-wrap {
    width: min(100%, 860px);
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.xz-html-frame {
    width: 100%;
    height: 240px;
    border: 0;
    display: block;
    background: #fff;
}

.message.has-xz-html {
    max-width: min(1100px, 96%);
}

.message.has-xz-html .xz-html-frame-wrap {
    width: 100%;
}

/* 错误信息样式 */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--error-color);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    z-index: 10002;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 18px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: #e4e6eb;
    color: var(--primary-color);
}

/* 占位按钮样式 */
.icon-btn.placeholder {
    opacity: 0.5;
    cursor: default;
}

.icon-btn.placeholder:hover {
    background: #f0f2f5;
    color: #555;
}

.input-container {
    position: relative;
    margin: 0 auto;
    max-width: 100%;
}

.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #ffffff;
    margin-bottom: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 16px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    box-shadow: none;
}

.input-main-row {
    display: flex;
    align-items: flex-end;
    position: relative;
}

.tool-prompt-bar {
    position: absolute;
    top: 12px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through to textarea */
    max-width: calc(100% - 160px);
    min-width: 0;
}

.tool-prompt-left {
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
}

.tool-prompt-icon {
    display: none; /* User requested "special text", icon might be distracting or keep if subtle. Let's hide to match "text block" description */
}

.tool-prompt-meta {
    display: flex;
    align-items: baseline;
    min-width: 0;
}

.tool-prompt-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-prompt-desc {
    display: none;
}

.tool-prompt-close {
    display: none; /* Hide close button, use Backspace to delete */
}

.tool-manager-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.tool-manager-modal {
    width: 860px;
    max-width: 96vw;
    max-height: 86vh;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e6ebf1;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tool-manager-modal.tool-manager-modal-floating {
    position: fixed;
    right: 18px;
    bottom: 110px;
    z-index: 10060;
    max-height: calc(100vh - 140px);
    width: 860px;
    max-width: calc(100vw - 36px);
}

.tool-manager-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
}

.tool-manager-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.tool-manager-close {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid #e6ebf1;
    background: #ffffff;
    cursor: pointer;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.tool-manager-close:hover {
    background: #f8fafc;
}

.tool-manager-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 14px;
    overflow: auto;
}

.tool-manager-body.single {
    grid-template-columns: 1fr;
}

.tool-manager-panel {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.tool-manager-panel-header {
    padding: 12px 12px;
    font-size: 13px;
    font-weight: 800;
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
    color: #0f172a;
}

.tool-list {
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-list-item {
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 10px 10px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tool-list-item.selected {
    border-color: rgba(78, 110, 242, 0.35);
    background: rgba(78, 110, 242, 0.05);
}

.tool-list-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid #e6ebf1;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex: 0 0 auto;
}

.tool-list-item-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.tool-list-item-main {
    min-width: 0;
    flex: 1;
}

.tool-list-item-name {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.tool-list-item-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
    line-height: 1.2;
}

.tool-list-item-actions {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

.tool-mini-btn {
    border: 1px solid #e6ebf1;
    background: #ffffff;
    height: 28px;
    padding: 0 8px;
    border-radius: 10px;
    cursor: pointer;
    color: #334155;
    font-size: 12px;
}

.tool-mini-btn:hover {
    background: #f8fafc;
}

.tool-form {
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-form label {
    font-size: 12px;
    color: #334155;
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}

.tool-form input,
.tool-form textarea,
.tool-form select {
    width: 100%;
    border: 1px solid #e6ebf1;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    color: #0f172a;
    background: #ffffff;
}

.tool-form textarea {
    min-height: 86px;
    resize: vertical;
}

.tool-pick-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tool-pick-row select {
    flex: 1;
}

.tool-form input:focus,
.tool-form textarea:focus,
.tool-form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 110, 242, 0.12);
}

.tool-list-item-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tool-scope-badge {
    flex: 0 0 auto;
    height: 18px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    white-space: nowrap;
}

.tool-scope-badge.private {
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    border-color: rgba(148, 163, 184, 0.22);
}

.tool-scope-badge.public {
    background: rgba(78, 110, 242, 0.10);
    color: rgba(30, 64, 175, 0.92);
    border-color: rgba(78, 110, 242, 0.22);
}

.tool-scope-badge.all {
    background: rgba(16, 185, 129, 0.10);
    color: rgba(5, 150, 105, 0.98);
    border-color: rgba(16, 185, 129, 0.22);
}

.tool-icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.tool-icon-option {
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e6ebf1;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
}

.tool-icon-option.active {
    border-color: var(--primary-color);
    background: rgba(78, 110, 242, 0.08);
    color: var(--primary-color);
}

.tool-icon-option svg {
    width: 16px;
    height: 16px;
    display: block;
}

.tool-form-actions {
    display: flex;
    gap: 8px;
}

.tool-primary-btn {
    flex: 1;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.tool-secondary-btn {
    height: 40px;
    border-radius: 12px;
    border: 1px solid #e6ebf1;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 0 12px;
}

.tool-secondary-btn:hover {
    background: #f8fafc;
}

@media (max-width: 900px) {
    .tool-manager-body {
        grid-template-columns: 1fr;
    }
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: none;
    transform: none;
}

.input-wrapper:hover:not(:focus-within) {
    border-color: #c1c8cd;
    box-shadow: none;
}

.input-box {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 12px 8px;
    min-height: 36px;
    max-height: none;
    overflow-y: hidden;
    resize: none;
    font-size: 16px;
    line-height: 1.5;
    color: #2c3e50;
    font-family: inherit;
}

.input-char-counter {
    display: none;
    margin-top: 2px;
    padding: 0 8px 6px;
    font-size: 12px;
    line-height: 1.2;
    color: #64748b;
    text-align: right;
    transition: color 0.3s ease;
}

.input-char-counter.visible {
    display: block;
}

.input-char-counter.over-limit {
    color: var(--error-color);
}

.input-box::placeholder {
    color: #8e9aaf;
    font-weight: 400;
    transition: color 0.2s ease;
}

.input-box:focus::placeholder {
    color: #adb5bd;
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    margin-right: 0;
}

.action-btn.recording { background: var(--error-color); color: #fff; }

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* 移动端响应式布局 */
@media (max-width: 768px) {
    /* 移除语音按钮组垂直排列 */

    .primary-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .input-wrapper {
        padding: 6px 10px;
        border-radius: 12px;
    }

    .input-box {
        font-size: 14px;
        padding: 10px 6px;
        min-height: 20px;
    }

    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .send-btn {
        width: 70px;
        height: 36px;
        font-size: 14px;
        gap: 6px;
    }

    .send-btn i {
        font-size: 12px;
    }

    .send-btn span {
        font-size: 12px;
    }

    .input-actions {
        gap: 2px;
        margin-left: 6px;
    }
}

/* 隐藏按钮样式 */
.hidden {
    display: none;
}

.primary-btn:hover {
    background: #3a56d4;
}

.primary-btn:disabled {
    background: #a0a0a0;
    cursor: not-allowed;
}

/* 终止按钮样式 */
.primary-btn.stop-mode {
    background: var(--error-color);
    animation: pulse 1.5s infinite;
}

.primary-btn.stop-mode:hover {
    background: #c82333;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.file-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.file-item {
    display: flex;
    align-items: center;
    background: #f0f7ff;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 14px;
    gap: 8px;
}

.file-item i {
    color: var(--primary-color);
}

.file-name {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-remove-btn {
    margin-left: 4px;
    background: transparent;
    border: none;
    color: #9aa0a6;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.file-remove-btn:hover {
    color: var(--error-color);
    background: rgba(220,53,69,0.08);
}

.file-remove-btn i {
    text-align: center;
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .sidebar-modal {
        width: var(--sidebar-width-mobile);
    }

    .message {
        max-width: 95%;
    }

    .chat-header {
        padding: 10px 15px;
    }

    .chat-title {
        font-size: 18px;
    }

    .user-role-badge {
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 11px;
    }

    .header-right {
        gap: 8px;
    }

    .icon-btn.new-chat {
        width: 40px;
        height: 40px;
        border-radius: 20px;
        padding: 0;
        font-size: 0;
        gap: 0;
    }

    .icon-btn.new-chat i {
        font-size: 18px;
    }

    .input-area {
        padding: 0px 10px;
        margin-bottom: 0px;
    }

    .input-box {
        padding: 10px 15px;
    }

    .input-char-counter {
        font-size: 11px;
        padding: 0 12px 6px;
    }

    /* 移动端按钮布局 */
    .input-action-buttons {
        justify-content: space-between;
    }

    .voice-send-group {
        flex-direction: column;
        gap: 5px;
    }

    .primary-btn {
        padding: 10px 18px;
    }
}

/* 录音指示器 */
.recording-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--error-color);
    font-size: 14px;
}

.recording-indicator.active {
    display: flex;
}

/* 错误提示样式 */
.error-notification {
    position: relative;
    margin: 10px auto;
    padding: 10px 20px;
    background-color: #ff4d4f;
    color: white;
    border-radius: 8px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease;
}

:root {
    --error-color: #ff4d4f;
}

/* 建议气泡样式 - 对话框风格 */
.suggestions-container {
    margin: 20px 0;
    padding: 0;
    max-width: 80%;
    align-self: flex-start;
    animation: fadeIn 0.3s ease;
    position: relative;
}

.suggestions-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 12px;
    padding: 0 4px;
}

.suggestions-title i {
    color: #ffc107;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
}

.suggestion-item {
    background: #ffffff;
    color: #495057;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    outline: none;
    max-width: 100%;
    word-wrap: break-word;
    line-height: 1.4;
    position: relative;
    text-align: left;
    margin-left: 0;
}

.suggestion-item:hover {
    background: #f8f9fa;
    transform: translateX(1px);
    /* border-color: var(--primary-color); */
}

.suggestion-item:active {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 建议项左侧指示器 */
.suggestion-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.suggestion-item:hover::before {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .suggestions-container {
        max-width: 95%;
    }

    .suggestion-item {
        font-size: 13px;
        padding: 10px 14px;
    }

    .suggestion-item:hover {
        transform: translateX(2px);
    }
}

/* 下一步建议下方卡片网格 */
.suggestions-card-grid {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 8px 16px 16px 16px;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: nowrap; /* 保证三卡片并排一行 */
    overflow-x: hidden; /* 容器不产生水平滚动 */
    overflow-y: visible;
}

.suggestions-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    aspect-ratio: 2 / 1; /* 宽:高 = 2:1（高:宽=1:2）*/
    min-width: 150px;    /* 保证最小高度约 75px（按比例） */
    max-width: 350px;    /* 保持不超过 350px 宽 */
    width: calc((100% - 24px) / 3); /* 三列自适应（两处gap=24px） */
    display: flex;
    align-items: stretch;
    flex: 0 0 auto; /* 横排且不被拉伸 */
}

.suggestions-card .card-body {
    width: 100%;
    height: 100%;
    padding: 8px;
    overflow: hidden; /* 禁止滚动条 */
    word-break: break-word;
    position: relative;
    background: transparent;
    display: flex;
    align-items: stretch;
}

.suggestions-card .card-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    overflow: hidden;
}

/* 卡片内部默认样式（图片+标题+内容） */
.suggestions-card .card-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.suggestions-card .card-title {
    font-weight: 600;
    margin: 6px 0 4px 0;
    color: #343a40;
}

.suggestions-card .card-text {
    font-size: 13px;
    line-height: 1.4;
    color: #495057;
    flex: 1 1 auto;
    overflow: hidden;
}

@media (max-width: 768px) {
    .suggestions-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 10px;
    }
}

/* 聊天图片样式 */
.chat-image {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
    display: block;
}

.chat-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chat-video {
    max-width: 100%;
    max-height: 380px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
    display: block;
}

/* 分段渲染容器样式 */
.finalized-content,
.incremental-content {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
}

.finalized-content {
    /* 固化内容不再变化 */
    position: relative;
}

.incremental-content {
    /* 增量内容可能会更新 */
    position: relative;
}

/* 确保容器内的所有子元素也遵守宽度限制 */
.finalized-content > *,
.incremental-content > * {
    max-width: 100%;
    box-sizing: border-box;
}

/* 特别处理图片，确保不溢出 */
.finalized-content img,
.incremental-content img {
    max-width: 100%;
    height: auto;
}

/* 特别处理代码块，确保不溢出 */
.finalized-content pre,
.incremental-content pre {
    max-width: 100%;
    overflow-x: auto;
}

/* 特别处理表格，确保不溢出 */
.finalized-content table,
.incremental-content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

/* 图片预览模态框样式 */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-preview-container {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.image-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eaeaea;
    background: #f8f9fa;
}

.image-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.image-preview-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.image-preview-close:hover {
    background: #e9ecef;
    color: #333;
}

.image-preview-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
}

.image-preview-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.image-preview-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eaeaea;
    background: #f8f9fa;
    justify-content: center;
}

.image-preview-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.image-preview-btn:hover {
    background: #3a56d4;
    transform: translateY(-1px);
}

.image-preview-btn i {
    font-size: 12px;
}

/* Markdown表格样式 */
.message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-content table th,
.message-content table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

.message-content table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.message-content table tr:nth-child(even) {
    background: #f8f9fa;
}

.message-content table tr:hover {
    background: #e9ecef;
}

.message-content table thead th {
    border-bottom: 2px solid #dee2e6;
}

.message-content table tbody tr:first-child td {
    border-top: 1px solid #ddd;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .message-content table {
        font-size: 12px;
    }

    .message-content table th,
    .message-content table td {
        padding: 8px 10px;
    }

    .image-preview-container {
        max-width: 95vw;
        max-height: 95vh;
    }

    .image-preview-footer {
        flex-direction: column;
    }

    .image-preview-btn {
        justify-content: center;
    }
}

/* KaTeX数学公式样式 */
.message-content .katex {
    font-size: 1.1em !important;
    margin: 10px 0;
}

.message-content .katex-display {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow-x: auto;
}

.message-content .katex-display .katex {
    font-size: 1.2em !important;
}

/* 行内数学公式样式 */
.message-content .katex-inline {
    margin: 0 2px;
}

/* 确保数学公式在流式渲染时不会造成布局抖动 */
.message-content .katex,
.message-content .katex-display {
    transition: none !important;
    animation: none !important;
}

/* 数学公式容器样式 */
.message-content .math-container {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.message-content .math-container .katex-display {
    margin: 10px 0;
    background: white;
}

/* 公式标签样式 */
.message-content .formula-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
}

/* 公式说明样式 */
.message-content .formula-description {
    margin-top: 10px;
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.4;
}

.message-content .formula-description strong {
    color: #495057;
}


/* 成功通知样式 */
.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #28a745;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
}

/* 流式渲染优化样式 */
.message-content {
    position: relative;
    min-height: 1em;
    /* 启用硬件加速 */
    transform: translateZ(0);
    will-change: contents;
}

/* 防止重复渲染时的闪烁 */
.message-content.streaming {
    transition: opacity 0.05s ease-in-out;
}

/* 数学公式渲染优化 */
.katex {
    font-size: 1.1em;
    /* 启用硬件加速 */
    transform: translateZ(0);
}

.katex-display {
    margin: 1em 0;
    text-align: center;
}

/* 代码块渲染优化 */
pre {
    position: relative;
    overflow-x: auto;
    /* 启用硬件加速 */
    transform: translateZ(0);
}

pre code {
    display: block;
    padding: 1em;
    background: #f8f9fa;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

/* 流式渲染防抖效果 */
.message-content.rendering {
    opacity: 0.9;
    /* 减少重绘 */
    transform: translateZ(0);
}

/* 性能优化：减少重排重绘 */
.message-content * {
    /* 避免不必要的重排 */
    box-sizing: border-box;
}

/* 优化滚动性能 */
.chat-container {
    /* 启用硬件加速滚动 */
    transform: translateZ(0);
    /* 优化滚动性能 */
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

/* 优化数学公式容器 */
.math-container {
    /* 启用硬件加速 */
    transform: translateZ(0);
    /* 避免重排 */
    contain: layout style;
}

/* 工作流结果弹窗样式 */
.workflow-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.workflow-result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.workflow-result-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 92%;
    max-width: 520px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.workflow-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.workflow-result-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.workflow-result-close:hover {
    background: #e9ecef;
    color: #333;
}

.workflow-result-body {
    padding: 18px 16px;
}

.workflow-url {
    word-break: break-all;
    background: #f6f8fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 12px;
    color: #333;
}

.workflow-result-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px 16px;
}

.workflow-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary-color);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
}

.workflow-open-btn:hover {
    background: #3a56d4;
}

/* 文档侧边栏样式 */
.doc-sidebar {
    width: 280px;
    background: #f8f9fa;
    border-left: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* 当有展开的班级文件夹时加宽侧边栏 */
.doc-sidebar.expanded {
    width: 340px;
}

.doc-sidebar.hidden {
    width: 0;
    border-left: none;
    overflow: hidden;
}

@media (min-width: 992px) {
    .doc-sidebar.hidden {
        width: 0;
        border-left: none;
        overflow: hidden;
    }
}

.doc-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.doc-sidebar-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-sidebar-header i {
    color: var(--primary-color);
}

.doc-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 文档分类样式 */
.doc-section {
    margin-bottom: 12px;
}

.doc-section-header {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-section-header.collapsible {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.doc-section-header.collapsible:hover {
    background: #e9ecef;
}

.doc-section-header h4 {
    margin: 0;
    color: #333;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.doc-section-header i {
    color: var(--primary-color);
    font-size: 11px;
}

.section-toggle-icon {
    transition: transform 0.2s ease;
    margin-right: 4px;
}

.doc-section-content {
    padding-left: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
    padding-bottom: 150px;
}

.doc-section-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

/* 班级文件夹标题样式（阶梯式） */
.class-folder-title {
    margin-bottom: 4px;
}

.folder-title-header {
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
    transition: background-color 0.2s ease;
}

.folder-title-header:hover {
    background: #e9ecef;
}

.folder-title-header .folder-toggle-icon {
    transition: transform 0.2s ease;
    font-size: 10px;
    color: #666;
    margin-right: 6px;
}

.folder-title-header .folder-icon {
    color: var(--primary-color);
    font-size: 12px;
    margin-right: 6px;
}

.folder-title-header .folder-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    flex: 1;
    min-width: 0;
}

.folder-title-header .folder-status {
    font-size: 10px;
    color: #666;
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.folder-title-header.is-loading .folder-status {
    background: rgba(78, 110, 242, 0.10);
    color: #2b4edc;
}

.cloud-folder-loading {
    background: transparent;
    border: 1px dashed rgba(0, 0, 0, 0.10);
    border-radius: 6px;
    padding: 8px 10px;
}

.cloud-folder-loading-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.cloud-folder-loading-spinner {
    color: var(--primary-color);
    width: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 班级文档缩进样式 */
.class-doc-indent {
    margin-left: 16px;
    margin-bottom: 2px;
    border-left: 2px solid #e9ecef;
    padding-left: 8px;
    background: #fafafa;
}

/* 原有文件夹样式保留 */
.folder-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 6px;
    overflow: hidden;
}

.folder-header {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.folder-header:hover {
    background: #f8f9fa;
}

.folder-title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.folder-toggle-icon {
    transition: transform 0.2s ease;
    font-size: 10px;
    color: #666;
}

.folder-icon {
    color: var(--primary-color);
    font-size: 12px;
}

.folder-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

.folder-status {
    font-size: 10px;
    color: #666;
}

.folder-content {
    padding: 0 12px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.folder-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
}

.folder-content:not(.collapsed) {
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.folder-loading,
.folder-error,
.folder-empty {
    text-align: center;
    padding: 12px;
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.folder-error {
    color: var(--error-color);
}

.folder-file-item {
    position: relative;
    margin-bottom: 4px;
    font-size: 11px;
    padding: 6px 8px;
    padding-right: 50px; /* 为悬浮按钮预留空间 */
    /* 继承主文档项的条形布局 */
    display: flex;
    align-items: stretch;
    flex-direction: row;
    min-height: 40px;
}

.folder-file-item:hover .doc-actions {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.folder-file-item .doc-title {
    font-size: 11px;
    line-height: 1.3;
    margin-bottom: 1px;
}

.folder-file-item .doc-time {
    font-size: 10px;
    color: #999;
    line-height: 1.1;
}

.folder-file-item .doc-title-text {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-file-item .doc-actions {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transform: translateY(-50%) scale(0.9);
}

/* 文件夹内文档的悬停信息框 */
.folder-file-item .doc-hover-info {
    position: absolute;
    right: 6px;
    top: calc(50% + 20px);
    background: rgba(108, 117, 125, 0.9);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 9;
    white-space: nowrap;
    max-width: 150px;
    transform: translateY(-50%) scale(0.9);
}

.folder-file-item:hover .doc-hover-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.folder-file-item .doc-action-btn {
    padding: 2px 4px;
    font-size: 9px;
    min-width: 20px;
    height: 20px;
}

.folder-file-item .doc-icon {
    display: flex;
    align-items: center;
    margin-right: 8px;
    color: #6c757d;
    font-size: 14px;
    flex-shrink: 0;
    width: 16px;
}

.doc-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.folder-file-item .doc-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.doc-item {
    position: relative;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 8px 12px;
    padding-right: 60px; /* 为悬浮按钮预留空间 */
    cursor: pointer;
    transition: all 0.3s ease;
    transform: none;
    opacity: 1;
    min-height: 50px;
    display: flex;
    align-items: stretch;
    margin-bottom: 4px;
    flex-direction: row;
}

/* 取消首个文档项的特殊高亮，使所有文档样式一致 */
.doc-item:first-child {
    transform: none;
    opacity: 1;
    border-color: #e9ecef;
    box-shadow: none;
}

.doc-item:hover {
    transform: scale(1);
    opacity: 1;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(78, 110, 242, 0.2);
    z-index: 10;
}

.doc-item:hover .doc-actions {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.doc-icon {
    display: flex;
    align-items: center;
    margin-right: 12px;
    color: #6c757d;
    font-size: 16px;
    flex-shrink: 0;
    width: 20px;
}

.doc-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    line-height: 1.3;
}

.doc-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.doc-time {
    font-size: 11px;
    color: #999;
    line-height: 1.2;
}

.doc-source-icon {
    font-size: 10px;
    opacity: 0.7;
    min-width: 12px;
    flex-shrink: 0;
}

.doc-title-text {
    flex: 1;
}

/* 商务风格文档头部与菜单 */
.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.doc-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.doc-menu-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: #fff;
    color: #666;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-menu-btn:hover {
    color: #333;
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(78, 110, 242, 0.15);
}

.doc-menu {
    position: absolute;
    right: 12px;
    top: 44px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
    z-index: 50;
}

.doc-menu.open {
    display: flex;
}

.doc-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.doc-menu-item i {
    color: var(--primary-color);
}

.doc-menu-item:hover {
    background: #f1f3f5;
}

/* profile menu */
.profile-menu-btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--ai-message-bg); color: var(--text-dark); display: grid; place-items: center; cursor: pointer; transition: all 0.2s ease; margin-left: auto; }
.profile-menu-btn:hover { color: var(--text-dark); box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.profile-menu { position: absolute; right: 12px; bottom: 44px; background: var(--ai-message-bg); border: 1px solid var(--border-color); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 8px; display: none; flex-direction: column; gap: 6px; min-width: 140px; z-index: 50; }
.profile-menu.open { display: flex; }
.profile-menu-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: transparent; border: none; color: var(--text-dark); text-align: left; cursor: pointer; transition: background 0.2s ease; }
.profile-menu-item i { color: var(--primary-color); }
.profile-menu-item:hover { background: rgba(0,0,0,0.06); }

/* theme ignore utility */
.no-theme {
    background: transparent !important;
    color: #555 !important;
    border: none !important;
    box-shadow: none !important;
}
.no-theme:hover,
.no-theme:active,
.no-theme:focus {
    background: transparent !important;
    color: #555 !important;
    border: none !important;
    box-shadow: none !important;
}
.icon-btn.no-theme,
.icon-btn.no-theme:hover { background: transparent !important; color: #555 !important; border: none !important; }
.menu-btn.no-theme,
.btn.no-theme,
.action-btn.no-theme { background: transparent !important; color: #555 !important; border: none !important; }
.user-profile.no-theme { background: rgba(255,255,255,0.1) !important; color: #333 !important; }

/* 菜单加载动画状态 */
.doc-menu.loading .doc-menu-item {
    display: none;
}

.doc-menu-spinner {
    display: none;
    width: 100%;
    padding: 6px 0;
    text-align: center;
    color: var(--primary-color);
}

.doc-menu.loading .doc-menu-spinner {
    display: block;
}

.doc-time {
    font-size: 10px;
    color: #666;
    text-align: left;
    margin-top: 4px;
}

.doc-actions {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 6px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transform: translateY(-50%) scale(0.9);
}

/* 文档悬停信息框 */
.doc-hover-info {
    position: absolute;
    right: 8px;
    top: calc(50% + 25px);
    background: rgba(108, 117, 125, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 9;
    white-space: nowrap;
    max-width: 200px;
    transform: translateY(-50%) scale(0.9);
}

.doc-item:hover .doc-hover-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.doc-hover-title {
    font-weight: 500;
    line-height: 1.2;
}

/* 删除按钮特殊样式 */
.doc-action-btn.delete {
    transition: all 0.2s ease;
}

.doc-action-btn.delete:hover {
    background-color: #dc3545 !important;
    color: white !important;
}

.doc-action-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.doc-action-btn:hover {
    background: #3a56d4;
    transform: translateY(-1px);
}

.doc-action-btn.secondary {
    background: #6c757d;
}

.doc-action-btn.secondary:hover {
    background: #5a6268;
}

/* 无文档提示样式 */
.no-docs {
    text-align: center;
    color: #666;
    font-size: 12px;
    padding: 20px;
}

.no-docs.error {
    color: var(--error-color);
}

.loading-docs {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    font-size: 12px;
}

.loading-docs i {
    margin-right: 6px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 已添加文档气泡样式 */
.added-doc-bubble {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #bbdefb;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(78, 110, 242, 0.1);
    animation: slideDown 0.3s ease;
}

.doc-bubble-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-bubble-content i {
    color: var(--primary-color);
    font-size: 16px;
}

.doc-bubble-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    word-break: break-all;
}

.doc-bubble-remove {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-bubble-remove:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 文档切换按钮使用 tool-bubble-btn 的基础/active 样式 */

/* 响应式设计 */
@media (max-width: 768px) {
    .doc-sidebar {
        width: 200px;
    }

    .chat-content-wrapper {
        flex-direction: row;
        /* 保持水平布局 */
    }

    .doc-item {
        min-height: 50px;
        /* 减小文档项高度 */
        padding: 8px;
    }

    .doc-title {
        font-size: 11px;
        /* 减小字体 */
    }

    .doc-icon {
        font-size: 20px;
        /* 减小图标 */
    }

    /* 菜单在移动端的尺寸微调 */
    .doc-header {
        align-items: center;
    }

    .doc-menu {
        right: 8px;
        top: 40px;
        min-width: 120px;
    }

    .doc-menu-item {
        padding: 8px;
    }
}

.success-notification i {
    font-size: 16px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 拷贝文档弹窗样式 */
.copy-doc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-doc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.copy-doc-container {
    margin: 5% auto;
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.copy-doc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.copy-doc-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.copy-doc-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.copy-doc-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.copy-doc-body {
    padding: 24px;
    margin: 0 auto;
}

.copy-doc-info {
    background: #f3f4f6;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.copy-doc-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #374151;
}

.copy-doc-info p:last-child {
    margin-bottom: 0;
}

.copy-doc-form label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

#folderTokenInput {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    margin-bottom: 20px;
}

#folderTokenInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 110, 242, 0.1);
}

.copy-doc-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.copy-doc-cancel,
.copy-doc-confirm {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.copy-doc-cancel {
    background: #f3f4f6;
    color: #374151;
}

.copy-doc-cancel:hover {
    background: #e5e7eb;
}

.copy-doc-confirm {
    background: var(--primary-color);
    color: white;
}

.copy-doc-confirm:hover:not(:disabled) {
    background: #3b5bdb;
}

.copy-doc-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 删除按钮样式 */
.doc-menu-item.delete {
    color: #dc2626;
}

.doc-menu-item.delete:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.doc-menu-item.delete i {
    color: #dc2626;
}

/* 操作气泡提示 */
.bubble-tip {
    position: fixed;
    z-index: 10010;
    background: #111827;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.06);
}

/* 小箭头 */
.bubble-tip::after {
    content: '';
    position: absolute;
    top: 10px;
    left: -6px; /* 默认从左侧贴近卡片时显示 */
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid rgba(17,24,39,1);
}

/* 内联（卡片内）气泡：右上角定位，无需箭头 */
.bubble-tip.inline {
    position: absolute;
    top: 8px;
    right: 8px;
}
.bubble-tip.inline::after { display: none; }

.bubble-tip.show {
    opacity: 1;
    transform: translateY(0);
}

.bubble-tip.hide {
    opacity: 0;
    transform: translateY(-4px);
}

.bubble-tip.success { background: #065f46; }
.bubble-tip.error { background: #7f1d1d; }
.bubble-tip.loading { background: #374151; }

.bubble-tip .bubble-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ========== 拖拽上传功能样式 ========== */

/* 拖拽时输入区域高亮效果 */
.input-area.drag-over {
    background: rgba(78, 110, 242, 0.05);
    border: 2px dashed var(--primary-color);
    transition: all 0.3s ease;
}

/* 拖拽遮罩层 */
.drag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.drag-overlay.show {
    opacity: 1;
}

.drag-overlay-content {
    background: white;
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    animation: dragOverlaySlideIn 0.4s ease-out forwards;
    border: 2px dashed var(--primary-color);
    max-width: 400px;
    width: 90%;
}

@keyframes dragOverlaySlideIn {
    to {
        transform: translateY(0);
    }
}

.drag-overlay-icon {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 24px;
    animation: dragIconBounce 2s ease-in-out infinite;
}

@keyframes dragIconBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

.drag-overlay-text h3 {
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.drag-overlay-text p {
    color: #6b7280;
    font-size: 16px;
}

/* 暗色主题适配 */
body.dark .drag-overlay-content {
    background: #2a2a2a;
    border-color: var(--primary-color);
}

body.dark .drag-overlay-text h3 {
    color: var(--text-light);
}

body.dark .drag-overlay-text p {
    color: #9ca3af;
}

/* 文件拖拽时的全局样式 */
body.dragging {
    pointer-events: none;
}

body.dragging * {
    pointer-events: none;
}

body.dragging .input-area {
    pointer-events: auto;
}

/* 拖拽状态下的视觉提示 */
.input-area::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(78, 110, 242, 0.05);
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.input-area.drag-over::after {
    opacity: 1;
}

/* 确保输入元素在拖拽状态下仍可见 */
.input-area.drag-over .input-container,
.input-area.drag-over .input-action-buttons {
    position: relative;
    z-index: 2;
}

/* 上传按钮在拖拽时的提示效果 */
.input-area.drag-over #attachFileBtn {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(78, 110, 242, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .drag-overlay-content {
        padding: 32px 24px;
        border-radius: 12px;
    }
    
    .drag-overlay-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }
    
    .drag-overlay-text h3 {
        font-size: 20px;
    }
    
    .drag-overlay-text p {
        font-size: 14px;
    }
}

/* 文件附件样式 */
.file-attachments {
    margin-top: 8px;
    padding: 8px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-attachment-item {
    flex: 1 1 100%;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.file-attachment-item.compact {
    flex: 0 1 auto;
    max-width: 280px;
    position: relative;
}

.file-attachment-item.compact::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 8px;
    bottom: calc(100% + 8px);
    max-width: 360px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(18, 18, 18, 0.92);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    word-break: break-all;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    z-index: 20;
}

.file-attachment-item.compact::before {
    content: '';
    position: absolute;
    left: 22px;
    bottom: calc(100% + 2px);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(18, 18, 18, 0.92);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    z-index: 21;
}

.file-attachment-item.compact:hover::after,
.file-attachment-item.compact:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.file-preview {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 12px;
}

.file-attachment-item.compact .file-preview {
    padding: 6px 10px;
    gap: 8px;
}

.attachment-image {
    max-width: 200px;
    max-height: 150px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.attachment-image:hover {
    transform: scale(1.02);
}

.attachment-video {
    max-width: 300px;
    max-height: 200px;
    border-radius: 6px;
}

.attachment-audio {
    width: 100%;
    max-width: 300px;
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 18px;
}

.file-attachment-item.compact .file-icon {
    width: 26px;
    height: 26px;
    font-size: 14px;
    border-radius: 6px;
    flex: 0 0 auto;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
    word-break: break-all;
}

.file-attachment-item.compact .file-info {
    min-width: 0;
}

.file-attachment-item.compact .file-name {
    max-width: 210px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
}

.file-size {
    font-size: 12px;
    color: #666;
}

.file-attachment-item.compact .file-size {
    display: none;
}

.file-download-link {
    text-decoration: none;
    color: inherit;
}

.file-download-link:hover .file-name {
    color: var(--primary-color);
    text-decoration: underline;
}

.input-file-preview {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
}

.input-file-preview:empty {
    display: none;
}

.input-file-preview .file-item {
    max-width: 360px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 12px;
    background: rgba(74, 110, 242, 0.08);
    border: 1px solid rgba(74, 110, 242, 0.18);
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
    cursor: default;
}

.input-file-preview .file-item i {
    font-size: 16px;
    flex: 0 0 auto;
}

.input-file-preview .file-item .file-name {
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
    flex: 1 1 auto;
}

.input-file-preview .file-item .file-remove-btn {
    position: relative;
    top: auto;
    right: auto;
    width: 22px;
    height: 22px;
    border-radius: 11px;
    border: none;
    background: transparent;
    color: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
}

.input-file-preview .file-item .file-remove-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.75);
}

.input-file-preview .file-item.upload-success {
    background: rgba(40, 167, 69, 0.10);
    border-color: rgba(40, 167, 69, 0.20);
    color: #28a745;
}

.input-file-preview .file-item.upload-success .file-name {
    color: var(--text-dark);
}

.input-file-preview .file-item.upload-error {
    background: rgba(220, 53, 69, 0.10);
    border-color: rgba(220, 53, 69, 0.20);
    color: #dc3545;
}

.input-file-preview .file-item.uploading::after {
    top: 50%;
    right: 10px;
    width: 12px;
    height: 12px;
    border-width: 2px;
    transform: translateY(-50%);
}

/* 用户消息中的文件附件特殊样式 */
.user-message .file-attachments {
    background: rgba(74, 110, 242, 0.05);
    border-radius: 8px;
    margin: 8px 0 0 0;
    padding: 6px;
}

.user-message .file-attachment-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(74, 110, 242, 0.2);
}

/* 移动端文件附件适配 */
@media (max-width: 768px) {
    .attachment-image {
        max-width: 150px;
        max-height: 120px;
    }
    
    .attachment-video {
        max-width: 250px;
        max-height: 150px;
    }
    
    .file-preview {
        padding: 6px 8px;
        gap: 8px;
    }
    
    .file-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .file-name {
        font-size: 13px;
    }
    
.file-size {
    font-size: 11px;
}

#attachFileBtn,
#attachFileBtn:hover {
    background: transparent !important;
}

#voiceInputBtn,
#voiceInputBtn:hover {
    background: transparent !important;
    border: none !important;
}
}
