/**
 * MetaoFly — Video Cropper & Rotator Styles
 * Professional, Clean & Ultra-Modern Spatial Video Studio Design
 * Scoped exclusively under #vcrApp / .vcr-workspace
 */

/* ============================================================
   1. ROOT VARIABLES & WORKSPACE CONTAINER
   ============================================================ */
#vcrApp,
.vcr-workspace {
    --vcr-primary: #f59e0b;
    --vcr-primary-hover: #d97706;
    --vcr-primary-glow: rgba(245, 158, 11, 0.28);
    --vcr-accent: #38bdf8;
    --vcr-accent-glow: rgba(56, 189, 248, 0.25);
    --vcr-success: #10b981;
    --vcr-bg-card: rgba(15, 23, 42, 0.75);
    --vcr-bg-card-subtle: rgba(30, 41, 59, 0.6);
    --vcr-border: rgba(255, 255, 255, 0.08);
    --vcr-border-active: rgba(245, 158, 11, 0.55);
    --vcr-text-muted: #94a3b8;
    --vcr-text-heading: #f8fafc;
    position: relative;
    box-sizing: border-box;
}

#vcrApp *,
.vcr-workspace * {
    box-sizing: border-box;
}

/* ============================================================
   2. TOP TOOL HEADER BANNER (Compact & Luxury)
   ============================================================ */
.vcr-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 28px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.07) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.vcr-header-banner::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
    filter: blur(35px);
}

.vcr-header-left {
    flex: 1;
    min-width: 280px;
    max-width: 760px;
}

.vcr-badge-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.vcr-studio-title {
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.vcr-title-gradient {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.vcr-studio-subtitle {
    font-size: 13.5px;
    color: var(--vcr-text-muted);
    line-height: 1.5;
    margin: 0;
    max-width: 680px;
}

.vcr-header-right {
    display: flex;
    align-items: center;
}

.vcr-quick-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vcr-pill-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.vcr-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    animation: vcrPulseDot 2s infinite ease-in-out;
}

@keyframes vcrPulseDot {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.25); }
}

/* ============================================================
   3. UPLOAD DROPZONE STAGE
   ============================================================ */
.vcr-upload-stage {
    width: 100%;
}

.vcr-dropzone {
    position: relative;
    padding: 64px 32px;
    text-align: center;
    border: 2px dashed rgba(245, 158, 11, 0.35);
    border-radius: 20px;
    background: radial-gradient(circle at 50% 30%, rgba(245, 158, 11, 0.06) 0%, rgba(15, 23, 42, 0.75) 80%);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.vcr-dropzone:hover,
.vcr-dropzone.dragover {
    border-color: #f59e0b;
    background: radial-gradient(circle at 50% 30%, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.9) 80%);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -10px var(--vcr-primary-glow);
}

.vcr-hidden-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.vcr-drop-icon-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
}

.vcr-glow-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, transparent 70%);
    animation: vcrPulse 2.8s infinite ease-in-out;
}

@keyframes vcrPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

.vcr-drop-title {
    font-size: 21px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.vcr-drop-desc {
    font-size: 13.5px;
    color: var(--vcr-text-muted);
    max-width: 540px;
    margin: 0 auto 22px;
    line-height: 1.5;
}

.vcr-drop-actions {
    display: inline-flex;
    gap: 12px;
    position: relative;
    z-index: 12;
    margin-bottom: 22px;
    flex-wrap: wrap;
    justify-content: center;
}

.vcr-btn-browse,
.vcr-btn-sample {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 22px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 13.5px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.vcr-btn-browse {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
    border: none;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.vcr-btn-browse:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.5);
}

.vcr-btn-sample {
    background: rgba(30, 41, 59, 0.85);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.vcr-btn-sample:hover {
    background: rgba(51, 65, 85, 0.95);
    color: #ffffff;
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

.vcr-drop-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 12px;
    color: #94a3b8;
}

.vcr-drop-features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   4. ACTIVE STUDIO STAGE & TOP TOOLBAR
   ============================================================ */
.vcr-studio-stage {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.vcr-top-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.vcr-toolbar-file {
    display: flex;
    align-items: center;
}

.vcr-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
    color: #f1f5f9;
}

.vcr-file-pill svg {
    color: #fbbf24;
}

.vcr-pill-meta {
    color: #38bdf8;
    font-size: 11.5px;
    font-weight: 700;
}

.vcr-toolbar-modes {
    display: flex;
    background: rgba(10, 15, 30, 0.85);
    padding: 3px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    gap: 4px;
}

.vcr-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 5px 14px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--vcr-text-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.vcr-mode-btn:hover {
    color: #ffffff;
}

.vcr-mode-btn.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(245, 158, 11, 0.12));
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.18);
}

.vcr-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vcr-btn-compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vcr-btn-compact:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(245, 158, 11, 0.4);
    color: #ffffff;
}

.vcr-btn-header-export {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35) !important;
}

.vcr-btn-header-export:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    box-shadow: 0 5px 16px rgba(245, 158, 11, 0.5) !important;
    transform: translateY(-1px);
}

/* ============================================================
   5. STUDIO DUAL-COLUMN GRID
   ============================================================ */
.vcr-studio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 420px);
    gap: 20px;
    align-items: start;
    width: 100%;
}

/* ============================================================
   6. LEFT COLUMN: PREVIEW STAGE & TRANSPORT BAR
   ============================================================ */
.vcr-stage-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.vcr-viewport-card {
    background: var(--vcr-bg-card);
    border: 1px solid var(--vcr-border);
    border-radius: 16px;
    padding: 18px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.vcr-canvas-container {
    position: relative;
    width: 100%;
    min-height: 520px;
    max-height: 680px;
    background: #080c16;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(30, 41, 59, 0.4) 0%, #060912 100%),
        radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
    background-size: 100% 100%, 20px 20px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9);
    -webkit-user-select: none;
    user-select: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#vcrCanvas {
    display: block;
    max-width: 100%;
    max-height: 640px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Interactive Crop Box Overlay */
.vcr-crop-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
}

.vcr-crop-overlay.active {
    pointer-events: auto;
}

/* 4 Surrounding Semi-Transparent Mask Panels */
.vcr-mask {
    position: absolute;
    background: rgba(4, 7, 15, 0.68);
    pointer-events: auto;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.vcr-mask-top    { top: 0; left: 0; right: 0; }
.vcr-mask-bottom { bottom: 0; left: 0; right: 0; }
.vcr-mask-left   { left: 0; }
.vcr-mask-right  { right: 0; }

/* The Pro Viewfinder Crop Box */
.vcr-crop-box {
    position: absolute;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.25);
    pointer-events: auto;
    cursor: move;
}

/* Rule of Thirds Guides */
.vcr-grid-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.28);
    pointer-events: none;
}

.vcr-gl-h1 { top: 33.333%; left: 0; right: 0; height: 1px; }
.vcr-gl-h2 { top: 66.666%; left: 0; right: 0; height: 1px; }
.vcr-gl-v1 { left: 33.333%; top: 0; bottom: 0; width: 1px; }
.vcr-gl-v2 { left: 66.666%; top: 0; bottom: 0; width: 1px; }

/* Center Drag Handle (Glass Disc Puck) */
.vcr-center-drag {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.88);
    border: 1.5px solid rgba(245, 158, 11, 0.8);
    color: #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: move;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.vcr-center-drag:hover {
    transform: translate(-50%, -50%) scale(1.15);
    background: #f59e0b;
    border-color: #fbbf24;
    color: #0f172a;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Dimensions Badge Pill (Floating Below Crop Box) */
.vcr-crop-pill {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.vcr-pill-ratio {
    color: #fbbf24;
    font-weight: 800;
}

/* ════════════════════════════════════════════════════════════
   PRO-GRADE CAMERA VIEWFINDER HANDLES (L-Corners & Edge Bars)
   ════════════════════════════════════════════════════════════ */
.vcr-handle {
    position: absolute;
    pointer-events: auto;
    z-index: 30;
}

/* Invisible Hit Area for Easy Touch & Drag */
.vcr-handle::after {
    content: '';
    position: absolute;
    top: -16px;
    left: -16px;
    width: 44px;
    height: 44px;
}

/* Corner Handles: Clean White L-Brackets */
.vcr-h-nw {
    top: -3px;
    left: -3px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-top: 3.5px solid #ffffff;
    border-left: 3.5px solid #ffffff;
    border-radius: 2px 0 0 0;
    box-shadow: -1px -1px 4px rgba(0, 0, 0, 0.85);
    cursor: nwse-resize;
}

.vcr-h-ne {
    top: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-top: 3.5px solid #ffffff;
    border-right: 3.5px solid #ffffff;
    border-radius: 0 2px 0 0;
    box-shadow: 1px -1px 4px rgba(0, 0, 0, 0.85);
    cursor: nesw-resize;
}

.vcr-h-sw {
    bottom: -3px;
    left: -3px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-bottom: 3.5px solid #ffffff;
    border-left: 3.5px solid #ffffff;
    border-radius: 0 0 0 2px;
    box-shadow: -1px 1px 4px rgba(0, 0, 0, 0.85);
    cursor: nesw-resize;
}

.vcr-h-se {
    bottom: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-bottom: 3.5px solid #ffffff;
    border-right: 3.5px solid #ffffff;
    border-radius: 0 0 2px 0;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.85);
    cursor: nwse-resize;
}

/* Edge Handles: Minimalist White Rounded Bars */
.vcr-h-n {
    top: -3px;
    left: calc(50% - 13px);
    width: 26px;
    height: 5px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    cursor: ns-resize;
}

.vcr-h-s {
    bottom: -3px;
    left: calc(50% - 13px);
    width: 26px;
    height: 5px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    cursor: ns-resize;
}

.vcr-h-w {
    top: calc(50% - 13px);
    left: -3px;
    width: 5px;
    height: 26px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    cursor: ew-resize;
}

.vcr-h-e {
    top: calc(50% - 13px);
    right: -3px;
    width: 5px;
    height: 26px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    cursor: ew-resize;
}

/* Hover Accent for Handles */
.vcr-handle:hover {
    border-color: #fbbf24 !important;
}
.vcr-h-n:hover,
.vcr-h-s:hover,
.vcr-h-w:hover,
.vcr-h-e:hover {
    background: #fbbf24 !important;
}

/* Playback Transport Controller Bar */
.vcr-playback-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.vcr-play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}

.vcr-play-btn:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: scale(1.06);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
}

.vcr-time-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
    min-width: 84px;
}

.vcr-time-sep {
    color: var(--vcr-text-muted);
}

.vcr-scrubber-track {
    position: relative;
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.vcr-slider-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
    margin: 0;
}

.vcr-scrubber-progress {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 999px;
    pointer-events: none;
    width: 0%;
}

.vcr-tool-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--vcr-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.vcr-tool-icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.vcr-tool-icon-btn.active {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.12);
}

/* ============================================================
   7. RIGHT COLUMN: CONTROL PANELS DECK
   ============================================================ */
.vcr-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: calc(76px + 16px);
}

.vcr-panel-card {
    background: var(--vcr-bg-card);
    border: 1px solid var(--vcr-border);
    border-radius: 14px;
    padding: 16px 18px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.vcr-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.vcr-panel-num {
    font-size: 10.5px;
    font-weight: 800;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 2px 7px;
    border-radius: 5px;
}

.vcr-panel-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    flex: 1;
}

.vcr-badge-chip {
    font-size: 11px;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 2px 8px;
    border-radius: 999px;
}

.vcr-transform-indicator {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 2px 8px;
    border-radius: 999px;
}

/* Aspect Ratio Presets Grid (Visual Silhouette Tiles) */
.vcr-ratio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.vcr-ratio-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 4px;
    min-height: 64px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.vcr-ratio-btn:hover {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.vcr-ratio-btn.active {
    background: rgba(245, 158, 11, 0.16);
    border-color: #f59e0b;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.vcr-ratio-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vcr-text-muted);
    transition: color 0.2s ease;
}

.vcr-ratio-btn:hover .vcr-ratio-visual,
.vcr-ratio-btn.active .vcr-ratio-visual {
    color: #fbbf24;
}

.vcr-ratio-label {
    font-size: 12.5px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.vcr-ratio-sub {
    font-size: 9.5px;
    color: var(--vcr-text-muted);
}

.vcr-ratio-btn.active .vcr-ratio-label {
    color: #fbbf24;
}

/* Orientation & Mirror Buttons */
.vcr-transform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.vcr-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    min-height: 54px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
}

.vcr-action-btn svg {
    color: #38bdf8;
    transition: transform 0.2s ease;
}

.vcr-action-btn:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.35);
    color: #ffffff;
    transform: translateY(-2px);
}

.vcr-action-btn:hover svg {
    transform: scale(1.1);
}

/* Background Pad Studio Controls */
.vcr-pad-toggle-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.vcr-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #e2e8f0;
    cursor: pointer;
}

.vcr-radio-label input {
    accent-color: #f59e0b;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.vcr-slider-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.vcr-slider-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--vcr-text-muted);
}

.vcr-slider-val {
    color: #fbbf24;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.vcr-range-input {
    width: 100%;
    accent-color: #f59e0b;
    height: 5px;
    cursor: pointer;
}

.vcr-palette-wrap {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vcr-sub-label {
    font-size: 11px;
    color: var(--vcr-text-muted);
    font-weight: 600;
}

.vcr-swatches-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.vcr-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 7px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.vcr-swatch:hover {
    transform: scale(1.1);
    border-color: #ffffff;
}

.vcr-swatch.active {
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Highlight Blur Card when in Pad Mode */
.vcr-mode-pad-active #vcrBlurStudioCard {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

/* Export Settings */
.vcr-export-settings {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.vcr-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vcr-setting-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--vcr-text-muted);
}

.vcr-btn-toggle-group {
    display: inline-flex;
    background: rgba(10, 15, 30, 0.85);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    gap: 2px;
}

.vcr-toggle-opt {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--vcr-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.vcr-toggle-opt.active {
    background: #f59e0b;
    color: #0f172a;
    font-weight: 700;
}

.vcr-btn-export {
    width: 100%;
    min-height: 46px;
    padding: 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.vcr-btn-export::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: rotate(25deg);
    transition: transform 0.6s ease;
}

.vcr-btn-export:hover::after {
    transform: rotate(25deg) translate(50%, 50%);
}

.vcr-btn-export:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5);
}

.vcr-export-hint {
    font-size: 10.5px;
    color: var(--vcr-text-muted);
    text-align: center;
    margin: 8px 0 0 0;
}

/* ============================================================
   8. MODALS (PROGRESS & SUCCESS)
   ============================================================ */
.vcr-modal-overlay {
    position: fixed !important;
    inset: 0 !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;
    z-index: 99999 !important;
    padding: var(--space-4);
    margin: 0;
    width: 100vw;
    height: 100vh;
}

.vcr-modal-overlay.active,
.vcr-modal-overlay[style*="display: flex"] {
    display: flex !important;
}

.vcr-modal-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 20px;
    padding: 36px 32px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(245, 158, 11, 0.15);
    animation: vcrModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes vcrModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.vcr-modal-spinner-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcr-spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(245, 158, 11, 0.15);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: vcrSpin 1s linear infinite;
}

@keyframes vcrSpin {
    to { transform: rotate(360deg); }
}

.vcr-spinner-icon {
    position: relative;
    z-index: 2;
}

.vcr-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
}

.vcr-modal-sub {
    font-size: 13px;
    color: var(--vcr-text-muted);
    margin: 0 0 20px 0;
}

.vcr-progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.vcr-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 999px;
    transition: width 0.15s ease;
}

.vcr-progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 24px;
}

.vcr-btn-cancel-export {
    min-height: 38px;
    padding: 8px 20px;
    font-size: 12px;
    border-radius: 8px;
}

/* Success Card */
.vcr-card-success {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(16, 185, 129, 0.15);
}

.vcr-success-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid #10b981;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.vcr-result-player-wrap {
    margin: 18px 0 24px;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcr-result-player-wrap video {
    max-width: 100%;
    max-height: 280px;
    display: block;
}

.vcr-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.vcr-btn-download {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 9px;
    border: none;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.vcr-btn-download:hover {
    background: linear-gradient(135deg, #34d399, #10b981) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.5);
}

/* ============================================================
   9. RESPONSIVE MEDIA QUERIES (Mobile & Tablet)
   ============================================================ */
@media (max-width: 1100px) {
    .vcr-studio-grid {
        grid-template-columns: 1fr;
    }

    .vcr-sidebar-column {
        position: static;
    }

    .vcr-canvas-container {
        min-height: 420px;
    }
}

@media (max-width: 768px) {
    .vcr-header-banner {
        padding: 16px 20px;
    }

    .vcr-studio-title {
        font-size: 1.4rem;
    }

    .vcr-top-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .vcr-toolbar-file,
    .vcr-toolbar-modes,
    .vcr-toolbar-actions {
        width: 100%;
        justify-content: center;
    }

    .vcr-canvas-container {
        min-height: 340px;
        max-height: 460px;
    }

    .vcr-playback-bar {
        flex-wrap: wrap;
    }

    .vcr-scrubber-track {
        order: 3;
        width: 100%;
        flex-basis: 100%;
        margin-top: 8px;
    }

    .vcr-ratio-grid,
    .vcr-transform-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
