.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.top-bar {
    height: 40px;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

body {
    margin: 0;
    padding-top: 40px;  /* 仅保留顶部导航栏的空间 */
}

h2 {
    color: #333;
    margin: 45px 0 5px 0;  /* 增加顶部间距避免被导航栏遮挡 */
    font-size: 1.6em;
    font-weight: normal;
    text-align: center;
}

.instruction {
    background-color: #f8f9fa;
    width: 100%;
    padding: 5px 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.instruction ol {
    margin: 10px 0;
    padding-left: 20px;
}

.instruction li {
    margin-bottom: 8px;
    color: #555;
}

#content {
    width: 100%;
    min-height: 200px;
    padding: 2px;
    margin-bottom: 2px;
    margin-right: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #0056b3;
}

#result {
    margin-top: 10px;
    width: 101%;
    overflow: hidden;  /* 防止内部滚动溢出 */
}

/* 表格相关样式 */
.table-container {
    margin-top: 0;
    border: 1px solid #ddd;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    overflow-x: auto;  /* 添加横向滚动 */
    background-color: #fff;
    max-width: 100%;  /* 限制最大宽度 */
    -webkit-overflow-scrolling: touch;  /* 移动端滚动优化 */
}

/* 工具栏容器 */
.toolbar-container {
    position: sticky;  /* 让工具栏固定在顶部 */
    left: 0;
    background-color: #fff;
    z-index: 10;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    border: none;
    table-layout: auto;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    min-width: 80px;
    max-width: 400px;
    word-wrap: break-word;
    white-space: normal;
}

th:first-child,
td:first-child {
    border-left: none;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    text-align: center;
    padding: 8px 4px;
}

th:nth-child(4),
td:nth-child(4) {
    min-width: 200px;
}

th:nth-child(5),
td:nth-child(5),
th:nth-child(6),
td:nth-child(6) {
    min-width: 80px;
    max-width: 120px;
}

th:last-child,
td:last-child {
    border-right: none;
}

tr:last-child td {
    border-bottom: none;
}

th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
    z-index: 2;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f5f5f5;
}

td:hover::after {
    display: none;
}

td:hover {
    position: static;
    overflow: visible;
    z-index: auto;
}

.more-rows-hint {
    text-align: center;
    background-color: #fff3cd;
    color: #856404;
    font-style: italic;
}

.table-info {
    margin-top: 10px;
    text-align: right;
    color: #666;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 控制组和设置相关样式 */
.control-group {
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.column-settings {
    margin-top: 15px;
    display: none;
    width: 100%;
}

#columnNames {
    width: 100%;
    padding-left: 5px;
    padding-top: 5px;
    padding-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

#settingsToggle {
    margin: 0;
    position: relative;
    width: auto;
    top: 2px;
    margin-right: 4px;
    vertical-align: middle;
}

.settings-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 2px;
}

.settings-toggle span {
    vertical-align: middle;
    font-size: 14px;
    color: #333;
    margin-top: 2px;
}

/* 进度条相关样式 */
.progress-wrapper {
    flex: 1;
    max-width: 400px;
}

.progress-container {
    position: relative;
}

.progress {
    height: 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #4CAF50;
    width: 0;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    color: white;
    font-size: 12px;
}

.estimated-time {
    position: absolute;
    right: 0;
    top: -16px;
    font-size: 12px;
    color: #666;
}

/* 删除重复的进度条样式 */
.progress {
    height: 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.error {
    color: red;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid red;
    background-color: #fff3f3;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .table-container {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* 工具栏样式 */
.table-toolbar {
    display: flex;
    gap: 6px;
    padding: 0px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.toolbar-buttons {
    display: flex;
    gap: 0;
}

.toolbar-btn {
    border-radius: 0;
    border-right: none;
}

.toolbar-btn:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.toolbar-btn:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border-right: 1px solid #e9ecef;
}

.toolbar-btn {
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
    transition: all 0.2s ease;
    position: relative;
}

.toolbar-btn:hover {
    background-color: #fff;
    border-color: #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.toolbar-btn i {
    font-size: 16px;
    color: #6c757d;
}

/* 复制按钮特殊样式 */
.toolbar-btn.copy-btn {
    padding-left: 36px;
}

.toolbar-btn.copy-btn::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('../image/copy.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.toolbar-btn.copy-btn i {
    display: none;
}

/* 导出Excel按钮特殊样式 */
.toolbar-btn.export-btn {
    padding-left: 36px;
}

.toolbar-btn.export-btn::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('../image/excel.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.toolbar-btn.export-btn i {
    display: none;
}

/* 分享按钮特殊样式 */
.toolbar-btn.share-btn {
    padding: 8px 16px;
    background-image: url('../image/share.svg');
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 16px;
    padding-left: 32px;
}

.toolbar-btn.share-btn i {
    display: none;
}

/* 禁用状态样式 */
.toolbar-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

.toolbar-btn:disabled:hover {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    box-shadow: none;
}

@media (max-width: 768px) {
    .toolbar-btn {
        padding: 6px 8px;
    }
    
    .toolbar-btn.copy-btn,
    .toolbar-btn.export-btn {
        padding-left: 32px;
    }

    .toolbar-btn.copy-btn::before,
    .toolbar-btn.export-btn::before {
        left: 8px;
        width: 14px;
        height: 14px;
    }
}

/* 提示框样式 */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;  /* 防止遮挡下方元素的点击 */
}

.toast {
    background-color: #fff;
    border-radius: 4px;
    padding: 16px 24px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInOut 3s ease;
    min-width: 250px;
    text-align: center;
    justify-content: center;
}

.toast.success {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #28a745;
}

.toast.error {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #dc3545;
}

.toast i {
    font-size: 18px;
}

.toast.success i {
    color: #28a745;
}

.toast.error i {
    color: #dc3545;
}

/* 修改动画效果 */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    15% {
        opacity: 1;
        transform: translateY(0);
    }
    85% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* 语言选择器样式 */
.language-selector {
    position: relative;
    display: inline-block;
}

.lang-btn {
    padding: 8px 16px 8px 40px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    min-width: 100px;
    position: relative;
}

.lang-btn::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('../image/language.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.lang-btn span {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    margin-left: 12px;
}

.lang-btn:hover {
    background-color: #fff;
    border-color: #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 120px;
}

.lang-menu.show {
    display: block;
}

.lang-option {
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    text-align: left;
    color: #495057;
    font-size: 14px;
}

.lang-option:hover {
    background-color: #f8f9fa;
}

/* 修改顶部栏样式 */
.top-bar {
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.left-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 修改Logo样式 */
.logo {
    font-family: 'Courier New', monospace;
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin: 0;  /* 移除margin */
}

/* 调整首页链接样式 */
.home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.home-link:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateX(-2px);
}

.home-link i {
    font-size: 16px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding-top: 60px;  /* 为固定顶栏留出空间 */
    }

    .container {
        padding: 10px;
        padding-top: 70px;  /* 移动端稍微减小一点顶部间距 */
        margin: 0;
    }

    .instruction {
        margin: 10px 0;
    }

    .control-group {
        flex-direction: column;
        gap: 10px;
    }

    .progress-wrapper {
        width: 100%;
        max-width: none;
        margin: 10px 0;
    }

    .progress {
        height: 24px;
    }

    .progress-bar {
        font-size: 14px;
    }

    .estimated-time {
        display: none;
    }

    .left-controls {
        width: 100%;
    }

    .table-container {
        margin: 10px -10px;  /* 负边距让表格占满屏幕 */
        border-radius: 0;
        overflow-x: auto;
    }

    table {
        min-width: 100%;  /* 确保表格至少占满容器宽度 */
    }

    .table-toolbar {
        flex-direction: row;
        padding: 8px;
        justify-content: center;
        gap: 12px;
    }

    .toolbar-btn {
        width: auto;
        padding: 8px;
        height: 36px;
    }

    .toolbar-btn span {
        display: none;
    }

    .toolbar-btn i {
        font-size: 18px;
        margin: 0;
    }

    .column-settings {
        margin: 10px 0;
    }

    #columnNames {
        padding: 10px;
    }

    .toast-container {
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .toast {
        width: 100%;
        margin: 0;
    }

    .top-bar {
        padding: 10px 15px;
    }

    .left-section {
        gap: 12px;
    }

    .logo {
        font-size: 1.5em;
    }

    .home-link {
        font-size: 13px;
        padding: 4px 8px;
    }

    h2 {
        font-size: 1.4em;
    }

    .instruction {
        font-size: 0.9em;
    }

    .checkbox-wrapper {
        text-align: center;
    }

    .table-container {
        overflow-x: auto;  /* 允许表格横向滚动 */
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 6px;
        min-width: 60px;
    }

    .lang-btn {
        padding: 8px;
        min-width: 36px;
        height: 36px;
        justify-content: center;
        border: 1px solid transparent;
        background-color: transparent;
        border-radius: 4px;
    }

    .lang-btn::before {
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .lang-btn span {
        display: none;
    }

    .lang-btn:hover {
        background-color: #f8f9fa;
        border-color: #e9ecef;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .lang-menu {
        right: 0;
        left: auto;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.3em;
    }

    .left-section {
        gap: 8px;
    }

    .instruction ol {
        padding-left: 15px;
    }

    .instruction li {
        margin-bottom: 6px;
    }

    #content {
        min-height: 200px;
    }

    .column-settings input {
        font-size: 0.9em;
    }

    .toast {
        width: 90%;
        font-size: 0.9em;
        padding: 12px 16px;
    }

    .table-toolbar {
        padding: 6px;
        gap: 8px;
    }

    .toolbar-btn {
        padding: 6px;
        height: 32px;
    }

    .toolbar-btn i {
        font-size: 16px;
    }
}

/* Logo链接样式 */
.logo-link {
    text-decoration: none;
    transition: transform 0.3s ease;
    display: block;
}

.logo-link:hover {
    transform: translateY(-1px);
}

/* 确保按钮内容居中对齐 */
.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 使用说明按钮样式 */
.instruction-toggle {
    background: transparent;
    border: none;
    padding: 3px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 4px;
    width: 100%;
    justify-content: flex-start;
}

.instruction-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.instruction-toggle i {
    color: #f39c12;  /* 使用温暖的黄色 */
    font-size: 18px;
}

/* 使用说明列表样式 */
#instructionSteps {
    margin: 10px 0;
    padding-left: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    width: 100%;
}

#instructionSteps.show {
    max-height: 200px;  /* 足够显示所有内容的高度 */
    opacity: 1;
    margin: 15px 0;
}

#instructionSteps.hidden {
    max-height: 0;
    margin: 0;
}

.instruction {
    background-color: #f8f9fa;
    width: 100%;
    padding: 5px 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.instruction li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.4;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-info:hover {
    background: #e9ecef;
}

.username-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 4px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.logout-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
}

/* 对话框覆层 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog-box {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.dialog-box h3 {
    margin: 0 0 16px 0;
    color: #333;
}

.dialog-box p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.5;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.dialog-btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.dialog-btn.confirm {
    background: #3498db;
    color: white;
}

.dialog-btn.cancel {
    background: #eee;
    color: #666;
}

.header-container {
    width: 100%;
    padding: 20px;
}

.logo-lang-button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    height: 40px;
    width: auto;
}

.right-items {
    display: flex;
    align-items: center;
    gap: 20px;
}

#languageSelect {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
}

.get-started-btn {
    padding: 10px 20px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.get-started-btn:hover {
    background-color: #1557b0;
}

/* 中央提示框样式 */
.center-toast {
    max-width: 300px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.center-toast.success {
    border-top: 4px solid #28a745;
}

.center-toast.error {
    border-top: 4px solid #dc3545;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .center-toast {
        max-width: 280px;
        padding: 15px !important;
    }
    
    .center-toast p {
        font-size: 14px !important;
    }
}

/* 用户菜单样式 */
.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 160px;
    display: none;
    z-index: 1001;
}

.user-menu.show {
    display: block;
}

.user-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    transition: background-color 0.2s;
}

.user-menu-item:hover {
    background-color: #f8f9fa;
}

.user-menu-item.full-username {
    border-bottom: 1px solid #eee;
    word-break: break-all;
    white-space: normal;
}

/* 分析页面特有样式 */
.analyze-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.input-section {
    margin-bottom: 20px;
}

.input-section textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

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

.column-input {
    margin-top: 15px;
}

.column-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.column-input .placeholder {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.analyze-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-top: 15px;
}

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

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

.result-section {
    margin-top: 30px;
    display: none;
}

.result-section.show {
    display: block;
}

.table-container {
    overflow-x: auto;
    margin-top: 0px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

tr:hover {
    background: #f8f9fa;
}

.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.toolbar-btn {
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
    transition: all 0.2s ease;
    position: relative;
}

.toolbar-btn:hover {
    background-color: #fff;
    border-color: #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.toolbar-btn i {
    font-size: 16px;
    color: #6c757d;
}

/* 复制按钮特殊样式 */
.toolbar-btn.copy-btn {
    padding-left: 36px;
}

.toolbar-btn.copy-btn::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('../image/copy.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.toolbar-btn.copy-btn i {
    display: none;
}

/* 导出Excel按钮特殊样式 */
.toolbar-btn.export-btn {
    padding-left: 36px;
}

.toolbar-btn.export-btn::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('../image/excel.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.toolbar-btn.export-btn i {
    display: none;
}

/* 分享按钮特殊样式 */
.toolbar-btn.share-btn {
    padding: 8px 16px;
    background-image: url('../image/share.svg');
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 16px;
    padding-left: 32px;
}

.toolbar-btn.share-btn i {
    display: none;
}

/* 禁用状态样式 */
.toolbar-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

.toolbar-btn:disabled:hover {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    box-shadow: none;
}

@media (max-width: 768px) {
    .analyze-container {
        padding: 15px;
    }
    
    .toolbar-btn {
        padding: 6px 8px;
    }
    
    .toolbar-btn.copy-btn,
    .toolbar-btn.export-btn {
        padding-left: 32px;
    }

    .toolbar-btn.copy-btn::before,
    .toolbar-btn.export-btn::before {
        left: 8px;
        width: 14px;
        height: 14px;
    }
}

/* 文件上传区域样式 */
.file-upload-container {
    width: 100%;
    margin-top: 10px;
    background-color: #fff;
    border-radius: 5px;
    border: 2px dashed #ddd;
    transition: all 0.3s ease;
}

.upload-area {
    width: 100%;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area.dragover {
    background-color: #f7f7f7;
}

.upload-area:hover {
    background-color: #f7f7f7;
}

.upload-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.upload-icon {
    width: 32px;
    height: 32px;
    margin: 0;
}

.upload-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.upload-area p {
    margin: 2px 0;
    color: #666;
    font-size: 14px;
    text-align: left;
}

.file-list {
    padding: 10px 20px;
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid #eee;
}

.file-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    max-width: calc(50% - 8px);
    min-width: 200px;
    flex: 1 1 auto;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.file-name {
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.file-size {
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}

.file-actions {
    margin-left: 8px;
    flex-shrink: 0;
}

.file-action-btn.delete {
    color: #dc3545;
    background: none;
    border: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-action-btn.delete:hover {
    color: #c82333;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
}

.file-action-btn.delete i {
    font-size: 14px;
}

@media (max-width: 768px) {
    .file-item {
        max-width: 100%;
    }
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #666;
    float: left;
}

.loading-indicator .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-row td {
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}


/* 根据配置动态添加样式类 */
.table-container {
    margin-top: 0px;
    transition: all 0.3s ease;
}

/* 表格样式方案 */
/* 样式1：现代简约风 */
.table-style-1 {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: auto;
}

.table-style-1 table {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-style-1 th {
    background: #f7f9fc;
    color: #2c3e50;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #edf2f7;
    font-size: 14px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.table-style-1 td {
    padding: 8px 12px;
    color: #4a5568;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
    line-height: 1.3;
}

.table-style-1 tr:hover {
    background-color: #f8fafc;
}

.table-style-1 td:first-child,
.table-style-1 th:first-child {
    padding-left: 16px;
    padding-right: 8px;
    font-weight: 500;
    color: #718096;
    width: 50px;
    text-align: center;
}

/* 样式2：商务专业风 */
.table-style-2 {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: auto;
}

.table-style-2 table {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    width: 100%;
    border-collapse: collapse;
}

.table-style-2 th {
    background: linear-gradient(180deg, #2c5282 0%, #2a4365 100%);
    color: white;
    font-weight: 600;
    padding: 18px 16px;
    text-align: left;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.table-style-2 td {
    padding: 16px;
    color: #1a202c;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.table-style-2 tr:nth-child(even) {
    background-color: #f8fafc;
}

.table-style-2 tr:hover {
    background-color: #edf2f7;
}

.table-style-2 td:first-child,
.table-style-2 th:first-child {
    padding-left: 24px;
    font-weight: 600;
    color: #2d3748;
    width: 60px;
    text-align: center;
    border-right: 1px solid #e2e8f0;
}

.table-style-2 th:first-child {
    border-right: 1px solid #4a5568;
}

/* 样式3：活力科技风 */
.table-style-3 {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.table-style-3 table {
    font-family: 'Space Grotesk', 'SF Mono', monospace;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-style-3 th {
    background: #2d2d2d;
    color: #00ff9d;
    font-weight: 600;
    padding: 20px 16px;
    text-align: left;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid #333;
}

.table-style-3 td {
    padding: 16px;
    color: #ffffff;
    border-bottom: 1px solid #333;
    font-size: 14px;
}

.table-style-3 tr:hover {
    background-color: #2d2d2d;
}

.table-style-3 td:first-child,
.table-style-3 th:first-child {
    padding-left: 24px;
    font-weight: 500;
    color: #00ff9d;
    width: 60px;
    text-align: center;
    border-right: 1px solid #333;
}

/* 样式4：柔和优雅风 */
.table-style-4 {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(176, 190, 197, 0.2);
    overflow: auto;
    font-family: 'Playfair Display', Georgia, serif;
}

.table-style-4 table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.table-style-4 th {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: #2E7D32;
    font-weight: 600;
    padding: 20px 16px;
    text-align: left;
    font-size: 15px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #A5D6A7;
}

.table-style-4 td {
    padding: 16px;
    color: #37474F;
    border-bottom: 1px solid #E8F5E9;
    font-size: 14px;
    line-height: 1.6;
}

.table-style-4 tr:hover {
    background-color: #F1F8E9;
}

.table-style-4 td:first-child,
.table-style-4 th:first-child {
    padding-left: 24px;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: #558B2F;
    width: 60px;
    text-align: center;
    border-right: 1px solid #E8F5E9;
}

/* 样式5：现代科技感 */
.table-style-5 {
    background: #0A192F;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.table-style-5 table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(180deg, rgba(10, 25, 47, 0.8) 0%, rgba(10, 25, 47, 1) 100%);
}

.table-style-5 th {
    background: rgba(100, 255, 218, 0.1);
    color: #64FFDA;
    font-weight: 600;
    padding: 20px 16px;
    text-align: left;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(100, 255, 218, 0.2);
}

.table-style-5 td {
    padding: 16px;
    color: #CCD6F6;
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
    font-size: 14px;
}

.table-style-5 tr:hover {
    background: rgba(100, 255, 218, 0.05);
}

.table-style-5 td:first-child,
.table-style-5 th:first-child {
    padding-left: 24px;
    color: #64FFDA;
    width: 60px;
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    border-right: 1px solid rgba(100, 255, 218, 0.1);
}

/* 样式6：复古报纸风 */
.table-style-6 {
    background: #F8F3E9;
    border: 3px double #2C1810;
    border-radius: 0;
    overflow: auto;
    font-family: 'Old Standard TT', 'Times New Roman', serif;
}

.table-style-6 table {
    width: 100%;
    border-collapse: collapse;
    background-image: 
        linear-gradient(rgba(248, 243, 233, 0.8) 2px, transparent 2px),
        linear-gradient(90deg, rgba(248, 243, 233, 0.8) 2px, transparent 2px);
    background-size: 50px 50px;
}

.table-style-6 th {
    background: #2C1810;
    color: #F8F3E9;
    font-weight: 700;
    padding: 24px 16px;
    text-align: left;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 3px double #2C1810;
    text-shadow: 1px 1px 0 #000;
}

.table-style-6 td {
    padding: 16px;
    color: #2C1810;
    border: 1px solid rgba(44, 24, 16, 0.2);
    font-size: 15px;
    line-height: 1.6;
}

.table-style-6 tr:nth-child(even) {
    background-color: rgba(44, 24, 16, 0.05);
}

.table-style-6 tr:hover {
    background-color: rgba(44, 24, 16, 0.1);
}

.table-style-6 td:first-child,
.table-style-6 th:first-child {
    padding-left: 24px;
    font-family: 'Playfair Display SC', serif;
    color: #2C1810;
    width: 60px;
    text-align: center;
    border-right: 2px solid rgba(44, 24, 16, 0.3);
    font-weight: 700;
}

.table-style-6 th:first-child {
    color: #F8F3E9;
}

/* 样式7：霓虹紫罗兰 */
.table-style-7 {
    background: #2D1B69;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(149, 0, 255, 0.2);
    overflow: auto;
    font-family: 'Outfit', sans-serif;
    position: relative;
}

.table-style-7::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF00E5, #9500FF, #00E5FF);
    animation: gradient 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.table-style-7 table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(180deg, rgba(45, 27, 105, 0.95) 0%, rgba(45, 27, 105, 1) 100%);
}

.table-style-7 th {
    background: rgba(149, 0, 255, 0.2);
    color: #FF00E5;
    font-weight: 600;
    padding: 20px 16px;
    text-align: left;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 0, 229, 0.3);
    text-shadow: 0 0 10px rgba(255, 0, 229, 0.5);
}

.table-style-7 td {
    padding: 16px;
    color: #E0E0FF;
    border-bottom: 1px solid rgba(149, 0, 255, 0.2);
    font-size: 15px;
}

.table-style-7 tr:hover {
    background: rgba(149, 0, 255, 0.1);
    box-shadow: 0 0 20px rgba(149, 0, 255, 0.1) inset;
}

.table-style-7 td:first-child,
.table-style-7 th:first-child {
    padding-left: 24px;
    color: #00E5FF;
    width: 60px;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    border-right: 1px solid rgba(149, 0, 255, 0.2);
}

/* 样式8：热带日落 */
.table-style-8 {
    background: linear-gradient(135deg, #FF6B6B, #FFE66D);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    overflow: auto;
    font-family: 'Poppins', sans-serif;
    padding: 3px;
}

.table-style-8 table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 14px;
}

.table-style-8 th {
    background: rgba(255, 255, 255, 0.2);
    color: #4A154B;
    font-weight: 700;
    padding: 20px 16px;
    text-align: left;
    font-size: 16px;
    letter-spacing: 0.5px;
    border-bottom: 3px solid rgba(255, 107, 107, 0.5);
}

.table-style-8 td {
    padding: 16px;
    color: #4A154B;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 15px;
    font-weight: 500;
}

.table-style-8 tr:hover {
    background: rgba(255, 255, 255, 0.2);
}

.table-style-8 td:first-child,
.table-style-8 th:first-child {
    padding-left: 24px;
    color: #FF6B6B;
    width: 60px;
    text-align: center;
    font-weight: 800;
    border-right: 2px solid rgba(255, 107, 107, 0.3);
}

/* 样式9：赛博朋克 */
.table-style-9 {
    background: #000000;
    border: 2px solid #00FF00;
    border-radius: 0;
    overflow: auto;
    font-family: 'Orbitron', sans-serif;
    position: relative;
}

.table-style-9::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FF00FF, #00FF00, #00FFFF, #FF00FF);
    background-size: 400% 400%;
    z-index: -1;
    animation: cyberpunkBorder 3s linear infinite;
}

@keyframes cyberpunkBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.table-style-9 table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #000000;
    background-image: 
        linear-gradient(rgba(0, 255, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.table-style-9 th {
    background: #1a1a1a;
    color: #00FF00;
    font-weight: 700;
    padding: 20px 16px;
    text-align: left;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 2px solid #00FF00;
    text-shadow: 0 0 10px #00FF00;
    position: relative;
}

.table-style-9 th::before {
    content: '>';
    position: absolute;
    left: 5px;
    color: #00FF00;
}

.table-style-9 td {
    padding: 16px;
    color: #00FF00;
    border-bottom: 1px solid rgba(0, 255, 0, 0.3);
    font-size: 14px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.table-style-9 tr:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2) inset;
}

.table-style-9 td:first-child,
.table-style-9 th:first-child {
    padding-left: 30px;
    color: #FF00FF;
    width: 60px;
    text-align: center;
    font-weight: 700;
    border-right: 2px solid rgba(255, 0, 255, 0.5);
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* 保存按钮特殊样式 */
.toolbar-btn.save-btn {
    padding: 8px 16px;
    background-image: url('../image/save.svg');
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 16px;
    padding-left: 32px;
}

.toolbar-btn.save-btn i {
    display: none;
}

#prioritymode label{display: inline-block;}

/* 优先级选择下拉列表样式 */
.priority-select {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.825L1.175 4 2.05 3.125 6 7.075 9.95 3.125 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
    min-width: 120px;
    height: 32px;
    line-height: 1;
}

.priority-select:hover {
    border-color: #bdbdbd;
    background-color: #fafafa;
}

.priority-select:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.priority-select option {
    padding: 8px;
    font-size: 14px;
    background-color: #fff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .priority-select {
        min-width: 100px;
        height: 28px;
        font-size: 13px;
        padding: 4px 24px 4px 8px;
    }
}