.warp-card {
    background: rgba(18, 24, 37, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.warp-card h3 {
    margin: 0 0 14px;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cyan);
}

.warp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.warp-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.warp-layer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.warp-layer-item.active {
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2) inset;
}

.warp-layer-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.warp-layer-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.warp-layer-copy small {
    color: var(--text-mid);
    font-size: 11px;
    font-weight: 500;
}

.warp-layer-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.warp-layer-dot.fg { background: #22d3ee; }
.warp-layer-dot.bg { background: #f472b6; }

.warp-actions-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.warp-actions-inline .btn-download,
.warp-actions-inline .btn-process {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
}

.warp-tool-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.warp-tool-row .tool-btn,
.warp-tool-row .btn-download,
.warp-tool-row .btn-process {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 86px;
    justify-content: center;
}

.warp-viewport-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.warp-viewport-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.warp-status {
    color: var(--text-mid);
    font-size: 13px;
}

#canvas-container {
    position: relative;
    flex: 1;
    min-height: 520px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(45deg, rgba(255,255,255,0.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.025) 75%),
        linear-gradient(45deg, rgba(255,255,255,0.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.025) 75%),
        #0c1119;
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
    overflow: hidden;
}

.warp-canvas-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gl-canvas,
#warp-mask-canvas,
#pin-overlay {
    position: absolute;
    inset: 0;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
}

#pin-overlay {
    pointer-events: auto;
    overflow: visible;
}

.warp-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 10, 15, 0.68);
    z-index: 2;
}

.warp-loader.hidden {
    display: none;
}

.warp-loader-box {
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(15, 20, 31, 0.95);
    border: 1px solid rgba(34, 211, 238, 0.25);
    color: var(--text-mid);
    font-size: 13px;
}

.warp-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 12, 20, 0.72);
}

.warp-player-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.warp-timeline-meta {
    display: flex;
    gap: 14px;
    color: var(--text-mid);
    font-size: 13px;
}

#timeline-slider {
    width: 100%;
}

.warp-hidden-input {
    display: none;
}

@media (max-width: 1100px) {
    #canvas-container {
        min-height: 420px;
    }

    .warp-footer {
        grid-template-columns: 1fr;
    }
}
