:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #45b7d1;
    --warning-color: #f9ca24;
    --success-color: #6ec071;
    --danger-color: #ff4757;
    --dark-bg: #1a202c;
    --dark-card: #2d3748;
    --dark-text: #e2e8f0;
    --light-bg: #f7fafc;
    --light-card: #ffffff;
    --light-text: #2d3748;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: var(--light-bg);
    color:#6c757d;
    transition: var(--transition);
    min-height: 100vh;
    padding-bottom: 80px;
    line-height: 1.6;
}

body.dark-mode {
    background: var(--dark-bg);
    color: var(--dark-text);
}

/* 布局样式 */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部导航 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    position: relative;
}
.header-actions {
    display: flex;
    gap: 10px;
}

/* 功能导航卡片 */
.feature-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background: var(--light-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dark-mode .feature-card {
    background: var(--dark-card);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-lg);
}

.feature-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    position: relative;
    z-index: 2;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
    position: relative;
    z-index: 2;
}

.dark-mode .feature-title {
    color: var(--secondary-color);
}

.feature-desc {
    font-size: 0.95rem;
    color: var(--gray-600);
    position: relative;
    z-index: 2;
}

.dark-mode .feature-desc {
    color: var(--gray-400);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: var(--transition);
    opacity: 0;
}

.feature-card:hover::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

@keyframes shine {
    0% { left: -50%; }
    100% { left: 100%; }
}

/* 内容区域 */
.content-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 25px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-section {
    background: var(--light-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.dark-mode .input-section {
    background: var(--dark-card);
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .section-title {
    color: var(--secondary-color);
}

.input-container {
    position: relative;
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    min-height: 120px;
    padding: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1.1em;
    resize: none;
    transition: var(--transition);
    outline: none;
    background: var(--gray-100);
    line-height: 1.6;
}

.dark-mode #search-input {
    background: var(--gray-800);
    border-color: var(--gray-600);
    color: var(--dark-text);
}

#search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

#search-button {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    font-size: 1.2rem;
}

#search-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.file-upload-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.upload-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.dark-mode .upload-option {
    border-color: var(--gray-600);
}

.upload-option:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 107, 0.05);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.upload-text {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.dark-mode .upload-text {
    color: var(--gray-400);
}

.file-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.file-preview {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 15px;
    position: relative;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    overflow: hidden;
}

.dark-mode .file-preview {
    background: var(--gray-800);
    border-color: var(--gray-600);
}

.file-preview:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.remove-file {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 10;
}

.remove-file:hover {
    transform: scale(1.1);
    background: var(--danger-color);
}

.thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.file-info {
    margin-top: 10px;
    overflow: hidden;
}

.file-name {
    font-weight: 500;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: var(--gray-600);
}

.dark-mode .file-meta {
    color: var(--gray-400);
}

/* 分析标记 */
.analysis-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.marker {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--warning-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    cursor: pointer;
    pointer-events: all;
    box-shadow: var(--shadow);
    transform: translate(-50%, -50%);
    z-index: 5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.marker-detail {
    position: absolute;
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: var(--shadow-md);
    z-index: 20;
    max-width: 200px;
    font-size: 0.85rem;
    color: var(--gray-800);
    display: none;
}

.dark-mode .marker-detail {
    background: var(--dark-card);
    color: var(--dark-text);
}

.marker:hover .marker-detail {
    display: block;
}

/* 回答区域 - 优化后样式 */
.answer-section {
    background: var(--light-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: none;
    width: 100%;
}

.dark-mode .answer-section {
    background: var(--dark-card);
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.dark-mode .answer-header {
    border-bottom-color: var(--gray-600);
}

.answer-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--primary-color);
}

.dark-mode .answer-title {
    color: var(--secondary-color);
}

.answer-actions {
    display: flex;
    gap: 10px;
    position: relative;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.dark-mode .action-btn {
    background: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--gray-300);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(15deg);
}

.action-btn.export {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* 优化后的答案内容区域 */
.answer-content {
    min-height: 200px;
    line-height: 1.8;
    width: 100%;
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    font-size: 16px;
    word-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
}

.dark-mode .answer-content {
    background: var(--gray-800);
    border-color: var(--gray-600);
}

/* 流式响应容器 */
.streaming-content {
    min-height: 200px;
    line-height: 1.8;
    transition: all 0.3s ease;
}

/* 思考内容容器 */
.thinking-content {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--gray-700);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.dark-mode .thinking-content {
    background-color: rgba(255, 193, 7, 0.15);
    color: var(--gray-300);
}

.thinking-content .thinking-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--warning-color);
    font-size: 1em;
}

/* 最终答案容器 */
.final-answer-content {
    min-height: 150px;
    line-height: 1.8;
    font-size: 16px;
    word-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
    position: relative;
}

/* 流式光标 */
.streaming-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: var(--primary-color);
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: middle;
    margin-bottom: -0.1em;
}

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

/* 打字效果 */
.typing-effect {
    overflow: hidden;
    border-right: 3px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color) }
}

/* 即时显示优化 */
.immediate-display {
    will-change: contents;
    backface-visibility: hidden;
}

/* 流畅滚动 */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Markdown 渲染样式优化 */
.final-answer-content h1, 
.final-answer-content h2, 
.final-answer-content h3, 
.final-answer-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--primary-color);
    font-weight: 600;
    scroll-margin-top: 20px;
}

.dark-mode .final-answer-content h1,
.dark-mode .final-answer-content h2,
.dark-mode .final-answer-content h3,
.dark-mode .final-answer-content h4 {
    color: var(--secondary-color);
}

.final-answer-content p {
    margin-bottom: 1em;
    line-height: 1.6;
}

/* 优化有序列表样式 */
.final-answer-content ol {
    counter-reset: item;
    list-style-type: none;
    padding-left: 2.2em;
    margin-bottom: 1.5em;
}

.final-answer-content ol li {
    display: block;
    position: relative;
    margin-bottom: 0.8em;
    padding-left: 0;
    counter-increment: item;
    line-height: 1.6;
}

.final-answer-content ol li:before {
    content: counter(item) ".";
    position: absolute;
    left: -2.2em;
    font-weight: bold;
    color: var(--primary-color);
    background: rgba(255, 107, 107, 0.1);
    width: 1.8em;
    height: 1.8em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
}

.dark-mode .final-answer-content ol li:before {
    color: var(--secondary-color);
    background: rgba(78, 205, 196, 0.15);
}

.final-answer-content ul {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.final-answer-content ul li {
    margin-bottom: 0.5em;
    position: relative;
    line-height: 1.6;
}

.final-answer-content ul li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.dark-mode .final-answer-content ul li:before {
    color: var(--secondary-color);
}

.final-answer-content code {
    background-color: var(--gray-200);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.dark-mode .final-answer-content code {
    background-color: var(--gray-700);
}

.final-answer-content pre {
    background-color: var(--gray-200);
    padding: 1em;
    border-radius: 5px;
    overflow: auto;
    margin-bottom: 1em;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

.dark-mode .final-answer-content pre {
    background-color: var(--gray-700);
}

.final-answer-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1em;
    margin-left: 0;
    margin-bottom: 1em;
    color: var(--gray-600);
    font-style: italic;
}

.dark-mode .final-answer-content blockquote {
    color: var(--gray-400);
}

.final-answer-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.9em;
    box-shadow: var(--shadow-sm);
}

.final-answer-content th,
.final-answer-content td {
    padding: 0.75em;
    text-align: left;
    border: 1px solid var(--gray-300);
}

.final-answer-content th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.final-answer-content tr:nth-child(even) {
    background-color: var(--gray-100);
}

.dark-mode .final-answer-content tr:nth-child(even) {
    background-color: var(--gray-700);
}

.final-answer-content tr:hover {
    background-color: var(--gray-200);
}

.dark-mode .final-answer-content tr:hover {
    background-color: var(--gray-600);
}

.final-answer-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
    box-shadow: var(--shadow);
}

/* 流式响应动画优化 */
@keyframes fadeInWord {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.streaming-word {
    animation: fadeInWord 0.1s ease-out forwards;
    opacity: 0;
}

/* AI风险提示 */
.ai-warning {
    margin-top: 20px;
    padding: 12px;
    background-color: rgba(249, 202, 36, 0.1);
    border-left: 4px solid var(--warning-color);
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--gray-700);
}

.dark-mode .ai-warning {
    background-color: rgba(249, 202, 36, 0.15);
    color: var(--gray-300);
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
}

.typing-text {
    font-weight: 600;
}

.typing-dots {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.6;
    animation: typing 1.4s infinite ease-in-out both;
}

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

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

@keyframes typing {
    0%, 80%, 100% { 
        transform: scale(0.6);
    }
    40% { 
        transform: scale(1);
    }
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-card {
    background: var(--light-card);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.dark-mode .sidebar-card {
    background: var(--dark-card);
}

.history-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    background: var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.dark-mode .history-item {
    background: var(--gray-800);
    border-color: var(--gray-600);
}

.history-item:hover {
    background: var(--gray-200);
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.dark-mode .history-item:hover {
    background: var(--gray-700);
    box-shadow: var(--shadow);
}

.history-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    position: relative;
}

.history-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dark-mode .history-btn {
    background: var(--gray-800);
    color: var(--gray-300);
    border-color: var(--gray-600);
}

.history-btn:hover {
    background: var(--gray-200);
    box-shadow: var(--shadow);
}

.dark-mode .history-btn:hover {
    background: var(--gray-700);
    box-shadow: var(--shadow);
}

.history-btn.export {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* 特殊作业面板 */
.special-work-panel {
    background: rgba(110, 192, 113, 0.1);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
    border: 1px dashed rgba(110, 192, 113, 0.3);
}

.special-work-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.special-work-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.special-work-btn {
    background: rgba(110, 192, 113, 0.1);
    border: 1px solid rgba(110, 192, 113, 0.3);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--success-color);
    font-size: 0.9rem;
}

.special-work-btn:hover {
    background: rgba(110, 192, 113, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.special-work-btn.active {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

/* 模式切换面板 */
.mode-switcher {
    background: var(--light-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--shadow);
    position: relative;
}

.dark-mode .mode-switcher {
    background: var(--dark-card);
}

.mode-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-mode .mode-title {
    color: var(--secondary-color);
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mode-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.dark-mode .mode-btn {
    background: var(--gray-800);
    border-color: var(--gray-600);
    color: var(--gray-300);
}

.mode-btn:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.dark-mode .mode-btn:hover {
    background: var(--gray-700);
    box-shadow: var(--shadow-sm);
}

.mode-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 移动端适配 */
@media (max-width: 1024px) {
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .feature-nav {
        grid-template-columns: 1fr;
    }
    
    .special-work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mode-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo {
        flex-direction: row;
        justify-content: center;
    }
    
    /* 移动端logo文字缩小 */
    .logo-text {
        font-size: 1.4rem;
    }
    
    /* 移动端模式切换图标与logo一行 */
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .file-upload-options {
        flex-direction: column;
    }
    
    .file-previews {
        grid-template-columns: 1fr;
    }
    
    .special-work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 移动端底部导航 */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--light-card);
        display: flex;
        justify-content: space-around;
        padding: 0px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .dark-mode .bottom-nav {
        background: var(--dark-card);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        cursor: pointer;
        padding: 8px 12px;
        border-radius: 8px;
        transition: var(--transition);
    }
    
    .nav-item.active {
        background: rgba(255, 107, 107, 0.1);
    }
    
    .nav-icon {
        font-size: 1.2rem;
        color: var(--gray-600);
    }
    
    .dark-mode .nav-icon {
        color: var(--gray-400);
    }
    
    .nav-item.active .nav-icon {
        color: var(--primary-color);
    }
    
    .nav-text {
        font-size: 0.7rem;
        color: var(--gray-600);
    }
    
    .dark-mode .nav-text {
        color: var(--gray-400);
    }
    
    .nav-item.active .nav-text {
        color: var(--primary-color);
        font-weight: 500;
    }
    
    body {
        padding-bottom: 70px;
    }
    
    /* 移动端答案区域优化 */
    .final-answer-content {
        padding: 15px;
        font-size: 15px;
    }
    
    .final-answer-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .final-answer-content pre {
        padding: 10px;
        font-size: 14px;
    }
    
    .final-answer-content ul, 
    .final-answer-content ol {
        padding-left: 1.2em;
    }
    
    /* 移动端优化有序列表 */
    .final-answer-content ol li {
        padding-left: 2em;
        margin-bottom: 0.6em;
    }
    
    .final-answer-content ol li:before {
        width: 1.6em;
        height: 1.6em;
        font-size: 0.8em;
    }
    
    /* 移动端流式显示优化 */
    .streaming-word {
        animation-duration: 0.05s;
    }
    
    .streaming-cursor {
        height: 1.1em;
    }
    
    /* 移动端思考内容优化 */
    .thinking-content {
        font-size: 0.85em;
        padding: 12px;
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 15px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .input-section, .answer-section, .sidebar-card {
        padding: 20px;
    }
    
    .special-work-grid {
        grid-template-columns: 1fr;
    }
    
    .final-answer-content {
        padding: 12px;
        font-size: 14px;
    }
    
    .final-answer-content h1 {
        font-size: 1.5em;
    }
    
    .final-answer-content h2 {
        font-size: 1.3em;
    }
    
    .final-answer-content h3 {
        font-size: 1.1em;
    }
    
    .final-answer-content pre {
        padding: 8px;
        font-size: 13px;
    }
    
    /* 移动端进一步优化有序列表 */
    .final-answer-content ol li {
        padding-left: 1.8em;
    }
    
    .final-answer-content ol li:before {
        width: 1.4em;
        height: 1.4em;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 通知样式 */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 9999;
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
    max-width: 300px;
    animation: slideIn 0.3s ease;
}

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

/* 应急流程图 - 优化样式 */
.emergency-flow {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.flow-step {
    display: flex;
    align-items: center; /* 修改为center确保垂直居中 */
    gap: 15px;
    padding: 15px;
    background: var(--gray-100);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.dark-mode .flow-step {
    background: var(--gray-800);
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    position: static; /* 移除绝对定位 */
    transform: none; /* 移除变换 */
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-desc {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.dark-mode .step-desc {
    color: var(--gray-400);
}

/* AR相机效果 */
.camera-view {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scanning-line {
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    animation: scan 2s infinite linear;
}

@keyframes scan {
   0% { top: 0; }
   100% { top: 100%; }
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.camera-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.shutter-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 4px solid white;
}

/* 导出选项菜单 - 修复位置 */
.export-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background: var(--light-card);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.dark-mode .export-menu {
    background: var(--dark-card);
}

.export-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.export-option:hover {
    background: var(--gray-100);
}

.dark-mode .export-option:hover {
    background: var(--gray-700);
}

.export-icon {
    font-size: 1rem;
    color: var(--gray-600);
}

.dark-mode .export-icon {
    color: var(--gray-400);
}

.export-text {
    font-size: 0.9rem;
    color: var(--gray-700);
}

.dark-mode .export-text {
    color: var(--gray-300);
}

/* PC端隐藏底部导航 */
@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
}

/* 修复导出菜单位置 */
.answer-actions {
    position: relative;
}

.export-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
}

/* 增强文本展示效果 */
.answer-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 表格响应式优化 */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 1em 0;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    -webkit-overflow-scrolling: touch;
}

.final-answer-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.9em;
    min-width: 600px; /* 确保表格有最小宽度 */
}

.final-answer-content th, 
.final-answer-content td {
    padding: 0.75em;
    text-align: left;
    border: 1px solid var(--gray-300);
    word-break: break-word; /* 允许长单词换行 */
}

.final-answer-content th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    position: sticky;
    left: 0;
}

.dark-mode .final-answer-content th {
    background-color: var(--gray-800);
    border-color: var(--gray-600);
}

.dark-mode .final-answer-content td {
    border-color: var(--gray-600);
}

.final-answer-content tr:nth-child(even) {
    background-color: var(--gray-100);
}

.dark-mode .final-answer-content tr:nth-child(even) {
    background-color: var(--gray-800);
}

.final-answer-content tr:hover {
    background-color: var(--gray-200);
}

.dark-mode .final-answer-content tr:hover {
    background-color: var(--gray-700);
}

/* 导出下拉菜单优化 */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--light-card);
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    z-index: 1;
    padding: 10px;
    margin-top: 5px;
}

.dark-mode .export-dropdown-content {
    background-color: var(--dark-card);
}

.export-dropdown:hover .export-dropdown-content {
    display: block;
}

.export-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.export-option:hover {
    background-color: var(--gray-100);
}

.dark-mode .export-option:hover {
    background-color: var(--gray-700);
}

.export-option i {
    margin-right: 8px;
    width: 10px;
    text-align: center;
}

/* 新增绘画功能样式 */
.paint-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.paint-option {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-300);
}

.dark-mode .paint-option {
    background: var(--gray-800);
    border-color: var(--gray-600);
}

.paint-option:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.dark-mode .paint-option:hover {
    background: var(--gray-700);
    box-shadow: var(--shadow-sm);
}

.paint-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.paint-text {
    font-size: 0.9rem;
    color: var(--gray-600);
    position: relative;
}

.dark-mode .paint-text {
    color: var(--gray-400);
}

/* 绘画生成结果区域 */
.paint-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.paint-result {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.paint-result:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.paint-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.paint-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.paint-action {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.paint-action:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* 绘画生成进度 */
.paint-progress {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
    display: none;
}

.dark-mode .paint-progress {
    background: var(--gray-700);
}

.paint-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

/* 绘画提示输入 */
.paint-prompt {
    margin-top: 15px;
}

.paint-prompt-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    resize: none;
    outline: none;
    transition: var(--transition);
    background: var(--gray-100);
    margin-bottom: 10px;
}

.dark-mode .paint-prompt-input {
    background: var(--gray-800);
    border-color: var(--gray-600);
    color: var(--dark-text);
}

.paint-prompt-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.paint-generate-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    box-shadow: var(--shadow);
}

.paint-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.paint-generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* PDF预览优化 */
.pdf-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.pdf-preview-content {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    height: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.dark-mode .pdf-preview-content {
    background: var(--dark-card);
}

.pdf-preview-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-300);
}

.dark-mode .pdf-preview-header {
    border-bottom-color: var(--gray-600);
}

.pdf-preview-title {
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-mode .pdf-preview-title {
    color: var(--secondary-color);
}

.pdf-preview-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.dark-mode .pdf-preview-close {
    background: var(--gray-700);
}

.pdf-preview-close:hover {
    background: var(--primary-color);
    color: white;
}

.pdf-preview-body {
    flex: 1;
    padding: 20px;
    overflow: auto;
}

/* 移动端绘画选项适配 */
@media (max-width: 768px) {
    .paint-options {
        grid-template-columns: 1fr;
    }
    
    .paint-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .paint-results {
        grid-template-columns: 1fr;
    }
}

/* 功能说明样式 */
.feature-description {
    padding: 15px;
    background: var(--gray-100);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 20px;
}

.dark-mode .feature-description {
    background: var(--gray-800);
}

.feature-description-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-mode .feature-description-title {
    color: var(--secondary-color);
}

.feature-description-text {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.dark-mode .feature-description-text {
    color: var(--gray-400);
}

/* 新增：优化Markdown渲染的样式 */
.final-answer-content .hljs {
    padding: 1em;
    border-radius: 8px;
    margin: 1em 0;
    font-size: 0.9em;
    line-height: 1.5;
}

.final-answer-content blockquote p {
    margin: 0;
}

.final-answer-content hr {
    border: none;
    border-top: 1px solid var(--gray-300);
    margin: 1.5em 0;
}

.dark-mode .final-answer-content hr {
    border-color: var(--gray-600);
}

/* 新增：专业安全报告样式 */
.safety-report {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 1.5em 0;
    box-shadow: var(--shadow);
}

.safety-report-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.safety-report-title {
    font-weight: 600;
    font-size: 1.1em;
}

.safety-report-content {
    padding: 20px;
    background: var(--gray-100);
}

.dark-mode .safety-report-content {
    background: var(--gray-800);
}

.safety-report-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-300);
}

.dark-mode .safety-report-item {
    border-bottom-color: var(--gray-600);
}

.safety-report-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.safety-report-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 15px;
}

.safety-report-details {
    flex: 1;
}

.safety-report-label {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.dark-mode .safety-report-label {
    color: var(--secondary-color);
}

.safety-report-value {
    color: var(--gray-700);
}

.dark-mode .safety-report-value {
    color: var(--gray-300);
}

.risk-level {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 8px;
}

.risk-level.high {
    background-color: var(--danger-color);
    color: white;
}

.risk-level.medium {
    background-color: var(--warning-color);
    color: var(--gray-800);
}

.risk-level.low {
    background-color: var(--success-color);
    color: white;
}

/* 新增：专业卡片样式 */
.info-card {
    background: var(--light-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin: 1em 0;
    border-left: 4px solid var(--primary-color);
}

.dark-mode .info-card {
    background: var(--dark-card);
}

.info-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.dark-mode .info-card-header {
    border-bottom-color: var(--gray-600);
}

.info-card-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1em;
}

.dark-mode .info-card-title {
    color: var(--secondary-color);
}

.info-card-content {
    line-height: 1.6;
}

/* 新增：步骤流程样式 - 优化版 */
.steps-container {
    margin: 1.5em 0;
    counter-reset: step;
}

.step-item {
    display: flex;
    margin-bottom: 15px;
    position: relative;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    padding-bottom: 15px;
    border-left: 2px solid var(--primary-color);
    padding-left: 15px;
    position: relative;
}

.step-item:last-child .step-content {
    border-left: 2px solid transparent;
}

.step-content::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
}

.step-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.dark-mode .step-title {
    color: var(--secondary-color);
}

.step-description {
    color: var(--gray-700);
}

.dark-mode .step-description {
    color: var(--gray-300);
}

/* 新增：移动端优化 - 确保内容不溢出 */
.mobile-optimized {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* 移动端表格优化 */
@media (max-width: 768px) {
    .final-answer-content table {
        font-size: 0.8em;
        min-width: 400px;
    }
    
    .final-answer-content th, 
    .final-answer-content td {
        padding: 0.5em;
    }
}

/* 表单元素防溢出 */
.mobile-input {
    width: 100%;
    max-width: 100%;
}

/* 新增：移动端代码块优化 */
.mobile-code {
    font-size: 14px;
    line-height: 1.4;
    width: 100%;
}

/* 新增：移动端图片优化 */
.mobile-image {
    max-width: 100%;
    height: auto;
}

/* 新增：应急处置流程优化 */
.emergency-steps {
    margin: 1.5em 0;
    counter-reset: emergency-step;
}

.emergency-step {
    display: flex;
    margin-bottom: 1.2em;
    align-items: center; /* 确保垂直居中 */
}

.emergency-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 0.95em;
}

.emergency-step-content {
    flex: 1;
    padding: 12px 15px;
    background: var(--gray-100);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.dark-mode .emergency-step-content {
    background: var(--gray-800);
}

.emergency-step-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-mode .emergency-step-title {
    color: var(--secondary-color);
}

.emergency-step-desc {
    color: var(--gray-700);
    line-height: 1.5;
}

.dark-mode .emergency-step-desc {
    color: var(--gray-300);
}

/* 移动端应急处置流程优化 */
@media (max-width: 768px) {
    .emergency-step {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .emergency-step-number {
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .emergency-step-content {
        width: 100%;
        margin-left: 0;
    }
}

/* 修复应急处置流程中的多余圆点问题 */
.emergency-flow .flow-step::before,
.emergency-flow .flow-step::after,
.emergency-flow .step-content::before,
.emergency-flow .step-content::after {
    display: none !important; /* 确保不显示任何伪元素 */
}

/* 修复PC端生成内容排版序号问题 */
.final-answer-content ol {
    list-style-type: decimal; /* 使用标准数字序号 */
    padding-left: 2em; /* 增加左边距 */
}

.final-answer-content ol li {
    display: list-item; /* 使用标准列表项显示 */
    position: relative;
    margin-bottom: 0.5em;
    padding-left: 0; /* 移除额外左边距 */
}

.final-answer-content ol li:before {
    display: none; /* 隐藏自定义序号 */
}

/* 移动端优化应急处置流程对齐 */
@media (max-width: 768px) {
    .flow-step {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .step-number {
        margin-bottom: 10px;
        margin-right: 0;
    }
}

/* 新增：自动搜索提示样式 */
.auto-search-notice {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 9999;
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
    display: none;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { top: 0; opacity: 0; }
    to { top: 80px; opacity: 1; }
}

/* 新增：加载遮罩样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    font-size: 1.2rem;
    flex-direction: column;
    gap: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-300);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 新增：联网搜索参考资料样式 */
.online-references {
    margin-top: 20px;
    padding: 15px;
    background: rgba(69, 183, 209, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.online-references-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.reference-items {
    list-style: none;
    padding-left: 0;
}

.reference-item {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    transition: var(--transition);
}

.dark-mode .reference-item {
    background: rgba(255, 255, 255, 0.1);
}

.reference-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
}

.dark-mode .reference-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.reference-link {
    color: var(--accent-color);
    text-decoration: none;
    display: block;
    word-break: break-all;
}

.reference-link:hover {
    text-decoration: underline;
}

/* 思考过程动画 */
.thinking-pulse {
    animation: thinkingPulse 2s infinite;
}

@keyframes thinkingPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* 复制成功提示 */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 9999;
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

/* 防止内容闪烁 */
.answer-content {
    transition: opacity 0.2s ease;
}

.answer-content.loading {
    opacity: 0.7;
}

.answer-content.loaded {
    opacity: 1;
}

/* 代码高亮样式优化 */
.hljs {
    background: var(--gray-900) !important;
    color: var(--gray-100) !important;
    border-radius: 8px;
    padding: 1.5em !important;
    margin: 1em 0 !important;
    overflow: auto !important;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
    color: #ff6b6b !important;
}

.hljs-function .hljs-keyword {
    color: #4ecdc4 !important;
}

.hljs-string,
.hljs-title,
.hljs-name,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
    color: #f9ca24 !important;
}

.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
    color: #a0aec0 !important;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-title,
.hljs-section,
.hljs-doctag,
.hljs-type,
.hljs-name,
.hljs-strong {
    font-weight: bold !important;
}

.hljs-emphasis {
    font-style: italic !important;
}

/* 导出功能优化 */
.export-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.export-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: var(--gray-100);
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dark-mode .export-btn {
    background: var(--gray-800);
    color: var(--gray-300);
}

.export-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.export-btn i {
    font-size: 0.9rem;
}