/* === 阅流风格界面重构 CSS === */
    .yueliu-workspace {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: -10px;
    }
    @media (min-width: 992px) {
        .yueliu-workspace {
            flex-direction: row;
            height: calc(100vh - 110px);
            min-height: 600px;
        }
    }

    /* 左侧：主功能区 */
    .yueliu-main-panel {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
        gap: 15px;
    }

    /* 播放器模块 */
    .yueliu-player-box {
        flex: 1;
        display: flex;
        flex-direction: column;
        background: var(--custom-bg-sidebar);
        border: 1px solid var(--custom-border);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    }
    .yueliu-header {
        padding: 12px 20px;
        border-bottom: 1px solid var(--custom-border);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--custom-bg-sidebar);
    }

    /* 预览容器 - 默认沉浸式纯黑背景，遇到文本时自动切回主色消除黑块 */
    .preview-box {
        position: relative;
        flex: 1;
        width: 100%;
        background: #0e0e12;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 400px;
        overflow: hidden;
    }
    .preview-box:has(.text-display) {
        background: var(--custom-bg-main);
    }

    .preview-media {
        max-width: 100%;
        max-height: 100%;
        cursor: crosshair;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    #markerCanvas { position: absolute; z-index: 100; pointer-events: none; touch-action: none; }

    .text-display {
        background: var(--custom-bg-main);
        color: var(--bs-body-color);
        padding: 30px;
        width: 100%;
        height: 100%;
        min-height: 400px;
        overflow-y: auto;
        font-size: 1.05rem;
        line-height: 1.7;
        white-space: pre-wrap;
        word-wrap: break-word;
        align-self: flex-start;
        text-align: left;
    }

    /* 文本高亮专属样式 */
    .text-highlight-active {
        background-color: rgba(255, 193, 7, 0.4);
        color: var(--bs-danger);
        font-weight: bold;
        border-radius: 4px;
        padding: 2px 4px;
        box-shadow: 0 0 8px rgba(255, 193, 7, 0.6);
        transition: all 0.3s ease;
    }

    /* === Excel 查看器样式 === */
    .excel-viewer-container {
        width: 100%;
        height: 100%;
        min-height: 400px;
        display: flex;
        flex-direction: column;
        background: var(--custom-bg-main);
        overflow: hidden;
    }
    .excel-sheet-tabs {
        display: flex;
        gap: 0;
        padding: 0;
        background: var(--custom-bg-sidebar);
        border-bottom: 2px solid var(--custom-border);
        overflow-x: auto;
        flex-shrink: 0;
    }
    .excel-sheet-tabs::-webkit-scrollbar { height: 3px; }
    .excel-sheet-tabs::-webkit-scrollbar-thumb { background: var(--custom-border); border-radius: 2px; }
    .excel-sheet-tab {
        padding: 8px 18px;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--bs-secondary);
        cursor: pointer;
        border: none;
        background: transparent;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        transition: all 0.2s;
        margin-bottom: -2px;
    }
    .excel-sheet-tab:hover { color: var(--bs-primary); background: var(--custom-item-bg); }
    .excel-sheet-tab.active {
        color: var(--bs-primary);
        border-bottom-color: var(--bs-primary);
        background: var(--custom-bg-main);
    }
    .excel-table-wrapper {
        flex: 1;
        overflow: auto;
        padding: 0;
    }
    .excel-table {
        border-collapse: collapse;
        width: max-content;
        min-width: 100%;
        font-size: 0.85rem;
    }
    .excel-table th, .excel-table td {
        border: 1px solid var(--custom-border);
        padding: 6px 10px;
        text-align: left;
        white-space: nowrap;
        max-width: 300px;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: crosshair;
        transition: background-color 0.15s;
        user-select: none;
        -webkit-user-select: none;
        position: relative;
    }
    .excel-table th {
        background: var(--custom-item-bg);
        font-weight: 700;
        color: var(--bs-body-color);
        position: sticky;
        top: 0;
        z-index: 2;
        cursor: col-resize;
    }
    .excel-table th:hover { background: rgba(var(--bs-primary-rgb), 0.15); }
    /* 列宽调整手柄 */
    .excel-table th::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: transparent;
        cursor: col-resize;
        transition: background 0.2s;
    }
    .excel-table th:hover::after { background: var(--bs-primary); }
    .excel-table th.resizing::after { background: var(--bs-warning); }
    .excel-table td:hover { background: rgba(var(--bs-primary-rgb), 0.12); }
    .excel-table td.excel-cell-selected {
        background: rgba(255, 193, 7, 0.35) !important;
        outline: 2px solid var(--bs-warning);
        outline-offset: -2px;
    }
    .excel-table td.excel-cell-highlight {
        background: rgba(255, 193, 7, 0.55) !important;
        outline: 3px solid var(--bs-danger);
        outline-offset: -2px;
        font-weight: bold;
        box-shadow: 0 0 12px rgba(255, 193, 7, 0.6);
        transition: all 0.3s ease;
    }
    /* 单元格展开状态（往下展开，增加高度） */
    .excel-table td.excel-cell-expanded {
        max-width: 600px !important;  /* 限制最大宽度，让内容往下换行 */
        min-width: 200px !important;  /* 最小宽度 */
        white-space: pre-wrap !important;  /* 保留空格和换行 */
        word-wrap: break-word !important;  /* 强制换行 */
        word-break: break-word !important;  /* 在单词边界换行 */
        overflow: visible !important;  /* 显示完整内容 */
        background: rgba(var(--bs-info-rgb), 0.15) !important;
        outline: 2px solid var(--bs-info);
        outline-offset: -2px;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    .excel-row-num {
        background: var(--custom-item-bg) !important;
        font-weight: 700;
        color: var(--bs-secondary);
        text-align: center !important;
        min-width: 40px;
        cursor: row-resize !important;
        position: sticky;
        left: 0;
        z-index: 1;
    }
    .excel-row-num:hover { background: rgba(var(--bs-primary-rgb), 0.15) !important; }
    /* 行高调整手柄 */
    .excel-row-num::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 3px;
        background: transparent;
        cursor: row-resize;
        transition: background 0.2s;
    }
    .excel-row-num:hover::after { background: var(--bs-primary); }
    .excel-row-num.resizing::after { background: var(--bs-warning); }
    .excel-table th:first-child {
        position: sticky;
        left: 0;
        z-index: 3;
        min-width: 40px;
        text-align: center;
    }
    /* === 底部素材预览 */
    .yueliu-materials-panel {
        background: var(--custom-bg-sidebar);
        border: 1px solid var(--custom-border);
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    }
    .horizontal-scroll-container::-webkit-scrollbar { height: 8px; }
    .horizontal-scroll-container::-webkit-scrollbar-thumb { background-color: #495057; border-radius: 4px; }
    .horizontal-scroll-container { scrollbar-width: thin; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 12px; padding-bottom: 5px; }

    .material-card {
        width: 220px;
        flex-shrink: 0;
        border-radius: 8px;
        border: 1px solid var(--custom-border);
        background: var(--custom-bg-main);
        transition: all 0.2s;
    }
    .material-card.active { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), 0.1); }

    .sidebar-thumbnail { width: 42px; height: 42px; background: var(--custom-item-bg); border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .sidebar-thumbnail img, .sidebar-thumbnail video { width: 100%; height: 100%; object-fit: cover; }

    /* 修复图标在浅色模式下的颜色 */
    .sidebar-thumbnail .doc-icon { font-size: 1.5rem; color: var(--bs-secondary-color); opacity: 0.8; }

    /* 右侧：操作与评论区 */
    .yueliu-side-panel {
        display: flex;
        flex-direction: column;
        background: var(--custom-bg-sidebar);
        border: 1px solid var(--custom-border);
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.03);
        overflow: hidden;
    }
    @media (min-width: 992px) {
        .yueliu-side-panel { width: 380px; flex-shrink: 0; height: 100%; }
    }

    .side-header-tabs { display: flex; border-bottom: 1px solid var(--custom-border); background: var(--custom-bg-sidebar); }
    .side-tab { flex: 1; text-align: center; padding: 12px 0; font-size: 0.9rem; font-weight: bold; color: var(--bs-primary); border-bottom: 2px solid var(--bs-primary); }

    .comments-scroll-area { flex: 1; overflow-y: auto; padding: 15px; background: var(--custom-bg-main); }
    .comment-bubble { background: var(--custom-bg-sidebar); border: 1px solid var(--custom-border); border-radius: 10px; padding: 12px; margin-bottom: 15px; position: relative; overflow: hidden; }
    .comment-bubble::before { content: ''; position: absolute; top: 0; left: -1px; width: 4px; height: 100%; background: var(--bs-info); border-radius: 10px 0 0 10px; }
    .marker-btn { max-width: 100%; display: inline-flex; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: break-all; }

    .comment-action-area { padding: 15px; background: var(--custom-bg-sidebar); border-top: 1px solid var(--custom-border); }
    .resubmit-panel { padding: 15px; border-bottom: 1px solid var(--custom-border); background: rgba(var(--bs-danger-rgb), 0.05); }