/* ========================================
   长片工业化生产 (Film Production Pipeline)
   暗色电影主题 — 深蓝灰底 + 琥珀 accent
   ======================================== */

.fp-section {
    --fp-bg: #0a0e14;
    --fp-surface: rgba(14, 20, 28, 0.94);
    --fp-card: rgba(18, 24, 34, 0.85);
    --fp-accent: #f0b35d;
    --fp-accent-2: #5dc3f0;
    --fp-text: #e8ecef;
    --fp-muted: #8a929f;
    --fp-border: rgba(220, 225, 235, 0.08);
    --fp-radius: 16px;
    color: var(--fp-text);
}

/* ---- Hero ---- */
.fp-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 28px 32px;
    border-radius: var(--fp-radius);
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
}

.fp-hero-copy { flex: 1; min-width: 280px; }

.fp-hero-kicker {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(240, 179, 93, 0.12);
    color: var(--fp-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.fp-hero-copy h2 {
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
}

.fp-hero-copy p {
    font-size: 14px;
    color: var(--fp-muted);
    line-height: 1.6;
    margin: 0;
}

.fp-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* ---- Step Bar (4 columns) ---- */
.fp-stepbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-bottom: 24px;
    border-radius: var(--fp-radius);
    overflow: hidden;
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
}

.fp-step-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fp-muted);
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, color 0.2s;
    text-align: center;
}

.fp-step-item i {
    font-size: 14px;
}

.fp-step-item:hover {
    color: var(--fp-accent);
}

.fp-step-item.active {
    background: rgba(240, 179, 93, 0.15);
    color: var(--fp-accent);
}

.fp-step-item.done {
    color: var(--fp-text);
    background: rgba(20, 30, 40, 0.5);
}

.fp-step-item.done::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
    margin-left: 2px;
    color: var(--fp-accent);
}

/* ---- Stage panels ---- */
.fp-stage {
    display: none;
    animation: fadeIn 0.25s ease;
}

.fp-stage.active { display: block; }

.fp-stage-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(240, 179, 93, 0.1);
    color: var(--fp-accent);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 18px;
}

.fp-stage-note {
    margin: -6px 0 16px;
    color: var(--fp-muted);
    font-size: 13px;
    line-height: 1.7;
}

/* ---- Cards ---- */
.fp-card {
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 22px;
    margin-bottom: 16px;
}

.fp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.fp-card-head h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.fp-card-head span.kicker {
    font-size: 11px;
    color: var(--fp-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Stage 1: Novel Input ---- */
.fp-novel-input {
    width: 100%;
    min-height: 240px;
    padding: 16px;
    background: rgba(10, 14, 20, 0.8);
    border: 1px solid var(--fp-border);
    border-radius: 12px;
    color: var(--fp-text);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.fp-novel-input:focus {
    border-color: var(--fp-accent);
    box-shadow: 0 0 0 3px rgba(240, 179, 93, 0.1);
}

.fp-novel-input::placeholder {
    color: var(--fp-muted);
    opacity: 0.6;
}

/* ---- Asset result cards ---- */
.fp-asset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 18px;
    align-items: start;
}

.fp-asset-card {
    background: rgba(10, 14, 20, 0.5);
    border: 1px solid var(--fp-border);
    border-radius: 12px;
    overflow: hidden;
}

.fp-asset-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 14px;
    color: var(--fp-text);
    transition: background 0.2s;
}

.fp-asset-card-head:hover { background: rgba(240, 179, 93, 0.06); }

.fp-asset-card-head i {
    font-size: 12px;
    color: var(--fp-muted);
    transition: transform 0.2s;
}

.fp-asset-card.open .fp-asset-card-head i {
    transform: rotate(180deg);
    color: var(--fp-accent);
}

.fp-asset-card-body {
    display: none;
    padding: 0 16px 14px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--fp-muted);
    max-height: 320px;
    overflow-y: auto;
}

.fp-asset-card.open .fp-asset-card-body { display: block; }

.fp-asset-stats {
    display: flex;
    gap: 18px;
    margin-top: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--fp-muted);
    align-items: center;
    flex-wrap: wrap;
}

.fp-next-step {
    margin-left: auto;
    padding: 0 22px;
    min-height: 40px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(240, 179, 93, 0.25);
    transition: all 0.2s ease;
}

/* 生图按钮 — 青蓝色，与金色操作按钮区分 */
.fp-btn-img {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    color: #0a1620;
    background: linear-gradient(135deg, #5dc3f0, #38b2f0);
    box-shadow: 0 2px 16px rgba(93, 195, 240, 0.3);
    transition: all 0.2s ease;
}

.fp-btn-img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(93, 195, 240, 0.45);
    background: linear-gradient(135deg, #72d0f8, #4cc0f8);
}

.fp-btn-img:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.fp-next-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(240, 179, 93, 0.35);
}

.fp-asset-stats strong {
    color: var(--fp-accent);
    font-size: 18px;
    margin-right: 2px;
}

/* ---- Stage 2: Plan Table ---- */
.fp-plan-scroll {
    overflow-x: auto;
    max-height: 60vh;
    border-radius: 12px;
    border: 1px solid var(--fp-border);
}

.fp-plan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 900px;
}

.fp-plan-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(20, 28, 38, 0.96);
    padding: 12px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    color: var(--fp-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border-bottom: 1px solid rgba(240, 179, 93, 0.2);
}

.fp-plan-table td {
    padding: 10px;
    border-bottom: 1px solid var(--fp-border);
    color: var(--fp-text);
    vertical-align: top;
    line-height: 1.5;
    white-space: nowrap;
}

.fp-plan-table td:nth-child(4) {  /* core event column */
    white-space: normal;
    min-width: 160px;
}

.fp-plan-table tbody tr:hover {
    background: rgba(240, 179, 93, 0.04);
}

.fp-plan-table .clip-active {
    background: rgba(240, 179, 93, 0.08);
}

/* ---- Stage 3: Master Image ---- */
.fp-master-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.fp-prompt-box {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: rgba(10, 14, 20, 0.7);
    border: 1px solid var(--fp-border);
    border-radius: 12px;
    padding: 16px;
    font-family: "Cascadia Code", "Fira Code", "JetBrains Mono", monospace;
    font-size: 12px;
    line-height: 1.7;
    color: var(--fp-muted);
    max-height: 50vh;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.fp-preview-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    border: 2px dashed var(--fp-border);
    border-radius: 12px;
    background: rgba(10, 14, 20, 0.3);
    color: var(--fp-muted);
    gap: 8px;
    overflow: hidden;
    position: relative;
}

.fp-preview-zone img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.fp-preview-zone.has-image {
    border-style: solid;
    border-color: rgba(240, 179, 93, 0.25);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fp-preview-zone.has-image:hover {
    border-color: var(--fp-accent);
    box-shadow: 0 0 20px rgba(240, 179, 93, 0.15);
}

.fp-preview-zone.has-image:hover::after {
    content: "🔍 点击放大";
    position: absolute;
    bottom: 10px;
    right: 12px;
    padding: 5px 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    border-radius: 6px;
    pointer-events: none;
}

.fp-preview-download {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.fp-preview-zone.has-image:hover .fp-preview-download { display: flex; }

.fp-preview-download:hover { background: rgba(240, 179, 93, 0.8); }

/* ---- Preview Loading Spinner ---- */
.fp-preview-loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 20, 0.7);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 3;
    border-radius: 12px;
}

.fp-preview-zone.loading .fp-preview-loading {
    display: flex;
}

.fp-preview-zone.loading {
    pointer-events: none;
    border-color: rgba(240, 179, 93, 0.3);
    border-style: solid;
}

.fp-preview-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(240, 179, 93, 0.15);
    border-top-color: var(--fp-accent);
    border-radius: 50%;
    animation: fpSpin 0.8s linear infinite;
}

.fp-preview-loading-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--fp-accent);
}

/* ---- Stage 4: Clip Navigator ---- */
.fp-clip-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.fp-clip-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--fp-border);
    background: var(--fp-card);
    color: var(--fp-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.fp-clip-nav-btn:hover:not(:disabled) {
    background: rgba(240, 179, 93, 0.08);
    border-color: var(--fp-accent);
}

.fp-clip-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.fp-clip-select {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--fp-border);
    background: var(--fp-card);
    color: var(--fp-text);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    min-width: 180px;
}

.fp-clip-select:focus {
    border-color: var(--fp-accent);
}

.fp-clip-info {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 12px;
    color: var(--fp-muted);
    margin-left: auto;
}

.fp-clip-info strong {
    color: var(--fp-accent);
}

/* ---- Stage 4: Dual Panel ---- */
.fp-dual-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.fp-dual-panel .fp-preview-zone {
    min-height: 200px;
    margin-top: 12px;
}

/* ---- Progress bar ---- */
.fp-progress-wrap {
    margin-top: 16px;
}

.fp-progress-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(240, 179, 93, 0.1);
    overflow: hidden;
    margin-bottom: 8px;
}

.fp-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--fp-accent), #f5c87a);
    transition: width 0.3s ease;
}

.fp-progress-text {
    font-size: 12px;
    color: var(--fp-muted);
    text-align: center;
}

/* ---- Buttons ---- */
.fp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.fp-btn-primary {
    background: linear-gradient(135deg, var(--fp-accent), #e8a44a);
    color: #0d1114;
    border-color: rgba(240, 179, 93, 0.4);
    font-weight: 700;
}

.fp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(240, 179, 93, 0.25);
}

.fp-btn-secondary {
    background: var(--fp-card);
    color: var(--fp-text);
    border-color: var(--fp-border);
}

.fp-btn-secondary:hover {
    background: rgba(240, 179, 93, 0.08);
    border-color: var(--fp-accent);
}

.fp-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- Streaming Console ---- */
.fp-stream-panel {
    margin-bottom: 18px;
    border: 1px solid rgba(100, 200, 120, 0.2);
    border-radius: 12px;
    overflow: hidden;
    background: #0a1110;
    animation: fpStreamIn 0.3s ease;
}

@keyframes fpStreamIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fp-stream-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(100, 200, 120, 0.08);
    border-bottom: 1px solid rgba(100, 200, 120, 0.12);
    font-size: 12px;
    font-weight: 700;
    color: #8cc9a0;
}

.fp-stream-head i {
    margin-right: 6px;
    font-size: 13px;
}

.fp-stream-status {
    font-size: 11px;
    color: #5a9470;
    font-weight: 500;
}

.fp-stream-status.done { color: #4ade80; }
.fp-stream-status.error { color: #f87171; }

.fp-stream-body {
    margin: 0;
    padding: 14px 16px;
    font-family: "Cascadia Code", "Fira Code", "JetBrains Mono", "Consolas", monospace;
    font-size: 12px;
    line-height: 1.75;
    color: #b8d8c8;
    max-height: 360px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    tab-size: 2;
}

.fp-stream-body::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #4ade80;
    animation: fpCursor 0.8s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 1px;
}

.fp-stream-body.done::after { display: none; }

@keyframes fpCursor {
    50% { opacity: 0; }
}

.fp-stream-body .fp-stream-dim { color: #5a7a6a; }
.fp-stream-body .fp-stream-highlight { color: #f0b35d; font-weight: 700; }

/* ---- Utility ---- */
.fp-empty {
    padding: 32px;
    text-align: center;
    color: var(--fp-muted);
    font-size: 14px;
    border: 1px dashed var(--fp-border);
    border-radius: 12px;
}

.fp-loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--fp-border);
    border-top-color: var(--fp-accent);
    border-radius: 50%;
    animation: fpSpin 0.7s linear infinite;
    margin-right: 6px;
}

/* ---- File upload ---- */
.fp-file-name {
    font-size: 12px;
    color: var(--fp-muted);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fp-file-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.fp-file-clear:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* ---- Stage 1 Action Bar ---- */
.fp-stage1-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
    align-items: start;
}

.fp-stage1-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.fp-btn-block {
    width: 100%;
    justify-content: center;
}

.fp-step-num {
    font-weight: 800;
    font-size: 13px;
    opacity: 0.75;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.fp-file-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
}

.fp-stage1-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fp-muted);
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
}

.fp-stage1-status.loading {
    color: var(--fp-accent);
    border-color: rgba(240, 179, 93, 0.3);
    background: radial-gradient(ellipse at center, rgba(240, 179, 93, 0.1) 0%, rgba(240, 179, 93, 0.02) 70%);
    box-shadow: 0 0 24px rgba(240, 179, 93, 0.12), inset 0 0 24px rgba(240, 179, 93, 0.04);
    animation: fpS1Glow 1.8s ease-in-out infinite;
    overflow: hidden;
    position: relative;
}

.fp-stage1-status.loading::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(240, 179, 93, 0.06), transparent, rgba(240, 179, 93, 0.04), transparent);
    animation: fpS1Orbit 3s linear infinite;
}

@keyframes fpS1Orbit {
    to { transform: rotate(360deg); }
}

@keyframes fpS1Glow {
    0%, 100% { box-shadow: 0 0 24px rgba(240, 179, 93, 0.12); border-color: rgba(240, 179, 93, 0.3); }
    50% { box-shadow: 0 0 44px rgba(240, 179, 93, 0.25), 0 0 80px rgba(240, 179, 93, 0.08); border-color: rgba(240, 179, 93, 0.55); }
}

.fp-stage1-status.success {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.06);
}

.fp-stage1-status.error {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(248, 113, 113, 0.06);
}

.fp-stage1-status i { font-size: 16px; }

.fp-s1-loader {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.fp-s1-rings {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.fp-s1-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
}

.fp-s1-ring:nth-child(1) {
    border-top-color: var(--fp-accent);
    animation: fpSpin 0.8s linear infinite;
}

.fp-s1-ring:nth-child(2) {
    inset: 4px;
    border-right-color: rgba(240, 179, 93, 0.6);
    animation: fpSpin 0.6s linear infinite reverse;
}

.fp-s1-ring:nth-child(3) {
    inset: 8px;
    border-bottom-color: rgba(240, 179, 93, 0.35);
    animation: fpSpin 1s linear infinite;
}

.fp-s1-text {
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--fp-accent), #fad48b, var(--fp-accent));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fpS1Shimmer 1.6s ease-in-out infinite;
    letter-spacing: 0.04em;
}

@keyframes fpS1Shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: 0 0; }
}

@keyframes fpSpin { to { transform: rotate(360deg); } }

/* ---- Status Banner ---- */
.fp-status-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: rgba(14, 20, 28, 0.95);
    border: 1px solid var(--fp-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--fp-muted);
    transition: all 0.3s ease;
}

.fp-status-banner.loading {
    border-color: rgba(240, 179, 93, 0.35);
    background: linear-gradient(135deg, rgba(240, 179, 93, 0.08), rgba(240, 179, 93, 0.03));
    color: var(--fp-accent);
    box-shadow: 0 0 24px rgba(240, 179, 93, 0.08);
    animation: fpStatusPulse 2s ease-in-out infinite;
}

.fp-status-banner.success {
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.06);
    color: #4ade80;
}

.fp-status-banner.error {
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(248, 113, 113, 0.06);
    color: #f87171;
}

@keyframes fpStatusPulse {
    0%, 100% { box-shadow: 0 0 24px rgba(240, 179, 93, 0.08); }
    50% { box-shadow: 0 0 40px rgba(240, 179, 93, 0.18); }
}

.fp-status-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(240, 179, 93, 0.2);
    border-top-color: var(--fp-accent);
    border-radius: 50%;
    animation: fpSpin 0.8s linear infinite;
    flex-shrink: 0;
}

.fp-status-banner.success .fp-status-spinner { display: none; }
.fp-status-banner.error .fp-status-spinner { display: none; }

.fp-status-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.fp-status-banner.loading .fp-status-icon { color: var(--fp-accent); }
.fp-status-banner.success .fp-status-icon { color: #4ade80; }
.fp-status-banner.error .fp-status-icon { color: #f87171; }

/* ---- Button Loading State ---- */
.fp-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

.fp-btn.loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: fpSpin 0.7s linear infinite;
    vertical-align: middle;
}

/* ---- Clip Table ---- */
.fp-clip-table-wrap {
    overflow-x: auto;
    max-height: 420px;
    overflow-y: auto;
}

.fp-clip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.fp-clip-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(20, 28, 38, 0.96);
    padding: 10px 8px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    color: var(--fp-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border-bottom: 1px solid rgba(240, 179, 93, 0.2);
}

.fp-clip-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--fp-text);
    vertical-align: middle;
    white-space: nowrap;
}

.fp-clip-table td:nth-child(3) {
    white-space: normal;
    min-width: 140px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fp-clip-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.fp-clip-table tbody tr:hover { background: rgba(240, 179, 93, 0.06); }
.fp-clip-table tbody tr.active { background: rgba(240, 179, 93, 0.12); }

.fp-clip-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fp-clip-status.done { background: #4ade80; }
.fp-clip-status.pending { background: rgba(255,255,255,0.15); }
.fp-clip-status.loading {
    background: transparent;
    border: 2px solid var(--fp-accent);
    border-top-color: transparent;
    animation: fpSpin 0.8s linear infinite;
}

.fp-clip-action {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--fp-text);
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.fp-clip-action:hover { background: rgba(240, 179, 93, 0.12); }

.fp-gen-mode {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--fp-border);
    background: var(--fp-card);
    color: var(--fp-text);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.fp-gen-mode:focus { border-color: var(--fp-accent); }

/* ---- Progress Bar Enhancements ---- */
.fp-progress-wrap {
    margin: 18px 0;
    padding: 16px 20px;
    background: rgba(14, 20, 28, 0.8);
    border-radius: 14px;
    border: 1px solid var(--fp-border);
}

.fp-progress-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(240, 179, 93, 0.08);
    overflow: hidden;
    margin-bottom: 10px;
}

.fp-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--fp-accent), #f5c87a, #fad48b);
    background-size: 200% 100%;
    animation: fpProgressShine 1.5s ease-in-out infinite;
    transition: width 0.5s ease;
}

@keyframes fpProgressShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.fp-progress-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--fp-accent);
    text-align: center;
}

/* ---- Streaming Console Enhancements ---- */
.fp-stream-panel {
    margin-bottom: 18px;
    border: 1px solid rgba(100, 200, 120, 0.2);
    border-radius: 12px;
    overflow: hidden;
    background: #0a1110;
    animation: fpStreamIn 0.3s ease;
    box-shadow: 0 0 20px rgba(100, 200, 120, 0.04);
}

.fp-stream-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(100, 200, 120, 0.08);
    border-bottom: 1px solid rgba(100, 200, 120, 0.1);
    font-size: 13px;
    font-weight: 700;
    color: #8cc9a0;
}

.fp-stream-head i { margin-right: 8px; }

.fp-stream-head .fp-stream-status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(100, 200, 120, 0.08);
}

.fp-stream-head .fp-stream-status.done {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}

.fp-stream-head .fp-stream-status.error {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

/* ---- Responsive ---- */
@media (max-width: 1120px) {
    .fp-master-layout,
    .fp-dual-panel {
        grid-template-columns: 1fr;
    }

    .fp-asset-grid {
        grid-template-columns: 1fr;
    }

    .fp-stepbar {
        grid-template-columns: repeat(2, 1fr);
    }

    .fp-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .fp-stepbar {
        grid-template-columns: 1fr;
    }

    .fp-plan-table {
        min-width: 640px;
    }

    .fp-clip-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .fp-clip-info {
        margin-left: 0;
        justify-content: center;
    }
}

/* ---- Project Tabs ---- */
.fp-project-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    overflow-x: auto;
}

.fp-project-tabs-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
}

.fp-project-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    color: var(--fp-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s ease;
    position: relative;
}

.fp-project-tab:hover {
    background: rgba(255,255,255,0.08);
    color: var(--fp-text);
}

.fp-project-tab.active {
    background: rgba(240, 179, 93, 0.12);
    border-color: rgba(240, 179, 93, 0.3);
    color: var(--fp-accent);
}

.fp-project-tab-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fp-project-tab-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--fp-muted);
    opacity: 0;
    transition: opacity .2s;
    cursor: pointer;
}

.fp-project-tab:hover .fp-project-tab-del {
    opacity: 1;
}

.fp-project-tab-del:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.fp-project-tab-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--fp-border);
    color: var(--fp-muted);
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
    flex-shrink: 0;
}

.fp-project-tab-add:hover {
    background: rgba(255,255,255,0.08);
    color: var(--fp-accent);
    border-color: var(--fp-accent);
}

@media (max-width: 720px) {
    .fp-project-tab-name {
        max-width: 80px;
    }
}
