









.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;
}

.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; }

.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;
}

.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;
}

.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;
}





.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;
}

.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;
}

.range-num {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    min-width: 0;
}



.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}



.btn-primary:hover:not(:disabled) {
    background: #ddd6fe;
}

.btn-download {
    background: #f3f4f6;
    color: #374151;
}

.btn-download:hover:not(:disabled) {
    background: #e5e7eb;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.frame-grid {
    padding: 12px;
    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: pointer;
}

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

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

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

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pick-box {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.pick-box input {
    margin: 0;
    cursor: pointer;
}

.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-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 {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.card-actions {
    display: flex;
    gap: 6px;
}

.btn-mini {
    flex: 1;
    padding: 4px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-mini-download {
    background: #f3f4f6;
    color: #374151;
}

.btn-mini-download:hover:not(:disabled) {
    background: #e5e7eb;
}
@media (max-width: 768px) {
    
}

/* ============ 工具页面通用布局样式 ============ */
.section-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.settings-card, .result-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.setting-item {
    margin-bottom: 15px;
}

.input-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.input-textarea:focus {
    border-color: #8b5cf6;
}

.input-textarea::placeholder {
    color: #9ca3af;
}

/* ============ 工具页面通用按钮样式 ============ */
.btn-group {
    display: flex;
    gap: 12px;
}

.btn-group .btn {
    flex: 1;
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.2);
}

.btn-primary.disabled,
.btn-primary:disabled {
    background: #e8e8e8 !important;
    color: #999 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.btn-secondary {
    padding: 12px 24px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-purple {
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-purple:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.2);
}

/* ============ 工具页面空状态样式 ============ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #9ca3af;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 14px;
    color: #888;
}

/* ============ 工具页面响应式布局 ============ */
@media (max-width: 768px) {
    .section-row {
        grid-template-columns: 1fr;
    }
}
