/**
 * Tool: Video Speed Changer & Reverse Studio - Free & Unlocked
 * Stylesheet: video-speed-reverse.css
 * Synchronized with MetaoFly Golden Standard 2-Column Tool Workspace
 */

/* ── Workspace Card Container ── */
.tool-workspace.vsr-workspace {
    display: grid !important;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr) !important;
    gap: var(--space-8);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-card);
    align-items: start;
    margin: var(--space-8) 0;
    position: relative;
    width: 100%;
}

@media (max-width: 960px) {
    .tool-workspace.vsr-workspace {
        grid-template-columns: 1fr !important;
        padding: var(--space-5);
    }
}

/* ── Left Column: Controls & Settings ── */
.vsr-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
}

.vsr-header-block {
    margin-bottom: var(--space-2);
}

.vsr-dropzone {
    text-align: center;
    border: 2px dashed rgba(6, 182, 212, 0.35);
    border-radius: var(--radius-lg);
    background: rgba(6, 182, 212, 0.03);
    cursor: pointer;
    transition: all var(--dur-normal) var(--ease-snappy);
}

.vsr-dropzone:hover,
.vsr-dropzone.drag-over {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.08);
    transform: translateY(-1px);
}

.vsr-file-info-strip {
    transition: all var(--dur-normal);
}

/* Speed Preset Buttons Grid */
.vsr-speed-presets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.vsr-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: #e2e8f0;
    transition: all var(--dur-fast);
    user-select: none;
}

.vsr-preset-btn:hover {
    border-color: rgba(6, 182, 212, 0.45);
    background: rgba(6, 182, 212, 0.1);
    transform: translateY(-1px);
    color: #38bdf8;
}

.vsr-preset-btn.active {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.35);
}

.vsr-preset-val {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    transition: color var(--dur-fast);
}

.vsr-preset-btn.active .vsr-preset-val {
    color: #22d3ee;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.vsr-preset-sub {
    font-size: 9.5px;
    color: var(--color-text-muted);
    transition: color var(--dur-fast);
}

.vsr-preset-btn.active .vsr-preset-sub {
    color: #67e8f9;
}

/* Export Toggle Buttons */
.vsr-btn-row {
    display: flex;
    gap: 6px;
}

.vsr-toggle-opt {
    padding: 7px 12px;
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all var(--dur-fast);
    user-select: none;
}

.vsr-toggle-opt:hover {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.35);
    color: #ffffff;
    transform: translateY(-1px);
}

.vsr-toggle-opt.active {
    background: rgba(6, 182, 212, 0.18);
    border-color: #06b6d4;
    color: #22d3ee;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
}

/* Quick Trim Buttons */
.vsr-quick-trim-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xs);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--dur-fast);
}

.vsr-quick-trim-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.4);
    color: #38bdf8;
}

.vsr-quick-trim-btn.active {
    background: rgba(6, 182, 212, 0.2);
    border-color: #06b6d4;
    color: #22d3ee;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* ── Right Column: Interactive Stage & Trimmer ── */
.vsr-preview {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.vsr-video-viewport {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* ── Fixed Fullscreen Modals ── */
.vsr-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    background: rgba(3, 7, 18, 0.85) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.vsr-modal-card {
    background: #0f172a;
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.9), 0 0 35px rgba(6, 182, 212, 0.15);
    animation: vsrModalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes vsrModalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vsr-modal-spinner-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vsr-spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(6, 182, 212, 0.2);
    border-top-color: #06b6d4;
    border-radius: 50%;
    animation: vsrSpin 1s linear infinite;
}

@keyframes vsrSpin {
    to {
        transform: rotate(360deg);
    }
}

.vsr-modal-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.vsr-modal-sub {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.vsr-progress-bar-wrap {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.vsr-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7, #06b6d4);
    transition: width 0.15s ease-out;
}

.vsr-progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    margin-bottom: 16px;
}

.vsr-result-preview-wrap {
    max-width: 100%;
    max-height: 280px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 16px auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.vsr-result-video {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.vsr-success-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}