/* ==================== 合集管理页面 ==================== */
.cm-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 60px);
}

.cm-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--ls-text-muted, #909090);
}
.cm-error i { font-size: 48px; margin-bottom: 16px; }
.cm-error p { font-size: 15px; margin-bottom: 20px; }
.cm-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 8px;
    background: var(--ls-primary, #1890ff);
    color: #fff;
    font-size: 14px;
    text-decoration: none;
}

/* 头部 */
.cm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.cm-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--ls-text, #1f1f1f);
    font-size: 20px;
    transition: background .2s;
}
.cm-back:hover { background: var(--ls-bg, #f5f6f7); }
.cm-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ls-text, #1f1f1f);
    margin: 0;
}

/* 合集信息卡片 */
.cm-info-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    background: var(--ls-card-bg, #fff);
    border: 1px solid var(--ls-border, #eee);
    margin-bottom: 16px;
}
.cm-info-cover {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ls-bg, #f5f6f7);
}
.cm-info-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cm-cover-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ls-text-muted, #909090);
    font-size: 32px;
}
.cm-info-body {
    flex: 1;
    min-width: 0;
}
.cm-info-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ls-text, #1f1f1f);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cm-info-desc {
    font-size: 13px;
    color: var(--ls-text-secondary, #666);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cm-info-desc.cm-empty { color: var(--ls-text-muted, #bbb); font-style: italic; }
.cm-info-meta {
    font-size: 12px;
    color: var(--ls-text-muted, #909090);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cm-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--ls-text-muted, #ccc);
}
.cm-info-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

/* 按钮 */
.cm-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid var(--ls-border, #ddd);
    background: var(--ls-card-bg, #fff);
    color: var(--ls-text, #1f1f1f);
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.cm-btn:hover { background: var(--ls-bg, #f5f6f7); }
.cm-btn i { font-size: 15px; }
.cm-btn-primary {
    background: var(--ls-primary, #1890ff);
    color: #fff;
    border-color: var(--ls-primary, #1890ff);
}
.cm-btn-primary:hover { opacity: .9; background: var(--ls-primary, #1890ff); }
.cm-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.cm-btn-danger { color: #ff4d4f; border-color: #ffccc7; }
.cm-btn-danger:hover { background: #fff1f0; }
.cm-btn-sm { padding: 4px 10px; font-size: 12px; }
.cm-btn-disabled { opacity: .5; pointer-events: none; }

/* 工具栏 */
.cm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 8px;
}
.cm-toolbar-left { font-size: 14px; color: var(--ls-text-secondary, #666); }
.cm-toolbar-left em { font-style: normal; font-weight: 600; }
.cm-toolbar-right { display: flex; align-items: center; gap: 10px; }
.cm-sort-mode {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--ls-text-secondary, #666);
    cursor: pointer;
    transition: background .2s;
}
.cm-sort-mode:hover { background: var(--ls-bg, #f5f6f7); }
.cm-sort-mode i { font-size: 16px; }

/* 视频列表 */
.cm-video-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cm-video-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--ls-card-bg, #fff);
    transition: background .2s;
}
.cm-video-item:hover { background: var(--ls-bg, #f8f9fa); }
.cm-item-sort {
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}
.cm-sort-num {
    font-size: 14px;
    font-weight: 600;
    color: var(--ls-text-muted, #909090);
}
.cm-item-cover {
    flex-shrink: 0;
    width: 96px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: #000;
}
.cm-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cm-item-dur {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgb(0 0 0 / 70%);
    color: #fff;
    font-size: 11px;
}
.cm-item-body {
    flex: 1;
    min-width: 0;
}
.cm-item-title {
    font-size: 14px;
    color: var(--ls-text, #1f1f1f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.cm-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--ls-text-muted, #909090);
}
.cm-item-meta i { font-size: 13px; margin-right: 2px; }
.cm-item-status {
    padding: 1px 6px;
    border-radius: 3px;
    background: #fff7e6;
    color: #fa8c16;
    font-size: 11px;
}
.cm-item-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity .2s;
}
.cm-video-item:hover .cm-item-actions { opacity: 1; }
.cm-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: var(--ls-text-muted, #909090);
    cursor: pointer;
    transition: all .2s;
    font-size: 18px;
}
.cm-item-btn:hover { background: var(--ls-bg, #f0f0f0); color: var(--ls-text, #1f1f1f); }
.cm-item-remove:hover { color: #ff4d4f; background: #fff1f0; }

/* 空状态 */
.cm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--ls-text-muted, #bbb);
}
.cm-empty i { font-size: 40px; margin-bottom: 12px; }
.cm-empty span { font-size: 14px; }

/* ==================== 合集列表页 ==================== */
.cl-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cl-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: var(--ls-card-bg, #fff);
    border: 1px solid var(--ls-border, #eee);
    cursor: pointer;
    transition: all .2s;
}
.cl-item:hover {
    border-color: var(--ls-primary, #1890ff);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.cl-item-cover {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ls-bg, #f5f6f7);
}
.cl-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cl-item-body {
    flex: 1;
    min-width: 0;
}
.cl-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ls-text, #1f1f1f);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cl-item-desc {
    font-size: 13px;
    color: var(--ls-text-secondary, #666);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cl-item-meta {
    font-size: 12px;
    color: var(--ls-text-muted, #909090);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cl-item-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==================== 合集表单弹窗 ==================== */
.cf-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 封面上传 */
.cf-cover-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.cf-cover-preview {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--ls-bg, #f5f6f7);
    border: 2px dashed var(--ls-border, #ddd);
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cf-cover-preview:hover {
    border-color: var(--ls-primary, #1890ff);
    background: var(--ls-bg-hover, #eef6ff);
}
.cf-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.cf-cover-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--ls-text-muted, #bbb);
}
.cf-cover-empty i {
    font-size: 32px;
}
.cf-cover-empty span {
    font-size: 12px;
}
.cf-cover-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--ls-primary, #1890ff);
}
.cf-cover-loading i { font-size: 24px; }
.cf-cover-loading span { font-size: 12px; }
.cf-cover-hint {
    font-size: 12px;
    color: var(--ls-text-muted, #999);
}
.cf-cover-remove-link {
    color: #ff4d4f;
    text-decoration: none;
    font-size: 12px;
}
.cf-cover-remove-link:hover { text-decoration: underline; }

/* 旋转动画 */
@keyframes cf-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.cf-spin { animation: cf-spin 1s linear infinite; }

/* 表单字段 */
.cf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cf-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ls-text, #1f1f1f);
}
.cf-label em {
    color: #ff4d4f;
    font-style: normal;
}
.cf-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--ls-border, #ddd);
    border-radius: 8px;
    font-size: 14px;
    color: var(--ls-text, #1f1f1f);
    background: var(--ls-card-bg, #fff);
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}
.cf-input:focus {
    border-color: var(--ls-primary, #1890ff);
}
.cf-input::placeholder {
    color: var(--ls-text-muted, #bbb);
}
.cf-textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.5;
}

/* 底部按钮 */
.cf-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ==================== 添加视频弹窗（勾选模式） ==================== */
.cav-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 60px 20px;
    color: var(--ls-text-muted, #999);
    font-size: 14px;
}

.cav-list {
    display: flex;
    flex-direction: column;
    max-height: 460px;
    overflow-y: auto;
    padding: 4px 0;
}
.cav-list::-webkit-scrollbar { width: 4px; }
.cav-list::-webkit-scrollbar-track { background: none; }
.cav-list::-webkit-scrollbar-thumb { background: var(--ls-border, #ddd); border-radius: 4px; }

.cav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    user-select: none;
}
.cav-item:hover { background: var(--ls-bg, #f5f6f7); }
.cav-item.cav-selected { background: var(--ls-bg-hover, #eef6ff); }
.cav-item.cav-in-collection {
    opacity: .5;
    cursor: default;
}

/* 勾选框 */
.cav-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.cav-uncheck { color: var(--ls-border, #ccc); }
.cav-checked, .cav-checked-icon { color: var(--ls-primary, #1890ff); }

/* 封面 */
.cav-cover {
    flex-shrink: 0;
    width: 96px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: #000;
}
.cav-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cav-dur {
    position: absolute;
    bottom: 3px;
    right: 3px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgb(0 0 0 / 70%);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
}

/* 内容 */
.cav-body {
    flex: 1;
    min-width: 0;
}
.cav-title {
    font-size: 13px;
    color: var(--ls-text, #1f1f1f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    line-height: 20px;
}
.cav-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--ls-text-muted, #909090);
}
.cav-meta i { font-size: 12px; margin-right: 2px; }

/* 已在合集标签 */
.cav-tag {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--ls-bg, #f0f0f0);
    color: var(--ls-text-muted, #999);
    font-size: 11px;
}

/* 加载更多 */
.cav-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: var(--ls-primary, #1890ff);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
    border-radius: 6px;
}
.cav-load-more:hover { background: var(--ls-bg, #f5f6f7); }
