body {
    font-family: 'Noto Sans SC', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 15px;
    background-color: #f0f5f9;
    color: #333;
    line-height: 1.6;
}

h1 {
    color: #2c7a7b;
    font-weight: 600;
    text-align: center;
    margin-bottom: 5px;
    font-size: 32px;
    letter-spacing: 0.5px;
}

.subtitle {
    color: #718096;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 400;
}

.chat-container {
    border: none;
    border-radius: 12px;
    padding: 20px;
    height: 450px;
    overflow-y: auto;
    margin-bottom: 30px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    max-width: 70%;
}

.user {
    background-color: #ebf8ff;
    color: #2c5282;
    margin-left: 30%;
    align-self: flex-end;
    border-top-right-radius: 2px;
    position: relative;
}

.assistant {
    background-color: #f7fafc;
    color: #1a365d;
    margin-right: 30%;
    border-top-left-radius: 2px;
    position: relative;
    border-left: 3px solid #2c7a7b;
}

.input-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.text-input {
    display: flex;
    margin-bottom: 10px;
    flex-direction: column;
    width: 100%;
    gap: 15px;
}

textarea {
    flex-grow: 1;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    resize: none;
    height: 80px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border 0.3s ease;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: #2c7a7b;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

button {
    padding: 12px 20px;
    background-color: #2c7a7b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 0;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background-color: #285e61;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.loading {
    text-align: center;
    color: #718096;
    margin: 20px 0;
    display: none;
    font-weight: 500;
}

.file-upload {
    margin-bottom: 25px;
    padding: 20px;
    border: 2px dashed #2c7a7b;
    border-radius: 12px;
    background-color: rgba(44, 122, 123, 0.05);
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: #285e61;
    background-color: rgba(44, 122, 123, 0.08);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.file-label {
    font-weight: 600;
    color: #2c7a7b;
    font-size: 16px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 14px;
}

.text-muted {
    color: #718096;
}

.text-warning {
    color: #c05621;
}

.controls {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.media-display {
    max-width: 300px;
    max-height: 200px;
    margin: 15px 0;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 进度条样式 */
.progress-container {
    margin: 15px 0;
    padding: 15px;
    background-color: #f7fafc;
    border-radius: 10px;
    margin-right: 30%;
    border-left: 3px solid #2c7a7b;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    height: 10px;
    background-color: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #2c7a7b;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

.file-warning {
    color: #c05621;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
    padding: 5px 10px;
    background-color: #fffaf0;
    border-radius: 5px;
    border-left: 3px solid #dd6b20;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 添加新样式支持修改后的HTML结构 */
.app-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #718096;
    font-size: 14px;
}

.full-width {
    width: 100%;
}

.btn-primary {
    background-color: #2c7a7b;
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-primary i {
    margin-right: 6px;
    font-size: 18px;
}

.btn-primary:hover {
    background-color: #285e61;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary i {
    margin-right: 6px;
    font-size: 16px;
}

.btn-secondary:hover {
    background-color: #cbd5e0;
    transform: translateY(-1px);
}

.file-input-container {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    margin-bottom: 10px;
}

.file-input-container input[type="file"] {
    position: absolute;
    font-size: 100px;
    opacity: 0;
    right: 0;
    top: 0;
    cursor: pointer;
    height: 100%;
    width: 100%;
    z-index: 2;
}

.file-button {
    background-color: #e2e8f0;
    color: #4a5568;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.file-button i {
    margin-right: 8px;
    font-size: 18px;
}

.file-input-container:hover .file-button {
    background-color: #cbd5e0;
}

.file-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .app-container {
        padding: 20px 15px;
    }
    
    button {
        margin-top: 0;
        width: 100%;
    }
    
    .message {
        max-width: 85%;
    }
    
    .user {
        margin-left: 15%;
    }
    
    .assistant {
        margin-right: 15%;
    }
    
    textarea {
        height: 100px;
    }
}

.file-info {
    display: flex;
    align-items: center;
    color: #4a5568;
    font-size: 14px;
    margin-top: 8px;
    padding: 6px 10px;
    background-color: #f7fafc;
    border-radius: 6px;
    width: fit-content;
}

.file-info i {
    margin-right: 8px;
    color: #2c7a7b;
    font-size: 16px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f7fafc;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #2c7a7b;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: #2c7a7b;
    text-decoration: none;
}

/* 结果列表样式 */
.result-item {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.result-item:hover {
    background-color: #f7fafc;
}

.result-info {
    flex-grow: 1;
}

.result-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.result-title i {
    margin-right: 8px;
    font-size: 18px;
}

.result-title .docx-icon {
    color: #2b579a;  /* Word文档蓝色 */
}

.result-title .json-icon {
    color: #8c8c8c;  /* JSON文件灰色 */
}

.result-meta {
    color: #718096;
    font-size: 14px;
}

.result-query {
    color: #4a5568;
    font-size: 14px;
    margin-top: 5px;
    font-style: italic;
}

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

.result-btn {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
}

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

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 标签页样式 */
.tab-container {
    margin-bottom: 25px;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button:hover {
    color: #2c7a7b;
    background-color: rgba(44, 122, 123, 0.05);
}

.tab-button.active {
    color: #2c7a7b;
    border-bottom-color: #2c7a7b;
    background-color: rgba(44, 122, 123, 0.08);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 剧本输入区域样式 */
.script-input {
    margin-bottom: 25px;
    padding: 20px;
    border: 2px dashed #805ad5;
    border-radius: 12px;
    background-color: rgba(128, 90, 213, 0.05);
    transition: all 0.3s ease;
}

.script-input:hover {
    border-color: #6b46c1;
    background-color: rgba(128, 90, 213, 0.08);
}

.script-input textarea {
    height: 120px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.script-input .form-group:first-child textarea {
    height: 200px;
}

.script-input .form-group:last-child textarea {
    height: 60px;
}

/* 结果文件类型图标 */
.docx-icon {
    color: #2c7a7b;
}

.json-icon {
    color: #d69e2e;
}
