/* ===== 设计系统 ===== */
:root {
    /* 主色调 - 深邃靛蓝紫 */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;

    /* 背景色系 */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #18181f;
    --bg-elevated: #1e1e28;
    --bg-hover: #252530;
    --bg-active: #2a2a38;

    /* 表面色 - 玻璃态 */
    --surface-glass: rgba(255, 255, 255, 0.03);
    --surface-glass-hover: rgba(255, 255, 255, 0.06);
    --surface-border: rgba(255, 255, 255, 0.06);
    --surface-border-hover: rgba(255, 255, 255, 0.12);

    /* 文字色 */
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-tertiary: #6b6b80;
    --text-muted: #4a4a5e;

    /* 强调色 */
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;

    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-surface: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);

    /* 尺寸 */
    --sidebar-width: 280px;
    --header-height: 56px;
    --input-area-height: auto;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 动效 */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
}

/* ===== 基础重置 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

/* ===== 背景粒子 ===== */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-particles::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse 800px 600px at 20% 30%, rgba(99, 102, 241, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 600px 400px at 80% 70%, rgba(139, 92, 246, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 50% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
    animation: bgFloat 30s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, -1%) rotate(1deg); }
    50% { transform: translate(-1%, 2%) rotate(-1deg); }
    75% { transform: translate(1%, -2%) rotate(0.5deg); }
}

/* ===== 布局容器 ===== */
.app-container {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--surface-border);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal);
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-header {
    height: var(--header-height);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--surface-border);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
}

.logo-text {
    font-size: 1.05rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.new-chat-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--surface-border);
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.new-chat-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-400);
    background: rgba(99, 102, 241, 0.1);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 8px 8px 4px;
    margin-bottom: 4px;
}

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-item {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
}

.history-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.history-item.active {
    background: var(--bg-active);
    color: var(--text-primary);
}

.history-item .history-icon {
    flex-shrink: 0;
    opacity: 0.5;
}

.history-item .history-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item .history-delete {
    opacity: 0;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.history-item .history-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--surface-border);
}

.quick-topics {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.topic-chip {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    font-family: inherit;
}

.topic-chip:hover {
    border-color: var(--primary-500);
    color: var(--primary-300);
    background: rgba(99, 102, 241, 0.08);
}

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

/* ===== 顶部栏 ===== */
.top-bar {
    height: var(--header-height);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--surface-border);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10;
}

.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.top-bar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.model-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.settings-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.settings-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ===== 聊天区域 ===== */
.chat-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.chat-area::-webkit-scrollbar {
    width: 6px;
}

.chat-area::-webkit-scrollbar-track {
    background: transparent;
}

.chat-area::-webkit-scrollbar-thumb {
    background: var(--surface-border);
    border-radius: 3px;
}

.chat-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ===== 欢迎页面 ===== */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height) - 120px);
    padding: 40px 24px;
    animation: fadeInUp 0.6s ease-out;
}

.welcome-screen.hidden {
    display: none;
}

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

.welcome-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
}

.welcome-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface-border);
    position: relative;
    z-index: 1;
}

.avatar-glow {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.3;
    filter: blur(12px);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.05); }
}

.welcome-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-align: center;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.welcome-quote {
    display: inline-block;
    margin-top: 8px;
    font-style: italic;
    color: var(--text-tertiary);
    font-size: 0.88rem;
}

.welcome-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 640px;
    width: 100%;
}

.welcome-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
    background: var(--surface-glass);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.welcome-card:hover {
    border-color: var(--primary-500);
    background: rgba(99, 102, 241, 0.06);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-desc {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* ===== 消息容器 ===== */
.messages-container {
    display: none;
    flex-direction: column;
    padding: 24px 0;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.messages-container.active {
    display: flex;
}

/* ===== 消息样式 ===== */
.message {
    padding: 8px 24px;
    animation: messageFadeIn 0.3s ease-out;
}

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

.message-inner {
    display: flex;
    gap: 16px;
    max-width: 100%;
}

.message-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 4px;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-avatar.user-avatar {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

.message-body {
    flex: 1;
    min-width: 0;
}

.message-role {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-text {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--text-primary);
    word-break: break-word;
}

.message-text p {
    margin-bottom: 12px;
}

.message-text p:last-child {
    margin-bottom: 0;
}

.message-text strong {
    font-weight: 600;
    color: var(--primary-300);
}

.message-text em {
    color: var(--text-secondary);
}

.message-text code {
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'SF Mono', 'Fira Code', Monaco, monospace;
    color: var(--primary-300);
}

.message-text ul, .message-text ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-text li {
    margin-bottom: 4px;
}

.message-text blockquote {
    border-left: 3px solid var(--primary-500);
    padding-left: 16px;
    margin: 12px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* 用户消息 */
.message.user-message {
    /* 用户消息保持默认布局 */
}

/* AI消息 */
.message.ai-message {
    background: var(--surface-glass);
    border-top: 1px solid var(--surface-border);
    border-bottom: 1px solid var(--surface-border);
    padding-top: 20px;
    padding-bottom: 20px;
}

/* 正在输入指示器 */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-400);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0.32s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* 流式光标效果 */
.streaming-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--primary-400);
    animation: blink 0.8s ease-in-out infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
}

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

/* ===== 输入区域 ===== */
.input-area {
    padding: 12px 24px 16px;
    background: linear-gradient(to top, var(--bg-primary) 60%, transparent);
    position: relative;
}

.input-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 8px 12px 8px 16px;
    transition: all var(--transition-fast);
}

.input-wrapper:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--shadow-md);
}

.input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.6;
    resize: none;
    max-height: 160px;
    outline: none;
    padding: 6px 0;
}

.input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-bottom: 4px;
}

.char-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    tabular-nums: true;
}

.send-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: not-allowed;
    transition: all var(--transition-fast);
}

.send-btn:not(:disabled) {
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.send-btn:not(:disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.send-btn:not(:disabled):active {
    transform: scale(0.95);
}

.input-hint {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== 设置面板 ===== */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.2s ease-out;
}

.settings-overlay.active {
    display: flex;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.settings-panel {
    width: 440px;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: panelSlideIn 0.3s ease-out;
}

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

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--surface-border);
}

.settings-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.close-settings {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.close-settings:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.settings-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.setting-group input {
    padding: 10px 14px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.setting-group input:focus {
    border-color: var(--primary-500);
}

.setting-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.save-settings-btn {
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.save-settings-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.settings-status {
    text-align: center;
    font-size: 0.82rem;
    color: var(--accent-emerald);
    min-height: 20px;
}

/* ===== 停止按钮 ===== */
.stop-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    transition: all var(--transition-fast);
    z-index: 5;
}

.stop-btn.visible {
    display: flex;
}

.stop-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.stop-btn .stop-icon {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: currentColor;
}

/* ===== 错误提示 ===== */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 8px 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #fca5a5;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: messageFadeIn 0.3s ease-out;
}

.error-message .error-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        z-index: 200;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: flex;
    }

    .welcome-cards {
        grid-template-columns: 1fr;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .message {
        padding: 8px 16px;
    }

    .input-area {
        padding: 8px 12px 12px;
    }
}

@media (max-width: 480px) {
    .welcome-avatar {
        width: 72px;
        height: 72px;
    }

    .welcome-subtitle {
        font-size: 0.85rem;
    }

    .welcome-card {
        padding: 12px;
    }
}

/* ===== 自定义滚动条 ===== */
.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--surface-border);
    border-radius: 2px;
}

/* ===== 移动端遮罩 ===== */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
}

.sidebar-backdrop.visible {
    display: block;
}

/* ===== 空状态提示 ===== */
.empty-history {
    padding: 24px 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.empty-history .empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}
