* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #343541;
    color: #ececf1;
    height: 100vh;
    overflow: hidden;
}

.screen {
    display: none;
    height: 100vh;
}

.screen.active {
    display: flex;
}

/* 登录界面 - 已禁用 */
#login-screen {
    display: none !important;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    text-align: center;
    min-width: 350px;
}

.login-container h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-form button:hover {
    background: #5568d3;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
}

/* 主界面 */
#main-screen {
    flex-direction: row;
    overflow: hidden;
    position: relative;
}

.sidebar {
    width: 280px;
    background: #171717;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #2f2f2f;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #2f2f2f;
    flex-shrink: 0;
}

.toggle-sidebar-btn {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #ececf1;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 36px;
    height: 36px;
}

.toggle-sidebar-btn:hover {
    background: #2a2a2a;
}

.open-sidebar-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 101;
    padding: 10px;
    background: rgba(32, 33, 35, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid #4d4d4f;
    border-radius: 8px;
    color: #ececf1;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.open-sidebar-btn:hover {
    background: rgba(42, 43, 50, 0.95);
    transform: scale(1.05);
}

.new-chat-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid #3f3f3f;
    border-radius: 8px;
    color: #ececf1;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    flex: 1;
}

.new-chat-btn:hover {
    background: #2a2a2a;
    border-color: #565656;
}

.new-chat-btn svg {
    flex-shrink: 0;
}

.new-chat-btn span {
    flex: 1;
    text-align: left;
}

/* 历史记录容器 */
.history-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
}

.history-container::-webkit-scrollbar {
    width: 6px;
}

.history-container::-webkit-scrollbar-track {
    background: transparent;
}

.history-container::-webkit-scrollbar-thumb {
    background: #3f3f3f;
    border-radius: 3px;
}

.history-container::-webkit-scrollbar-thumb:hover {
    background: #565656;
}

/* 历史记录分组 */
.history-section {
    margin-bottom: 16px;
}

.history-section:last-child {
    margin-bottom: 0;
}

.history-section-title {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #8e8ea0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
}

.history-list {
    padding: 0 8px;
}

.history-item {
    position: relative;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #ececf1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    background: transparent;
}

.history-item:hover {
    background: #2a2a2a;
}

.history-item.active {
    background: #2a2a2a;
}

.history-item-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8ea0;
}

.history-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-item-title {
    font-size: 14px;
    color: #ececf1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.history-item-subtitle {
    font-size: 12px;
    color: #8e8ea0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-actions {
    display: none;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.history-item:hover .history-item-actions {
    display: flex;
}

.history-item-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    color: #8e8ea0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-item-btn:hover {
    background: #3f3f3f;
    color: #ececf1;
}

.history-item-btn svg {
    width: 16px;
    height: 16px;
}

.delete-btn:hover {
    color: #ef4444;
}

.sidebar-footer {
    border-top: 1px solid #2f2f2f;
    padding: 12px;
    flex-shrink: 0;
    background: #171717;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-profile:hover {
    background: #2a2a2a;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.user-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #ececf1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* API 状态指示器 */
.api-status-container {
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid #4d4d4f;
}

.api-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.api-label {
    color: #8e8ea0;
}

.api-value {
    color: #ececf1;
    font-weight: 500;
    flex: 1;
}

.api-indicator {
    font-size: 12px;
    animation: pulse 2s ease-in-out infinite;
}

.api-indicator.primary {
    color: #10a37f;
}

.api-indicator.backup {
    color: #f5c842;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.toggle-api-btn {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid #4d4d4f;
    border-radius: 6px;
    color: #ececf1;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.toggle-api-btn:hover {
    background: #2a2b32;
    border-color: #10a37f;
}

.toggle-api-btn.checking svg {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.toggle-api-btn:hover svg {
    animation: rotate 0.5s linear infinite;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid #4d4d4f;
    border-radius: 6px;
    color: #ececf1;
    cursor: pointer;
    font-size: 14px;
}

.logout-btn:hover {
    background: #2a2b32;
}

/* API 状态通知 */
.api-status-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: #2d2e38;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid #10a37f;
}

.api-status-notification.warning {
    border-left-color: #f5c842;
}

.api-status-notification.error {
    border-left-color: #ef4444;
}

.api-status-notification.info {
    border-left-color: #5fb3f6;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-content svg {
    flex-shrink: 0;
    color: #10a37f;
}

.api-status-notification.warning .notification-content svg {
    color: #f5c842;
}

.api-status-notification.error .notification-content svg {
    color: #ef4444;
}

.api-status-notification.info .notification-content svg {
    color: #5fb3f6;
}

.notification-content span {
    color: #ececf1;
    font-size: 14px;
    line-height: 1.5;
}

.notification-close {
    background: none;
    border: none;
    color: #8e8ea0;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ececf1;
}

.api-status-notification.fade-out {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .api-status-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    @keyframes slideIn {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes slideOut {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    margin-left: 280px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #343541;
    display: flex;
    flex-direction: column;
}

/* 自定义滚动条 */
.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    opacity: 0.6;
    overflow: hidden;
}

.welcome-screen h1 {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #ececf1;
}

.welcome-screen p {
    color: #8e8ea0;
    font-size: 15px;
}

.messages {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0 100px 0;
    pointer-events: none;
    min-height: min-content;
}

.messages .message {
    pointer-events: auto;
}

.message {
    margin-bottom: 28px;
    padding: 28px 32px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.message.user {
    background: transparent;
    border-left: 3px solid rgba(95, 179, 246, 0.4);
    border-top: 1px solid rgba(95, 179, 246, 0.1);
    border-right: 1px solid rgba(95, 179, 246, 0.1);
    border-bottom: 1px solid rgba(95, 179, 246, 0.1);
}

.message.user:hover {
    background: rgba(95, 179, 246, 0.03);
    border-left-color: rgba(95, 179, 246, 0.6);
    box-shadow: 0 4px 20px rgba(95, 179, 246, 0.1);
}

.message.assistant {
    background: transparent;
    border-left: 3px solid rgba(16, 163, 127, 0.4);
    border-top: 1px solid rgba(16, 163, 127, 0.1);
    border-right: 1px solid rgba(16, 163, 127, 0.1);
    border-bottom: 1px solid rgba(16, 163, 127, 0.1);
}

.message.assistant:hover {
    background: rgba(16, 163, 127, 0.03);
    border-left-color: rgba(16, 163, 127, 0.6);
    box-shadow: 0 4px 20px rgba(16, 163, 127, 0.1);
}

.message-header {
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #8e8ea0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.message.user .message-header {
    color: rgba(95, 179, 246, 0.85);
    border-bottom-color: rgba(95, 179, 246, 0.15);
}

.message.assistant .message-header {
    color: rgba(16, 163, 127, 0.85);
    border-bottom-color: rgba(16, 163, 127, 0.15);
}

/* 消息操作按钮 */
.message-actions {
    display: flex;
    gap: 8px;
    opacity: 1;
    transition: all 0.2s;
}

.message-action-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #8e8ea0;
    cursor: pointer;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.message-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ececf1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.message-action-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.message-action-btn.success {
    color: #10a37f;
    border-color: rgba(16, 163, 127, 0.4);
    background: rgba(16, 163, 127, 0.12);
}

.copy-btn:hover {
    color: #10a37f;
    border-color: rgba(16, 163, 127, 0.4);
    background: rgba(16, 163, 127, 0.08);
}

.print-btn:hover {
    color: #5fb3f6;
    border-color: rgba(95, 179, 246, 0.4);
    background: rgba(95, 179, 246, 0.08);
}

.message-content {
    line-height: 1.8;
    white-space: pre-wrap;
    color: #d1d1d6;
    font-size: 15px;
}

.message.user .message-content {
    color: #ececf1;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.8;
    letter-spacing: 0.3px;
}

/* 用户消息的紧凑布局 */
.message.user {
    padding: 20px 28px;
}

/* 用户消息中的表情符号 */
.message.user .message-content {
    font-variant-emoji: emoji;
}

/* 本地上下文提示 */
.context-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-top: 12px;
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.15) 0%, rgba(16, 163, 127, 0.08) 100%);
    border: 1px solid rgba(16, 163, 127, 0.3);
    border-radius: 8px;
    font-size: 12px;
    color: rgba(16, 163, 127, 0.95);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(16, 163, 127, 0.1);
}

.context-indicator.local-context {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
    border-color: rgba(52, 211, 153, 0.4);
    color: rgba(16, 185, 129, 1);
}

.context-indicator svg {
    width: 14px;
    height: 14px;
    opacity: 0.9;
    flex-shrink: 0;
}

.view-history-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    margin-left: 4px;
}

.view-history-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.view-history-btn svg {
    width: 14px;
    height: 14px;
}

/* 历史对话面板 */
.history-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.history-panel.show {
    opacity: 1;
}

.history-panel.closing {
    opacity: 0;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-panel-header h3 {
    margin: 0;
    font-size: 18px;
    color: #ececf1;
}

.close-panel-btn {
    background: transparent;
    border: none;
    color: #8e8ea0;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-panel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ececf1;
}

.history-panel > div:first-child {
    background: #2a2b32;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.history-panel.show > div:first-child {
    transform: scale(1);
}

.history-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.history-item-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.history-item-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(16, 163, 127, 0.3);
    transform: translateX(4px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-item-number {
    background: rgba(16, 163, 127, 0.2);
    color: rgba(16, 163, 127, 1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.copy-history-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    color: #8e8ea0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-history-btn:hover {
    background: rgba(16, 163, 127, 0.2);
    border-color: rgba(16, 163, 127, 0.4);
    color: rgba(16, 163, 127, 1);
}

.history-item-question {
    color: #5fb3f6;
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.history-item-answer {
    color: #a0a0a8;
    font-size: 12px;
    line-height: 1.6;
}

.history-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 12px 12px;
}

.history-panel-footer p {
    margin: 0;
    font-size: 12px;
    color: #8e8ea0;
    text-align: center;
}

/* 推理过程样式 */
.reasoning-content {
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.reasoning-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    user-select: none;
}

.reasoning-header svg {
    flex-shrink: 0;
    color: #f5c842;
}

.reasoning-header span {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #f5c842;
}

.reasoning-header .toggle-reasoning {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8ea0;
    transition: all 0.2s;
}

.reasoning-header .toggle-reasoning:hover {
    color: #ececf1;
}

.reasoning-content.collapsed .toggle-reasoning svg {
    transform: rotate(-90deg);
}

.reasoning-body {
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #b4b4b9;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    transition: all 0.3s;
}

.reasoning-content.collapsed .reasoning-body {
    max-height: 0;
    padding: 0 12px;
    overflow: hidden;
}

/* 推理过程滚动条 */
.reasoning-body::-webkit-scrollbar {
    width: 6px;
}

.reasoning-body::-webkit-scrollbar-track {
    background: transparent;
}

.reasoning-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.reasoning-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   分析报告渲染样式 - 专业优雅风格
   ============================================ */

.markdown-body {
    font-size: 15.5px;
    line-height: 1.85;
    color: #ececf1;
    white-space: normal;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    letter-spacing: 0.2px;
}

/* 报告标题样式 - 层次分明，优雅大气 */
.markdown-body h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 40px 0 24px 0;
    padding: 20px 0 16px 0;
    color: #ececf1;
    text-align: center;
    position: relative;
    letter-spacing: 1px;
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.08) 0%, rgba(16, 163, 127, 0.03) 100%);
    border-radius: 12px;
    border: 1px solid rgba(16, 163, 127, 0.2);
    box-shadow: 0 4px 16px rgba(16, 163, 127, 0.1);
}

.markdown-body h1::before {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 28px;
    opacity: 0.7;
}

.markdown-body h1::after {
    content: '✨';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 28px;
    opacity: 0.7;
}

/* 主要章节标题 */
.markdown-body h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 36px 0 18px 0;
    padding: 16px 20px;
    color: #ececf1;
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.15) 0%, rgba(16, 163, 127, 0.08) 100%);
    border-left: 5px solid #10a37f;
    border-radius: 0 10px 10px 0;
    letter-spacing: 0.5px;
    position: relative;
    box-shadow: 0 2px 8px rgba(16, 163, 127, 0.1);
}

.markdown-body h2::before {
    content: '📊';
    margin-right: 12px;
    font-size: 22px;
}

/* 次级章节标题 */
.markdown-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 16px 0;
    padding: 12px 0 12px 28px;
    color: #ececf1;
    position: relative;
    border-bottom: 2px solid rgba(16, 163, 127, 0.2);
    letter-spacing: 0.3px;
}

.markdown-body h3::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #10a37f;
    font-weight: 700;
    font-size: 18px;
}

/* 小节标题 */
.markdown-body h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px 0;
    padding: 8px 0 8px 20px;
    color: #d1d1d6;
    position: relative;
    border-left: 3px solid rgba(16, 163, 127, 0.4);
}

.markdown-body h4::before {
    content: '•';
    position: absolute;
    left: -8px;
    color: #10a37f;
    font-weight: 700;
    font-size: 20px;
}

.markdown-body h5 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: #d1d1d6;
    padding-left: 16px;
    position: relative;
}

.markdown-body h5::before {
    content: '◦';
    position: absolute;
    left: 0;
    color: #10a37f;
    font-size: 16px;
}

.markdown-body h6 {
    font-size: 15px;
    font-weight: 600;
    margin: 16px 0 8px 0;
    color: #b4b4b9;
    font-style: italic;
}

/* 段落样式 - 优雅易读 */
.markdown-body p {
    margin: 16px 0;
    color: #d1d1d6;
    text-align: justify;
    line-height: 1.9;
    text-indent: 0;
}

/* 首段特殊样式 */
.markdown-body h2 + p,
.markdown-body h3 + p {
    margin-top: 20px;
    font-weight: 500;
    color: #ececf1;
}

/* 列表样式 - 清晰美观，层次分明 */
.markdown-body ul,
.markdown-body ol {
    margin: 20px 0;
    padding-left: 36px;
    color: #d1d1d6;
}

.markdown-body li {
    margin: 12px 0;
    line-height: 1.9;
    position: relative;
}

/* 无序列表样式 */
.markdown-body ul li {
    list-style-type: none;
    padding-left: 12px;
    position: relative;
}

.markdown-body ul li::before {
    content: '◆';
    position: absolute;
    left: -20px;
    color: #10a37f;
    font-weight: 700;
    font-size: 14px;
    top: 2px;
}

/* 嵌套列表样式 */
.markdown-body ul ul li::before {
    content: '▸';
    color: rgba(16, 163, 127, 0.8);
    font-size: 12px;
}

.markdown-body ul ul ul li::before {
    content: '•';
    color: rgba(16, 163, 127, 0.6);
    font-size: 16px;
}

/* 有序列表样式 */
.markdown-body ol {
    counter-reset: item;
}

.markdown-body ol li {
    list-style-type: none;
    counter-increment: item;
    padding-left: 12px;
}

.markdown-body ol li::before {
    content: counter(item) '.';
    position: absolute;
    left: -24px;
    color: #10a37f;
    font-weight: 700;
    font-size: 14px;
    min-width: 20px;
    text-align: right;
}

/* 引用块样式 - 重要提示和总结 */
.markdown-body blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    border-left: 5px solid #10a37f;
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.12) 0%, rgba(16, 163, 127, 0.06) 100%);
    border-radius: 0 12px 12px 0;
    color: #ececf1;
    font-style: normal;
    position: relative;
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.15);
    border-top: 1px solid rgba(16, 163, 127, 0.2);
    border-right: 1px solid rgba(16, 163, 127, 0.2);
    border-bottom: 1px solid rgba(16, 163, 127, 0.2);
}

.markdown-body blockquote::before {
    content: '💡';
    position: absolute;
    top: 16px;
    left: -12px;
    font-size: 24px;
    background: #343541;
    padding: 4px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.markdown-body blockquote p {
    margin: 10px 0;
    padding-left: 0;
    font-weight: 500;
    line-height: 1.8;
}

.markdown-body blockquote p:first-child {
    margin-top: 0;
}

.markdown-body blockquote p:last-child {
    margin-bottom: 0;
}

/* 代码样式 - 专业清晰 */
.markdown-body code {
    padding: 3px 6px;
    background: rgba(16, 163, 127, 0.12);
    border: 1px solid rgba(16, 163, 127, 0.2);
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #10a37f;
    font-weight: 500;
}

.markdown-body pre {
    margin: 16px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.markdown-body pre code {
    padding: 0;
    background: transparent;
    border: none;
    color: #d1d1d6;
    font-weight: 400;
}

/* 表格样式 - 专业数据展示 */
.markdown-body table {
    margin: 28px 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(16, 163, 127, 0.2);
    box-shadow: 0 4px 16px rgba(16, 163, 127, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.markdown-body table th {
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.25) 0%, rgba(16, 163, 127, 0.15) 100%);
    color: #ececf1;
    padding: 16px 20px;
    text-align: center;
    font-weight: 700;
    border-bottom: 3px solid rgba(16, 163, 127, 0.4);
    font-size: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
}

.markdown-body table th::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #10a37f, transparent);
}

.markdown-body table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #d1d1d6;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s;
}

.markdown-body table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

.markdown-body table tr:last-child td {
    border-bottom: none;
}

.markdown-body table tr:hover td {
    background: rgba(16, 163, 127, 0.08);
    color: #ececf1;
}

/* 表格标题行特殊样式 */
.markdown-body table tbody tr:first-child td {
    font-weight: 600;
    color: #ececf1;
    background: rgba(16, 163, 127, 0.1);
}

/* 分隔线样式 - 优雅简洁 */
.markdown-body hr {
    margin: 32px 0;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    position: relative;
}

.markdown-body hr::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #343541;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.2);
    font-size: 12px;
}

/* 强调和重点样式 */
.markdown-body strong {
    font-weight: 700;
    color: #ececf1;
    background: linear-gradient(180deg, transparent 65%, rgba(16, 163, 127, 0.2) 65%);
    padding: 2px 4px;
    border-radius: 3px;
    letter-spacing: 0.2px;
}

.markdown-body em {
    font-style: italic;
    color: #10a37f;
    font-weight: 500;
}

/* 特殊标记样式 */
.markdown-body mark {
    background: linear-gradient(135deg, rgba(245, 200, 66, 0.3) 0%, rgba(245, 200, 66, 0.1) 100%);
    color: #f5c842;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* 删除线样式 */
.markdown-body del {
    text-decoration: line-through;
    color: #8e8ea0;
    opacity: 0.7;
}

/* 链接样式 */
.markdown-body a {
    color: #10a37f;
    text-decoration: none;
    border-bottom: 1px solid rgba(16, 163, 127, 0.3);
    transition: all 0.2s;
    font-weight: 500;
}

.markdown-body a:hover {
    color: #0d8c6d;
    border-bottom-color: #0d8c6d;
    background: rgba(16, 163, 127, 0.08);
}

/* ============================================
   免责声明样式 - 专业法律条款展示
   ============================================ */

/* 免责声明卡片样式 - 与分析报告浑然一体，采用绿色主题 */
.disclaimer-card {
    margin: 32px 0;
    padding: 20px 24px;
    border-left: 5px solid #10a37f;
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.12) 0%, rgba(16, 163, 127, 0.06) 100%);
    border-radius: 0 12px 12px 0;
    color: #ececf1;
    font-style: normal;
    position: relative;
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.15);
    border-top: 1px solid rgba(16, 163, 127, 0.2);
    border-right: 1px solid rgba(16, 163, 127, 0.2);
    border-bottom: 1px solid rgba(16, 163, 127, 0.2);
    font-size: 15.5px;
    line-height: 1.85;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    letter-spacing: 0.2px;
}

.disclaimer-card h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
    color: #ececf1 !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    background: none !important;
    text-align: left !important;
    position: relative !important;
}

.disclaimer-card h2::after {
    display: none !important;
}

.disclaimer-card p {
    margin: 16px 0 !important;
    color: #d1d1d6 !important;
    text-align: justify !important;
    line-height: 1.9 !important;
    text-indent: 0 !important;
    padding-left: 0 !important;
    font-weight: 500 !important;
}

.disclaimer-card p:first-of-type {
    margin-top: 20px !important;
    font-weight: 600 !important;
    color: #ececf1 !important;
}

.disclaimer-card p:last-of-type {
    margin-top: 24px !important;
    padding: 16px 20px !important;
    background: rgba(16, 163, 127, 0.08) !important;
    border-left: 3px solid #10a37f !important;
    border-radius: 0 8px 8px 0 !important;
    font-weight: 600 !important;
    color: #ececf1 !important;
    text-align: center !important;
    border-top: 1px solid rgba(16, 163, 127, 0.2) !important;
    border-right: 1px solid rgba(16, 163, 127, 0.2) !important;
    border-bottom: 1px solid rgba(16, 163, 127, 0.2) !important;
    box-shadow: 0 2px 8px rgba(16, 163, 127, 0.1) !important;
}

.disclaimer-card ul {
    margin: 20px 0 !important;
    padding-left: 36px !important;
    color: #d1d1d6 !important;
    list-style: none !important;
}

.disclaimer-card li {
    margin: 12px 0 !important;
    line-height: 1.9 !important;
    position: relative !important;
    list-style-type: none !important;
    padding-left: 12px !important;
    color: #d1d1d6 !important;
    font-size: 15.5px !important;
}

.disclaimer-card li::before {
    content: '◆' !important;
    position: absolute !important;
    left: -20px !important;
    color: #10a37f !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    top: 2px !important;
}

.disclaimer-card li strong {
    font-weight: 700 !important;
    color: #ececf1 !important;
    background: linear-gradient(180deg, transparent 65%, rgba(16, 163, 127, 0.2) 65%) !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    letter-spacing: 0.2px !important;
}

/* 免责声明容器 - 专业法律文档风格 */
.report-disclaimer {
    margin-top: 48px;
    padding: 32px 36px;
    background: linear-gradient(135deg, 
        rgba(245, 200, 66, 0.12) 0%, 
        rgba(245, 200, 66, 0.06) 50%, 
        rgba(239, 68, 68, 0.08) 100%);
    border: 2px solid rgba(245, 200, 66, 0.4);
    border-radius: 16px;
    position: relative;
    box-shadow: 
        0 8px 24px rgba(245, 200, 66, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.report-disclaimer::before {
    content: '⚠️';
    position: absolute;
    top: -16px;
    left: 32px;
    background: linear-gradient(135deg, #f5c842, #f39c12);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 24px;
    box-shadow: 
        0 4px 12px rgba(245, 200, 66, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.report-disclaimer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #f5c842 0%, 
        #f39c12 25%, 
        #e67e22 50%, 
        #d35400 75%, 
        #c0392b 100%);
    border-radius: 16px 16px 0 0;
}

/* 免责声明标题样式 */
.report-disclaimer h2 {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #f5c842 !important;
    margin: 0 0 24px 0 !important;
    text-align: center !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.report-disclaimer h2::before {
    display: none !important;
}

.report-disclaimer h2::after {
    display: none !important;
}

/* 免责声明子标题 */
.report-disclaimer h3 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #ececf1 !important;
    margin: 24px 0 12px 0 !important;
    padding: 8px 12px !important;
    background: rgba(16, 163, 127, 0.15) !important;
    border-left: 4px solid #10a37f !important;
    border-radius: 0 8px 8px 0 !important;
    letter-spacing: 0.3px !important;
}

.report-disclaimer h3::before {
    display: none !important;
}

/* 免责声明内容样式 */
.report-disclaimer p {
    font-size: 14px !important;
    line-height: 1.8 !important;
    color: #d1d1d6 !important;
    margin: 16px 0 !important;
    text-align: justify !important;
}

.report-disclaimer blockquote {
    background: rgba(16, 163, 127, 0.1) !important;
    border-left: 4px solid #10a37f !important;
    margin: 20px 0 !important;
    padding: 16px 20px !important;
    border-radius: 0 8px 8px 0 !important;
    font-weight: 600 !important;
    color: #ececf1 !important;
}

.report-disclaimer blockquote::before {
    content: '📋' !important;
    font-size: 20px !important;
    margin-right: 8px !important;
}

/* 免责声明列表样式 */
.report-disclaimer ul {
    margin: 20px 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
}

.report-disclaimer li {
    margin: 12px 0 !important;
    padding: 12px 16px 12px 48px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 8px !important;
    border-left: 3px solid rgba(16, 163, 127, 0.4) !important;
    position: relative !important;
    transition: all 0.2s ease !important;
    line-height: 1.7 !important;
    color: #d1d1d6 !important;
}

.report-disclaimer li:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-left-color: #10a37f !important;
    transform: translateX(4px) !important;
}

.report-disclaimer li::before {
    content: none !important;
}

/* 提取emoji图标并放在左侧 */
.report-disclaimer li strong::before {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 18px !important;
    font-weight: normal !important;
}

/* 强调文本样式 */
.report-disclaimer strong {
    color: #ececf1 !important;
    font-weight: 700 !important;
}

/* 底部提示样式 */
.report-disclaimer > p:last-of-type {
    margin-top: 28px !important;
    padding: 16px 20px !important;
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.15), rgba(16, 163, 127, 0.08)) !important;
    border: 1px solid rgba(16, 163, 127, 0.3) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    color: #10a37f !important;
    text-align: center !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}

/* 生成信息样式 */
.report-disclaimer em {
    display: block !important;
    text-align: center !important;
    margin-top: 24px !important;
    padding-top: 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-size: 12px !important;
    color: #8e8ea0 !important;
    font-style: normal !important;
}

/* 特殊标记 - 温馨提示框 */
.markdown-body blockquote p:first-child:has(strong:first-child) {
    display: flex;
    align-items: center;
    gap: 8px;
}

.markdown-body blockquote p:first-child strong:first-child::before {
    content: '💡';
    margin-right: 4px;
}



.input-container {
    position: fixed;
    bottom: 0;
    left: 280px;
    right: 0;
    border-top: 1px solid #4d4d4f;
    padding: 20px;
    background: #343541;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-form {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.input-form input,
.input-form select {
    flex: 1;
    min-width: 150px;
    padding: 12px;
    background: #40414f;
    border: 1px solid #4d4d4f;
    border-radius: 6px;
    color: #ececf1;
    font-size: 14px;
}

.place-input-wrapper {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.region-select {
    width: 100%;
    padding: 12px;
    background: #40414f;
    border: 1px solid #4d4d4f;
    border-radius: 6px;
    color: #ececf1;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.region-select:hover:not(:disabled) {
    border-color: #10a37f;
}

.region-select:focus {
    outline: none;
    border-color: #10a37f;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2);
}

.region-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.region-select option {
    background: #343541;
    color: #ececf1;
    padding: 8px;
}

/* 侧边栏隐藏状态 */
.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* 桌面端 - 显示收起按钮 */
@media (min-width: 769px) {
    .toggle-sidebar-btn {
        display: flex;
    }
    
    .sidebar.hidden {
        transform: translateX(-100%);
    }
    
    #main-screen.sidebar-hidden .sidebar {
        transform: translateX(-100%);
    }
    
    #main-screen.sidebar-hidden .main-content {
        margin-left: 0;
    }
    
    #main-screen.sidebar-hidden .input-container {
        left: 0;
    }
    
    #main-screen.sidebar-hidden .open-sidebar-btn {
        display: flex;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .open-sidebar-btn {
        display: flex;
        position: fixed;
        top: 10px;
        left: 10px;
        padding: 8px;
        z-index: 101;
    }
    
    .sidebar.active ~ .sidebar-overlay {
        display: block;
        opacity: 1;
    }
    
    .main-content {
        width: 100%;
        margin-left: 0;
    }
    
    .input-container {
        left: 0;
        right: 0;
        padding: 12px 10px;
    }
    
    .place-input-wrapper {
        grid-template-columns: 1fr;
    }
    
    .toggle-sidebar-btn {
        display: flex;
    }
    
    .sidebar {
        width: 100%;
        max-width: 320px;
    }
    
    /* 隐藏打印PDF按钮 */
    .print-btn {
        display: none !important;
    }
    
    /* 优化聊天容器显示区域 */
    .chat-container {
        padding: 10px 12px;
        padding-bottom: 80px;
    }
    
    /* 优化消息显示 */
    .messages {
        padding: 10px 0;
    }
    
    .message {
        margin-bottom: 16px;
        padding: 16px 14px;
        border-radius: 10px;
    }
    
    .message-header {
        font-size: 11px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .message-content {
        font-size: 14px;
        line-height: 1.7;
    }
    
    /* 优化消息操作按钮 */
    .message-actions {
        gap: 6px;
    }
    
    .message-action-btn {
        padding: 3px 10px;
        font-size: 11px;
    }
    
    /* 优化Markdown内容显示 */
    .markdown-body {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .markdown-body h1 {
        font-size: 22px;
        margin: 24px 0 14px 0;
        padding-bottom: 10px;
    }
    
    .markdown-body h2 {
        font-size: 19px;
        margin: 20px 0 12px 0;
        padding-left: 12px;
    }
    
    .markdown-body h3 {
        font-size: 17px;
        margin: 18px 0 10px 0;
        padding-left: 18px;
    }
    
    .markdown-body h4 {
        font-size: 15px;
        margin: 14px 0 8px 0;
    }
    
    .markdown-body h5,
    .markdown-body h6 {
        font-size: 14px;
        margin: 12px 0 6px 0;
    }
    
    .markdown-body p {
        margin: 10px 0;
    }
    
    .markdown-body ul,
    .markdown-body ol {
        margin: 12px 0;
        padding-left: 24px;
    }
    
    .markdown-body li {
        margin: 6px 0;
    }
    
    .markdown-body blockquote {
        margin: 14px 0;
        padding: 12px 14px;
    }
    
    .markdown-body table {
        margin: 16px 0;
        font-size: 13px;
    }
    
    .markdown-body table th,
    .markdown-body table td {
        padding: 10px 12px;
    }
    
    .markdown-body code {
        font-size: 13px;
        padding: 2px 5px;
    }
    
    .markdown-body pre {
        margin: 12px 0;
        padding: 12px;
        font-size: 12px;
    }
    
    /* 移动端免责声明卡片优化 - 绿色主题 */
    .disclaimer-card {
        margin: 24px 0;
        padding: 16px 20px;
        border-radius: 0 10px 10px 0;
        font-size: 14px;
    }
    
    .disclaimer-card::before {
        top: 12px;
        left: -10px;
        font-size: 20px;
        padding: 3px;
    }
    
    .disclaimer-card h2 {
        font-size: 20px !important;
        margin-bottom: 14px !important;
    }
    
    .disclaimer-card h2::before {
        font-size: 18px;
        margin-right: 8px;
    }
    
    .disclaimer-card p {
        font-size: 14px !important;
        margin: 12px 0 !important;
        line-height: 1.8 !important;
    }
    
    .disclaimer-card p:first-of-type {
        margin-top: 16px !important;
        font-size: 14px !important;
    }
    
    .disclaimer-card ul {
        padding-left: 28px !important;
    }
    
    .disclaimer-card li {
        font-size: 14px !important;
        margin: 10px 0 !important;
        line-height: 1.8 !important;
        padding-left: 10px !important;
    }
    
    .disclaimer-card li::before {
        left: -18px !important;
        font-size: 12px !important;
        color: #10a37f !important;
    }
    
    .disclaimer-card p:last-of-type {
        margin-top: 20px !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
    
    /* 移动端旧版免责声明优化 */
    .report-disclaimer {
        margin-top: 32px;
        padding: 20px 16px;
        border-radius: 12px;
    }
    
    .report-disclaimer::before {
        top: -12px;
        left: 16px;
        padding: 6px 12px;
        font-size: 20px;
    }
    
    .report-disclaimer h2 {
        font-size: 18px !important;
        margin-bottom: 16px !important;
    }
    
    .report-disclaimer h3 {
        font-size: 14px !important;
        margin: 16px 0 8px 0 !important;
        padding: 6px 10px !important;
    }
    
    .report-disclaimer p {
        font-size: 13px !important;
        margin: 12px 0 !important;
    }
    
    .report-disclaimer li {
        margin: 8px 0 !important;
        padding: 10px 12px 10px 36px !important;
        font-size: 13px !important;
    }
    
    .report-disclaimer li strong::before {
        left: 12px !important;
        font-size: 16px !important;
    }
    
    .report-disclaimer > p:last-of-type {
        margin-top: 20px !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
    
    /* 优化上下文指示器 */
    .context-indicator {
        padding: 6px 10px;
        margin-top: 8px;
        font-size: 11px;
    }
    
    .context-indicator svg {
        width: 12px;
        height: 12px;
    }
    
    /* 优化推理内容 */
    .reasoning-content {
        margin-bottom: 12px;
    }
    
    .reasoning-header {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .reasoning-body {
        padding: 10px;
        font-size: 12px;
        max-height: 200px;
    }
    
    /* 优化欢迎屏幕 */
    .welcome-screen h1 {
        font-size: 22px;
    }
    
    .welcome-screen p {
        font-size: 14px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

.input-form button {
    padding: 12px 24px;
    background: #10a37f;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.input-form button:hover {
    background: #0d8c6d;
}

.input-form button:disabled {
    background: #4d4d4f;
    cursor: not-allowed;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #4d4d4f;
    border-top-color: #ececf1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 聊天输入框 */
.chat-input-form {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.user-info-btn {
    padding: 12px;
    background: #40414f;
    border: 1px solid #4d4d4f;
    border-radius: 6px;
    color: #ececf1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    transition: all 0.3s;
}

.user-info-btn:hover {
    background: #10a37f;
    border-color: #10a37f;
}

.user-info-btn.has-info {
    background: #10a37f;
    border-color: #10a37f;
}

.chat-input-form textarea {
    flex: 1;
    padding: 12px;
    background: #40414f;
    border: 1px solid #4d4d4f;
    border-radius: 6px;
    color: #ececf1;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 200px;
    overflow-y: auto;
    /* 隐藏滚动条但保留滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE和Edge */
}

/* 隐藏Chrome、Safari的滚动条 */
#chat-input::-webkit-scrollbar {
    display: none;
}

.chat-input-form textarea::placeholder {
    color: #8e8ea0;
    opacity: 0.8;
    font-style: italic;
}

.chat-input-form textarea:focus {
    outline: none;
    border-color: #10a37f;
}

.chat-input-form textarea:focus::placeholder {
    opacity: 0.5;
}

.chat-input-form button {
    padding: 12px;
    background: #10a37f;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.chat-input-form button:hover {
    background: #0d8c6d;
}

.chat-input-form button:disabled {
    background: #4d4d4f;
    cursor: not-allowed;
}

/* 调整初始表单为网格布局 */
.input-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.input-form .place-input-wrapper {
    grid-column: 1 / -1;
}

.input-form button {
    grid-column: 1 / -1;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #2d2e38;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #4d4d4f;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #ececf1;
}

.modal-close {
    background: none;
    border: none;
    color: #8e8ea0;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #40414f;
    color: #ececf1;
}

.modal-body {
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #4d4d4f;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #565656;
}

/* 人员标签页样式 */
.person-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4d4d4f;
    overflow-x: auto;
    flex-wrap: wrap;
}

.person-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #4d4d4f;
    border-radius: 8px 8px 0 0;
    color: #8e8ea0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
    position: relative;
}

.person-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #10a37f;
    color: #ececf1;
}

.person-tab.active {
    background: rgba(16, 163, 127, 0.15);
    border-color: #10a37f;
    color: #10a37f;
    border-bottom-color: transparent;
}

.person-tab-close {
    background: transparent;
    border: none;
    color: #8e8ea0;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: 4px;
}

.person-tab-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.person-tab-add {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: transparent;
    border: 2px dashed #4d4d4f;
    border-radius: 8px;
    color: #8e8ea0;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    min-width: 110px;
}

.person-tab-add:hover {
    border-color: #10a37f;
    color: #10a37f;
    background: rgba(16, 163, 127, 0.05);
}

.person-tab-add svg {
    flex-shrink: 0;
}

/* 人员表单容器 */
.person-form-container {
    min-height: 300px;
}

.person-form {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.person-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 保留旧样式以兼容 */
.people-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.person-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #4d4d4f;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s;
}

.person-card:hover {
    border-color: #10a37f;
    box-shadow: 0 2px 8px rgba(16, 163, 127, 0.1);
}

.person-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #4d4d4f;
}

.person-number {
    font-size: 14px;
    font-weight: 600;
    color: #10a37f;
}

.btn-remove-person {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #ef4444;
    border-radius: 4px;
    color: #ef4444;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.btn-remove-person:hover {
    background: rgba(239, 68, 68, 0.1);
}

.person-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-add-person {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px dashed #4d4d4f;
    border-radius: 8px;
    color: #8e8ea0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-add-person:hover {
    border-color: #10a37f;
    color: #10a37f;
    background: rgba(16, 163, 127, 0.05);
}

.btn-add-person svg {
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #ececf1;
    font-size: 13px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: #40414f;
    border: 1px solid #4d4d4f;
    border-radius: 6px;
    color: #ececf1;
    font-size: 13px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #10a37f;
    box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.place-input-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #4d4d4f;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.btn-primary {
    padding: 12px 24px;
    background: #10a37f;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #0d8c6d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #4d4d4f;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid #4d4d4f;
    border-radius: 6px;
    color: #ececf1;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #40414f;
    border-color: #8e8ea0;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .place-input-wrapper {
        grid-template-columns: 1fr;
    }
}

/* API 状态通知 */
.api-status-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 16px 20px;
    background: #2d2e38;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid #10a37f;
}

.api-status-notification.warning {
    border-left-color: #f39c12;
}

.api-status-notification.error {
    border-left-color: #e74c3c;
}

.api-status-notification .notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.api-status-notification svg {
    flex-shrink: 0;
    color: #10a37f;
}

.api-status-notification.warning svg {
    color: #f39c12;
}

.api-status-notification.error svg {
    color: #e74c3c;
}

.api-status-notification span {
    color: #ececf1;
    font-size: 14px;
    line-height: 1.5;
}

.api-status-notification .notification-close {
    background: none;
    border: none;
    color: #8e8ea0;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.api-status-notification .notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ececf1;
}

.api-status-notification.fade-out {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* API 切换按钮 */
.api-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 16px;
    background: rgba(32, 33, 35, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid #4d4d4f;
    border-radius: 8px;
    color: #ececf1;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.api-toggle-btn:hover {
    background: rgba(42, 43, 50, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.api-toggle-btn svg {
    flex-shrink: 0;
}

.api-toggle-btn .api-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.api-toggle-btn .api-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10a37f;
    animation: pulse 2s infinite;
}

.api-toggle-btn.using-backup .api-indicator {
    background: #f39c12;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .api-status-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .api-toggle-btn {
        bottom: 80px;
        right: 10px;
        font-size: 12px;
        padding: 10px 14px;
    }
}

/* 空状态提示 */
.history-empty {
    padding: 32px 16px;
    text-align: center;
    color: #8e8ea0;
}

.history-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.history-empty p {
    font-size: 14px;
    line-height: 1.6;
}

/* 历史记录项动画 */
.history-item {
    animation: fadeInSlide 0.2s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 预设问题下拉列表 */
.questions-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-width: 800px;
    width: 100%;
    margin: 0 auto 10px;
    background: #2d2e38;
    border: 1px solid #40414f;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

.questions-dropdown.active {
    display: block;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.questions-list {
    padding: 8px;
}

.question-item {
    padding: 12px 16px;
    margin: 4px 0;
    background: #40414f;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #ececf1;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    line-height: 1.5;
}

.question-item:hover {
    background: #4d4d4f;
    border-color: #10a37f;
    transform: translateX(4px);
}

.question-item:active {
    background: #565869;
}

/* 输入包装器 - 用于相对定位预设问题下拉列表 */
.input-wrapper {
    position: relative;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

/* 滚动条样式 */
.questions-dropdown::-webkit-scrollbar {
    width: 8px;
}

.questions-dropdown::-webkit-scrollbar-track {
    background: #2d2e38;
    border-radius: 12px;
}

.questions-dropdown::-webkit-scrollbar-thumb {
    background: #565869;
    border-radius: 4px;
}

.questions-dropdown::-webkit-scrollbar-thumb:hover {
    background: #6e6e80;
}

/* 关系定位区域样式 */
.relationship-section {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

.relationship-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.relationship-header svg {
    color: #667eea;
    flex-shrink: 0;
}

.relationship-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #ececf1;
}

.relationship-description {
    font-size: 12px;
    color: #b4b4b4;
    margin-bottom: 12px;
    line-height: 1.4;
}

.relationship-section .form-group {
    margin-bottom: 0;
}

.relationship-section .form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #ececf1;
    margin-bottom: 6px;
}

.relationship-section input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(64, 65, 79, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ececf1;
    font-size: 13px;
    transition: all 0.2s ease;
}

.relationship-section input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(64, 65, 79, 1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.relationship-section input::placeholder {
    color: #8e8ea0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   专业分析指令模板样式
   ============================================ */

/* 模板按钮 */
.templates-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: transparent;
    border: 1px solid #4d4d4f;
    border-radius: 8px;
    color: #ececf1;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.templates-btn:hover {
    background: rgba(16, 163, 127, 0.1);
    border-color: #10a37f;
    color: #10a37f;
}

.templates-btn svg {
    width: 20px;
    height: 20px;
}

/* 模板弹窗 */
.templates-modal-content {
    max-width: 750px;
    max-height: 85vh;
}

#templates-modal .modal-header {
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.1) 0%, rgba(16, 163, 127, 0.05) 100%);
    border-bottom: 2px solid rgba(16, 163, 127, 0.2);
}

#templates-modal .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

#templates-modal .modal-header h2::before {
    content: '📚';
    font-size: 24px;
}

/* 模板类型切换标签 */
.template-type-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.template-type-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #8e8ea0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.template-type-tab svg {
    width: 18px;
    height: 18px;
    transition: all 0.3s;
}

.template-type-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ececf1;
}

.template-type-tab.active {
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.2) 0%, rgba(16, 163, 127, 0.1) 100%);
    border-color: rgba(16, 163, 127, 0.4);
    color: #10a37f;
    box-shadow: 0 2px 8px rgba(16, 163, 127, 0.15);
}

.template-type-tab.active svg {
    color: #10a37f;
    transform: scale(1.1);
}

.templates-list {
    display: grid;
    gap: 12px;
    max-height: 520px;
    overflow-y: auto;
    padding: 4px;
}

.templates-list::-webkit-scrollbar {
    width: 8px;
}

.templates-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.templates-list::-webkit-scrollbar-thumb {
    background: rgba(16, 163, 127, 0.3);
    border-radius: 4px;
}

.templates-list::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 163, 127, 0.5);
}

.template-item {
    padding: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.template-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #10a37f, #0d8c6d);
    opacity: 0;
    transition: opacity 0.3s;
}

.template-item:hover {
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.12) 0%, rgba(16, 163, 127, 0.06) 100%);
    border-color: rgba(16, 163, 127, 0.4);
    transform: translateX(6px);
    box-shadow: 0 4px 16px rgba(16, 163, 127, 0.15);
}

.template-item:hover::before {
    opacity: 1;
}

.template-item:active {
    transform: translateX(4px);
}

.template-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.template-item-header svg {
    color: #10a37f;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.template-title {
    font-size: 15px;
    font-weight: 600;
    color: #ececf1;
    letter-spacing: 0.3px;
}

.template-preview {
    font-size: 13px;
    color: #b4b4b9;
    line-height: 1.7;
    white-space: pre-wrap;
    padding-left: 32px;
}

.no-templates {
    text-align: center;
    padding: 60px 20px;
    color: #8e8ea0;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.no-templates::before {
    content: '📭';
    font-size: 48px;
    opacity: 0.5;
}

/* 加载通知动画 */
@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
}

/* 加载通知样式 */
.loading-notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.loading-notification.info {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.loading-notification.success {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
}

.loading-notification.warning {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}