.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    background-color: white;
}

.app-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.app-header h1 {
    font-size: 18px;
    font-weight: 600;
}

.chat-window {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
}

.welcome-screen h2 {
    margin-bottom: 12px;
    color: #333;
}

/* 消息样式 */
.message {
    display: flex;
    max-width: 85%;
    gap: 12px;
    animation: fadeIn 0.3s ease-out;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.assistant {
    align-self: flex-start;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

.message.user .avatar {
    background-color: var(--primary-color);
    color: white;
}

.message-content {
    position: relative;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
    box-shadow: var(--shadow);
}

.message.user .message-content {
    background-color: var(--primary-color);
    color: white;
    border-top-right-radius: 2px;
}

.message.assistant .message-content {
    background-color: #f7f7f7;
    color: var(--text-color);
    border-top-left-radius: 2px;
}

/* 消息编辑按钮 */
.message-actions {
    position: absolute;
    bottom: -10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.message.user:hover .message-actions {
    opacity: 1;
    transform: translateY(-5px);
}

.action-btn {
    background: white;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.action-btn:hover {
    background: #f8f8f8;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.action-btn svg {
    width: 14px;
    height: 14px;
}

/* 消息中的图片容器 */
.message-images-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.message-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    cursor: zoom-in;
    transition: transform 0.2s, opacity 0.2s;
    border: 1px solid rgba(0,0,0,0.05);
}

.message.user .message-image {
    border-color: rgba(255,255,255,0.2);
}

.message-image:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Markdown 样式 */
.message.assistant .text {
    line-height: 1.6;
    word-break: break-word;
}

.message.assistant .text p {
    margin: 8px 0;
}

.message.assistant .text p:first-child {
    margin-top: 0;
}

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

.message.assistant .text code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

.message.assistant .text pre {
    background-color: #f6f8fa;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

.message.assistant .text pre code {
    background-color: transparent;
    padding: 0;
}

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

.message.assistant .text blockquote {
    border-left: 4px solid #dfe2e5;
    color: #6a737d;
    margin: 8px 0;
    padding-left: 16px;
}

.message.assistant .text h1, .message.assistant .text h2, .message.assistant .text h3 {
    margin: 16px 0 8px;
    line-height: 1.25;
}

/* 标题选择列表布局 */
.title-selection-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

/* Chrome 风格按钮样式 */
.chrome-style-btn {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background-color: #ffffff;
    border: 1px solid #dee1e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    width: 100%;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.chrome-style-btn:hover {
    background-color: #f8f9fa;
    border-color: #caced1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.chrome-style-btn:active {
    background-color: #f1f3f4;
    transform: translateY(0);
}

/* 按钮内部组件样式 */
.btn-type {
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
    background-color: #f1f3f4;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 12px;
    white-space: nowrap;
}

.btn-title {
    font-size: 14px;
    color: #202124;
    font-weight: 500;
    flex: 1;
    line-height: 1.4;
    word-break: break-word;
}

/* 标题备注 */
.title-remark {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

/* 正文内容卡片容器 */
.content-cards-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 4px;
    width: 100%;
    scrollbar-width: thin;
    scroll-snap-type: x mandatory;
}

.content-cards-container::-webkit-scrollbar {
    height: 6px;
}

.content-cards-container::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

/* 正文内容卡片 */
.content-card {
    flex: 0 0 280px;
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    scroll-snap-align: start;
    cursor: default;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.card-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(255, 36, 66, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    align-self: flex-start;
}

.card-direction {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.card-preview {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 78px;
}

.card-detail-btn {
    margin-top: auto;
    background: #f5f5f5;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* 详情弹窗增强 */
.detail-modal .modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.detail-text-scroll {
    flex: 1;
    overflow-y: auto;
    margin-top: 15px;
    padding-right: 10px;
}

.detail-modal h3 {
    color: white;
}

.detail-text {
    font-size: 15px;
    line-height: 1.7;
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .content-cards-container {
        flex-direction: column;
        overflow-x: hidden;
        gap: 12px;
    }

    .content-card {
        flex: none;
        width: 100%;
    }
    
    .detail-modal .modal-content {
        padding: 20px;
    }

    .app-header {
        padding: 0 16px;
    }

    .chat-window {
        padding: 16px;
        gap: 16px;
    }

    .message {
        max-width: 90%;
        gap: 8px;
    }

    .avatar {
        width: 32px;
        height: 32px;
    }

    .message-content {
        padding: 10px 14px;
        font-size: 14px;
    }

    .message-image {
        width: 100px;
        height: 100px;
    }

    .welcome-screen h2 {
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .chrome-style-btn {
        padding: 8px 12px;
    }
    
    .btn-type {
        display: none; /* 手机端隐藏类型标签以节省空间 */
    }
    
    .btn-title {
        font-size: 13px;
    }
}

/* 打字机光标 */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: #333;
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: middle;
}

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