/* ============ 预览卡片 ============ */
.preview-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.header-count {
    font-size: 12px;
    font-weight: 500;
    color: #8b5cf6;
}

.card-header-center {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

.card-header-center .header-count {
    margin: 0 4px;
}

.drag-hint {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
}

.preview-area {
    padding: 15px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-area-clickable {
    cursor: pointer;
}

/* ============ 上传占位 ============ */
.upload-placeholder {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 40px;
    border: 3px dashed #d1d5db;
    border-radius: 16px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-placeholder:hover,
.upload-placeholder.drag-over {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.upload-icon { font-size: 48px; }
.upload-text { font-size: 17px; font-weight: 600; color: #374151; }
.upload-hint { font-size: 13px; color: #9ca3af; }

/* ============ 左侧上传卡片 ============ */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.upload-area .upload-icon { font-size: 26px; margin-bottom: 6px; }
.upload-area .upload-text { font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 4px; }
.upload-area .upload-hint { font-size: 11px; color: #9ca3af; }

/* ============ 实时预览 ============ */
.live-preview {
    width: 100%;
    cursor: pointer;
    max-width: 540px;
    background: repeating-conic-gradient(#e5e7eb 0% 25%, transparent 0% 50%) 50% / 16px 16px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.live-preview canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.header-duration {
    color: #9ca3af;
}

/* ============ 进度条 ============ */
.progress-wrap {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #f3f4f6;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c4b5fd, #8b5cf6);
    border-radius: 5px;
    transition: width 0.25s ease;
}

.progress-text {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #6d28d9;
}

/* ============ 设置控件 ============ */
.setting-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.mode-selector {
    display: flex;
    gap: 6px;
}

.mode-btn {
    flex: 1;
    padding: 8px 6px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
}

.mode-btn:hover { border-color: #c4b5fd; }

.mode-btn.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #6d28d9;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.checkbox-row input { margin: 0; }

.checkbox-row span {
    font-size: 13px;
    color: #374151;
}

.range-with-value {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-slider {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #8b5cf6;
    border-radius: 50%;
    cursor: pointer;
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #8b5cf6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    font-size: 13px;
    font-weight: 600;
    color: #6d28d9;
    min-width: 42px;
    text-align: right;
}

/* ============ 图片/帧网格 ============ */
.frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.frame-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s;
    cursor: grab;
}

.frame-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.12);
}

.frame-card.dragging {
    opacity: 0.5;
}

.frame-card.drag-over {
    border-color: #8b5cf6;
    transform: scale(1.02);
}

.frame-card.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.frame-card.active .card-index {
    background: #ddd6fe;
}

.card-header-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 6px;
}

.card-header-row .card-index {
    justify-self: start;
}

.card-header-row .frame-time {
    justify-self: center;
}

.card-header-row .card-del-btn {
    justify-self: end;
}

.card-index {
    font-size: 10px;
    font-weight: 600;
    color: #8b5cf6;
    background: #f5f3ff;
    padding: 1px 6px;
    border-radius: 8px;
}

.frame-time {
    font-size: 10px;
    font-weight: 500;
    color: #065f46;
    background: #d1fae5;
    padding: 1px 6px;
    border-radius: 8px;
}

.card-del-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.card-del-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.card-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: repeating-conic-gradient(#ccc 0% 25%, transparent 0% 50%) 50% / 10px 10px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-preview img,
.card-preview canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.card-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-name {
    flex: 1;
    min-width: 0;
    font-size: 10px;
    font-weight: 500;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    flex-shrink: 0;
    font-size: 10px;
    color: #9ca3af;
    white-space: nowrap;
}

.card-settings {
    padding-top: 3px;
    border-top: 1px solid #f3f4f6;
}

.card-setting-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-setting-item label {
    font-size: 10px;
    color: #6b7280;
    white-space: nowrap;
}

.card-setting-item input {
    flex: 1;
    padding: 3px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 10px;
    min-width: 0;
}

.card-setting-item input:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.follow-global-row {
    padding-top: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.follow-status {
    flex: 1 1 0;
    padding: 2px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    color: #6b7280;
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all 0.15s ease;
}

.follow-status:hover {
    border-color: #c4b5fd;
    color: #7c3aed;
}

.follow-status.active {
    border-color: #8b5cf6;
    background: #8b5cf6;
    color: #fff;
}

.delay-ind-btn {
    flex: 1 1 0;
    padding: 2px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    color: #6b7280;
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.delay-ind-btn:hover {
    border-color: #c4b5fd;
    color: #7c3aed;
}

.delay-ind-btn.active {
    border-color: #8b5cf6;
    background: #8b5cf6;
    color: #fff;
}

/* ============ 缩放工具特有样式 ============ */
.range-input {
    width: 90px;
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
}

.card-target {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: #059669;
}

.card-target .arrow {
    color: #9ca3af;
}

.card-target .badge {
    background: #d1fae5;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
}

.card-target .scale-badge {
    margin-left: auto;
    background: #ede9fe;
    color: #6d28d9;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
}

.result-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 0;
}

.player-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

.player-label {
    font-size: 12px;
    font-weight: 600;
    color: #6d28d9;
    min-width: 90px;
}

.player-slider {
    flex: 1;
}

.player-delay {
    font-size: 11px;
    color: #6b7280;
    min-width: 50px;
    text-align: right;
}

@media (max-width: 768px) {

}


