[v-cloak] {
    display: none;
}
.splice {
    --sp-bg: #0c0b10;
    --sp-panel: #17151e;
    --sp-line: #302b3e;
    --sp-purple: #a589ff;
    color: #f2effc;
    background: var(--sp-bg);
    border-radius: 20px;
    padding: 26px;
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.splice * {
    box-sizing: border-box;
}
.splice button,
.splice select,
.splice input {
    font: inherit;
    color: inherit;
}
.splice button,
.splice select {
    background: #24202f;
    border: 1px solid var(--sp-line);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}
.splice button:hover {
    background: #39304e;
    border-color: #8870c8;
}
.splice button:disabled {
    opacity: 0.35;
    cursor: default;
}
.splice button:focus-visible,
.splice input:focus-visible,
.splice a:focus-visible {
    outline: 2px solid #b89bff;
    outline-offset: 3px;
}
.splice a {
    color: #baa4ff;
}
.splice input {
    background: #100e16;
    border: 1px solid var(--sp-line);
    border-radius: 7px;
    padding: 8px 10px;
    min-width: 0;
}
.splice h1,
.splice h2,
.splice p {
    margin: 0;
}
.splice h1 {
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -1px;
}
.splice h1 span {
    color: var(--sp-purple);
    font-size: 15px;
    vertical-align: top;
}
.splice h2 {
    font-size: 16px;
    font-weight: 600;
}
.splice small,
.sp-muted {
    color: #a49bb8;
}
.splice .sp-primary {
    background: #7954e9;
    border-color: #9775fa;
    color: white;
    font-weight: 600;
}
.sp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.sp-head > div > small {
    font-size: 10px;
    letter-spacing: 2px;
    color: #b09bdc;
}
.sp-head p {
    color: #a49bb8;
    margin-top: 5px;
}
.sp-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.sp-actions small {
    color: inherit;
    font-weight: 400;
    border-left: 1px solid #baa4ff;
    padding-left: 8px;
    margin-left: 6px;
}
.sp-document {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #9b90ac;
}
.sp-document input {
    background: transparent;
    border-color: transparent;
    font-size: 15px;
    color: #e8e0fa;
    max-width: 300px;
    flex: 1;
}
.sp-document button {
    margin-left: auto;
}
.sp-dirty {
    color: #f2bf73 !important;
}
.sp-upper {
    display: grid;
    grid-template-columns: minmax(260px, 34%) minmax(0, 1fr);
    gap: 14px;
}
.sp-library,
.sp-preview,
.sp-timeline {
    background: var(--sp-panel);
    border: 1px solid var(--sp-line);
    border-radius: 14px;
    overflow: hidden;
}
.sp-library {
    padding: 16px;
    max-height: 450px;
    display: flex;
    flex-direction: column;
}
.sp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.sp-section-head a {
    font-size: 12px;
}
.sp-tabs {
    display: flex;
    background: #100e16;
    border-radius: 9px;
    padding: 3px;
    margin-bottom: 10px;
}
.sp-tabs button {
    border: 0;
    background: transparent;
    flex: 1;
    padding: 6px;
}
.sp-tabs button.active {
    color: #dacfff;
    background: #3a2b5c;
}
.sp-search {
    width: 100%;
    margin-bottom: 12px;
}
.sp-source-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
    overflow: auto;
    padding-right: 4px;
    align-content: start;
}
.sp-thumb {
    aspect-ratio: 16/10;
    background: linear-gradient(145deg, #292438, #15111e);
    border-radius: 9px;
    position: relative;
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
}
.sp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sp-thumb > span {
    font-size: 22px;
    color: #847292;
}
.sp-thumb small {
    position: absolute;
    bottom: 5px;
    right: 6px;
    background: #000b;
    border-radius: 4px;
    padding: 1px 5px;
    color: white;
    font: 10px monospace;
}
.sp-source-caption {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
}
.sp-source-caption > span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 1;
    font-size: 12px;
}
.sp-source-caption button {
    padding: 1px 6px;
    color: #c1a6ff;
    font-size: 18px;
}
.sp-source > small {
    font-size: 10px;
}
.sp-more {
    margin-top: 10px;
}
.sp-preview {
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 350px;
}
.sp-preview .sp-section-head small {
    letter-spacing: 2px;
    font-size: 10px;
}
.sp-preview .sp-section-head button {
    font-size: 11px;
    padding: 4px 8px;
}
.sp-screen {
    background: #060507;
    flex: 1;
    min-height: 200px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    max-height: 340px;
    width: 100%;
}
.sp-screen video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.sp-welcome {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
}
.sp-welcome > div {
    font-size: 65px;
    line-height: 1;
    color: #463264;
    margin-bottom: 15px;
    position: relative;
}
.sp-welcome > div span {
    position: absolute;
    font-size: 22px;
    right: -8px;
    bottom: 0;
    color: #c2aaff;
}
.sp-welcome h2 {
    font-size: 19px;
}
.sp-welcome p {
    color: #8d809f;
    font-size: 12px;
    margin-top: 8px;
}
.sp-playback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    font: 12px monospace;
}
.sp-playback button {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #8d6de9;
    color: white;
}
.sp-timeline {
    margin-bottom: 14px;
}
.sp-timeline-tools {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--sp-line);
    flex-wrap: wrap;
}
.sp-tool-buttons,
.sp-zoom {
    display: flex;
    gap: 6px;
    align-items: center;
}
.sp-tool-buttons button,
.sp-zoom button {
    font-size: 12px;
    padding: 5px 9px;
}
.sp-timeline-tools h2 small {
    background: #342744;
    border-radius: 5px;
    padding: 1px 5px;
    font-size: 11px;
}
.sp-zoom {
    margin-left: auto;
    color: #afa1c5;
}
.sp-zoom input {
    width: 90px;
    accent-color: #a585ff;
    padding: 0;
}
.sp-scroll {
    overflow: auto;
    padding: 0 18px 16px;
    min-height: 166px;
    background: #100e16;
    scrollbar-color: #51416a #16111e;
}
.sp-track {
    min-width: 100%;
    position: relative;
    padding-bottom: 14px;
}
.sp-ruler {
    height: 38px;
    position: relative;
    cursor: crosshair;
    border-bottom: 1px solid #282032;
}
.sp-ruler span {
    position: absolute;
    font: 10px monospace;
    color: #8d7fa3;
    border-left: 1px solid #4a3c5d;
    height: 15px;
    top: 12px;
    padding-left: 5px;
    pointer-events: none;
}
.sp-clips {
    display: flex;
    position: relative;
    height: 94px;
    padding-top: 12px;
}
.sp-clip {
    background: #3e2f60;
    border: 0;
    box-shadow: inset 0 0 0 2px #645087;
    flex-shrink: 0;
    height: 80px;
    overflow: hidden;
    cursor: grab;
    transition: transform 0.18s ease, border-color 0.15s;
    border-radius: 6px;
    position: relative;
    min-width: 0;
}
.sp-clip.selected {
    box-shadow: inset 0 0 0 2px #c9b2ff;
    background: #59417f;
}
.sp-clip-film {
    height: 48px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, #3f3056, #21192e);
}
.sp-clip-film img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    opacity: 0.5;
}
.sp-clip-film span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 7px;
    font-size: 11px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.sp-clip > small {
    font: 10px monospace;
    white-space: nowrap;
    color: #e0d3f7;
    padding-left: 5px;
}
.sp-insert {
    position: absolute;
    top: 39px;
    bottom: 7px;
    width: 3px;
    background: #dfc8ff;
    box-shadow: 0 0 18px #ab71ff;
    pointer-events: none;
    font-size: 22px;
    color: #fff;
    z-index: 5;
}
.sp-playhead {
    position: absolute;
    width: 1px;
    background: #f0e5ff;
    top: 20px;
    bottom: 0;
    cursor: ew-resize;
    touch-action: none;
    z-index: 4;
}
.sp-playhead::before {
    content: "";
    position: absolute;
    left: -10px;
    right: -10px;
    top: 0;
    bottom: 0;
}
.sp-playhead b {
    position: absolute;
    left: -5px;
    top: 0;
    width: 11px;
    height: 10px;
    background: #dcc7ff;
    clip-path: polygon(0 0, 100% 0, 100% 65%, 50% 100%, 0 65%);
}
.sp-overflow {
    position: absolute;
    top: 38px;
    bottom: 0;
    background: repeating-linear-gradient(
        135deg,
        #d8932924 0,
        #d8932924 4px,
        transparent 4px,
        transparent 10px
    );
    border-left: 2px dashed #efb259;
    pointer-events: none;
}
.sp-overflow span {
    font-size: 10px;
    color: #f2bf73;
    white-space: nowrap;
}
.sp-drop-empty {
    color: #8f7aa8;
    display: grid;
    place-items: center;
    width: 100%;
    border: 1px dashed #514066;
    border-radius: 8px;
}
.sp-timeline-footer {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #9687aa;
    font-size: 11px;
}
.sp-modal {
    position: fixed;
    inset: 0;
    background: #06030bc7;
    backdrop-filter: blur(7px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 20px;
}
.sp-modal > section {
    width: 480px;
    max-width: 100%;
    max-height: 85vh;
    overflow: auto;
    padding: 30px;
    background: #1b1626;
    border: 1px solid #63507f;
    border-radius: 18px;
    box-shadow: 0 25px 100px #0008;
    position: relative;
}
.sp-modal h2 {
    font-size: 23px;
    margin-bottom: 20px;
}
.sp-modal p {
    color: #b4a7c6;
    margin: 16px 0;
}
.sp-modal label {
    display: block;
    margin: 15px 0;
    color: #cec0e2;
}
.sp-modal select {
    display: block;
    width: 100%;
    margin-top: 8px;
}
.sp-modal .sp-close {
    position: absolute;
    right: 12px;
    top: 12px;
    border: 0;
    background: transparent;
    font-size: 22px;
}
.sp-modal .sp-primary {
    width: 100%;
    margin-top: 10px;
}
.sp-export-summary {
    font: 30px monospace;
    color: #e1ccff;
}
.sp-export-summary span {
    display: block;
    font-size: 14px;
    margin-top: 8px;
}
.sp-warning {
    background: #5d422333;
    padding: 12px;
    border-left: 2px solid #efb259;
}
.sp-list-item {
    display: flex !important;
    flex-direction: column;
    text-align: left;
    width: 100%;
    padding: 14px !important;
    margin: 8px 0;
    gap: 5px;
    border-bottom: 1px solid #392e48;
}
.sp-error {
    padding: 12px;
    background: #482e31;
    border-radius: 8px;
    margin-bottom: 14px;
}
.sp-error button {
    margin-left: 10px;
}
.sp-rotate {
    display: none;
}
@media (max-width: 1200px) {
    .splice {
        padding: 16px;
    }
    .sp-head {
        align-items: flex-start;
    }
    .sp-actions {
        justify-content: flex-end;
    }
    .sp-actions .sp-primary small {
        display: none;
    }
    .sp-upper {
        grid-template-columns: 280px minmax(0, 1fr);
    }
}
@media (max-width: 950px) and (orientation: landscape) {
    .splice {
        padding: 10px;
    }
    .sp-head {
        margin-bottom: 8px;
    }
    .sp-head h1 {
        font-size: 20px;
    }
    .sp-head p,
    .sp-head > div > small {
        display: none;
    }
    .sp-document {
        margin-bottom: 8px;
    }
    .sp-upper {
        grid-template-columns: 230px minmax(0, 1fr);
    }
    .sp-library {
        max-height: 270px;
        padding: 10px;
    }
    .sp-preview {
        min-height: 250px;
        padding: 10px;
    }
    .sp-screen {
        min-height: 150px;
        max-height: 170px;
    }
    .sp-timeline-tools {
        padding: 8px;
        gap: 8px;
    }
    .sp-timeline-tools h2 {
        display: none;
    }
    .sp-tool-buttons button {
        font-size: 11px;
    }
    .sp-timeline-footer > span:first-child {
        display: none;
    }
}
@media (max-width: 850px) and (max-aspect-ratio: 4/5) {
    .sp-editor {
        display: none;
    }
    .sp-rotate {
        display: block;
        padding: 65px 20px;
        text-align: center;
        border: 1px solid #413051;
        border-radius: 16px;
        background: radial-gradient(ellipse at top, #30203f, #110e18);
    }
    .sp-rotate > div {
        font-size: 70px;
        color: #b693ff;
    }
    .sp-rotate h2 {
        margin: 20px 0;
    }
    .sp-rotate p {
        color: #b4a7c6;
    }
    .sp-head {
        flex-direction: column;
    }
    .sp-actions {
        justify-content: flex-start;
    }
    .sp-document {
        flex-wrap: wrap;
    }
    .sp-document input {
        max-width: 100%;
    }
    .splice {
        padding: 14px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .sp-clip {
        transition: none;
    }
}
.sp-seek {
    display: block;
    width: 100%;
    height: 4px;
    flex-shrink: 0;
    margin: 4px 0 12px;
    padding: 0 !important;
    accent-color: #b693ff;
    cursor: ew-resize;
}
.sp-trim-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 7px;
    z-index: 3;
    cursor: ew-resize;
    background: #d8c2ff;
    opacity: 0;
    touch-action: none;
}
.sp-clip.selected .sp-trim-handle {
    opacity: 1;
}
.sp-trim-left {
    left: 0;
}
.sp-trim-right {
    right: 0;
}
.sp-clip.selected .sp-clip-film span {
    padding-left: 10px;
}
.sp-clip.selected > small {
    padding-left: 10px;
}
.ai-main-content:has(.splice),
.ai-content-inner:has(.splice) {
    background: #0c0b10;
}

.sp-preview-status {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #100c18b3;
    color: #e5dcf5;
    z-index: 1;
}

.sp-results-head, .sp-export-search, .sp-export-pages { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sp-results-head h2 { margin: 0; }
.sp-results-link { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 12px; color: #fff; background: #7650c2; }
.sp-results-link:hover { color: #fff; background: #8960d6; }
.sp-export-search .sp-search { flex: 1; width: auto; min-width: 140px; margin: 0; }
.sp-export-pages { margin-top: 18px; font-variant-numeric: tabular-nums; }

.sp-processing-hint { margin: 8px 0; padding: 12px 14px; border-left: 3px solid #ab86ed; border-radius: 8px; background: #30243e; color: #e5d7fc; font-size: 14px; line-height: 1.65; }
