* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #f0f0f0;
    --text-secondary: #d0d0d0;
    --text-muted: #b0b0b0;
    --accent-color: #4a9eff;
    --accent-hover: #3a8eef;
    --border-color: #404040;
    --error-color: #ff4757;
    --success-color: #2ed573;
    --warning-color: #ffa502;
    --thinking-color: #8e44ad;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --font-serif: 'Crimson Text', Georgia, serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

body {
    font-family: var(--font-serif), serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    background-color: var(--bg-primary);
}

.app-container.sidebar-collapsed .sidebar {
    width: 0;
    transform: translateX(-100%);
    border-right: none;
    overflow: hidden;
}

/* 文件夹导航 */
.folder-navigation {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.breadcrumb-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.breadcrumb-item.active {
    color: var(--accent-color);
    font-weight: 500;
    cursor: default;
}

.breadcrumb-item.active:hover {
    background: transparent;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* 文件夹项样式 */
.folder-item {
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.folder-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
}

.folder-item-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.folder-item-icon svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.folder-item-content {
    flex: 1;
    min-width: 0;
}

.folder-item-name {
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.folder-item-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.folder-item:hover .folder-item-actions {
    opacity: 1;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.sidebar {
    width: 320px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-select {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.language-select:focus {
    border-color: var(--accent-color);
}

.settings-btn, .file-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.settings-btn:hover, .file-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.conversation-list {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.new-chat-btn {
    width: 100%;
    padding: 12px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: background-color 0.2s ease;
}

.new-chat-btn:hover {
    background: var(--accent-hover);
}

.new-folder-btn {
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.new-folder-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-color);
}

.conversations {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.folder-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.folder-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.folder-count {
    font-size: 12px;
    color: var(--text-muted);
}

.folder-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversation-item {
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.conversation-item:hover {
    background: var(--bg-tertiary);
}

.conversation-item.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.conversation-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.conversation-title {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-title-input {
    width: 100%;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--accent-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.conversation-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.conversation-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.conversation-folder-select {
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 5px 8px;
    font-size: 12px;
}

.conversation-folder-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.empty-folder {
    padding: 10px 12px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 12px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    min-height: 0;
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--bg-secondary);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    display: block;
}

.sidebar-toggle:hover {
    background-color: var(--bg-tertiary);
}

.model-info {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
}

.chat-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 0;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.welcome-message h3 {
    margin-bottom: 12px;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.message {
    display: flex;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-avatar {
    background: var(--accent-color);
    color: white;
}

.ai-avatar {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.message-author {
    font-weight: 600;
    font-size: 14px;
}

.message-time {
    font-size: 12px;
    color: var(--text-muted);
}

.message-body {
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-body h1,
.message-body h2,
.message-body h3,
.message-body h4,
.message-body h5,
.message-body h6 {
    margin: 1em 0 0.5em 0;
    line-height: 1.4;
    font-weight: 600;
    color: var(--text-primary);
}

.message-body h1 {
    font-size: 1.8em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.3em;
}

.message-body h2 {
    font-size: 1.5em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
}

.message-body h3 {
    font-size: 1.3em;
}

.message-body p {
    margin: 0.8em 0;
}

.message-body code {
    background: var(--bg-tertiary);
    color: #f9c74f;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono), monospace;
    font-size: 0.9em;
}

.message-body pre {
    background: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    margin: 1em 0;
}

.message-body pre code {
    background: none;
    color: #c9d1d9;
    padding: 0;
    border-radius: 0;
    font-size: 0.9em;
    line-height: 1.6;
}

.message-body ul,
.message-body ol {
    margin: 0.8em 0;
    padding-left: 2em;
}

.message-body li {
    margin: 0.3em 0;
}

.message-body blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1em;
    margin: 1em 0;
    color: var(--text-secondary);
    font-style: italic;
}

.message-body a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.message-body a:hover {
    border-bottom-color: var(--accent-color);
}

.message-body table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    overflow: hidden;
    border-radius: var(--radius);
}

.message-body table td,
.message-body table th {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: left;
}

.message-body table th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

.message-body table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.message-body strong {
    font-weight: 600;
    color: var(--text-primary);
}

.message-body em {
    font-style: italic;
}

.message-body del {
    text-decoration: line-through;
    opacity: 0.7;
}

.message-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1em 0;
}

.message-body hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5em 0;
}

.message-thinking {
    background: rgba(142, 68, 173, 0.1);
    border: 1px solid var(--thinking-color);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    font-family: var(--font-mono), monospace;
    font-size: 14px;
    color: var(--thinking-color);
    white-space: pre-wrap;
    word-break: break-word;
}

.message-thinking-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--thinking-color);
}

.thinking-indicator {
    width: 12px;
    height: 12px;
    border: 2px solid var(--thinking-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.message-files {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attached-file {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.file-content {
    font-family: var(--font-mono), monospace;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message:hover .message-actions {
    opacity: 1;
}

.message-action {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.message-action:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.input-section {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 24px;
}

.file-upload-area {
    max-width: 800px;
    margin: 0 auto 16px;
    min-height: 0;
    transition: all 0.3s ease;
}

.file-upload-area.drag-over {
    background: rgba(74, 158, 255, 0.1);
    border: 2px dashed var(--accent-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.drag-over-text {
    color: var(--accent-color);
    font-weight: 500;
    margin: 10px 0;
}

.uploaded-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uploaded-file {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.file-details h4 {
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.file-details p {
    font-size: 12px;
    color: var(--text-muted);
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.file-action-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.input-container {
    max-width: 800px;
    margin: 0 auto;
}

.input-wrapper {
    position: relative;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: border-color 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent-color);
}

#messageInput {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-serif), serif;
    font-size: 16px;
    line-height: 1.5;
    padding: 16px 100px 16px 16px;
    resize: none;
    min-height: 60px;
    max-height: 200px;
}

#messageInput::placeholder {
    color: var(--text-muted);
}

.input-actions {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: flex;
    gap: 8px;
}

.send-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.send-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.send-btn:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.5;
}

.send-btn.streaming {
    background: var(--error-color);
}

.send-btn.streaming:hover {
    background: #e74c3c;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.shortcuts {
    display: flex;
    align-items: center;
    gap: 4px;
}

kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: var(--font-mono), monospace;
    font-size: 10px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
}

.search-modal {
    max-width: 600px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--bg-tertiary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.search-input {
    margin-bottom: 20px;
}

.search-input input {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
}

.search-result {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result:hover {
    background-color: var(--bg-tertiary);
}

.search-result-preview {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.search-result-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.highlight {
    background: var(--warning-color);
    color: black;
    padding: 1px 2px;
    border-radius: 2px;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 14px;
    z-index: 1002;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--success-color);
    background: rgba(46, 213, 115, 0.1);
}

.toast.error {
    border-color: var(--error-color);
    background: rgba(255, 71, 87, 0.1);
}

.typewriter {
    display: inline;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--accent-color);
    animation: blink 1s infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.messages-container::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.conversation-list::-webkit-scrollbar,
.attached-file::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.conversation-list::-webkit-scrollbar-track,
.attached-file::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.messages-container::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.conversation-list::-webkit-scrollbar-thumb,
.attached-file::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.conversation-list::-webkit-scrollbar-thumb:hover,
.attached-file::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@media (max-width: 768px) {
    .app-container.sidebar-collapsed .sidebar {
        width: 320px;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        width: 100%;
    }

    .message {
        gap: 12px;
    }

    .input-section {
        padding: 16px;
    }

    .modal {
        width: 95%;
        margin: 20px;
    }

    .sidebar-actions {
        flex-direction: column;
        gap: 8px;
    }

    .language-select {
        order: 2;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 280px;
    }

    .chat-header {
        padding: 12px 16px;
    }

    .messages-container {
        padding: 16px;
        gap: 16px;
    }

    .message-body {
        font-size: 15px;
    }

    .input-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    #messageInput {
        padding-right: 100px;
    }
}

.home-view {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.home-card {
    width: min(700px, 100%);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
    padding: 36px;
    text-align: center;
}

.home-card h1 {
    margin-bottom: 10px;
}

.home-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-view.hidden,
.home-view.hidden {
    display: none;
}
