/* ============================================
   EmbedFlows — Premium Design System
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Core palette */
    --vx-bg: #0a0a0f;
    --vx-bg-subtle: #12121a;
    --vx-surface: rgba(255, 255, 255, 0.04);
    --vx-surface-hover: rgba(255, 255, 255, 0.07);
    --vx-surface-active: rgba(255, 255, 255, 0.1);
    --vx-border: rgba(255, 255, 255, 0.08);
    --vx-border-focus: rgba(108, 92, 231, 0.5);
    --vx-text: #e8e6f0;
    --vx-text-muted: rgba(232, 230, 240, 0.5);
    --vx-text-dim: rgba(232, 230, 240, 0.3);

    /* Accent */
    --vx-accent: #6c5ce7;
    --vx-accent-light: #a29bfe;
    --vx-accent-glow: rgba(108, 92, 231, 0.3);
    --vx-accent-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);

    /* Status */
    --vx-success: #00b894;
    --vx-error: #e17055;

    /* Spacing */
    --vx-gap: 16px;
    --vx-radius: 14px;
    --vx-radius-sm: 8px;
    --vx-radius-xs: 6px;

    /* Typography */
    --vx-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    /* Transitions */
    --vx-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --vx-duration: 0.2s;
}

html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--vx-font);
    background: var(--vx-bg);
    color: var(--vx-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--vx-accent-light); text-decoration: none; transition: color var(--vx-duration) var(--vx-ease); }
a:hover { color: #fff; }

/* --- Ambient Background --- */
.vx-ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.vx-ambient::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--vx-accent-glow) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: vx-float 20s ease-in-out infinite;
}
.vx-ambient::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 184, 148, 0.12) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: vx-float 25s ease-in-out infinite reverse;
}

@keyframes vx-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --- App Layout --- */
.vx-app { min-height: 100vh; display: flex; flex-direction: column; }

/* --- Header --- */
.vx-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-bottom: 1px solid var(--vx-border);
}
.vx-header__inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vx-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.vx-logo__image {
    display: block;
    width: auto;
    height: 32px;
}

.vx-nav { display: flex; align-items: center; gap: 6px; }
.vx-nav__link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--vx-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--vx-text-muted);
    transition: all var(--vx-duration) var(--vx-ease);
}
.vx-nav__link:hover { color: var(--vx-text); background: var(--vx-surface-hover); }
.vx-nav__link--glow {
    color: var(--vx-accent-light);
    background: rgba(108, 92, 231, 0.1);
}
.vx-nav__link--glow:hover { background: rgba(108, 92, 231, 0.18); color: #fff; }

/* --- Content --- */
.vx-content {
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    width: 100%;
}

/* --- Card --- */
.vx-card {
    background: var(--vx-surface);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius);
    margin-bottom: var(--vx-gap);
    overflow: hidden;
    transition: border-color var(--vx-duration) var(--vx-ease);
}
.vx-card:hover { border-color: rgba(255, 255, 255, 0.12); }
.vx-card--accent { border-color: rgba(108, 92, 231, 0.25); background: rgba(108, 92, 231, 0.05); }
.vx-card--preview { border-color: rgba(255, 255, 255, 0.06); }

.vx-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--vx-border);
    color: var(--vx-text-muted);
}
.vx-card__header h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--vx-text-muted);
    flex: 1;
}

.vx-card__body { padding: 18px; }
.vx-card__body--flush { padding: 0; }

/* --- Builder Layout --- */
.vx-builder__hero {
    text-align: center;
    padding: 4px 0 12px;
}
.vx-builder__title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--vx-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.vx-builder__subtitle {
    color: var(--vx-text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

.vx-builder__grid {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: var(--vx-gap);
    align-items: start;
}

.vx-builder__sidebar { display: flex; flex-direction: column; }
.vx-builder__main { display: flex; flex-direction: column; }

/* --- URL Bar --- */
.vx-url-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}
.vx-url-bar__icon { color: var(--vx-accent); flex-shrink: 0; }
.vx-url-bar__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--vx-text);
    font-size: 1rem;
    font-family: var(--vx-font);
    padding: 4px 0;
}
.vx-url-bar__input::placeholder { color: var(--vx-text-dim); }

/* --- Buttons --- */
.vx-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--vx-radius-sm);
    font-family: var(--vx-font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--vx-duration) var(--vx-ease);
    white-space: nowrap;
}
.vx-btn--primary {
    background: var(--vx-accent-gradient);
    color: #fff;
    box-shadow: 0 0 20px var(--vx-accent-glow);
}
.vx-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 0 30px var(--vx-accent-glow); }
.vx-btn--glow { animation: vx-btn-pulse 3s ease-in-out infinite; }

@keyframes vx-btn-pulse {
    0%, 100% { box-shadow: 0 0 20px var(--vx-accent-glow); }
    50% { box-shadow: 0 0 35px var(--vx-accent-glow); }
}

.vx-btn--outline {
    background: transparent;
    color: var(--vx-accent-light);
    border: 1px solid var(--vx-border);
}
.vx-btn--outline:hover { background: var(--vx-surface-hover); color: #fff; border-color: var(--vx-accent); }
.vx-btn--sm { padding: 6px 12px; font-size: 0.8rem; }
.vx-btn-icon {
    background: transparent;
    border: none;
    color: var(--vx-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--vx-radius-xs);
    transition: all var(--vx-duration) var(--vx-ease);
    display: flex;
    align-items: center;
    margin-left: auto;
}
.vx-btn-icon:hover { color: var(--vx-accent-light); background: var(--vx-surface-hover); }
.vx-btn-icon--danger:hover { color: var(--vx-error); }

/* --- Copy Group Widget --- */
.vx-copy-group {
    display: inline-flex;
    background: var(--vx-surface);
    border: 1px solid var(--vx-border);
    border-radius: 20px;
    padding: 3px;
    gap: 3px;
    margin-left: auto;
}
.vx-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 16px;
    border: none;
    background: transparent;
    color: var(--vx-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--vx-font);
    transition: all 0.2s ease;
}
.vx-copy-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--vx-text);
}
.vx-copy-btn.is-copied {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.vx-btn--danger {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.3);
}
.vx-btn--danger:hover {
    background: rgba(244, 63, 94, 0.25);
    color: #fff;
    border-color: rgba(244, 63, 94, 0.5);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

/* --- Embed Status Panel --- */
.vx-status-panel {
    border-radius: 12px;
    overflow: hidden;
    padding: 32px 20px;
    text-align: center;
    transition: all var(--vx-duration) var(--vx-ease);
}

/* Unsaved State - Red */
.vx-status-panel.is-unsaved {
    border: 1px solid rgba(244, 63, 94, 0.2);
    background: radial-gradient(circle at top, rgba(244, 63, 94, 0.08) 0%, rgba(20, 20, 25, 0.3) 70%);
}
.vx-status-state--unsaved .vx-status-icon {
    color: #f43f5e;
    margin-bottom: 12px;
}
.vx-status-state--unsaved .vx-status-icon svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.4));
}
.vx-status-state--unsaved h4 {
    color: #f43f5e;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.vx-status-state--unsaved p {
    color: var(--vx-text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* Saved State - Green */
.vx-status-panel.is-saved {
    border: 1px solid rgba(16, 185, 129, 0.2);
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.12) 0%, rgba(20, 20, 25, 0.3) 70%);
}
.vx-status-state--saved .vx-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    margin-bottom: 16px;
    box-shadow: 0 0 0 12px rgba(16, 185, 129, 0.05);
}
.vx-status-state--saved .vx-status-icon svg {
    width: 28px;
    height: 28px;
}
.vx-status-state--saved h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #10b981;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.vx-status-state--saved p {
    color: var(--vx-text-muted);
    font-size: 0.85rem;
}

/* State Toggling */
.vx-status-state {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: vx-fade-in 0.4s ease forwards;
}
.vx-status-panel.is-unsaved .vx-status-state--unsaved {
    display: flex;
}
.vx-status-panel.is-saved .vx-status-state--saved {
    display: flex;
}

@keyframes vx-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Skins --- */
.vx-skins {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.vx-skin {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    border-right: 1px solid var(--vx-border);
    transition: all var(--vx-duration) var(--vx-ease);
    position: relative;
}
.vx-skin:last-child { border-right: none; }
.vx-skin:hover { background: var(--vx-surface-hover); }
.vx-skin--active {
    background: var(--vx-surface-active);
}
.vx-skin--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--vx-accent-gradient);
    border-radius: 1px;
}
.vx-skin__input { position: absolute; opacity: 0; pointer-events: none; }
.vx-skin__preview {
    width: 48px;
    height: 28px;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform var(--vx-duration) var(--vx-ease);
}
.vx-skin:hover .vx-skin__preview { transform: scale(1.08); }
.vx-skin__info { text-align: center; }
.vx-skin__name { display: block; font-weight: 600; font-size: 0.85rem; color: var(--vx-text); }
.vx-skin__desc { display: block; font-size: 0.7rem; color: var(--vx-text-dim); margin-top: 2px; }

/* --- Preview --- */
.vx-preview {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--vx-radius-sm);
    overflow: hidden;
    background: #000;
}
.vx-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.vx-preview__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 8px;
    color: var(--vx-text-dim);
    position: relative;
}
.vx-preview__empty h4 { font-size: 1.1rem; font-weight: 600; color: var(--vx-text-muted); }
.vx-preview__empty p { font-size: 0.85rem; }
.vx-preview__pulse {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--vx-accent-glow) 0%, transparent 70%);
    animation: vx-pulse 3s ease-in-out infinite;
}

@keyframes vx-pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.6; }
}

/* --- Toggle Switch --- */
.vx-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}
.vx-switch + .vx-switch { border-top: 1px solid rgba(255,255,255,0.03); }
.vx-switch__label { font-size: 0.85rem; color: var(--vx-text-muted); }

.vx-toggle {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}
.vx-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.vx-toggle__track {
    width: 38px;
    height: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    transition: background var(--vx-duration) var(--vx-ease);
    display: flex;
    align-items: center;
    padding: 2px;
}
.vx-toggle__thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all var(--vx-duration) var(--vx-ease);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.vx-toggle input:checked + .vx-toggle__track {
    background: var(--vx-accent);
}
.vx-toggle input:checked + .vx-toggle__track .vx-toggle__thumb {
    transform: translateX(18px);
    background: #fff;
    box-shadow: 0 0 8px var(--vx-accent-glow);
}

/* --- Lead Capture Builder Card --- */
.vx-help-dot {
    display: inline-grid;
    width: 14px;
    height: 14px;
    place-items: center;
    margin-left: 3px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    color: var(--vx-text-dim);
    font-size: 9px;
    cursor: help;
}
.vx-lead-card__body { padding-top: 14px; }
.vx-lead-card__settings { transition: opacity .18s ease; }
.vx-lead-card__settings.is-disabled { opacity: .48; }
.vx-lead-label {
    color: var(--vx-text-dim);
    font-size: .72rem;
    font-weight: 600;
}
.vx-lead-label--spaced { margin-top: 14px; }
.vx-lead-after {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 7px 0 9px;
    color: var(--vx-text-muted);
    font-size: .78rem;
}
.vx-lead-after .vx-input { width: 62px; padding: 6px 7px; }
.vx-lead-timings {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}
.vx-lead-timing { position: relative; }
.vx-lead-timing input { position: absolute; opacity: 0; pointer-events: none; }
.vx-lead-timing span {
    display: block;
    padding: 6px 2px;
    border: 1px solid var(--vx-border);
    border-radius: 5px;
    background: rgba(255,255,255,.025);
    color: var(--vx-text-muted);
    font-size: .67rem;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: all var(--vx-duration) var(--vx-ease);
}
.vx-lead-timing:hover span { color: #fff; border-color: rgba(108,92,231,.5); }
.vx-lead-timing.is-active span {
    border-color: var(--vx-accent);
    background: rgba(108,92,231,.28);
    color: #fff;
}
.vx-lead-fields { display: flex; gap: 18px; margin-top: 8px; }
.vx-check { display: inline-flex; align-items: center; gap: 6px; color: var(--vx-text-muted); font-size: .74rem; cursor: pointer; }
.vx-check input { accent-color: var(--vx-accent); }
.vx-lead-skip { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.04); }
.vx-lead-skip .vx-switch__label { font-size: .76rem; }
.vx-lead-preview {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(108,92,231,.3);
    border-radius: 6px;
    background: rgba(108,92,231,.04);
    color: var(--vx-accent-light);
    font: 600 .74rem var(--vx-font);
    cursor: pointer;
    transition: all var(--vx-duration) var(--vx-ease);
}
.vx-lead-preview:hover { border-color: var(--vx-accent); background: rgba(108,92,231,.12); color: #fff; }
.vx-lead-preview:disabled { opacity: .45; cursor: not-allowed; }

/* --- Inputs --- */
.vx-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--vx-surface);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-xs);
    color: var(--vx-text);
    font-family: var(--vx-font);
    font-size: 0.85rem;
    transition: all var(--vx-duration) var(--vx-ease);
    outline: none;
}
.vx-input:focus { border-color: var(--vx-border-focus); box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1); }
.vx-input::placeholder { color: var(--vx-text-dim); }
.vx-input--sm { width: 70px; flex-shrink: 0; text-align: center; }
.vx-input--file { padding: 7px 10px; font-size: 0.8rem; }
.vx-input--file::file-selector-button {
    background: var(--vx-surface-hover);
    color: var(--vx-text-muted);
    border: 1px solid var(--vx-border);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-right: 8px;
}

.vx-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--vx-surface);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-xs);
    color: var(--vx-text);
    font-family: var(--vx-font);
    font-size: 0.85rem;
    resize: vertical;
    outline: none;
    transition: all var(--vx-duration) var(--vx-ease);
}
.vx-textarea:focus { border-color: var(--vx-border-focus); box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1); }
.vx-textarea--code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.8rem; color: var(--vx-accent-light); }

.vx-field { margin-bottom: 12px; }
.vx-field:last-child { margin-bottom: 0; }
.vx-field__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--vx-text-dim);
    margin-bottom: 6px;
}

/* --- Range Slider --- */
.vx-range {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
}
.vx-range + .vx-range { border-top: 1px solid rgba(255,255,255,0.03); }
.vx-range--compact { padding: 3px 0; }
.vx-range__label {
    font-size: 0.8rem;
    color: var(--vx-text-dim);
    white-space: nowrap;
    min-width: 55px;
}
.vx-range__control { display: flex; align-items: center; gap: 8px; flex: 1; }
.vx-range__input {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.vx-range__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--vx-accent);
    box-shadow: 0 0 8px var(--vx-accent-glow);
    cursor: pointer;
    transition: transform 0.15s;
}
.vx-range__input::-webkit-slider-thumb:hover { transform: scale(1.2); }
.vx-range__input::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--vx-accent);
    border: none;
    cursor: pointer;
}
.vx-range__value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--vx-accent-light);
    background: rgba(108, 92, 231, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 40px;
    text-align: center;
    white-space: nowrap;
}

/* --- Shapes --- */
.vx-shapes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}
.vx-shape {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: var(--vx-radius-xs);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--vx-duration) var(--vx-ease);
    background: var(--vx-surface);
}
.vx-shape:hover { border-color: var(--vx-border); background: var(--vx-surface-hover); }
.vx-shape--active { border-color: var(--vx-accent); background: rgba(108, 92, 231, 0.08); }
.vx-shape__input { position: absolute; opacity: 0; pointer-events: none; }
.vx-shape__preview { color: var(--vx-text-muted); }
.vx-shape--active .vx-shape__preview { color: var(--vx-accent-light); }
.vx-shape__name { font-size: 0.65rem; color: var(--vx-text-dim); text-transform: uppercase; letter-spacing: 0.5px; }

/* --- Colors --- */
.vx-color { margin-bottom: 14px; }
.vx-color:last-child { margin-bottom: 0; }
.vx-color__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--vx-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}
.vx-color__row { display: flex; align-items: center; gap: 8px; }
.vx-color__swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.vx-color__swatch--sm { width: 16px; height: 16px; border-radius: 4px; border-width: 1px; }
.vx-color__hex { flex: 1; }
.vx-color__native {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
}
.vx-color__native::-webkit-color-swatch-wrapper { padding: 0; }
.vx-color__native::-webkit-color-swatch { border: none; border-radius: 4px; }

/* --- Chapter/Subtitle/Audio Track Rows --- */
.chapter-row, .subtitle-row, .audio-track-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}
.chapter-row + .chapter-row,
.subtitle-row + .subtitle-row,
.audio-track-row + .audio-track-row {
    border-top: 1px solid rgba(255,255,255,0.03);
}

/* --- Size Inputs --- */
.vx-size-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vx-size-sep { color: var(--vx-text-dim); font-weight: 300; }

/* --- Badge --- */
.vx-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    background: var(--vx-surface-hover);
    color: var(--vx-text-muted);
}
.vx-badge--accent { background: rgba(108, 92, 231, 0.15); color: var(--vx-accent-light); }
.vx-badge--sm { padding: 2px 8px; font-size: 0.65rem; }

/* --- Tables --- */
.vx-table-wrap { overflow-x: auto; }
.vx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.vx-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--vx-text-dim);
    border-bottom: 1px solid var(--vx-border);
}
.vx-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--vx-text-muted);
}
.vx-table tr:hover td { background: var(--vx-surface); color: var(--vx-text); }

/* --- Text Helpers --- */
.vx-text--muted { color: var(--vx-text-muted); }
.vx-text--sm { font-size: 0.8rem; margin-top: 8px; }
.vx-text--center { text-align: center; padding: 20px 0; }
.vx-text--mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.78rem; }
.vx-link { color: var(--vx-accent-light); }
.vx-link:hover { color: #fff; text-decoration: underline; }

code {
    background: var(--vx-surface-hover);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--vx-accent-light);
}

/* --- Detail Page --- */
.vx-detail__hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0 24px;
}
.vx-detail__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 8px;
}
.vx-detail__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--vx-gap);
}
.vx-detail-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.85rem;
    color: var(--vx-text-muted);
}
.vx-detail-list__color { display: flex; align-items: center; gap: 6px; }

/* --- Error Page --- */
.vx-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    gap: 12px;
}
.vx-error__icon {
    font-size: 5rem;
    font-weight: 900;
    background: var(--vx-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.vx-error h1 { font-size: 1.5rem; }
.vx-error__debug {
    background: var(--vx-surface);
    padding: 12px 16px;
    border-radius: var(--vx-radius-sm);
    font-size: 0.8rem;
    color: var(--vx-error);
    max-width: 500px;
    overflow-x: auto;
}

/* --- Toast --- */
.vx-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--vx-radius-sm);
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--vx-border);
    color: var(--vx-text);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    transform: translateX(120%);
    transition: transform 0.4s var(--vx-ease);
}
.vx-toast--visible { transform: translateX(0); }
.vx-toast__icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.vx-toast--success .vx-toast__icon { background: rgba(0, 184, 148, 0.2); color: var(--vx-success); }
.vx-toast--error .vx-toast__icon { background: rgba(225, 112, 85, 0.2); color: var(--vx-error); }

/* --- Analytics --- */
.vx-analytics .vx-card + .vx-card { margin-top: var(--vx-gap); }

/* --- Captured Leads --- */
.vx-leads-page { max-width: 1240px; margin: 0 auto; }
.vx-leads-hero { padding: 12px 0 24px; }
.vx-leads-hero__eyebrow {
    display: inline-block;
    margin-bottom: 5px;
    color: var(--vx-accent-light);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}
.vx-leads-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--vx-gap);
    margin-bottom: var(--vx-gap);
}
.vx-lead-stat {
    position: relative;
    display: flex;
    min-height: 108px;
    flex-direction: column;
    justify-content: center;
    padding: 20px 24px;
    overflow: hidden;
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius);
    background: linear-gradient(145deg, rgba(108,92,231,.08), var(--vx-surface));
}
.vx-lead-stat::after {
    position: absolute;
    top: -28px;
    right: -18px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--vx-accent-glow);
    filter: blur(28px);
    content: '';
}
.vx-lead-stat__label { color: var(--vx-text-muted); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }
.vx-lead-stat strong { margin-top: 4px; color: #fff; font-size: 2rem; line-height: 1; }
.vx-leads-card { overflow: visible; }
.vx-leads-card__header { flex-wrap: wrap; }
.vx-leads-count {
    padding: 4px 9px;
    border-radius: 20px;
    background: rgba(108,92,231,.14);
    color: var(--vx-accent-light);
    font-size: .7rem;
    font-weight: 700;
}
.vx-leads-search {
    display: flex;
    width: min(280px, 100%);
    align-items: center;
    gap: 7px;
    margin-left: 6px;
    padding: 7px 10px;
    border: 1px solid var(--vx-border);
    border-radius: 8px;
    background: rgba(0,0,0,.16);
    color: var(--vx-text-dim);
}
.vx-leads-search:focus-within { border-color: var(--vx-accent); box-shadow: 0 0 0 3px rgba(108,92,231,.1); }
.vx-leads-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font: 500 .78rem var(--vx-font); }
.vx-leads-search input::placeholder { color: var(--vx-text-dim); }
.vx-leads-table td { vertical-align: middle; }
.vx-lead-contact { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.vx-lead-contact__avatar {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 1px solid rgba(108,92,231,.28);
    border-radius: 9px;
    background: rgba(108,92,231,.12);
    color: var(--vx-accent-light);
    font-size: .75rem;
    font-weight: 800;
}
.vx-lead-contact a { display: block; color: #fff; font-size: .82rem; font-weight: 600; }
.vx-lead-contact a:hover { color: var(--vx-accent-light); }
.vx-lead-contact small { display: block; margin-top: 2px; color: var(--vx-text-dim); font-size: .7rem; }
.vx-lead-source { display: inline-block; max-width: 210px; overflow: hidden; color: var(--vx-text-muted); text-overflow: ellipsis; white-space: nowrap; }
.vx-leads-table time { color: var(--vx-text-muted); white-space: nowrap; }
.vx-leads-empty { display: flex; min-height: 340px; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; text-align: center; }
.vx-leads-empty__icon { display: grid; width: 68px; height: 68px; place-items: center; margin-bottom: 18px; border: 1px solid rgba(108,92,231,.25); border-radius: 20px; background: rgba(108,92,231,.1); color: var(--vx-accent-light); }
.vx-leads-empty h2 { color: #fff; font-size: 1.25rem; }
.vx-leads-empty p { max-width: 420px; margin: 8px 0 20px; color: var(--vx-text-muted); font-size: .85rem; line-height: 1.55; }
.vx-leads-no-results { padding: 34px 18px; color: var(--vx-text-muted); text-align: center; }
.vx-leads-no-results[hidden], .vx-leads-table tr[hidden] { display: none; }

/* --- Responsive --- */
@media (max-width: 1200px) {
    .vx-builder__grid {
        grid-template-columns: 260px 1fr;
    }
    .vx-builder__sidebar--right {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: var(--vx-gap);
    }
}

@media (max-width: 768px) {
    .vx-builder__grid {
        grid-template-columns: 1fr;
    }
    .vx-skins { grid-template-columns: 1fr; }
    .vx-skin { border-right: none; border-bottom: 1px solid var(--vx-border); }
    .vx-skin:last-child { border-bottom: none; }
    .vx-detail__hero { flex-direction: column; }
    .vx-detail__grid { grid-template-columns: 1fr; }
    .vx-header__inner { padding: 0 16px; }
    .vx-content { padding: 16px; }
    .vx-shapes { grid-template-columns: repeat(2, 1fr); }
    .vx-leads-stats { grid-template-columns: 1fr; }
    .vx-lead-stat { min-height: 88px; }
    .vx-leads-search { order: 3; width: 100%; margin: 6px 0 0; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ============================================
   PAYWALL — Locked State for Unpaid Users
   ============================================ */

/* Paywall Banner */
.vx-paywall-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 118, 117, 0.12), rgba(108, 92, 231, 0.12));
    border: 1px solid rgba(255, 118, 117, 0.25);
    border-radius: var(--vx-radius);
    padding: 24px 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
}

.vx-paywall-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 118, 117, 0.06), transparent);
    animation: vx-paywall-shimmer 3s ease-in-out infinite;
}

@keyframes vx-paywall-shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.vx-paywall-banner__icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 118, 117, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.vx-paywall-banner__icon svg {
    width: 26px;
    height: 26px;
    color: #ff7675;
}

.vx-paywall-banner__content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.vx-paywall-banner__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.vx-paywall-banner__text {
    font-size: 0.85rem;
    color: var(--vx-text-muted);
    line-height: 1.5;
}

.vx-paywall-banner__cta {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--vx-accent-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s var(--vx-ease), box-shadow 0.2s var(--vx-ease);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

.vx-paywall-banner__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.5);
    color: #fff;
}

/* Locked Form — disable all interactions */
.vx-builder__form--locked .vx-builder__sidebar,
.vx-builder__form--locked .vx-builder__sidebar--right {
    pointer-events: none;
    opacity: 0.35;
    filter: grayscale(0.3);
    user-select: none;
}

.vx-builder__form--locked .vx-card--preview {
    pointer-events: none;
    opacity: 0.35;
}

/* Blurred Embed Code */
.vx-embed-blurred {
    position: relative;
}

.vx-embed-blurred .vx-card__body {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

.vx-embed-blurred .vx-card__header {
    filter: blur(3px);
    pointer-events: none;
}

.vx-embed-blurred::after {
    content: '🔒 Purchase required';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(10, 10, 15, 0.4);
    border-radius: var(--vx-radius);
    z-index: 5;
    letter-spacing: 0.05em;
}

/* ============================================
   NICE TRY! Modal Popup
   ============================================ */

.vx-nicetry-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--vx-ease), visibility 0.3s var(--vx-ease);
}

.vx-nicetry-overlay.vx-nicetry--active {
    opacity: 1;
    visibility: visible;
}

.vx-nicetry-card {
    background: linear-gradient(160deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 118, 117, 0.3);
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(255, 118, 117, 0.15), 0 0 120px rgba(108, 92, 231, 0.1);
}

.vx-nicetry-overlay.vx-nicetry--active .vx-nicetry-card {
    animation: vx-nicetry-shake 0.6s var(--vx-ease);
}

@keyframes vx-nicetry-shake {
    0% { transform: scale(0.8) rotate(0deg); opacity: 0; }
    20% { transform: scale(1.05) rotate(-1deg); }
    40% { transform: scale(0.98) rotate(1deg); }
    60% { transform: scale(1.02) rotate(-0.5deg); }
    80% { transform: scale(0.99) rotate(0.5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.vx-nicetry-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 118, 117, 0.08), transparent, rgba(108, 92, 231, 0.08), transparent);
    animation: vx-nicetry-rotate 6s linear infinite;
}

@keyframes vx-nicetry-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vx-nicetry-emoji {
    position: relative;
    z-index: 1;
    font-size: 52px;
    margin-bottom: 16px;
    animation: vx-nicetry-bounce 1s ease-in-out infinite alternate;
}

@keyframes vx-nicetry-bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.vx-nicetry-title {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff7675, #fd79a8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.vx-nicetry-text {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    color: var(--vx-text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
}

.vx-nicetry-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: var(--vx-accent-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s var(--vx-ease), box-shadow 0.2s var(--vx-ease);
    box-shadow: 0 0 24px rgba(108, 92, 231, 0.4);
}

.vx-nicetry-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 36px rgba(108, 92, 231, 0.6);
    color: #fff;
}

.vx-nicetry-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--vx-text-muted);
    font-size: 18px;
    transition: background 0.2s var(--vx-ease), color 0.2s var(--vx-ease);
}

.vx-nicetry-close:hover {
    background: rgba(255, 118, 117, 0.15);
    color: #ff7675;
}
