/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 应用悬浮容器 */
.container {
    max-width: 1200px;
    width: 95%;
    margin: 0 auto;
    padding: 0;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 90vh;
    transition: all 0.5s ease;
    position: absolute; /* 改为绝对定位，使其可以在页面中移动 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

/* 容器折叠状态样式 */
.container.collapsed {
    height: auto !important;
    min-height: unset;
    max-height: 70px; /* 只保留标题行高度 */
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.2rem;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 分栏布局 */
.split-layout {
    display: flex;
    gap: 15px;
    flex: 1;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease, transform 0.3s ease;
    padding: 15px;
}

/* 左侧聊天区域样式 */
.chat-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    position: relative;
    overflow: hidden;
    max-height: 100%;
}

/* 右侧行程区域样式 */
.itinerary-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    overflow: hidden;
    max-height: 100%;
}

.itinerary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 15px;
}

.itinerary-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
}

.itinerary-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #3498db;
    color: white;
    border: none;
}

.action-btn:hover {
    background-color: #2980b9;
}

.action-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.itinerary-content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}

.itinerary-content {
    line-height: 1.6;
}

.empty-itinerary {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #95a5a6;
    text-align: center;
    padding: 30px;
}

/* 聊天容器样式 */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    background-color: white;
    border-radius: 6px;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    position: relative;
}

.chat-message.user {
    justify-content: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
}

/* 行程部分样式 */
.itinerary-section:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.itinerary-section h2,
.itinerary-section h3 {
    position: relative;
}

/* 编辑按钮样式 */
.edit-section-btn {
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    color: #3498db;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
}

.itinerary-section:hover .edit-section-btn {
    opacity: 1;
    background-color: rgba(52, 152, 219, 0.1);
}

.edit-section-btn:hover {
    background-color: rgba(52, 152, 219, 0.2);
}

/* 修改按钮样式 */
.edit-itinerary-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 16px;
    color: #3498db;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-itinerary-btn:hover {
    background-color: #e9f5ff;
    border-color: #3498db;
}

/* 高亮修改样式 - 增强 */
.highlight-edit {
    animation: highlight-fade 8s ease-in-out;
    position: relative;
    padding: 2px 5px;
    margin: 0 -5px;
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.7);
    display: inline-block;
    border-left: 3px solid #3498db;
}

@keyframes highlight-fade {
    0%, 10% {
        background-color: rgba(52, 152, 219, 0.4);
    }
    40%, 60% {
        background-color: rgba(52, 152, 219, 0.2);
    }
    100% {
        background-color: rgba(52, 152, 219, 0.1);
    }
}

/* 机器人消息样式 */
.chat-message.bot .message-content {
    background-color: #f0f2f5;
    color: #333;
    border-top-left-radius: 4px;
}

/* 用户消息样式 */
.chat-message.user .message-content {
    background-color: #3498db;
    color: white;
    border-top-right-radius: 4px;
}

/* Markdown内容样式 */
.message-content ul {
    margin-left: 20px;
    margin-top: 8px;
}

.message-content li {
    margin-bottom: 5px;
}

.message-content h2 {
    margin: 16px 0 8px;
    font-size: 1.4rem;
    color: #2c3e50;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 6px;
}

.message-content h3 {
    margin: 14px 0 8px;
    font-size: 1.2rem;
    color: #3498db;
}

.message-content p {
    margin-bottom: 8px;
}

.message-content strong {
    font-weight: 600;
}

/* 行程修改面板样式 */
.edit-panel {
    position: absolute;
    bottom: 70px;
    left: 20px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    overflow: hidden;
    max-height: 80%;
    border: 1px solid #e0e0e0;
}

.edit-panel.active {
    display: block;
}

.edit-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.edit-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #2c3e50;
}

.edit-panel-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.edit-panel-content {
    padding: 16px;
    overflow-y: auto;
    max-height: 400px;
}

#edit-content {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 100px;
    margin: 10px 0;
    font-family: inherit;
}

.edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.edit-actions button {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

#edit-submit {
    background-color: #3498db;
    color: white;
    border: none;
}

#edit-cancel {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
}

/* 聊天输入区域 */
.chat-input-container {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
}

#user-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    font-size: 1rem;
    font-family: inherit;
    max-height: 100px;
    transition: border-color 0.3s;
}

#user-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

#send-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

#send-btn:hover {
    background-color: #2980b9;
}

#send-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#send-btn svg {
    width: 24px;
    height: 24px;
}

/* 加载指示器样式 */
.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 0;
    margin: 10px auto;
}

.loading-indicator.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 10px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    border-top: 1px solid #eaeaea;
    margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        margin-bottom: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .chat-section {
        padding: 15px;
        min-height: 400px;
    }
    
    .chat-container {
        min-height: 300px;
    }
    
    .message-content {
        max-width: 90%;
    }
    
    .edit-panel {
        left: 10px;
        right: 10px;
        bottom: 65px;
    }
    
    .edit-section-btn {
        opacity: 1;
        background-color: rgba(52, 152, 219, 0.1);
    }
    
    .split-layout {
        flex-direction: column;
    }
    
    .itinerary-section, .chat-section {
        width: 100%;
    }
}

.edit-tip {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
    text-align: right;
}

.edit-badge {
    font-size: 0.7rem;
    background-color: #27ae60;
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 5px;
    position: relative;
    top: -1px;
    font-weight: bold;
    text-transform: uppercase;
}

.edit-description {
    font-size: 0.9rem;
    font-style: italic;
    color: #27ae60;
    background-color: rgba(46, 204, 113, 0.1);
    padding: 8px 12px;
    margin: 10px 0;
    border-left: 3px solid #27ae60;
    border-radius: 0 3px 3px 0;
    line-height: 1.4;
}

.modification-container {
    background-color: #f8fcff;
    border: 1px solid #d1e8ff;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    position: relative;
}

.modification-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d1e8ff;
}

.modification-container::before {
    content: "仅显示修改部分";
    position: absolute;
    top: -10px;
    left: 15px;
    background-color: #3498db;
    color: white;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 3px;
}

.view-full-btn, .back-to-mod-btn {
    display: block;
    margin: 12px auto;
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #d1e8ff;
    border-radius: 4px;
    color: #3498db;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-weight: 500;
}

.view-full-btn:hover, .back-to-mod-btn:hover {
    background-color: #e9f5ff;
    border-color: #3498db;
}

.view-full-btn::before {
    content: "📄 ";
}

.back-to-mod-btn::before {
    content: "🔍 ";
}

/* 美化确认按钮 */
#confirm-itinerary {
    background-color: #27ae60;
    transition: all 0.3s;
}

#confirm-itinerary:hover {
    background-color: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#confirm-itinerary:disabled {
    background-color: #95a5a6;
    transform: none;
    box-shadow: none;
}

.itinerary-section {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.itinerary-section:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.itinerary-content h2 {
    color: #2c3e50;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 8px;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.itinerary-content h3 {
    color: #3498db;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* 确认提示样式 */
.confirm-prompt {
    background-color: #f1f9f7;
    border: 1px dashed #27ae60;
    color: #27ae60;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.confirm-icon {
    font-style: normal;
    margin-right: 8px;
    font-size: 1.2rem;
    font-weight: bold;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* 修改计数标签 */
.edit-count-badge {
    background-color: #3498db;
    color: white;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 20px;
    display: flex;
    margin-bottom: 15px;
    font-weight: 500;
    align-items: center;
    justify-content: center;
    width: fit-content;
}

.edit-count-badge:before {
    content: "📝 ";
    margin-right: 5px;
}

/* 待确认的修改样式 */
.pending-edit {
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.6);
    border-left: 3px solid #27ae60;
}

/* 成功确认动画 */
.success-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeOut 1.5s forwards;
}

.success-icon {
    width: 100px;
    height: 100px;
    background-color: #27ae60;
    border-radius: 50%;
    position: relative;
    animation: scaleIn 0.5s ease-out;
}

.success-icon:before, .success-icon:after {
    content: '';
    position: absolute;
    background-color: white;
}

.success-icon:before {
    width: 25px;
    height: 10px;
    left: 20px;
    top: 50px;
    transform: rotate(45deg);
}

.success-icon:after {
    width: 50px;
    height: 10px;
    left: 30px;
    top: 45px;
    transform: rotate(-45deg);
    transform-origin: left top;
}

@keyframes fadeOut {
    0%, 50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Word修订模式样式 */
.deleted-text {
    text-decoration: line-through;
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    padding: 0 3px;
    margin: 0 1px;
    border-radius: 2px;
}

.added-text {
    color: #27ae60;
    background-color: rgba(46, 204, 113, 0.1);
    padding: 0 3px;
    margin: 0 1px;
    border-radius: 2px;
    font-weight: bold;
    border-bottom: 1px solid #27ae60;
}

.edit-comment {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-style: italic;
    background-color: #f5f5f5;
    padding: 1px 5px;
    margin: 0 3px;
    border-radius: 3px;
    white-space: nowrap;
    display: inline-block;
    vertical-align: text-top;
    border-left: 2px solid #95a5a6;
}

/* 原始内容样式 */
.original-text {
    color: #7f8c8d;
    background-color: #f5f5f5;
    border-left: 3px solid #e74c3c;
    padding: 8px 12px;
    margin: 10px 0;
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.4;
    border-radius: 0 4px 4px 0;
}

.original-badge {
    background-color: #e74c3c;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
    font-weight: bold;
    font-style: normal;
}

/* 修改记录样式 */
.changes-summary {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin: 10px 0 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.changes-summary.hidden {
    display: none;
}

.changes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f5f7fa;
    border-bottom: 1px solid #e0e0e0;
}

.changes-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #7f8c8d;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.changes-list {
    padding: 12px 15px;
    max-height: 200px;
    overflow-y: auto;
}

.change-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.change-item:last-child {
    border-bottom: none;
}

.change-item .change-time {
    color: #7f8c8d;
    font-size: 0.8rem;
    margin-top: 4px;
}

.no-changes {
    color: #95a5a6;
    font-style: italic;
    text-align: center;
    padding: 15px;
}

.view-btn {
    background-color: #f1c40f;
}

.view-btn:hover {
    background-color: #f39c12;
}

/* 修改历史视图样式 */
#changes-list {
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.no-changes {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.change-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.change-item:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.change-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.change-number {
    font-weight: bold;
    color: #555;
    margin-right: 10px;
    min-width: 30px;
}

.change-description {
    flex-grow: 1;
    font-weight: 500;
}

.change-time {
    color: #777;
    font-size: 0.9em;
}

.change-details {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.view-change-btn, .restore-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.view-change-btn {
    background-color: #e6f7ff;
    color: #1890ff;
}

.view-change-btn:hover {
    background-color: #bae7ff;
}

.restore-btn {
    background-color: #f6ffed;
    color: #52c41a;
}

.restore-btn:hover {
    background-color: #d9f7be;
}

/* 修改详情模态窗口 */
.change-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e8e8e8;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.change-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.change-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-container {
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
}

.content-container h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #555;
}

.content {
    max-height: 300px;
    overflow-y: auto;
    background-color: #fafafa;
    padding: 10px;
    border-radius: 4px;
}

.modified-content .highlight-edit {
    background-color: #f6ffed;
    border-left: 3px solid #52c41a;
    padding-left: 5px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.restore-version-btn, .close-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.restore-version-btn {
    background-color: #52c41a;
    color: white;
}

.restore-version-btn:hover {
    background-color: #389e0d;
}

.close-btn {
    background-color: #f0f0f0;
    color: #333;
}

.close-btn:hover {
    background-color: #d9d9d9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
    
    .change-content {
        flex-direction: column;
    }
    
    .change-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .change-time {
        margin-top: 5px;
    }
}

/* 可折叠标题行样式 */
.collapsible-header {
    background-color: #ffffff;
    border-radius: 0;
    padding: 15px 20px;
    margin-bottom: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move; /* 指示可拖拽 */
    transition: all 0.3s ease;
    z-index: 10;
    position: relative;
    border-bottom: 1px solid #eaeaea;
    user-select: none; /* 防止拖拽时选中文本 */
}

.collapsible-header:hover {
    background-color: #f8f9fa;
}

.header-content {
    flex: 1;
}

.collapsible-header h1 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1.8rem;
    transition: font-size 0.3s ease;
}

.collapsible-header p {
    color: #7f8c8d;
    font-size: 1rem;
    margin: 0;
    transition: opacity 0.3s ease;
}

.collapse-toggle {
    background: none;
    border: none;
    color: #3498db;
    font-size: 16px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.collapse-toggle:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.collapse-icon {
    transition: transform 0.3s ease;
}

/* 折叠状态 */
.collapsed .collapse-icon {
    transform: rotate(180deg);
}

.collapsed.collapsible-header {
    border-radius: 8px;
    margin-bottom: 20px;
}

.collapsed.collapsible-header h1 {
    font-size: 2rem;
}

.collapsed.collapsible-header p {
    opacity: 0.8;
}

/* 内容区域 */
.split-layout {
    transition: max-height 0.5s ease, opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
    transform-origin: top;
}

.split-layout.collapsed {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0);
    margin: 0;
}

/* 移动端布局样式调整 */
.mobile-tabs-container {
    display: none;
    flex-direction: column;
    height: 90vh;
    width: 95%;
    max-width: 500px;
    overflow: hidden;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    position: absolute; /* 同样改为绝对定位 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

/* 移动端可折叠标题行样式 */
.mobile-header {
    border-radius: 0;
    margin: 0;
    padding: 12px 15px;
}

.mobile-header h1 {
    font-size: 1.5rem;
}

.mobile-header p {
    font-size: 0.9rem;
}

/* 移动端内容区域 */
.mobile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.mobile-content.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.mobile-view-active .mobile-tabs-container {
    display: flex; /* 使用flex而不是block */
}

.mobile-tabs-header {
    display: flex;
    background-color: #ffffff;
    padding: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.mobile-tab-button {
    flex: 1;
    padding: 12px;
    background-color: #f0f0f0;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 8px;
    margin: 0 5px;
}

.mobile-tab-button.active {
    background-color: #3498db;
    color: white;
}

.mobile-tab-content {
    display: none;
    flex: 1;
    overflow: auto;
    padding: 10px;
    flex-direction: column; /* 确保内容可以垂直排列 */
}

.mobile-tab-content.active {
    display: flex; /* 使用flex而不是block，确保填充可用空间 */
}

/* 移动端聊天容器 */
#mobile-chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

/* 移动端结果容器 */
#mobile-result-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 移动端用户输入区域 */
.user-input-container {
    display: flex;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
}

.user-input-container form {
    display: flex;
    width: 100%;
}

.user-input-container input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 15px;
    outline: none;
}

.user-input-container textarea {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 15px;
    outline: none;
    resize: none;
    max-height: 80px;
    min-height: 48px;
}

.user-input-container button {
    margin-left: 10px;
    padding: 0 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s;
}

.user-input-container button:hover {
    background-color: #2980b9;
}

/* 移动端页脚 */
.mobile-footer {
    padding: 10px;
    text-align: center;
    background-color: #f5f7fa;
    border-top: 1px solid #e0e0e0;
    color: #7f8c8d;
    font-size: 12px;
}

/* 响应式设计处理 */
@media screen and (max-width: 768px) {
    /* PC版的布局在移动设备上隐藏 */
    .mobile-view-active .container {
        display: none;
    }
  
    /* 移动端布局在移动设备上显示 */
    .mobile-view-active .mobile-tabs-container {
        display: flex;
    }
}

/* 移动端容器折叠状态样式 */
.mobile-tabs-container.collapsed {
    height: auto !important;
    min-height: unset;
    max-height: 60px; /* 只保留标题行高度 */
}

/* 拖拽时的样式 */
.container.dragging, .mobile-tabs-container.dragging {
    cursor: move;
    opacity: 0.95;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transition: none; /* 拖拽时禁用过渡效果，使拖拽更流畅 */
}

/* 区域折叠样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 15px;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-collapse-btn {
    background: none;
    border: none;
    color: #3498db;
    font-size: 16px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.section-collapse-btn:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.section-content-collapsed {
    max-height: 0 !important;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.section-header-collapsed .collapse-icon {
    transform: rotate(180deg);
}

/* 原有的标题样式改为与section-header兼容 */
.itinerary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 15px;
}

/* 标题合并样式 */
.header-title-group {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.header-title-group h1 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.8rem;
}

.header-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

/* 移动端标题行样式调整 */
.mobile-header .header-title-group {
    gap: 8px;
}

.mobile-header .header-title-group h1 {
    font-size: 1.5rem;
}

.mobile-header .header-subtitle {
    font-size: 0.9rem;
}

@media screen and (max-width: 600px) {
    .header-title-group {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
}

/* 调整响应式设计 */
@media screen and (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .container, .mobile-tabs-container {
        width: 100%;
        height: 95vh;
    }
    
    .split-layout {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }
    
    .chat-section, .itinerary-section {
        padding: 10px;
    }
    
    .section-header {
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
}

/* 移动端容器折叠状态样式 */
.mobile-tabs-container.collapsed {
    height: auto !important;
    min-height: unset;
    max-height: 60px; /* 只保留标题行高度 */
}

/* 拖拽时的样式 */
.container.dragging, .mobile-tabs-container.dragging {
    cursor: move;
    opacity: 0.95;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transition: none; /* 拖拽时禁用过渡效果，使拖拽更流畅 */
}

/* 移动端编辑面板样式调整 */
@media screen and (max-width: 768px) {
    .edit-panel {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 15px 15px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }
    
    .edit-panel.active {
        transform: translateY(0);
    }
    
    .edit-panel-content {
        max-height: 50vh;
        overflow-y: auto;
    }
    
    /* 确保移动端编辑面板在切换标签页时仍然可见 */
    .mobile-tab-content.active .edit-panel.active,
    #chat-tab.active .edit-panel.active {
        display: block;
        z-index: 1000;
    }
}

/* 容器样式修改以支持拖拽 */
.container, .mobile-tabs-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    transition: box-shadow 0.3s ease;
    max-height: 95vh;
}

/* 拖拽时的样式 */
.container.dragging, .mobile-tabs-container.dragging {
    cursor: move;
    opacity: 0.95;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transition: none; /* 拖拽时禁用过渡效果，使拖拽更流畅 */
}

/* 确保标题行可作为拖拽把手 */
.collapsible-header, .mobile-header {
    cursor: move;
    user-select: none;
    touch-action: none;
}

/* 添加时间轴样式 */
.timeline-view {
    padding: 0 0 20px 40px;
    position: relative;
    margin-top: 20px;
}

.timeline-view::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30px;
    width: 4px;
    background: linear-gradient(to bottom, #3498db 0%, #2ecc71 50%, #f1c40f 100%);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.timeline-day {
    position: relative;
    margin-bottom: 40px;
    padding-left: 50px;
}

/* 日期标签 */
.timeline-day::before {
    content: attr(data-date);
    position: absolute;
    top: 5px;
    left: -130px;
    background-color: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    white-space: nowrap;
    z-index: 3;
}

.timeline-day-header {
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.timeline-day-header::before {
    content: '';
    position: absolute;
    top: 5px;
    left: -50px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #3498db;
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.4), 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.timeline-day-header::after {
    content: '';
    position: absolute;
    top: 17px;
    left: -39px;
    width: 20px;
    height: 2px;
    background-color: #3498db;
    z-index: 1;
}

.timeline-day-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.timeline-time-slot {
    position: relative;
    margin-bottom: 25px;
    padding-left: 30px;
    padding-bottom: 15px;
}

.timeline-time-slot::before {
    content: '';
    position: absolute;
    top: 5px;
    left: -42px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #2ecc71;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3), 0 0 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.timeline-time-slot::after {
    content: '';
    position: absolute;
    top: 13px;
    left: -26px;
    width: 15px;
    height: 2px;
    background-color: #2ecc71;
    z-index: 1;
}

.timeline-time-slot h3 {
    margin: 0 0 12px;
    font-size: 1.2rem;
    color: #16a085;
    position: relative;
}

.timeline-time-slot h3::before {
    content: attr(data-time);
    position: absolute;
    left: -90px;
    top: 2px;
    font-size: 0.8rem;
    color: #7f8c8d;
    font-weight: normal;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #eee;
}

.timeline-content {
    background-color: #fff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 3px solid #2ecc71;
}

.timeline-content:hover {
    transform: translateY(-3px) translateX(5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.timeline-content p {
    margin: 0 0 12px;
    line-height: 1.6;
}

.timeline-content p:last-child {
    margin-bottom: 0;
}

/* 特殊内容标识 */
.timeline-content.has-transport {
    border-left-color: #f39c12;
}

.timeline-content.has-accommodation {
    border-left-color: #9b59b6;
}

.timeline-content .content-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 8px;
    margin-bottom: 8px;
    color: white;
}

.timeline-content .tag-transport {
    background-color: #f39c12;
}

.timeline-content .tag-accommodation {
    background-color: #9b59b6;
}

.timeline-content .tag-food {
    background-color: #e74c3c;
}

.timeline-content .tag-activity {
    background-color: #3498db;
}

/* 时间轴标记点动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.8), 0 0 0 4px rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0), 0 0 0 4px rgba(52, 152, 219, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0), 0 0 0 4px rgba(52, 152, 219, 0.4);
    }
}

.timeline-day-header::before {
    animation: pulse 2s infinite;
}

/* 时间轴编辑按钮样式 */
.timeline-edit-btn {
    position: absolute;
    top: 0;
    right: 0;
    padding: 5px 10px;
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
}

.timeline-day-header:hover .timeline-edit-btn,
.timeline-time-slot:hover .timeline-edit-btn {
    opacity: 1;
}

.timeline-edit-btn:hover {
    background-color: rgba(52, 152, 219, 0.2);
}

/* 视图切换按钮样式 */
.view-toggle-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.view-toggle-btn {
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.view-toggle-btn:hover:not(.active) {
    background-color: #e9ecef;
}

/* 地图背景样式 */
.map-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1; /* 放在最底层 */
}

.map-container {
    width: 100%;
    height: 100%;
}

/* 确保其他容器覆盖地图 */
.container, .mobile-tabs-container {
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.9);
}