/*
  Pastor Video Creator (Plugin CSS)
  NOTE: Fully scoped to .pvc-wizard-wrapper to avoid affecting the host theme.
*/

/* CRITICAL: Reserve scrollbar space to prevent layout shifts when modal opens */
/* This works in modern browsers (Chrome 94+, Firefox 97+, Safari 16.4+, Edge 94+) */
html {
    scrollbar-gutter: stable;
}

/* CRITICAL: Make the reserved scrollbar gutter space gray when modal is open */
html.wizard-modal-open {
    background-color: #d0d0d0;
}

/* ==========================================================================
   THEME SYSTEM - LIGHT MODE IS DEFAULT
   Dark mode requires data-theme="dark" attribute
   ========================================================================== */

.pvc-wizard-wrapper {
    /* LIGHT MODE - DEFAULT COLORS */
    --bg-card: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-input: #ffffff;
    --bg-primary: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-accent: #111827;
    --border-primary: #e5e7eb;
    --border-secondary: #f3f4f6;
    --border-accent: #d1d5db;
    /* Source-of-truth accents */
    --pvc-primary: #5b3af1;
    --pvc-primary-hover: #4f46e5;
    --pvc-primary-disabled: rgba(91, 58, 241, 0.6);
    --pvc-primary-shadow: rgba(91, 58, 241, 0.4);
    --pvc-danger: #9d1616;
    --pvc-danger-hover: #dc3545;

    /* Backwards-compat aliases used across template/JS */
    --accent-primary: var(--pvc-primary);
    --accent-secondary: var(--pvc-primary);
    --accent-tertiary: #06b6d4;
    --accent-success: #10b981;
    --accent-error: #ef4444;
    --accent-warning: #f59e0b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,.15);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.2);
    --font-primary: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-display: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-smooth: 0.2s ease;
    scroll-behavior: smooth;
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
}

/* ==========================================================================
   DARK MODE - Based on test.php design
   Activated with data-theme="dark" attribute
   ========================================================================== */

/* Dark mode variable definitions - apply to wrapper and modal overlay */
.pvc-wizard-wrapper[data-theme="dark"],
.wizard-modal-overlay[data-theme="dark"] {
    /* DARK MODE COLORS - Based on pastorsforge.com theme */
    --bg-card: #0a0a0a;
    --bg-secondary: #141414;
    --bg-input: #1a1a1a;
    --bg-primary: #000000;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #808080;
    --text-accent: #ffffff;
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.05);
    --border-accent: rgba(255, 255, 255, 0.2);
    /* Orange accent colors matching pastorsforge.com */
    --accent-primary: #5b3af1;
    --accent-secondary: #5b3af1;
    --accent-tertiary: #FFB347;
    --accent-success: #10b981;
    --accent-error: #ef4444;
    --accent-warning: #5b3af1;
    --shadow-sm: 0 4px 6px rgba(0,0,0,.3);
    --shadow-md: 0 10px 25px rgba(0,0,0,.4);
    --shadow-lg: 0 20px 40px rgba(0,0,0,.5);
}

/* Ensure all children inside dark mode modal inherit variables */
.wizard-modal-overlay[data-theme="dark"] *,
.pvc-wizard-wrapper[data-theme="dark"] * {
    /* Variables are inherited, but this ensures cascade */
}

/* Dark mode body/html background when modal is open */
html.wizard-modal-open[data-theme="dark"] {
    background-color: #141414;
}

/* Dark mode loading screen */
.pvc-wizard-wrapper[data-theme="dark"] .pvc-loading-screen {
    background: linear-gradient(135deg, #141414 0%, #1a1a1a 100%);
}

.pvc-wizard-wrapper[data-theme="dark"] .pvc-loading-screen .loading-spinner-circle {
    border-top-color: #5b3af1;
    border-right-color: #5b3af1;
}

/* Dark mode modal overlay */
.wizard-modal-overlay[data-theme="dark"] {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* Dark mode sidebar */
.pvc-wizard-wrapper[data-theme="dark"] .dashboard-sidebar,
.wizard-modal-overlay[data-theme="dark"] .dashboard-sidebar {
    background: #0a0a0a;
    border-color: rgba(255, 255, 255, 0.1);
}

.pvc-wizard-wrapper[data-theme="dark"] .nav-item.active,
.wizard-modal-overlay[data-theme="dark"] .nav-item.active {
    background: rgba(91, 58, 241, 0.14);
}

/* Dark mode scrollbars */
.pvc-wizard-wrapper[data-theme="dark"] .wizard-modal-container {
    scrollbar-color: #4b5563 #141414 !important;
}

.pvc-wizard-wrapper[data-theme="dark"] .wizard-modal-container::-webkit-scrollbar-track {
    background: #141414 !important;
}

.pvc-wizard-wrapper[data-theme="dark"] .wizard-modal-container::-webkit-scrollbar-thumb {
    background: #4b5563 !important;
    border-color: #141414 !important;
}

.pvc-wizard-wrapper[data-theme="dark"] .wizard-modal-container::-webkit-scrollbar-thumb:hover {
    background: #6b7280 !important;
}

/* Dark mode: .dashboard-content scrollbar — no custom colors (browser default gray thumb / gray track) */

/* ==========================================================================
   DARK MODE - Additional Component Overrides
   ========================================================================== */

/* Dark mode input fields */
.pvc-wizard-wrapper[data-theme="dark"] input[type="text"],
.pvc-wizard-wrapper[data-theme="dark"] input[type="email"],
.pvc-wizard-wrapper[data-theme="dark"] input[type="password"],
.pvc-wizard-wrapper[data-theme="dark"] input[type="search"],
.pvc-wizard-wrapper[data-theme="dark"] textarea,
.pvc-wizard-wrapper[data-theme="dark"] select,
.wizard-modal-overlay[data-theme="dark"] input[type="text"],
.wizard-modal-overlay[data-theme="dark"] input[type="email"],
.wizard-modal-overlay[data-theme="dark"] input[type="password"],
.wizard-modal-overlay[data-theme="dark"] input[type="search"],
.wizard-modal-overlay[data-theme="dark"] textarea,
.wizard-modal-overlay[data-theme="dark"] select {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.pvc-wizard-wrapper[data-theme="dark"] input::placeholder,
.pvc-wizard-wrapper[data-theme="dark"] textarea::placeholder,
.wizard-modal-overlay[data-theme="dark"] input::placeholder,
.wizard-modal-overlay[data-theme="dark"] textarea::placeholder {
    color: #6b7280;
}

/* Dark mode cards and sections */
.pvc-wizard-wrapper[data-theme="dark"] .wizard-step,
.pvc-wizard-wrapper[data-theme="dark"] .option-card,
.pvc-wizard-wrapper[data-theme="dark"] .wizard-new-option-card,
.pvc-wizard-wrapper[data-theme="dark"] .product-card,
.pvc-wizard-wrapper[data-theme="dark"] .account-card,
.pvc-wizard-wrapper[data-theme="dark"] .settings-card,
.pvc-wizard-wrapper[data-theme="dark"] .help-card,
.wizard-modal-overlay[data-theme="dark"] .wizard-step,
.wizard-modal-overlay[data-theme="dark"] .option-card,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-option-card,
.wizard-modal-overlay[data-theme="dark"] .product-card,
.wizard-modal-overlay[data-theme="dark"] .account-card,
.wizard-modal-overlay[data-theme="dark"] .settings-card,
.wizard-modal-overlay[data-theme="dark"] .help-card {
    background: #0a0a0a;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Dark mode upload areas */
.pvc-wizard-wrapper[data-theme="dark"] .upload-label,
.pvc-wizard-wrapper[data-theme="dark"] .upload-preview,
.pvc-wizard-wrapper[data-theme="dark"] .uploaded-audio-card,
.pvc-wizard-wrapper[data-theme="dark"] .uploaded-logo-preview,
.wizard-modal-overlay[data-theme="dark"] .upload-label,
.wizard-modal-overlay[data-theme="dark"] .upload-preview,
.wizard-modal-overlay[data-theme="dark"] .uploaded-audio-card,
.wizard-modal-overlay[data-theme="dark"] .uploaded-logo-preview {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.2);
}

.pvc-wizard-wrapper[data-theme="dark"] .upload-label:hover,
.wizard-modal-overlay[data-theme="dark"] .upload-label:hover {
    background: rgba(91, 58, 241, 0.12);
    border-color: #5b3af1;
}

/* Dark mode tabs and navigation */
.pvc-wizard-wrapper[data-theme="dark"] .dashboard-tab.active,
.wizard-modal-overlay[data-theme="dark"] .dashboard-tab.active {
    background: #141414;
}

.pvc-wizard-wrapper[data-theme="dark"] .nav-item,
.wizard-modal-overlay[data-theme="dark"] .nav-item {
    color: #a0a0a0;
}

.pvc-wizard-wrapper[data-theme="dark"] .nav-item:hover,
.wizard-modal-overlay[data-theme="dark"] .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.pvc-wizard-wrapper[data-theme="dark"] .nav-item.active,
.wizard-modal-overlay[data-theme="dark"] .nav-item.active {
    color: #ffffff;
    border-left-color: #5b3af1;
}

/* Dark mode filters and bubbles */
.pvc-wizard-wrapper[data-theme="dark"] .theme-bubble,
.pvc-wizard-wrapper[data-theme="dark"] .template-bubble,
.pvc-wizard-wrapper[data-theme="dark"] .aspect-filter-bubble,
.pvc-wizard-wrapper[data-theme="dark"] .history-filter-btn,
.pvc-wizard-wrapper[data-theme="dark"] .history-sort-btn,
.wizard-modal-overlay[data-theme="dark"] .theme-bubble,
.wizard-modal-overlay[data-theme="dark"] .template-bubble,
.wizard-modal-overlay[data-theme="dark"] .aspect-filter-bubble,
.wizard-modal-overlay[data-theme="dark"] .history-filter-btn,
.wizard-modal-overlay[data-theme="dark"] .history-sort-btn {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Dark mode voice/music library */
.pvc-wizard-wrapper[data-theme="dark"] .voice-library-scrollable,
.pvc-wizard-wrapper[data-theme="dark"] .music-library-grid,
.wizard-modal-overlay[data-theme="dark"] .voice-library-scrollable,
.wizard-modal-overlay[data-theme="dark"] .music-library-grid {
    background: #0a0a0a;
    border-color: rgba(255, 255, 255, 0.1);
}

.pvc-wizard-wrapper[data-theme="dark"] .library-track,
.wizard-modal-overlay[data-theme="dark"] .library-track:not(.voice-card) {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.pvc-wizard-wrapper[data-theme="dark"] .library-track:not(.voice-card):hover,
.wizard-modal-overlay[data-theme="dark"] .library-track:not(.voice-card):hover {
    background: rgba(91, 58, 241, 0.12) !important;
    border-color: #5b3af1 !important;
    box-shadow: none !important;
}

/* Dark mode welcome screen */
.pvc-wizard-wrapper[data-theme="dark"] .pvc-welcome-screen,
.wizard-modal-overlay[data-theme="dark"] .pvc-welcome-screen {
    background: linear-gradient(135deg, #141414 0%, #1a1a1a 100%);
}

.pvc-wizard-wrapper[data-theme="dark"] .welcome-login-form,
.wizard-modal-overlay[data-theme="dark"] .welcome-login-form {
    background: #0a0a0a;
    border-color: rgba(255, 255, 255, 0.1);
}

.pvc-wizard-wrapper[data-theme="dark"] .login-tab,
.wizard-modal-overlay[data-theme="dark"] .login-tab {
    background: transparent;
    color: #a0a0a0;
}

.pvc-wizard-wrapper[data-theme="dark"] .login-tab.active,
.wizard-modal-overlay[data-theme="dark"] .login-tab.active {
    background: rgba(91, 58, 241, 0.12);
    color: #ffffff;
}

/* Dark mode credits info */
.pvc-wizard-wrapper[data-theme="dark"] .credits-info,
.pvc-wizard-wrapper[data-theme="dark"] .credit-counter,
.wizard-modal-overlay[data-theme="dark"] .credits-info,
.wizard-modal-overlay[data-theme="dark"] .credit-counter {
    background: rgba(91, 58, 241, 0.12);
    border-color: rgba(91, 58, 241, 0.30);
}

/* Dark mode scheduler */
.pvc-wizard-wrapper[data-theme="dark"] .scheduler-calendar-wrapper,
.pvc-wizard-wrapper[data-theme="dark"] .autopost-calendar-wrapper,
.wizard-modal-overlay[data-theme="dark"] .scheduler-calendar-wrapper,
.wizard-modal-overlay[data-theme="dark"] .autopost-calendar-wrapper {
    background: #0a0a0a;
}

.pvc-wizard-wrapper[data-theme="dark"] .scheduler-calendar-day,
.pvc-wizard-wrapper[data-theme="dark"] .autopost-calendar-day,
.wizard-modal-overlay[data-theme="dark"] .scheduler-calendar-day,
.wizard-modal-overlay[data-theme="dark"] .autopost-calendar-day {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.1);
}

.pvc-wizard-wrapper[data-theme="dark"] .scheduler-calendar-day:hover:not(.other-month):not(.past),
.pvc-wizard-wrapper[data-theme="dark"] .autopost-calendar-day:hover:not(.other-month),
.wizard-modal-overlay[data-theme="dark"] .scheduler-calendar-day:hover:not(.other-month):not(.past),
.wizard-modal-overlay[data-theme="dark"] .autopost-calendar-day:hover:not(.other-month) {
    background: rgba(91, 58, 241, 0.14);
    border-color: #5b3af1;
}

/* Dark mode upload progress track only (render bar has no visible track — see wizard-new.css) */
.pvc-wizard-wrapper[data-theme="dark"] .upload-progress-bar,
.wizard-modal-overlay[data-theme="dark"] .upload-progress-bar {
    background: #1a1a1a;
}

/* Dark mode modal close button */
.pvc-wizard-wrapper[data-theme="dark"] .wizard-modal-close,
.wizard-modal-overlay[data-theme="dark"] .wizard-modal-close {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transition: all 0.3s ease !important;
}

/* Dark mode modal close button hover - red animation */
.pvc-wizard-wrapper[data-theme="dark"] .wizard-modal-close:hover,
.wizard-modal-overlay[data-theme="dark"] .wizard-modal-close:hover {
    background: #dc3545 !important;
    color: white !important;
    transform: rotate(90deg) !important;
    border-color: #dc3545 !important;
}

/* Dark mode debug panel - keep it distinct */
.pvc-wizard-wrapper[data-theme="dark"] [id*="debugPanel"] {
    background: #0a0a0a;
    border-color: #dc3545;
    color: #ffffff;
}

/* Dark mode SweetAlert2 */
[data-theme="dark"] .swal2-popup {
    background: #0a0a0a !important;
    color: #ffffff !important;
}

[data-theme="dark"] .swal2-title {
    color: #ffffff !important;
}

[data-theme="dark"] .swal2-html-container {
    color: #a0a0a0 !important;
}

/* Dark mode modal container background */
.wizard-modal-overlay[data-theme="dark"] .wizard-modal-container {
    background: var(--bg-card);
}

/* ==========================================================================
   DARK MODE - Additional Fixes
   ========================================================================== */

/* Dark mode headings - ensure all text is white */
.wizard-modal-overlay[data-theme="dark"] h1,
.wizard-modal-overlay[data-theme="dark"] h2,
.wizard-modal-overlay[data-theme="dark"] h3,
.wizard-modal-overlay[data-theme="dark"] h4,
.wizard-modal-overlay[data-theme="dark"] h5,
.wizard-modal-overlay[data-theme="dark"] h6,
.wizard-modal-overlay[data-theme="dark"] .section-title,
.wizard-modal-overlay[data-theme="dark"] .step-title,
.wizard-modal-overlay[data-theme="dark"] .card-title,
.wizard-modal-overlay[data-theme="dark"] label {
    color: #ffffff !important;
}


/* Dark mode badges */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-option-badge,
.wizard-modal-overlay[data-theme="dark"] .prayer-mode-card .wizard-new-option-badge {
    background: var(--pvc-primary) !important;
}

/* Dark mode history video title */
.wizard-modal-overlay[data-theme="dark"] .history-video-title {
    color: #a0a0a0 !important;
}

/* Dark mode - Paste Script and Generate AI dropdowns/sections */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-textarea,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options,
.wizard-modal-overlay[data-theme="dark"] .script-editor,
.wizard-modal-overlay[data-theme="dark"] .ai-options {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-textarea::placeholder {
    color: #808080 !important;
}

.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-textarea:focus {
    border-color: #5b3af1 !important;
}

/* Dark mode - Form groups inside dropdowns */
.wizard-modal-overlay[data-theme="dark"] .form-group input,
.wizard-modal-overlay[data-theme="dark"] .form-group textarea,
.wizard-modal-overlay[data-theme="dark"] .form-group select,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options input,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options textarea,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options select,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor input,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor textarea {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] .form-group input::placeholder,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options input::placeholder,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options textarea::placeholder {
    color: #808080 !important;
}

.wizard-modal-overlay[data-theme="dark"] .form-group label {
    color: #ffffff !important;
}

/* Dark mode - Save Script button - matches Use This Voice style */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor button,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor .btn,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor .wizard-new-btn {
    background: var(--pvc-primary) !important;
    border-color: var(--pvc-primary) !important;
    color: #ffffff !important;
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor button i,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor .wizard-new-btn i {
    color: #ffffff !important;
}

/* Shine effect for Save Script button */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor button::before,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor .wizard-new-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor button:hover::before,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor .wizard-new-btn:hover::before {
    left: 100%;
}

.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor button:hover,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor .wizard-new-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--pvc-primary-shadow);
    background: var(--pvc-primary) !important;
}

/* Disabled state - grayed out */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor button:disabled,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor .wizard-new-btn:disabled {
    background: rgba(91, 58, 241, 0.4) !important;
    border-color: rgba(91, 58, 241, 0.4) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    cursor: not-allowed;
}

.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor button:disabled i,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-script-editor .wizard-new-btn:disabled i {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Dark mode - AI Options buttons - orange */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options button,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options .btn,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options .wizard-new-btn {
    background: #5b3af1 !important;
    border-color: #5b3af1 !important;
    color: #000000 !important;
}

.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options button:hover,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-ai-options .wizard-new-btn:hover {
    background: #5b3af1 !important;
    border-color: #5b3af1 !important;
}

/* Dark mode - All primary action buttons orange */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-btn.primary,
.wizard-modal-overlay[data-theme="dark"] .btn-primary,
.wizard-modal-overlay[data-theme="dark"] button.primary {
    background: #5b3af1 !important;
    border-color: #5b3af1 !important;
    color: #000000 !important;
}

.wizard-modal-overlay[data-theme="dark"] .wizard-new-btn.primary:hover,
.wizard-modal-overlay[data-theme="dark"] .btn-primary:hover {
    background: #5b3af1 !important;
    border-color: #5b3af1 !important;
}

/* Dark mode - Voice Library and Use Your Own (Step 3) */
.wizard-modal-overlay[data-theme="dark"] .voice-library-scrollable,
.wizard-modal-overlay[data-theme="dark"] .voice-library-container,
.wizard-modal-overlay[data-theme="dark"] .voice-library,
.wizard-modal-overlay[data-theme="dark"] .use-your-own,
.wizard-modal-overlay[data-theme="dark"] .upload-own-voice,
.wizard-modal-overlay[data-theme="dark"] .voice-upload-area {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-card,
.wizard-modal-overlay[data-theme="dark"] .voice-item,
.wizard-modal-overlay[data-theme="dark"] .voice-option {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-card:hover,
.wizard-modal-overlay[data-theme="dark"] .voice-item:hover,
.wizard-modal-overlay[data-theme="dark"] .voice-option:hover {
    background: #252525 !important;
    border-color: rgba(91, 58, 241, 0.30) !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-card.selected,
.wizard-modal-overlay[data-theme="dark"] .voice-item.selected,
.wizard-modal-overlay[data-theme="dark"] .voice-option.selected {
    border-color: #5b3af1 !important;
    background: rgba(91, 58, 241, 0.12) !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-name,
.wizard-modal-overlay[data-theme="dark"] .voice-card h4,
.wizard-modal-overlay[data-theme="dark"] .voice-item h4 {
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-description,
.wizard-modal-overlay[data-theme="dark"] .voice-card p,
.wizard-modal-overlay[data-theme="dark"] .voice-item p {
    color: #a0a0a0 !important;
}

/* Dark mode - Voice upload dropzone */
.wizard-modal-overlay[data-theme="dark"] .voice-dropzone,
.wizard-modal-overlay[data-theme="dark"] .audio-dropzone,
.wizard-modal-overlay[data-theme="dark"] .upload-dropzone {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #a0a0a0 !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-dropzone:hover,
.wizard-modal-overlay[data-theme="dark"] .audio-dropzone:hover,
.wizard-modal-overlay[data-theme="dark"] .upload-dropzone:hover {
    border-color: #5b3af1 !important;
    background: rgba(91, 58, 241, 0.12) !important;
}

/* Dark mode - Voice play buttons */
.wizard-modal-overlay[data-theme="dark"] .voice-play-btn,
.wizard-modal-overlay[data-theme="dark"] .play-voice-btn {
    background: #5b3af1 !important;
    color: #000000 !important;
}

/* Voice preview button - orange gradient */
.wizard-modal-overlay[data-theme="dark"] .voice-preview-btn,
.wizard-modal-overlay[data-theme="dark"] .voice-preview,
.voice-library-section .voice-preview-btn,
.voice-library-section .voice-preview {
    background: linear-gradient(180deg, #5d18e5 0%, #3a0e8d 100%) !important;
    color: black !important;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* ==========================================================================
   DARK MODE - Voice Library & Use Your Own Dropdowns (Step 3)
   ========================================================================== */

/* Voice library scrollable container */
.wizard-modal-overlay[data-theme="dark"] .voice-library-scrollable {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-library-scrollable::-webkit-scrollbar-track {
    background: #141414 !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-library-scrollable::-webkit-scrollbar-thumb {
    background: #404040 !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-library-scrollable::-webkit-scrollbar-thumb:hover {
    background: #505050 !important;
}

/* Voice select dropdown */
.wizard-modal-overlay[data-theme="dark"] .voice-select-dropdown {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-select-dropdown:hover,
.wizard-modal-overlay[data-theme="dark"] .voice-select-dropdown:focus {
    border-color: #5b3af1 !important;
    box-shadow: 0 0 0 3px rgba(91, 58, 241, 0.12) !important;
}

/* Voice preview button */
.wizard-modal-overlay[data-theme="dark"] .voice-preview-btn-small {
    background: #1a1a1a !important;
    color: #5b3af1 !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-preview-btn-small:hover {
    background: #5b3af1 !important;
    color: #000000 !important;
}

/* Browse all voices button */
.wizard-modal-overlay[data-theme="dark"] .browse-all-voices-btn {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #5b3af1 !important;
}

.wizard-modal-overlay[data-theme="dark"] .browse-all-voices-btn:hover {
    background: #5b3af1 !important;
    color: #000000 !important;
    border-color: #5b3af1 !important;
}

/* Voice library section backgrounds */
.wizard-modal-overlay[data-theme="dark"] .voice-library-section {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Voice cards in library */
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-card {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-card.selected,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-card:hover,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-card.selected:hover {
    background: rgba(91, 58, 241, 0.12) !important;
    border-color: #5b3af1 !important;
    box-shadow: none !important;
}

/* Voice name and description text */
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-name,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .track-title,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .track-name,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .library-info h4 {
    color: #ffffff !important;
}

/* Selected voice name: no gradient text (wizard-new.css aligns light/dark); keep solid readable colors */
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-card.selected .voice-name,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card.selected .voice-name,
.pvc-wizard-wrapper[data-theme="dark"] .voice-library-section .voice-card.selected .voice-name,
.pvc-wizard-wrapper[data-theme="dark"] .music-library-section .voice-card.selected .voice-name {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="light"] .voice-library-section .voice-card.selected .voice-name,
.wizard-modal-overlay[data-theme="light"] .music-library-section .voice-card.selected .voice-name,
.pvc-wizard-wrapper[data-theme="light"] .voice-library-section .voice-card.selected .voice-name,
.pvc-wizard-wrapper[data-theme="light"] .music-library-section .voice-card.selected .voice-name {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #111827 !important;
    color: #111827 !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-description,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .track-meta,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .instruction-text {
    color: #a0a0a0 !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-library-section .track-credits {
    color: #5b3af1 !important;
}

/* Library tracks */
.wizard-modal-overlay[data-theme="dark"] .library-track:not(.voice-card) {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.wizard-modal-overlay[data-theme="dark"] .library-track:not(.voice-card):hover {
    background: rgba(91, 58, 241, 0.12) !important;
    border-color: #5b3af1 !important;
    box-shadow: none !important;
}

.wizard-modal-overlay[data-theme="dark"] .library-track:not(.voice-card).selected {
    background: rgba(91, 58, 241, 0.12) !important;
    border-color: #5b3af1 !important;
    box-shadow: none !important;
}

/* Voice continue button */
.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section button:not(.voice-preview-btn) {
    background: #5b3af1 !important;
    border-color: #5b3af1 !important;
    color: #000000 !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button:hover,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section button:not(.voice-preview-btn):hover {
    background: #5b3af1 !important;
    border-color: #5b3af1 !important;
}

/* Voice preview button - dark mode styling with gold background */
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn {
    background: #5b3af1 !important;
    color: #000000 !important;
    border: none !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn:hover {
    background: #fdb44b !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn i,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn i.fa-play,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn i.fas,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn span {
    color: #000000 !important;
}

/* Playing state - red gradient */
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn.playing {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border-color: #dc2626 !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn.playing i,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn.playing span {
    color: white !important;
}

/* Voice modal (full library popup) */
.wizard-modal-overlay[data-theme="dark"] .voice-modal-content {
    background: #0a0a0a !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-modal-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* Upload your own section */
.wizard-modal-overlay[data-theme="dark"] .upload-voice-section,
.wizard-modal-overlay[data-theme="dark"] .own-voice-section,
.wizard-modal-overlay[data-theme="dark"] .custom-voice-upload,
.wizard-modal-overlay[data-theme="dark"] .custom-voice-section,
.wizard-modal-overlay[data-theme="dark"] .upload-audio-section,
.wizard-modal-overlay[data-theme="dark"] .audio-upload-area,
.wizard-modal-overlay[data-theme="dark"] .upload-area,
.wizard-modal-overlay[data-theme="dark"] .dropzone,
.wizard-modal-overlay[data-theme="dark"] [class*="upload-section"],
.wizard-modal-overlay[data-theme="dark"] [class*="audio-upload"],
.wizard-modal-overlay[data-theme="dark"] [class*="custom-voice"] {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Uploaded audio card */
.uploaded-audio-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.wizard-modal-overlay[data-theme="dark"] .uploaded-audio-card {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Custom voice section text */
.wizard-modal-overlay[data-theme="dark"] .custom-voice-section *,
.wizard-modal-overlay[data-theme="dark"] .custom-voice-section label,
.wizard-modal-overlay[data-theme="dark"] .custom-voice-section h4,
.wizard-modal-overlay[data-theme="dark"] .custom-voice-section h3 {
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] .custom-voice-section p,
.wizard-modal-overlay[data-theme="dark"] .custom-voice-section .description {
    color: #a0a0a0 !important;
}

.wizard-modal-overlay[data-theme="dark"] .upload-voice-section label,
.wizard-modal-overlay[data-theme="dark"] .own-voice-section label,
.wizard-modal-overlay[data-theme="dark"] .upload-audio-section label {
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] .upload-voice-section p,
.wizard-modal-overlay[data-theme="dark"] .own-voice-section p,
.wizard-modal-overlay[data-theme="dark"] .upload-audio-section p {
    color: #a0a0a0 !important;
}

/* Mic icon in upload section - orange */
.wizard-modal-overlay[data-theme="dark"] .upload-audio-section i,
.wizard-modal-overlay[data-theme="dark"] .audio-upload-area i,
.wizard-modal-overlay[data-theme="dark"] [class*="upload-section"] i.fa-microphone,
.wizard-modal-overlay[data-theme="dark"] [class*="upload"] i.fa-microphone,
.wizard-modal-overlay[data-theme="dark"] .dropzone i {
    color: #5b3af1 !important;
}

/* Voice Library - FREE tag orange */
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-free,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .free-tag,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section [class*="free"],
.wizard-modal-overlay[data-theme="dark"] .library-track .free-tag,
.wizard-modal-overlay[data-theme="dark"] .voice-card .free-tag {
    background: #5b3af1 !important;
    color: #000000 !important;
}

/* Voice Library - Credits tag red */
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .track-credits,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-credits,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section [class*="credits"],
.wizard-modal-overlay[data-theme="dark"] .library-track .track-credits {
    color: #ef4444 !important;
}

/* Voice Library - Preview text - black for preview button */
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn .voice-preview-text,
.wizard-modal-overlay[data-theme="dark"] .voice-library-section .voice-preview-btn span {
    color: #000000 !important;
}

/* voice-continue-button-wrapper, music-continue-button-wrapper & use-this-audio - grayed out red by default (disabled state) */
.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button,
.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button:disabled,
.wizard-modal-overlay[data-theme="dark"] .music-continue-button-wrapper button,
.wizard-modal-overlay[data-theme="dark"] .music-continue-button-wrapper button:disabled,
.wizard-modal-overlay[data-theme="dark"] .use-this-audio-btn:disabled,
.wizard-modal-overlay[data-theme="dark"] [class*="use-this-audio"]:disabled,
.wizard-modal-overlay[data-theme="dark"] [class*="use-audio"]:disabled {
    background: rgba(91, 58, 241, 0.4) !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button:disabled i,
.wizard-modal-overlay[data-theme="dark"] .music-continue-button-wrapper button:disabled i,
.wizard-modal-overlay[data-theme="dark"] .use-this-audio-btn:disabled i,
.wizard-modal-overlay[data-theme="dark"] [class*="use-this-audio"]:disabled i {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* voice-continue-button-wrapper, music-continue-button-wrapper & use-this-audio - when selected: solid red with white text */
.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button:not(:disabled),
.wizard-modal-overlay[data-theme="dark"] .music-continue-button-wrapper button:not(:disabled),
.wizard-modal-overlay[data-theme="dark"] .use-this-audio-btn:not(:disabled),
.wizard-modal-overlay[data-theme="dark"] [class*="use-this-audio"]:not(:disabled),
.wizard-modal-overlay[data-theme="dark"] [class*="use-audio"]:not(:disabled) {
    background: var(--pvc-primary) !important;
    border: none !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
}

.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button:not(:disabled) i,
.wizard-modal-overlay[data-theme="dark"] .music-continue-button-wrapper button:not(:disabled) i,
.wizard-modal-overlay[data-theme="dark"] .use-this-audio-btn:not(:disabled) i {
    color: #ffffff !important;
}

/* Shine effect on hover for Use This Voice/Music button */
.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button:not(:disabled)::before,
.wizard-modal-overlay[data-theme="dark"] .music-continue-button-wrapper button:not(:disabled)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button:not(:disabled):hover::before,
.wizard-modal-overlay[data-theme="dark"] .music-continue-button-wrapper button:not(:disabled):hover::before {
    left: 100%;
}

.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button:not(:disabled):hover,
.wizard-modal-overlay[data-theme="dark"] .music-continue-button-wrapper button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--pvc-primary-shadow);
    background: var(--pvc-primary) !important;
}

.wizard-modal-overlay[data-theme="dark"] .voice-continue-button-wrapper button:not(:disabled) i,
.wizard-modal-overlay[data-theme="dark"] .music-continue-button-wrapper button:not(:disabled) i,
.wizard-modal-overlay[data-theme="dark"] .use-this-audio-btn:not(:disabled) i,
.wizard-modal-overlay[data-theme="dark"] [class*="use-this-audio"]:not(:disabled) i {
    color: #ffffff !important;
}

/* Use No Music button - Step 4 */
.wizard-modal-overlay[data-theme="dark"] #newMusicContinueFooter button,
.wizard-modal-overlay[data-theme="dark"] [id*="newMusicContinueFooter"] button {
    background: var(--pvc-primary) !important;
    border: none !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    width: 100% !important;
    justify-content: center !important;
}

.wizard-modal-overlay[data-theme="dark"] #newMusicContinueFooter button i,
.wizard-modal-overlay[data-theme="dark"] [id*="newMusicContinueFooter"] button i {
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] #newMusicContinueFooter button::before,
.wizard-modal-overlay[data-theme="dark"] [id*="newMusicContinueFooter"] button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.wizard-modal-overlay[data-theme="dark"] #newMusicContinueFooter button:hover::before,
.wizard-modal-overlay[data-theme="dark"] [id*="newMusicContinueFooter"] button:hover::before {
    left: 100%;
}

.wizard-modal-overlay[data-theme="dark"] #newMusicContinueFooter button:hover,
.wizard-modal-overlay[data-theme="dark"] [id*="newMusicContinueFooter"] button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--pvc-primary-shadow);
    background: var(--pvc-primary) !important;
}

/* Music Library Section - dark mode styling to match Voice Library */
.wizard-modal-overlay[data-theme="dark"] .music-library-section {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section h4 {
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .instruction-text,
.wizard-modal-overlay[data-theme="dark"] .music-library-section p {
    color: #a0a0a0 !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-library-scrollable {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card.library-track,
.wizard-modal-overlay[data-theme="dark"] .voice-library-scrollable .voice-card.library-track {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card.selected,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card:hover,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card.selected:hover,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track.selected,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track:hover,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .library-track.selected:hover,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card.library-track.selected,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card.library-track:hover,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-card.library-track.selected:hover,
.wizard-modal-overlay[data-theme="dark"] .voice-library-scrollable .voice-card.library-track.selected,
.wizard-modal-overlay[data-theme="dark"] .voice-library-scrollable .voice-card.library-track:hover,
.wizard-modal-overlay[data-theme="dark"] .voice-library-scrollable .voice-card.library-track.selected:hover {
    background: rgba(91, 58, 241, 0.12) !important;
    border-color: #5b3af1 !important;
    box-shadow: none !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-name {
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-preview-btn {
    background: #5b3af1 !important;
    color: #000000 !important;
    border: none !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-preview-btn:hover {
    background: #fdb44b !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-preview-btn i,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-preview-btn span {
    color: #000000 !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-preview-btn.playing {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
}

.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-preview-btn.playing i,
.wizard-modal-overlay[data-theme="dark"] .music-library-section .voice-preview-btn.playing span {
    color: white !important;
}

/* Watermark buttons - Step 5/6 - matches Use This Voice style */
.wizard-modal-overlay[data-theme="dark"] [id*="WatermarkedContinueFooter"] button,
.wizard-modal-overlay[data-theme="dark"] [id*="NoWatermarkContinueFooter"] button,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueWatermarked_"] button,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueNoWatermark_"] button,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueCustomBranding_"] {
    background: var(--pvc-primary) !important;
    border: none !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    width: 100% !important;
    justify-content: center !important;
}

.wizard-modal-overlay[data-theme="dark"] [id*="WatermarkedContinueFooter"] button i,
.wizard-modal-overlay[data-theme="dark"] [id*="NoWatermarkContinueFooter"] button i,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueWatermarked_"] button i,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueNoWatermark_"] button i,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueCustomBranding_"] i {
    color: #ffffff !important;
}

/* Custom Branding button icon - match text color when disabled (dark mode) */
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueCustomBranding_"]:disabled i {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Shine effect for watermark buttons */
.wizard-modal-overlay[data-theme="dark"] [id*="WatermarkedContinueFooter"] button::before,
.wizard-modal-overlay[data-theme="dark"] [id*="NoWatermarkContinueFooter"] button::before,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueWatermarked_"] button::before,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueNoWatermark_"] button::before,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueCustomBranding_"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.wizard-modal-overlay[data-theme="dark"] [id*="WatermarkedContinueFooter"] button:hover::before,
.wizard-modal-overlay[data-theme="dark"] [id*="NoWatermarkContinueFooter"] button:hover::before,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueWatermarked_"] button:hover::before,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueNoWatermark_"] button:hover::before,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueCustomBranding_"]:hover::before {
    left: 100%;
}

.wizard-modal-overlay[data-theme="dark"] [id*="WatermarkedContinueFooter"] button:hover,
.wizard-modal-overlay[data-theme="dark"] [id*="NoWatermarkContinueFooter"] button:hover,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueWatermarked_"] button:hover,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueNoWatermark_"] button:hover,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueCustomBranding_"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--pvc-primary-shadow);
    background: var(--pvc-primary) !important;
}

/* Disabled state for watermark buttons */
.wizard-modal-overlay[data-theme="dark"] [id*="WatermarkedContinueFooter"] button:disabled,
.wizard-modal-overlay[data-theme="dark"] [id*="NoWatermarkContinueFooter"] button:disabled,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueWatermarked_"] button:disabled,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueNoWatermark_"] button:disabled,
.wizard-modal-overlay[data-theme="dark"] [id*="wizardNewContinueCustomBranding_"]:disabled {
    background: rgba(91, 58, 241, 0.4) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    cursor: not-allowed;
}

.wizard-modal-overlay[data-theme="dark"] [id*="WatermarkedContinueFooter"] button:disabled i,
.wizard-modal-overlay[data-theme="dark"] [id*="NoWatermarkContinueFooter"] button:disabled i {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Watermark info note - info circle icon */

/* Back button - orange styled */
.wizard-modal-overlay[data-theme="dark"] .back-btn,
.wizard-modal-overlay[data-theme="dark"] .wizard-back-btn,
.wizard-modal-overlay[data-theme="dark"] button.back,
.wizard-modal-overlay[data-theme="dark"] [class*="back-btn"] {
    background: transparent !important;
    border-color: #5b3af1 !important;
    color: #5b3af1 !important;
}

.wizard-modal-overlay[data-theme="dark"] .back-btn:hover,
.wizard-modal-overlay[data-theme="dark"] .wizard-back-btn:hover,
.wizard-modal-overlay[data-theme="dark"] button.back:hover,
.wizard-modal-overlay[data-theme="dark"] [class*="back-btn"]:hover {
    background: #5b3af1 !important;
    color: #000000 !important;
}

/* Dark mode cards - soft contrast against dark background */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-option-card,
.wizard-modal-overlay[data-theme="dark"] .option-card,
.wizard-modal-overlay[data-theme="dark"] .create-option-card,
.wizard-modal-overlay[data-theme="dark"] .template-card,
.wizard-modal-overlay[data-theme="dark"] .video-card,
.wizard-modal-overlay[data-theme="dark"] .history-card,
.wizard-modal-overlay[data-theme="dark"] .help-card,
.wizard-modal-overlay[data-theme="dark"] .data-card,
.wizard-modal-overlay[data-theme="dark"] .settings-card,
.wizard-modal-overlay[data-theme="dark"] .account-card,
.wizard-modal-overlay[data-theme="dark"] .help-category,
.wizard-modal-overlay[data-theme="dark"] .help-section-card,
.wizard-modal-overlay[data-theme="dark"] .support-card,
.wizard-modal-overlay[data-theme="dark"] .faq-category {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* voice-card-content should have no background */
.wizard-modal-overlay[data-theme="dark"] .voice-card-content {
    background: transparent !important;
}

/* Dark mode card text - ensure readability */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-option-card *,
.wizard-modal-overlay[data-theme="dark"] .option-card *,
.wizard-modal-overlay[data-theme="dark"] .create-option-card * {
    color: #ffffff;
}

.wizard-modal-overlay[data-theme="dark"] .wizard-new-option-card p,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-option-card .description,
.wizard-modal-overlay[data-theme="dark"] .option-card p,
.wizard-modal-overlay[data-theme="dark"] .option-card .description {
    color: #a0a0a0 !important;
}

/* Dark mode card hover */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-option-card:hover,
.wizard-modal-overlay[data-theme="dark"] .option-card:hover,
.wizard-modal-overlay[data-theme="dark"] .create-option-card:hover,
.wizard-modal-overlay[data-theme="dark"] .template-card:hover,
.wizard-modal-overlay[data-theme="dark"] .video-card:hover,
.wizard-modal-overlay[data-theme="dark"] .history-card:hover {
    background: #252525 !important;
    border-color: rgba(91, 58, 241, 0.30) !important;
}

/* Dark mode card selected/checked - match hover effect exactly */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-option-card:has(.wizard-new-option-radio:checked),
.wizard-modal-overlay[data-theme="dark"] .option-card:has(.option-radio:checked),
.wizard-modal-overlay[data-theme="dark"] .create-option-card:has(input:checked),
.wizard-modal-overlay[data-theme="dark"] .template-card:has(input:checked),
.wizard-modal-overlay[data-theme="dark"] .video-card:has(input:checked),
.wizard-modal-overlay[data-theme="dark"] .history-card:has(input:checked) {
    background: #252525 !important;
    border-color: rgba(91, 58, 241, 0.30) !important;
}

/* Dark mode video thumbnails/previews in Your Videos */
.wizard-modal-overlay[data-theme="dark"] .video-thumbnail,
.wizard-modal-overlay[data-theme="dark"] .video-preview,
.wizard-modal-overlay[data-theme="dark"] .history-video-thumb,
.wizard-modal-overlay[data-theme="dark"] .video-item {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dark mode history video cards */
.wizard-modal-overlay[data-theme="dark"] .history-video-card,
.pvc-wizard-wrapper[data-theme="dark"] .history-video-card {
    background: linear-gradient(145deg, #0a0a0a, #141414) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Fade-in animation for video cards */
.history-video-card.video-card-fade-in {
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.16s ease, border-color 0.16s ease;
    animation: fadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.history-video-card .r2-video-thumbnail {
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* My Scripts cards — match My Videos entrance */
.history-script-card.script-card-fade-in {
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.16s ease, border-color 0.16s ease;
    animation: fadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-fill-mode: backwards;
}

/* Prevent zoom flash for 9:16 videos in fullscreen - apply immediately via CSS */
.history-video-card[data-aspect="9:16"] video.r2-video-thumbnail:fullscreen,
.history-video-card[data-aspect="9:16"] video.r2-video-thumbnail:-webkit-full-screen,
.history-video-card[data-aspect="9:16"] video.r2-video-thumbnail:-moz-full-screen,
.history-video-card[data-aspect="9:16"] video.r2-video-thumbnail:-ms-fullscreen {
    object-fit: contain !important;
    background-color: black !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover for video cards (My Videos) */
.history-video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
    border-color: rgba(96, 165, 250, 0.9);
}
.pvc-wizard-wrapper[data-theme="dark"] .history-video-card:hover,
.wizard-modal-overlay[data-theme="dark"] .history-video-card:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Video title margin fix */
[id*="videoTitle_"],
#pvc-1-videoTitle_ {
    margin-top: 0px !important;
}

/* Dark mode dropdowns */
.wizard-modal-overlay[data-theme="dark"] select,
.wizard-modal-overlay[data-theme="dark"] .dropdown,
.wizard-modal-overlay[data-theme="dark"] .select-wrapper,
.wizard-modal-overlay[data-theme="dark"] [class*="dropdown"],
.wizard-modal-overlay[data-theme="dark"] .form-select {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* Dark mode dropdown options */
.wizard-modal-overlay[data-theme="dark"] select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* Dark mode main content area background */
.wizard-modal-overlay[data-theme="dark"] .wizard-modal-content,
.wizard-modal-overlay[data-theme="dark"] .dashboard-content,
.wizard-modal-overlay[data-theme="dark"] .main-content {
    background: #141414;
}

/* Dark mode section backgrounds */
.wizard-modal-overlay[data-theme="dark"] .content-section,
.wizard-modal-overlay[data-theme="dark"] .videos-section,
.wizard-modal-overlay[data-theme="dark"] .help-section,
.wizard-modal-overlay[data-theme="dark"] .data-section,
.wizard-modal-overlay[data-theme="dark"] .settings-section {
    background: #0a0a0a;
}

/* Dark mode grid containers */
.wizard-modal-overlay[data-theme="dark"] .videos-grid,
.wizard-modal-overlay[data-theme="dark"] .templates-grid,
.wizard-modal-overlay[data-theme="dark"] .cards-grid,
.wizard-modal-overlay[data-theme="dark"] .options-grid {
    background: transparent;
}

/* Dark mode accordion/collapsible items in Help/Data */
.wizard-modal-overlay[data-theme="dark"] .accordion-item,
.wizard-modal-overlay[data-theme="dark"] .collapsible-item,
.wizard-modal-overlay[data-theme="dark"] .faq-item,
.wizard-modal-overlay[data-theme="dark"] .help-item,
.wizard-modal-overlay[data-theme="dark"] .data-item {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Dark mode help item wrapper and button */
.wizard-modal-overlay[data-theme="dark"] .help-item-wrapper {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-button {
    background: #1a1a1a !important;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-button:hover {
    background: #252525 !important;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-header h3 {
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-header h3 i.fas {
    color: #ffffff !important;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-button p {
    color: #a0a0a0 !important;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-arrow {
    color: #a0a0a0 !important;
}

/* Dark mode help dropdown content */
.wizard-modal-overlay[data-theme="dark"] .help-item-dropdown {
    background: #141414 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-dropdown::-webkit-scrollbar-track {
    background: #141414 !important;
}

.wizard-modal-overlay[data-theme="dark"] .help-item-dropdown::-webkit-scrollbar-thumb {
    background: #404040 !important;
    border-color: #141414 !important;
}

/* Dark mode active help item border - orange accent */
.wizard-modal-overlay[data-theme="dark"] .help-item-wrapper:has(.help-item-dropdown[style*="display: block"]) {
    border-color: #5b3af1 !important;
    box-shadow: 0 4px 12px rgba(91, 58, 241, 0.14) !important;
}

/* Dark mode table rows */
.wizard-modal-overlay[data-theme="dark"] table,
.wizard-modal-overlay[data-theme="dark"] tr,
.wizard-modal-overlay[data-theme="dark"] td,
.wizard-modal-overlay[data-theme="dark"] th {
    background: #141414;
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.wizard-modal-overlay[data-theme="dark"] tr:nth-child(even) {
    background: #1a1a1a;
}

/* Dark mode info boxes */
.wizard-modal-overlay[data-theme="dark"] .info-box,
.wizard-modal-overlay[data-theme="dark"] .notice-box,
.wizard-modal-overlay[data-theme="dark"] .alert-box {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #a0a0a0;
}

/* Dark mode - Create Content card icons orange */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-option-card i,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-option-card .card-icon,
.wizard-modal-overlay[data-theme="dark"] .option-card i,
.wizard-modal-overlay[data-theme="dark"] .option-card .card-icon {
    color: #5b3af1 !important;
}

/* Dark mode - Step numbers orange background (but not step7-loader) */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-step-number:not(.step7-loader) {
    background: #5b3af1 !important;
    color: #000000 !important;
}

/* Dark mode - step7-loader keeps original styling */
.wizard-modal-overlay[data-theme="dark"] .wizard-new-step-number.step7-loader {
    background: transparent !important;
}

/* Dark mode - hide step7-number and show spinner */
.wizard-modal-overlay[data-theme="dark"] .step7-number,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-step-number.step7-loader .step7-number {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Only apply display: block when spinner does NOT have fade-out class AND parent is NOT completed */
/* Exclude spinners that are inside completed loaders or have fade-out class */
.wizard-modal-overlay[data-theme="dark"] .step7-loader:not(.completed) .step7-spinner:not(.fade-out),
.wizard-modal-overlay[data-theme="dark"] .wizard-new-step-number.step7-loader:not(.completed) .step7-spinner:not(.fade-out) {
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    animation: step7-spin 1.0s linear infinite !important; /* Ensure animation works in dark mode */
    /* Don't set transform here - let animation handle rotation */
}

.wizard-modal-overlay[data-theme="dark"] .step7-loader.loading {
    background: transparent !important;
}

.wizard-modal-overlay[data-theme="dark"] .step7-spinner {
    border-color: rgba(91, 58, 241, 0.20) !important;
    border-top-color: #5b3af1 !important;
    border-right-color: #5b3af1 !important;
}

/* CRITICAL: Hide spinner when fade-out is applied OR when parent is completed - MUST come after ALL other step7-spinner rules */
.wizard-modal-overlay[data-theme="dark"] .step7-spinner.fade-out,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-step-number.step7-loader .step7-spinner.fade-out,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-step-number.step7-loader.completed .step7-spinner,
.wizard-modal-overlay[data-theme="dark"] .step7-loader.completed .step7-spinner {
    opacity: 0 !important;
    display: none !important;
    visibility: hidden !important;
    animation: none !important;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-10px) !important;
}

/* Additional fade-out selectors for other possible locations */
.wizard-modal-overlay[data-theme="dark"] .step7-loader .step7-spinner.fade-out,
.wizard-modal-overlay[data-theme="dark"] .wizard-new-step-header .step7-spinner.fade-out {
    opacity: 0 !important;
    display: none !important;
    visibility: hidden !important;
    animation: none !important;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-10px) !important;
}

.wizard-modal-overlay[data-theme="dark"] .step7-loader.completed {
    background: var(--pvc-primary) !important;
}

/* Dark mode - all green check backgrounds to red */
.wizard-modal-overlay[data-theme="dark"] .completed,
.wizard-modal-overlay[data-theme="dark"] .success,
.wizard-modal-overlay[data-theme="dark"] [class*="check"].completed,
.wizard-modal-overlay[data-theme="dark"] [class*="success-bg"],
.wizard-modal-overlay[data-theme="dark"] .wizard-new-step-number.completed {
    background: var(--pvc-primary) !important;
}

/* Film Strip Animation - Processing Page */
.film-strip-container {
    width: 150px;
    height: 72px;
    overflow: hidden;
    position: relative;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 40px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.film-strip {
    display: flex;
    position: absolute;
    height: 100%;
    top: 0;
    left: 0;
    animation: scrollFilm 40s linear infinite; /* Slower animation */
}

.film-frame {
    flex: 0 0 auto;
    width: 80px;
    height: 100%;
    margin-right: 4px;
    background: transparent;
    position: relative;
    border: 1px solid rgb(80 61 251 / 40%);
    box-sizing: border-box;
}

.film-frame::before,
.film-frame::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 6px,
        rgba(91, 58, 241, 0.18) 6px,
        rgba(91, 58, 241, 0.18) 12px
    );
}

.film-frame::before {
    top: 0;
}

.film-frame::after {
    bottom: 0;
}

@keyframes scrollFilm {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Dark mode - Earn Credits icons orange */
.wizard-modal-overlay[data-theme="dark"] .earn-credits i,
.wizard-modal-overlay[data-theme="dark"] .earn-credits .card-icon,
.wizard-modal-overlay[data-theme="dark"] .credits-card i,
.wizard-modal-overlay[data-theme="dark"] .credits-card .card-icon,
.wizard-modal-overlay[data-theme="dark"] [class*="earn"] i,
.wizard-modal-overlay[data-theme="dark"] [class*="credit"] i {
    color: #5b3af1 !important;
}

/* CRITICAL: Prevent background scrolling when modal is open */
/* scrollbar-gutter: stable on html ensures no layout shift in modern browsers */
/* For older browsers, JavaScript will add padding compensation */
body.wizard-modal-open {
    overflow: hidden !important;
    /* scrollbar-gutter on html element reserves space, so no padding needed in modern browsers */
    /* JavaScript will add padding-right fallback for older browsers */
}

/* OPTIONAL: Scrollbar styling (graceful degradation - may not work in private mode) */
/* These styles are optional and will gracefully degrade if browser doesn't support them */
/* WebKit browsers (Chrome, Safari, Edge) - ALL parts same gray */
html.wizard-modal-open::-webkit-scrollbar,
body.wizard-modal-open::-webkit-scrollbar {
    width: 17px;
    background: #d0d0d0 !important; /* Same gray for entire scrollbar */
}

html.wizard-modal-open::-webkit-scrollbar-track,
body.wizard-modal-open::-webkit-scrollbar-track {
    background: #d0d0d0 !important; /* Same gray for track */
    opacity: 1 !important;
    transition: background 0.3s ease-out;
}

html.wizard-modal-open::-webkit-scrollbar-thumb,
body.wizard-modal-open::-webkit-scrollbar-thumb {
    background: #d0d0d0 !important; /* Same gray for thumb */
    opacity: 1 !important;
    transition: background 0.3s ease-out;
    border-radius: 0 !important; /* No border radius for uniform look */
    border: none !important;
}

html.wizard-modal-open::-webkit-scrollbar-thumb:hover,
body.wizard-modal-open::-webkit-scrollbar-thumb:hover {
    background: #d0d0d0 !important; /* Same gray even on hover */
}

/* CRITICAL: Style scrollbar buttons (up/down arrows) - same gray */
html.wizard-modal-open::-webkit-scrollbar-button,
body.wizard-modal-open::-webkit-scrollbar-button {
    background: #d0d0d0 !important; /* Same gray for buttons */
    display: block !important;
    height: 17px !important;
    width: 17px !important;
}

html.wizard-modal-open::-webkit-scrollbar-button:start:decrement,
html.wizard-modal-open::-webkit-scrollbar-button:end:increment,
body.wizard-modal-open::-webkit-scrollbar-button:start:decrement,
body.wizard-modal-open::-webkit-scrollbar-button:end:increment {
    background: #d0d0d0 !important; /* Same gray for increment/decrement buttons */
}

html.wizard-modal-open::-webkit-scrollbar-button:vertical:start:decrement,
html.wizard-modal-open::-webkit-scrollbar-button:vertical:end:increment,
body.wizard-modal-open::-webkit-scrollbar-button:vertical:start:decrement,
body.wizard-modal-open::-webkit-scrollbar-button:vertical:end:increment {
    background: #d0d0d0 !important; /* Same gray for vertical buttons */
}

html.wizard-modal-open::-webkit-scrollbar-button:horizontal:start:decrement,
html.wizard-modal-open::-webkit-scrollbar-button:horizontal:end:increment,
body.wizard-modal-open::-webkit-scrollbar-button:horizontal:start:decrement,
body.wizard-modal-open::-webkit-scrollbar-button:horizontal:end:increment {
    background: #d0d0d0 !important; /* Same gray for horizontal buttons */
}

/* CRITICAL: Style scrollbar corner (where horizontal and vertical meet) - same gray */
html.wizard-modal-open::-webkit-scrollbar-corner,
body.wizard-modal-open::-webkit-scrollbar-corner {
    background: #d0d0d0 !important; /* Same gray for corner */
}

/* Firefox scrollbar - entire scrollbar same gray */
html.wizard-modal-open,
body.wizard-modal-open {
    scrollbar-width: auto !important;
    scrollbar-color: #d0d0d0 #d0d0d0 !important; /* Same gray for both thumb and track */
}

/* Loading Screen */
.pvc-wizard-wrapper .pvc-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.pvc-wizard-wrapper .pvc-loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.pvc-wizard-wrapper .pvc-loading-screen .loading-spinner-circle {
    width: 32px;
    height: 32px;
    border: 3px solid transparent;
    border-top: 3px solid #9ca3af;
    border-right: 3px solid #9ca3af;
    border-radius: 50%;
    animation: spinner-rotate 1.2s linear infinite;
}

@keyframes spinner-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Homepage Content Fade In */
.pvc-wizard-wrapper .pvc-homepage-content {
    transition: opacity 0.6s ease-in;
}

.pvc-wizard-wrapper .pvc-homepage-content.fade-in {
    opacity: 1 !important;
}

/* Light Mode is now the default - no special selectors needed */
/* See .pvc-wizard-wrapper at top of file for light mode colors */
/* Products Grid — fixed px min only; min(100%,…) in minmax() can collapse to one column in some layouts */
.pvc-wizard-wrapper .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: -25px !important;
    justify-content: center;
    /* Performance optimization - use subgrid when possible */
    contain-intrinsic-size: auto 300px;
}

.pvc-wizard-wrapper .product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-primary);
    transition: all var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: visible;
    backdrop-filter: none;
    max-width: 500px;
    width: 100%;
    /* Performance optimizations like PromptBase */
    contain: layout style paint;
    content-visibility: auto;
    /* Prevent layout thrash when virtualized */
    contain-intrinsic-size: auto 520px;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.product-card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
    border-color: var(--border-accent);
}

.product-card:hover::before {
    transform: scaleX(1);
}

/* Inner layout shell — plugin-specific class (avoid theme/Bootstrap `.container` collisions) */
.pvc-wizard-wrapper .pvc-wizard-shell {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Modal content should not be constrained by the shell */
.wizard-modal-content .pvc-wizard-shell {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Video Setup Wizard - Modern Accordion Style */
/* Open Video Wizard Button */
.pvc-wizard-wrapper .open-wizard-button-container {
    margin-top: 32px;
    text-align: center;
}

.pvc-wizard-wrapper .open-wizard-btn .btn-text {
    font-family: "Host Grotesk", sans-serif;
}

.pvc-wizard-wrapper .open-wizard-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 400;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-md);
}

.pvc-wizard-wrapper .open-wizard-btn .btn-icon,
.pvc-wizard-wrapper .open-wizard-btn .btn-icon i,
.pvc-wizard-wrapper .open-wizard-btn i,
.pvc-wizard-wrapper .open-wizard-btn .fa-sparkles,
.pvc-wizard-wrapper .open-wizard-btn i.fa-sparkles {
    color: white !important;
    font-size: 1.2rem !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.pvc-wizard-wrapper .open-wizard-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.pvc-wizard-wrapper .open-wizard-btn:hover .btn-icon,
.pvc-wizard-wrapper .open-wizard-btn:hover .btn-icon i,
.pvc-wizard-wrapper .open-wizard-btn:hover i,
.pvc-wizard-wrapper .open-wizard-btn:hover .fa-sparkles,
.pvc-wizard-wrapper .open-wizard-btn:hover i.fa-sparkles {
    color: white !important;
    opacity: 1 !important;
}

/* Wizard Modal Popup - Full Screen from Bottom */
.wizard-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
    /* Theme hardening: keep above sticky headers/overlays */
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    /* Theme hardening: ensure stacking context is isolated */
    isolation: isolate !important;
    /* Don't hide scrollbar - leave it visible but covered by popup */
    /* overflow: hidden !important; */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    box-sizing: border-box !important;
}

.wizard-modal-overlay.active {
    visibility: visible !important;
    opacity: 1 !important;
}

.wizard-modal-container {
    position: relative;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    margin: 0 !important;
    /* CSS Variables for modal - inherit from wrapper */
    background: var(--bg-card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: none;
    /* CRITICAL: Always show scrollbar - same logic as voice library */
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth;
    scrollbar-gutter: stable !important; /* Reserve space for scrollbar to prevent layout shift */
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.wizard-modal-overlay.active .wizard-modal-container {
    transform: translateY(0);
}

/* CRITICAL: Modal container scrollbar - same styling as voice library */
/* WebKit browsers (Chrome, Safari, Edge) - ALWAYS VISIBLE GRAY SCROLLBAR */
.wizard-modal-container::-webkit-scrollbar {
    width: 15px !important; /* Slightly thicker for better visibility */
    display: block !important; /* CRITICAL: Always show scrollbar */
    -webkit-appearance: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.wizard-modal-container::-webkit-scrollbar-track {
    background: #d0d0d0 !important; /* Light gray track - ALWAYS VISIBLE */
    border-radius: 6px !important;
    -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.15) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.wizard-modal-container::-webkit-scrollbar-thumb {
    background: #808080 !important; /* Darker gray thumb - ALWAYS VISIBLE */
    border-radius: 6px !important;
    min-height: 40px !important; /* Ensure thumb is always visible */
    -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.3) !important;
    border: 2px solid #d0d0d0 !important; /* More visible border */
    visibility: visible !important;
    opacity: 1 !important;
}

.wizard-modal-container::-webkit-scrollbar-thumb:hover {
    background: #666666 !important; /* Even darker gray on hover */
}

/* Firefox scrollbar - always show scrollbar */
.wizard-modal-container {
    scrollbar-width: auto !important; /* Firefox: always show scrollbar (not thin, use auto for better visibility) */
    scrollbar-color: #808080 #d0d0d0 !important; /* Firefox: darker gray thumb (#808080) and light gray track (#d0d0d0) - ALWAYS VISIBLE */
}

/* Content pane scrollbar — gray thumb, white track (thicker than Help dropdown for visibility) */
.wizard-modal-overlay:not([data-theme="dark"]) .dashboard-content::-webkit-scrollbar,
.wizard-modal-overlay[data-theme="light"] .dashboard-content::-webkit-scrollbar {
    width: 15px !important;
    -webkit-appearance: none !important;
}

.wizard-modal-overlay:not([data-theme="dark"]) .dashboard-content::-webkit-scrollbar-track,
.wizard-modal-overlay[data-theme="light"] .dashboard-content::-webkit-scrollbar-track {
    background: #ffffff !important;
    border-radius: 6px !important;
}

.wizard-modal-overlay:not([data-theme="dark"]) .dashboard-content::-webkit-scrollbar-thumb,
.wizard-modal-overlay[data-theme="light"] .dashboard-content::-webkit-scrollbar-thumb {
    background: #4a4a4a !important;
    border-radius: 6px !important;
    min-height: 40px !important;
    border: 2px solid #ffffff !important;
}

.wizard-modal-overlay:not([data-theme="dark"]) .dashboard-content::-webkit-scrollbar-thumb:hover,
.wizard-modal-overlay[data-theme="light"] .dashboard-content::-webkit-scrollbar-thumb:hover {
    background: #333333 !important;
}

/* Light: Firefox — gray thumb on white track */
.wizard-modal-overlay:not([data-theme="dark"]) .dashboard-content,
.wizard-modal-overlay[data-theme="light"] .dashboard-content {
    scrollbar-width: auto !important;
    scrollbar-color: #4a4a4a #ffffff !important;
}

.wizard-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: all var(--transition-smooth);
}

.wizard-modal-close:hover {
    background: #dc3545;
    color: white;
    transform: rotate(90deg);
    border-color: #dc3545;
}

.wizard-modal-content {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0; /* Critical for nested flex + scroll in .wizard-modal-container */
    height: auto;
    overflow: visible;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    max-width: none;
    /* Inherit all CSS variables from wrapper */
}

/* Apply all .pvc-wizard-wrapper styles to .wizard-modal-content as well */
.wizard-modal-content .wizard-header,
.wizard-modal-content .wizard-title,
.wizard-modal-content .wizard-subtitle,
.wizard-modal-content .wizard-steps,
.wizard-modal-content .wizard-step,
.wizard-modal-content .step-header,
.wizard-modal-content .step-number,
.wizard-modal-content .step-info,
.wizard-modal-content .step-title,
.wizard-modal-content .step-description,
.wizard-modal-content .step-content,
.wizard-modal-content .option-grid,
.wizard-modal-content .option-card,
.wizard-modal-content .option-icon,
.wizard-modal-content .option-name,
.wizard-modal-content .template-steps {
    /* All styles are inherited from parent selectors */
}

/* Video Setup Wizard - Modern Accordion Style (inside modal) */
.wizard-modal-content .video-setup-wizard,
.pvc-wizard-wrapper .video-setup-wizard {
    margin-top: 0;
    background: transparent;
    border-radius: 16px !important;
    padding: 20px 32px;
    box-shadow: none;
    border: none;
    width: 100%;
    max-width: 100%;
}

/* Ensure wizard content inside modal is properly scoped and styled */
.wizard-modal-content .wizard-header,
.wizard-modal-content .wizard-steps,
.wizard-modal-content .wizard-step,
.wizard-modal-content .step-header,
.wizard-modal-content .step-content {
    width: 100%;
    max-width: 100%;
}

/* Apply all wizard styles to content inside modal */
.wizard-modal-content .wizard-header {
    text-align: center;
    margin-bottom: 32px;
}

.wizard-modal-content .wizard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-accent);
    margin-bottom: 8px;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.wizard-modal-content .wizard-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.wizard-modal-content .wizard-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wizard-modal-content .wizard-step {
    background: var(--bg-secondary);
    border-radius: 16px !important;
    -webkit-border-radius: 16px !important;
    -moz-border-radius: 16px !important;
    border: 1px solid var(--border-primary);
    overflow: visible !important;
}

.wizard-modal-content .wizard-step .step-content {
    overflow: visible !important;
    border-radius: 0 0 16px 16px;
    padding: 20px;
}

.wizard-modal-content .wizard-step.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wizard-modal-content .step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
}

.wizard-modal-content .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.wizard-modal-content .step-info {
    flex: 1;
}

.wizard-modal-content .step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-accent);
    margin: 0 0 4px 0;
}

.wizard-modal-content .step-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.wizard-modal-content .step-content {
    padding: 0 24px 24px 24px;
}

.wizard-modal-content .option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    overflow: visible !important;
    padding: 8px 0;
    margin: -8px 0;
}

.wizard-modal-content .option-card {
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 12px !important;
    padding: 20px;
    text-align: center;
    cursor: pointer !important;
    transition: all var(--transition-smooth);
    position: relative;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto !important;
    z-index: 100 !important;
}

/* Carousel mode: Template steps container - hidden by default, shown when template selected */
.wizard-modal-content .template-steps,
.pvc-wizard-wrapper .template-steps {
    display: none !important;
    flex-direction: row;
    gap: 0;
    overflow: visible;
}

.wizard-modal-content .template-steps[style*="display: flex"],
.pvc-wizard-wrapper .template-steps[style*="display: flex"] {
    display: flex !important;
}

/* All step reveal/hide animations are now handled by JavaScript slideDown/slideUp - no CSS transitions needed */

.pvc-wizard-wrapper .wizard-header,
.wizard-modal-content .wizard-header {
    text-align: center;
    margin-bottom: 32px;
}

.pvc-wizard-wrapper .wizard-title,
.wizard-modal-content .wizard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-accent);
    margin-bottom: 8px;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.pvc-wizard-wrapper .wizard-subtitle,
.wizard-modal-content .wizard-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.pvc-wizard-wrapper .wizard-steps {
    display: flex;
    flex-direction: row;
    gap: 0;
    width: 100%;
    min-width: 100%;
}

.pvc-wizard-wrapper .wizard-step,
.wizard-modal-content .wizard-step {
    background: var(--bg-secondary);
    border-radius: 16px !important;
    -webkit-border-radius: 16px !important;
    -moz-border-radius: 16px !important;
    border: 1px solid var(--border-primary);
    overflow: visible !important;
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    display: none !important;
    opacity: 1;
}

.pvc-wizard-wrapper .wizard-step.active,
.wizard-modal-content .wizard-step.active {
    display: block !important;
    opacity: 1;
}

.pvc-wizard-wrapper .wizard-step .step-content,
.wizard-modal-content .wizard-step .step-content {
    overflow: visible !important;
    border-radius: 0 0 16px 16px;
    padding: 20px;
    display: block !important;
    visibility: visible !important;
}

.pvc-wizard-wrapper .wizard-step,
.wizard-modal-content .wizard-step {
    /* No CSS transitions - jQuery handles all animations */
    /* Slightly different opacity than background for visual distinction */
    opacity: 0.98;
}

.pvc-wizard-wrapper .wizard-step.active,
.wizard-modal-content .wizard-step.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Carousel mode: All step content is always visible when step is active */
.pvc-wizard-wrapper .wizard-step.active .step-content,
.wizard-modal-content .wizard-step.active .step-content {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* CSS-ONLY WIZARD ADVANCEMENT - Using parent container :has() selector */
/* When template is selected, show Script step */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepTemplate"] input[name="template"]:checked) [id$="stepScript"] {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepTemplate"] input[name="template"]:checked) [id$="stepScript"] .step-content {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.wizard-steps:has(#stepTemplate input[name="template"]:checked) #stepScript {
    opacity: 1;
}

/* Mark Script step as active when template is selected */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepTemplate"] input[name="template"]:checked) [id$="stepScript"].active,
.pvc-wizard-wrapper .wizard-steps:has([id$="stepTemplate"] input[name="template"]:checked) [id$="stepScript"] {
    border-color: var(--accent-primary);
}

/* When script_mode paste is selected, show script editor */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_mode"][value="paste"]:checked) [id$="scriptEditor"] {
    display: block !important;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_mode"][value="paste"]:checked) [id$="aiOptions"] {
    display: none !important;
}

/* When script_mode ai is selected, show AI options */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_mode"][value="ai"]:checked) [id$="aiOptions"] {
    display: block !important;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_mode"][value="ai"]:checked) [id$="scriptEditor"] {
    display: none !important;
}

/* When script is saved (radio checked), show Aspect Ratio step - EXACT same pattern as template selection */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_saved"]:checked) [id$="stepAspect"] {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    opacity: 1;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_saved"]:checked) [id$="stepAspect"] .step-content {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_saved"]:checked) [id$="stepAspect"].active,
.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_saved"]:checked) [id$="stepAspect"] {
    border-color: var(--accent-primary);
}

/* When aspect is selected, show Brand step */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepAspect"] input[name="aspect"]:checked) [id$="stepBrand"] .step-content {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepAspect"] input[name="aspect"]:checked) [id$="stepBrand"] {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Show brand upload section when custom is selected */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepBrand"] input[name="brand"][value="custom"]:checked) [id$="brandUploadSection"] {
    display: block !important;
    visibility: visible !important;
}

/* When brand is selected, show Music step */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepAspect"] input[name="aspect"]:checked):has([id$="stepBrand"] input[name="brand"]:checked) [id$="stepMusic"] .step-content {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepAspect"] input[name="aspect"]:checked):has([id$="stepBrand"] input[name="brand"]:checked) [id$="stepMusic"] {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}


/* Show music upload section when upload is selected */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepMusic"] input[name="music"][value="upload"]:checked) [id$="musicUploadSection"] {
    display: block !important;
    visibility: visible !important;
}

/* Show music library section when library is selected */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepMusic"] input[name="music"][value="library"]:checked) [id$="musicLibrarySection"] {
    display: block !important;
    visibility: visible !important;
}

/* When music is selected, show Watermark step */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepAspect"] input[name="aspect"]:checked):has([id$="stepBrand"] input[name="brand"]:checked):has([id$="stepMusic"] input[name="music"]:checked) [id$="stepWatermark"] .step-content {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepAspect"] input[name="aspect"]:checked):has([id$="stepBrand"] input[name="brand"]:checked):has([id$="stepMusic"] input[name="music"]:checked) [id$="stepWatermark"] {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Watermark options grid - 2 columns */
.pvc-wizard-wrapper .watermark-options {
    grid-template-columns: repeat(2, 1fr);
}

/* Watermark info note - hide when No Watermark is selected */
.pvc-wizard-wrapper .watermark-info-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    padding: 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-primary);
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepWatermark"] input[name="watermark"][value="remove"]:checked) .watermark-info-note {
    display: none !important;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.info-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-text strong {
    color: var(--text-accent);
    font-weight: 600;
}

.pvc-wizard-wrapper [data-theme="light"] .watermark-info-note {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
}

/* Show premium upgrade section when No Watermark is selected */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepWatermark"] input[name="watermark"][value="remove"]:checked) [id$="premiumUpgradeSection"] {
    display: block !important;
    visibility: visible !important;
}

/* When watermark is selected, show Generate Video footer */
.pvc-wizard-wrapper .video-setup-wizard:has([id$="stepWatermark"] input[name="watermark"]:checked) [id$="wizardFooter"] {
    display: block !important;
}

.pvc-wizard-wrapper .step-header,
.wizard-modal-content .step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    user-select: none;
}

.step-header:hover {
    background: var(--bg-input);
}

.pvc-wizard-wrapper .wizard-step.active .step-header {
    background: rgba(99, 102, 241, 0.05);
}

.pvc-wizard-wrapper .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all var(--transition-smooth);
    border: 2px solid var(--border-primary);
    position: relative; /* Required for ::before positioning */
}

.pvc-wizard-wrapper .wizard-step.active .step-number {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.pvc-wizard-wrapper .step-info {
    flex: 1;
}

.pvc-wizard-wrapper .step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-accent);
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.pvc-wizard-wrapper .step-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.pvc-wizard-wrapper .step-chevron {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform var(--transition-smooth);
    flex-shrink: 0;
}

.pvc-wizard-wrapper .wizard-step.active .step-chevron {
    transform: rotate(0deg);
}

.pvc-wizard-wrapper .wizard-step:not(.active) .step-chevron {
    transform: rotate(-90deg);
}

.pvc-wizard-wrapper .step-content {
    padding: 24px;
    padding-top: 0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pvc-wizard-wrapper .option-grid,
.wizard-modal-content .option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    overflow: visible !important;
    padding: 8px 0;
    margin: -8px 0;
}

.pvc-wizard-wrapper .option-card,
.wizard-modal-content .option-card {
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 12px !important;
    padding: 20px;
    text-align: center;
    cursor: pointer !important;
    transition: all var(--transition-smooth);
    position: relative;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto !important;
    z-index: 100 !important;
    -webkit-tap-highlight-color: transparent;
}

/* Hide checkbox visually but keep it accessible */
.pvc-wizard-wrapper .option-radio,
.wizard-modal-content .option-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Hide checkboxes visually but keep functionality */
.pvc-wizard-wrapper input[type="checkbox"].option-radio,
.wizard-modal-content input[type="checkbox"].option-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Make checkboxes in same group behave like radio buttons - hide others when one is checked (CSS-only) */
.pvc-wizard-wrapper [id$="stepTemplate"]:has(input[name="template"]:checked) input[name="template"]:not(:checked),
.pvc-wizard-wrapper [id$="stepScript"]:has(input[name="script_mode"]:checked) input[name="script_mode"]:not(:checked),
.pvc-wizard-wrapper [id$="stepAspect"]:has(input[name="aspect"]:checked) input[name="aspect"]:not(:checked),
.pvc-wizard-wrapper [id$="stepBrand"]:has(input[name="brand"]:checked) input[name="brand"]:not(:checked),
.pvc-wizard-wrapper [id$="stepMusic"]:has(input[name="music"]:checked) input[name="music"]:not(:checked),
.pvc-wizard-wrapper [id$="stepWatermark"]:has(input[name="watermark"]:checked) input[name="watermark"]:not(:checked) {
    pointer-events: none;
    opacity: 0.3;
}

/* When one checkbox is checked, automatically uncheck others in the same group (CSS-only trick) */
.pvc-wizard-wrapper [id$="stepTemplate"]:has(input[name="template"]:checked) .option-card:has(input[name="template"]:not(:checked)) {
    pointer-events: none;
    opacity: 0.5;
}

.pvc-wizard-wrapper [id$="stepScript"]:has(input[name="script_mode"]:checked) .option-card:has(input[name="script_mode"]:not(:checked)) {
    pointer-events: none;
    opacity: 0.5;
}

.pvc-wizard-wrapper [id$="stepAspect"]:has(input[name="aspect"]:checked) .option-card:has(input[name="aspect"]:not(:checked)) {
    pointer-events: none;
    opacity: 0.5;
}

.pvc-wizard-wrapper [id$="stepBrand"]:has(input[name="brand"]:checked) .option-card:has(input[name="brand"]:not(:checked)) {
    pointer-events: none;
    opacity: 0.5;
}

.pvc-wizard-wrapper [id$="stepMusic"]:has(input[name="music"]:checked) .option-card:has(input[name="music"]:not(:checked)) {
    pointer-events: none;
    opacity: 0.5;
}

.pvc-wizard-wrapper [id$="stepWatermark"]:has(input[name="watermark"]:checked) .option-card:has(input[name="watermark"]:not(:checked)) {
    pointer-events: none;
    opacity: 0.5;
}

.pvc-wizard-wrapper .option-card:hover:not(:has(.option-radio:checked)),
.wizard-modal-content .option-card:hover:not(:has(.option-radio:checked)) {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: var(--bg-secondary);
    z-index: 200 !important;
}

/* CSS-only selection: When radio is checked, style the label */
.pvc-wizard-wrapper .option-card:has(.option-radio:checked),
.wizard-modal-content .option-card:has(.option-radio:checked) {
    border-color: var(--accent-primary) !important;
    background: rgba(99, 102, 241, 0.15) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
    transform: none !important;
}

/* Wizard New Option Cards - Same styling as option-card */
.pvc-wizard-wrapper .wizard-new-option-card {
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.pvc-wizard-wrapper .wizard-new-option-card:hover:not(:has(.wizard-new-option-radio:checked)) {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: var(--bg-secondary);
}

/* When radio is checked, style the card with purple background */
.pvc-wizard-wrapper .wizard-new-option-card:has(.wizard-new-option-radio:checked) {
    border-color: var(--accent-primary) !important;
    background: rgba(99, 102, 241, 0.15) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
    transform: none !important;
}

/* Wizard New Option Grid */
.pvc-wizard-wrapper .wizard-new-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

/* Override for Step 1 - Force 4 columns */
.pvc-wizard-wrapper .wizard-new-step[data-step="1"] .wizard-new-step-content .wizard-new-option-grid {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Create Content - Template "Show more" behavior (Step 1 only)
   Must use !important: wizard-new.css sets .wizard-new-option-card { display:flex !important },
   which would otherwise keep .wizard-new-template-extra labels visible when collapsed. */
.pvc-wizard-wrapper [id*="newStep1"] .wizard-new-template-extra,
.wizard-modal-overlay [id*="newStep1"] .wizard-new-template-extra,
.wizard-modal-content [id*="newStep1"] .wizard-new-template-extra {
    display: none !important;
}

.pvc-wizard-wrapper [id*="newStep1"] .wizard-new-template-extra.is-visible,
.wizard-modal-overlay [id*="newStep1"] .wizard-new-template-extra.is-visible,
.wizard-modal-content [id*="newStep1"] .wizard-new-template-extra.is-visible {
    display: flex !important;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 220ms ease, transform 220ms ease;
    will-change: opacity, transform;
}

.pvc-wizard-wrapper [id*="newStep1"] .wizard-new-template-extra.is-visible.is-animated-in,
.wizard-modal-overlay [id*="newStep1"] .wizard-new-template-extra.is-visible.is-animated-in,
.wizard-modal-content [id*="newStep1"] .wizard-new-template-extra.is-visible.is-animated-in {
    opacity: 1;
    transform: translateY(0);
}

.pvc-wizard-wrapper [id*="newStep1"] .wizard-new-show-more-card,
.wizard-modal-overlay [id*="newStep1"] .wizard-new-show-more-card,
.wizard-modal-content [id*="newStep1"] .wizard-new-show-more-card {
    border-style: dashed;
}

.pvc-wizard-wrapper [id*="newStep1"] .wizard-new-show-more-card.is-hidden,
.wizard-modal-overlay [id*="newStep1"] .wizard-new-show-more-card.is-hidden,
.wizard-modal-content [id*="newStep1"] .wizard-new-show-more-card.is-hidden {
    display: none !important;
}

/* Show more: + icon and count (5) side by side, both gold */
.pvc-wizard-wrapper [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-icon,
.wizard-modal-overlay [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-icon,
.wizard-modal-content [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.pvc-wizard-wrapper [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-icon i,
.wizard-modal-overlay [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-icon i,
.wizard-modal-content [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-icon i,
.pvc-wizard-wrapper [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-count,
.wizard-modal-overlay [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-count,
.wizard-modal-content [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-count {
    color: #5b3af1;
}

.pvc-wizard-wrapper [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-count,
.wizard-modal-overlay [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-count,
.wizard-modal-content [id*="newStep1"] .wizard-new-show-more-card .wizard-new-show-more-count {
    font-size: 36px;
    font-weight: bold !important;
    margin-top: -5px !important;
}

/* Wizard New Option Icon */
.pvc-wizard-wrapper .wizard-new-option-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.pvc-wizard-wrapper .wizard-new-option-card:has(.wizard-new-option-radio:checked) .wizard-new-option-icon {
    color: var(--accent-primary);
}

/* Wizard New Option Name */
.pvc-wizard-wrapper .wizard-new-option-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.pvc-wizard-wrapper .wizard-new-option-card:has(.wizard-new-option-radio:checked) .wizard-new-option-name {
    color: var(--accent-primary);
}

/* Wizard New Option Hint */
.pvc-wizard-wrapper .wizard-new-option-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Hide radio button visually */
.pvc-wizard-wrapper .wizard-new-option-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pvc-wizard-wrapper .option-icon,
.wizard-modal-content .option-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    line-height: 1;
    pointer-events: none; /* Let clicks pass through to card */
    display: inline-block;
}

.pvc-wizard-wrapper .option-name,
.pvc-wizard-wrapper .option-hint,
.pvc-wizard-wrapper .option-badge,
.wizard-modal-content .option-name,
.wizard-modal-content .option-hint,
.wizard-modal-content .option-badge {
    pointer-events: none; /* Let clicks pass through to card */
}

.pvc-wizard-wrapper .option-name,
.wizard-modal-content .option-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 4px;
}

.pvc-wizard-wrapper .option-hint,
.wizard-modal-content .option-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.pvc-wizard-wrapper .option-badge,
.wizard-modal-content .option-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-secondary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pvc-wizard-wrapper .wizard-footer,
.wizard-modal-content .wizard-footer {
    margin-top: 0;
    text-align: center;
    padding-top: 24px;
    padding-bottom: 64px;
    border-top: none;
}

.pvc-wizard-wrapper .wizard-footer .generate-btn,
.wizard-modal-content .wizard-footer .generate-btn {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.wizard-inline-actions { margin-top: 16px; display: flex; justify-content: flex-end; }
.generate-btn.disabled { opacity: 0.6; pointer-events: none; }

/* Style label as button when used with hidden checkbox */
.pvc-wizard-wrapper label.generate-btn,
.wizard-modal-content label.generate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    border-radius: 16px !important;
    -webkit-border-radius: 16px !important;
    -moz-border-radius: 16px !important;
}

.pvc-wizard-wrapper .wizard-checkbox {
    display: none !important;
}

/* Mark completed steps visually - removed duplicate ::after, using ::before only */

.pvc-wizard-wrapper .generate-btn,
.wizard-modal-content .generate-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 16px !important;
    -webkit-border-radius: 16px !important;
    -moz-border-radius: 16px !important;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

/* Social media share buttons - keep same style but with brand colors */
/* Share Card Buttons - Entire card is clickable */
.share-card-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
}

.share-card-btn:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.share-card-btn:active,
.share-card-btn.clicked {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

.share-card-btn.disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.share-card-btn .share-icon {
    font-size: 3rem;
    margin-bottom: 0;
    transition: transform 0.2s ease;
}

.share-card-btn:hover .share-icon {
    transform: scale(1.1);
}

.share-card-btn .share-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.share-card-btn .share-content h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.2s ease;
}

.share-card-btn:hover .share-content h3,
.share-card-btn:active .share-content h3,
.share-card-btn.clicked .share-content h3 {
    color: var(--accent-primary);
}

.share-card-btn .share-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.share-card-btn .share-action-text {
    margin-top: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.share-card-btn:hover .share-action-text,
.share-card-btn:active .share-action-text,
.share-card-btn.clicked .share-action-text {
    color: var(--accent-primary);
}

/* Legacy share button styles (for backwards compatibility) */
.share-btn.facebook-share-btn {
    background: linear-gradient(135deg, #1877f2 0%, #0d5dbf 100%) !important;
}

.share-btn.facebook-share-btn:hover {
    box-shadow: 0 10px 30px rgba(24, 119, 242, 0.4) !important;
}

.share-btn.twitter-share-btn {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%) !important;
}

.share-btn.twitter-share-btn:hover {
    box-shadow: 0 10px 30px rgba(29, 161, 242, 0.4) !important;
}

.share-btn.linkedin-share-btn {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%) !important;
}

.share-btn.linkedin-share-btn:hover {
    box-shadow: 0 10px 30px rgba(0, 119, 181, 0.4) !important;
}

/* Credit Top-Up Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
    background: var(--bg-secondary);
    height: 8px;
    border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    height: 24px;
    width: 24px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: all 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

input[type="range"]::-moz-range-track {
    background: var(--bg-secondary);
    height: 8px;
    border-radius: 4px;
}

input[type="range"]::-moz-range-thumb {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    height: 24px;
    width: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: all 0.3s;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

/* Earn Credits — Top Up: keep “100 credits = $2.00” inside the viewport on narrow screens */
.pvc-wizard-wrapper .credits-topup-section,
.wizard-modal-content .credits-topup-section {
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
}

.pvc-wizard-wrapper .credits-topup-section .library-info,
.wizard-modal-content .credits-topup-section .library-info {
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
}

.pvc-wizard-wrapper .pvc-topup-summary,
.wizard-modal-content .pvc-topup-summary {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-secondary);
    padding: 18px 20px;
    border-radius: 12px;
    border: 2px solid var(--border-primary);
}

.pvc-wizard-wrapper .pvc-topup-price-outer,
.wizard-modal-content .pvc-topup-price-outer {
    max-width: 100%;
    box-sizing: border-box;
}

.pvc-wizard-wrapper .pvc-topup-credit-input,
.wizard-modal-content .pvc-topup-credit-input {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 576px) {
    .pvc-wizard-wrapper .credits-topup-section .library-info,
    .wizard-modal-content .credits-topup-section .library-info {
        padding: 20px 14px !important;
    }

    .pvc-wizard-wrapper .pvc-topup-summary,
    .wizard-modal-content .pvc-topup-summary {
        flex-direction: column;
        padding: 16px 12px;
        gap: 12px;
    }

    .pvc-wizard-wrapper .pvc-topup-credit-input,
    .wizard-modal-content .pvc-topup-credit-input {
        width: 100% !important;
        max-width: 220px;
        font-size: 1.35rem !important;
        padding: 12px 14px !important;
    }

    .pvc-wizard-wrapper .pvc-topup-summary-label,
    .wizard-modal-content .pvc-topup-summary-label {
        font-size: 1rem !important;
    }

    .pvc-wizard-wrapper .pvc-topup-summary-eq,
    .wizard-modal-content .pvc-topup-summary-eq {
        font-size: 1.25rem !important;
        line-height: 1;
    }

    .pvc-wizard-wrapper .pvc-topup-summary-price,
    .wizard-modal-content .pvc-topup-summary-price {
        font-size: 1.45rem !important;
    }
}

/* Settings — Account Information: clearer spacing on small screens */
@media (max-width: 576px) {
    .wizard-modal-content .pvc-settings-account-card {
        padding: 18px 14px !important;
        margin-bottom: 18px !important;
    }

    .wizard-modal-content .pvc-settings-account-card > h3 {
        margin-bottom: 18px !important;
        font-size: 1.1rem !important;
        line-height: 1.35;
        flex-wrap: wrap;
        gap: 8px;
    }

    .wizard-modal-content .pvc-settings-account-card .pvc-autofit-250 {
        gap: 14px !important;
        margin-bottom: 6px;
    }

    .wizard-modal-content .pvc-settings-account-card .pvc-autofit-250 > div {
        padding: 16px 14px !important;
    }

    .wizard-modal-content .pvc-settings-account-card .pvc-autofit-250 > div > div:first-child {
        margin-bottom: 10px !important;
    }

    .wizard-modal-content .pvc-settings-account-card label {
        font-size: 0.8125rem !important;
        line-height: 1.35;
    }

    .wizard-modal-content .pvc-settings-account-card .pvc-autofit-250 > div > div:last-child {
        font-size: 0.95rem !important;
        line-height: 1.45;
    }

    .wizard-modal-content .pvc-settings-account-card > div[style*="margin-bottom: 24px"] {
        margin-bottom: 18px !important;
        padding: 16px 14px !important;
    }

    .wizard-modal-content .pvc-settings-account-card .pvc-account-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 12px !important;
    }

    .wizard-modal-content .pvc-settings-account-card .pvc-account-header-row > div:first-child {
        gap: 8px !important;
    }

    .wizard-modal-content .pvc-settings-account-card .pvc-account-header-row h4 {
        font-size: 0.95rem !important;
        line-height: 1.35;
    }

    .wizard-modal-content .pvc-settings-account-card .pvc-account-header-row button {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 10px 16px !important;
    }

    .wizard-modal-content .pvc-settings-account-card [id$="currentEmail"] {
        margin-left: 0 !important;
        margin-top: 4px;
        font-size: 0.9rem !important;
        line-height: 1.5;
        word-break: break-word;
    }

    .wizard-modal-content .pvc-settings-account-card [id$="emailForm"] > div[style*="display: flex"],
    .wizard-modal-content .pvc-settings-account-card [id$="passwordForm"] > div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .wizard-modal-content .pvc-settings-account-card [id$="emailForm"] button,
    .wizard-modal-content .pvc-settings-account-card [id$="passwordForm"] button {
        width: 100%;
        min-height: 44px;
    }
}

/* Grayed out / locked state for Edit Script button */
.generate-btn.script-locked-btn {
    background: var(--bg-input) !important;
    color: var(--text-secondary) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    opacity: 0.8;
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    -moz-border-radius: 12px !important;
}

.generate-btn.script-locked-btn:hover {
    background: var(--bg-input) !important;
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

[data-theme="light"] .generate-btn.script-locked-btn {
    background: #e2e8f0 !important;
    color: #64748b !important;
}

[data-theme="light"] .generate-btn.script-locked-btn:hover {
    background: #cbd5e1 !important;
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-credits {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Script editor styles */
/* AI Options Styling */
.ai-options {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-primary);
    overflow: visible;
    max-height: none !important;
    /* No CSS transitions - jQuery handles all animations */
    /* Slightly different opacity for visual distinction */
    opacity: 0.97;
}

.ai-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.ai-section:last-child {
    margin-bottom: 0;
}

.ai-label {
    display: block;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.script-title-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-smooth);
}

.script-title-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.script-title-input::placeholder {
    color: var(--text-muted);
}

/* Script Length Options - Use same styling as wizard-new-option-card but smaller */
.ai-section .wizard-new-option-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

/* Audience row: responsive (1 / 2 / 4 columns by breakpoint) */
.wizard-new-audience-grid,
.pvc-wizard-wrapper .wizard-new-audience-grid,
.ai-section .wizard-new-audience-grid,
.wizard-modal-content .wizard-new-audience-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.wizard-new-audience-grid .wizard-new-audience-card,
.pvc-wizard-wrapper .wizard-new-audience-grid .wizard-new-audience-card,
.wizard-modal-content .wizard-new-audience-grid .wizard-new-audience-card {
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 576px) {
    .wizard-new-audience-grid,
    .pvc-wizard-wrapper .wizard-new-audience-grid,
    .ai-section .wizard-new-audience-grid,
    .wizard-modal-content .wizard-new-audience-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .wizard-new-audience-grid,
    .pvc-wizard-wrapper .wizard-new-audience-grid,
    .ai-section .wizard-new-audience-grid,
    .wizard-modal-content .wizard-new-audience-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.ai-section .wizard-new-option-card {
    min-height: 100px;
    padding: 16px 12px;
}

.ai-section .wizard-new-option-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.ai-section .wizard-new-option-name {
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.ai-section .wizard-new-option-hint {
    font-size: 0.8125rem;
}

@media (max-width: 768px) {
    .ai-section .wizard-new-option-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-section .wizard-new-option-card {
        min-height: 90px;
        padding: 14px;
    }
}

/* Theme Bubbles */
.theme-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.theme-bubble {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    user-select: none;
    -webkit-user-select: none;
}

.theme-bubble:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.theme-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.theme-bubble:has(.theme-checkbox:checked) {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.theme-bubble span {
    pointer-events: none;
}

.script-editor { 
    margin-top: 16px;
    overflow: visible;
    max-height: none !important;
    /* No CSS transitions - jQuery handles all animations */
}
.script-textarea {
    width: 100%;
    min-height: 140px;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-primary);
    resize: vertical;
    transition: all var(--transition-smooth);
}
.script-textarea:disabled,
.script-textarea.script-locked {
    background: var(--bg-input);
    opacity: 0.7;
    cursor: not-allowed;
    border-color: var(--accent-success);
}
[data-theme="light"] .script-textarea:disabled,
[data-theme="light"] .script-textarea.script-locked {
    opacity: 0.6;
}
.script-actions { display: flex; gap: 12px; margin-top: 12px; pointer-events: auto !important; z-index: 10; }
.script-actions button,
.script-actions label.generate-btn,
.script-actions .generate-btn { 
    pointer-events: auto !important; 
    z-index: 11; 
    position: relative;
    border-radius: 16px !important;
    -webkit-border-radius: 16px !important;
    -moz-border-radius: 16px !important;
}
.generate-btn.secondary { background: var(--accent-tertiary); }
.generate-btn.secondary:hover { box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4); }
.script-note { margin-top: 8px; font-size: 0.85rem; color: var(--text-secondary); }

/* Upload Sections */
.brand-upload-section,
.music-upload-section,
.music-library-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    overflow: visible;
    max-height: none !important;
}

.upload-instructions h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 12px;
}

.instruction-text {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.instruction-examples {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.example-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
}

.example-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.example-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.example-text small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.upload-area {
    margin-top: 16px;
}

.upload-input {
    display: none;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    border: 2px dashed var(--border-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-align: center;
    min-height: 120px;
}

.upload-label:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-text strong {
    color: var(--text-accent);
    font-size: 1rem;
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.upload-preview {
    margin-top: 16px;
    position: relative;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
}

.upload-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius-sm);
    display: block;
    margin: 0 auto;
}

.upload-preview.audio-preview {
    display: flex;
    align-items: center;
    gap: 16px;
}

.upload-preview audio {
    flex: 1;
    max-width: 100%;
}

.remove-upload {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-error);
    color: white;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.remove-upload:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Music Library */
.library-info {
    margin-bottom: 20px;
}

.credits-info {
    margin-top: 12px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.music-library-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.library-track {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.library-track:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.library-track.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.play-preview {
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.play-preview:hover {
    /* No hover effect */
}

.play-preview.playing {
    background: transparent;
}

.play-icon {
    font-size: 18px;
    margin-left: 2px;
    color: var(--text-primary);
}

.track-info {
    flex: 1;
}

.track-name {
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 4px;
}

.track-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.track-credits {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

/* Premium Upgrade Section */
.premium-upgrade-section {
    margin-top: 24px;
}

.upgrade-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.upgrade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.upgrade-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.upgrade-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

.upgrade-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-accent);
    font-family: var(--font-display);
}

.upgrade-description {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.upgrade-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.benefit-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.upgrade-pricing {
    text-align: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 2px solid var(--accent-primary);
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-display);
    line-height: 1;
    margin-bottom: 8px;
}

.pricing-period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.upgrade-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.upgrade-btn:active {
    transform: translateY(0);
}

.upgrade-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.upgrade-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-smooth);
}

.upgrade-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Step completion indicator */
.step-number {
    position: relative;
}

.wizard-step.completed .step-number {
    background: var(--accent-success) !important;
    color: transparent !important; /* Hide the number, show checkmark */
    border-color: var(--accent-success) !important;
}

.wizard-step.completed .step-number::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1;
}

/* Auto-mark steps with green checkmark when selections are made - CSS-only */
.pvc-wizard-wrapper .wizard-steps:has([id$="stepTemplate"] input[name="template"]:checked) [id$="stepTemplate"] .step-number,
.wizard-modal-content .wizard-steps:has([id$="stepTemplate"] input[name="template"]:checked) [id$="stepTemplate"] .step-number {
    background: var(--accent-success) !important;
    color: transparent !important;
    border-color: var(--accent-success) !important;
}
.pvc-wizard-wrapper .wizard-steps:has([id$="stepTemplate"] input[name="template"]:checked) [id$="stepTemplate"] .step-number::before,
.wizard-modal-content .wizard-steps:has([id$="stepTemplate"] input[name="template"]:checked) [id$="stepTemplate"] .step-number::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_mode"]:checked) [id$="stepScript"] .step-number,
.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_saved"]:checked) [id$="stepScript"] .step-number,
.wizard-modal-content .wizard-steps:has([id$="stepScript"] input[name="script_mode"]:checked) [id$="stepScript"] .step-number,
.wizard-modal-content .wizard-steps:has([id$="stepScript"] input[name="script_saved"]:checked) [id$="stepScript"] .step-number,
.pvc-wizard-wrapper .template-steps:has(input[name$="_script_mode"]:checked) [id*="stepScript"] .step-number,
.pvc-wizard-wrapper .template-steps:has(input[name$="_script_saved"]:checked) [id*="stepScript"] .step-number,
.wizard-modal-content .template-steps:has(input[name$="_script_mode"]:checked) [id*="stepScript"] .step-number,
.wizard-modal-content .template-steps:has(input[name$="_script_saved"]:checked) [id*="stepScript"] .step-number {
    background: var(--accent-success) !important;
    color: transparent !important;
    border-color: var(--accent-success) !important;
}
.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_mode"]:checked) [id$="stepScript"] .step-number::before,
.pvc-wizard-wrapper .wizard-steps:has([id$="stepScript"] input[name="script_saved"]:checked) [id$="stepScript"] .step-number::before,
.wizard-modal-content .wizard-steps:has([id$="stepScript"] input[name="script_mode"]:checked) [id$="stepScript"] .step-number::before,
.wizard-modal-content .wizard-steps:has([id$="stepScript"] input[name="script_saved"]:checked) [id$="stepScript"] .step-number::before,
.pvc-wizard-wrapper .template-steps:has(input[name$="_script_mode"]:checked) [id*="stepScript"] .step-number::before,
.pvc-wizard-wrapper .template-steps:has(input[name$="_script_saved"]:checked) [id*="stepScript"] .step-number::before,
.wizard-modal-content .template-steps:has(input[name$="_script_mode"]:checked) [id*="stepScript"] .step-number::before,
.wizard-modal-content .template-steps:has(input[name$="_script_saved"]:checked) [id*="stepScript"] .step-number::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepAspect"] input[name="aspect"]:checked) [id$="stepAspect"] .step-number,
.wizard-modal-content .wizard-steps:has([id$="stepAspect"] input[name="aspect"]:checked) [id$="stepAspect"] .step-number,
.pvc-wizard-wrapper .template-steps:has(input[name$="_aspect"]:checked) [id*="stepAspect"] .step-number,
.wizard-modal-content .template-steps:has(input[name$="_aspect"]:checked) [id*="stepAspect"] .step-number {
    background: var(--accent-success) !important;
    color: transparent !important;
    border-color: var(--accent-success) !important;
}
.pvc-wizard-wrapper .wizard-steps:has([id$="stepAspect"] input[name="aspect"]:checked) [id$="stepAspect"] .step-number::before,
.wizard-modal-content .wizard-steps:has([id$="stepAspect"] input[name="aspect"]:checked) [id$="stepAspect"] .step-number::before,
.pvc-wizard-wrapper .template-steps:has(input[name$="_aspect"]:checked) [id*="stepAspect"] .step-number::before,
.wizard-modal-content .template-steps:has(input[name$="_aspect"]:checked) [id*="stepAspect"] .step-number::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepBrand"] input[name="brand"]:checked) [id$="stepBrand"] .step-number,
.wizard-modal-content .wizard-steps:has([id$="stepBrand"] input[name="brand"]:checked) [id$="stepBrand"] .step-number,
.pvc-wizard-wrapper .template-steps:has(input[name$="_brand"]:checked) [id*="stepBrand"] .step-number,
.wizard-modal-content .template-steps:has(input[name$="_brand"]:checked) [id*="stepBrand"] .step-number {
    background: var(--accent-success) !important;
    color: transparent !important;
    border-color: var(--accent-success) !important;
}
.pvc-wizard-wrapper .wizard-steps:has([id$="stepBrand"] input[name="brand"]:checked) [id$="stepBrand"] .step-number::before,
.wizard-modal-content .wizard-steps:has([id$="stepBrand"] input[name="brand"]:checked) [id$="stepBrand"] .step-number::before,
.pvc-wizard-wrapper .template-steps:has(input[name$="_brand"]:checked) [id*="stepBrand"] .step-number::before,
.wizard-modal-content .template-steps:has(input[name$="_brand"]:checked) [id*="stepBrand"] .step-number::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepMusic"] input[name="music"]:checked) [id$="stepMusic"] .step-number,
.wizard-modal-content .wizard-steps:has([id$="stepMusic"] input[name="music"]:checked) [id$="stepMusic"] .step-number,
.pvc-wizard-wrapper .template-steps:has(input[name$="_music"]:checked) [id*="stepMusic"] .step-number,
.wizard-modal-content .template-steps:has(input[name$="_music"]:checked) [id*="stepMusic"] .step-number {
    background: var(--accent-success) !important;
    color: transparent !important;
    border-color: var(--accent-success) !important;
}
.pvc-wizard-wrapper .wizard-steps:has([id$="stepMusic"] input[name="music"]:checked) [id$="stepMusic"] .step-number::before,
.wizard-modal-content .wizard-steps:has([id$="stepMusic"] input[name="music"]:checked) [id$="stepMusic"] .step-number::before,
.pvc-wizard-wrapper .template-steps:has(input[name$="_music"]:checked) [id*="stepMusic"] .step-number::before,
.wizard-modal-content .template-steps:has(input[name$="_music"]:checked) [id*="stepMusic"] .step-number::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1;
}

.pvc-wizard-wrapper .wizard-steps:has([id$="stepWatermark"] input[name="watermark"]:checked) [id$="stepWatermark"] .step-number,
.wizard-modal-content .wizard-steps:has([id$="stepWatermark"] input[name="watermark"]:checked) [id$="stepWatermark"] .step-number,
.pvc-wizard-wrapper .template-steps:has(input[name$="_watermark"]:checked) [id*="stepWatermark"] .step-number,
.wizard-modal-content .template-steps:has(input[name$="_watermark"]:checked) [id*="stepWatermark"] .step-number {
    background: var(--accent-success) !important;
    color: transparent !important;
    border-color: var(--accent-success) !important;
}
.pvc-wizard-wrapper .wizard-steps:has([id$="stepWatermark"] input[name="watermark"]:checked) [id$="stepWatermark"] .step-number::before,
.wizard-modal-content .wizard-steps:has([id$="stepWatermark"] input[name="watermark"]:checked) [id$="stepWatermark"] .step-number::before,
.pvc-wizard-wrapper .template-steps:has(input[name$="_watermark"]:checked) [id*="stepWatermark"] .step-number::before,
.wizard-modal-content .template-steps:has(input[name$="_watermark"]:checked) [id*="stepWatermark"] .step-number::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1;
}

/* Ensure checkmarks disappear and step numbers return to normal when unchecked */
.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepTemplate"] input[name="template"]:checked)) [id$="stepTemplate"] .step-number {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}
.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepTemplate"] input[name="template"]:checked)) [id$="stepTemplate"] .step-number::before {
    content: none !important;
}

.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepScript"] input[name="script_mode"]:checked)):not(:has([id$="stepScript"] input[name="script_saved"]:checked)) [id$="stepScript"] .step-number {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}
.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepScript"] input[name="script_mode"]:checked)):not(:has([id$="stepScript"] input[name="script_saved"]:checked)) [id$="stepScript"] .step-number::before {
    content: none !important;
}

.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepAspect"] input[name="aspect"]:checked)) [id$="stepAspect"] .step-number {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}
.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepAspect"] input[name="aspect"]:checked)) [id$="stepAspect"] .step-number::before {
    content: none !important;
}

.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepBrand"] input[name="brand"]:checked)) [id$="stepBrand"] .step-number {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}
.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepBrand"] input[name="brand"]:checked)) [id$="stepBrand"] .step-number::before {
    content: none !important;
}

.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepMusic"] input[name="music"]:checked)) [id$="stepMusic"] .step-number {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}
.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepMusic"] input[name="music"]:checked)) [id$="stepMusic"] .step-number::before {
    content: none !important;
}

.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepWatermark"] input[name="watermark"]:checked)) [id$="stepWatermark"] .step-number {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}
.pvc-wizard-wrapper .wizard-steps:not(:has([id$="stepWatermark"] input[name="watermark"]:checked)) [id$="stepWatermark"] .step-number::before {
    content: none !important;
}

/* Responsive wizard */
@media (max-width: 768px) {
    .video-setup-wizard {
        padding: 20px;
    }
    
    .wizard-title {
        font-size: 1.5rem;
    }
    
    .option-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .option-card {
        padding: 16px;
        min-height: 120px;
    }
    
    .pvc-wizard-wrapper .option-icon,
    .wizard-modal-content .option-icon {
        font-size: 2rem;
        display: inline-block;
    }
    
    .step-header {
        padding: 16px;
    }
    
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-accent);
    line-height: 1.2;
    letter-spacing: -0.015em;
    flex: 1;
    font-family: var(--font-display);
}

.product-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.share-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: var(--radius-md);
    transition: all var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.6;
    line-height: 1;
    height: 24px;
    width: 24px;
}

.share-btn:hover {
    color: var(--accent-primary);
    opacity: 0.8;
    transform: translateY(-2px) scale(1.1);
}

.favorite-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: var(--radius-md);
    transition: all var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.6;
    line-height: 1;
    height: 28px;
    width: 28px;
}

.favorite-btn:not(.liked) {
    font-size: 1.5rem;
}

.favorite-btn:hover {
    color: var(--accent-error);
    opacity: 0.8;
    transform: translateY(-2px) scale(1.2);
}

.favorite-btn.liked {
    color: var(--accent-error);
    opacity: 1;
    animation: heartPump 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes heartPump {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1.3); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.product-tags {
    margin-bottom: 20px;
}

.product-tag {
    display: inline;
    padding: 4px 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-primary);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.product-tag:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.product-tag:not(:last-child)::after {
    content: ', ';
    color: var(--text-secondary);
    cursor: default;
}

.product-images {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.product-image {
    flex: 1;
    height: 140px;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-secondary);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}

.product-image:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-md);
    border-color: var(--border-accent);
}

/* Video Container Styles */
.product-video-container {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-input);
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.product-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--bg-input);
}

.product-video-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    cursor: pointer;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    transition: all var(--transition-smooth);
    pointer-events: none;
}

.product-video-placeholder:hover .video-play-overlay {
    background: rgba(99, 102, 241, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.product-description {
    margin-top: 18px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
    line-clamp: 2;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-primary);
}

/* Video Action Buttons */
.video-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.video-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    text-align: left;
}

.video-action-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.video-action-btn .action-icon {
    font-size: 1.2rem;
    margin-right: 10px;
}

.video-action-btn .action-text {
    flex: 1;
}

.video-action-btn .credit-cost {
    font-size: 0.85rem;
    padding: 4px 8px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--accent-primary);
}

.video-action-btn:hover .credit-cost {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.download-btn:hover {
    background: var(--accent-success);
    border-color: var(--accent-success);
}

.edit-btn:hover {
    background: var(--accent-tertiary);
    border-color: var(--accent-tertiary);
}

.package-btn:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.product-price.free {
    color: var(--accent-success);
}

.add-to-cart {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.add-to-cart:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.add-to-cart.free {
    background: var(--accent-success);
}

.add-to-cart.free:hover {
    background: #059669;
}

.add-to-cart.in-cart {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
}

.add-to-cart.in-cart:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Loading States */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 500;
}

.loading .spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent-tertiary);
    animation: spin 1s linear infinite;
}

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

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 500;
}

.end-of-list-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px solid var(--accent-primary);
    margin: 24px 0;
    box-shadow: var(--shadow-md);
}

.end-of-list-message h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.end-of-list-message p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
}

/* Modal/Popup Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: var(--bg-modal);
    max-width: 800px;
    max-height: 90vh;
    margin: 5vh auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-primary);
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-header {
    padding: 32px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-header .popup-nav {
    position: absolute;
    left: 32px;
    display: flex;
    gap: 8px;
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-accent);
    margin: 0;
    flex: 1;
    text-align: center;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-smooth);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.close-btn:hover {
    color: var(--text-accent);
    background: var(--bg-input);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

.modal-body #modalDescription {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.modal-img-container {
    text-align: center;
}

.modal-img-container img.modal-img {
    width: 100%;
    min-height: 250px;
    max-height: 500px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    background: var(--bg-input);
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-secondary);
    display: block;
}

.modal-img-container:has(img[src=""]) {
    display: none !important;
}

.modal-img-container img.modal-img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-accent);
}

/* Category Tags */
.categories {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    background: var(--bg-input);
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    transition: all var(--transition-smooth);
    cursor: default;
}

.category-tag:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Modal Section Headings */
.modal-body h4 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 12px;
}

.modal-body p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-card);
}

.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.popup-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-accent);
}

.popup-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.popup-nav-btn {
    background: var(--bg-input);
    border: 2px solid var(--border-primary);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    transition: all var(--transition-smooth);
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-nav-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: scale(1.05);
}

.popup-btn {
    background: var(--accent-primary);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: white;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.popup-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.popup-btn.in-cart {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: none;
}

.popup-btn.in-cart:hover {
    background: var(--bg-secondary);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pricing chart styles removed */

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-primary);
    z-index: 2000;
    animation: slideUp 0.3s ease;
    font-weight: 500;
}

.toast.success {
    border-left: 4px solid var(--accent-success);
}

.toast.error {
    border-left: 4px solid var(--accent-error);
}

.toast.info {
    border-left: 4px solid var(--accent-tertiary);
}

.toast.warning {
    border-left: 4px solid var(--accent-warning);
}

/* Footer Styles */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    margin-top: 80px;
    padding: 60px 0 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-accent);
    margin-bottom: 16px;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-smooth);
}

.footer-section ul li a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all var(--transition-smooth);
}

.social-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid var(--border-primary);
    padding-top: 24px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.footer-bottom-content p {
    color: var(--text-muted);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.refund-notice {
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.refund-notice p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-smooth);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.back-to-top-icon {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top-icon {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .pvc-wizard-wrapper .footer-content,
    .wizard-modal-overlay .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .pvc-wizard-wrapper .footer-bottom-content,
    .wizard-modal-overlay .footer-bottom-content {
        flex-direction: column;
        gap: 16px;
    text-align: center;
}

    .pvc-wizard-wrapper .footer-links,
    .wizard-modal-overlay .footer-links {
        justify-content: center;
    }
}

/* Responsive Design — scoped so SaaS/block themes are not affected */
@media (max-width: 768px) {
    .pvc-wizard-wrapper .header-wrapper,
    .wizard-modal-overlay .header-wrapper {
        padding: 16px;
    }
    
    .pvc-wizard-wrapper .pvc-wizard-shell,
    .wizard-modal-overlay .pvc-wizard-shell {
        padding: 16px;
    }

    .pvc-wizard-wrapper .header,
    .wizard-modal-overlay .header {
        padding: 24px;
        margin-bottom: 24px;
    }

    .pvc-wizard-wrapper .header h1,
    .wizard-modal-overlay .header h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .pvc-wizard-wrapper .theme-controls,
    .wizard-modal-overlay .theme-controls {
        position: static;
        text-align: center;
    margin-bottom: 20px;
}

    .pvc-wizard-wrapper .header-actions,
    .wizard-modal-overlay .header-actions {
        position: static;
        align-self: center;
        margin: 16px auto 0;
    }

    .pvc-wizard-wrapper .search-controls,
    .wizard-modal-overlay .search-controls {
        flex-direction: column;
        gap: 12px;
        margin-top: 25px;
        margin-bottom: 0;
    }

    .pvc-wizard-wrapper .search-input,
    .pvc-wizard-wrapper .filter-dropdown,
    .wizard-modal-overlay .search-input,
    .wizard-modal-overlay .filter-dropdown {
        min-width: auto;
        width: 100%;
    }

    .pvc-wizard-wrapper .pvc-wizard-shell .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: -25px !important;
    }

    .pvc-wizard-wrapper .pvc-wizard-shell .product-card {
        padding: 20px;
    }

    .pvc-wizard-wrapper .platform-grid,
    .wizard-modal-overlay .platform-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 16px;
    }

    .pvc-wizard-wrapper .modal-content,
    .wizard-modal-overlay .modal-content {
        margin: 16px;
        padding: 24px;
        max-width: calc(100vw - 32px);
    }

    .pvc-wizard-wrapper .modal-images,
    .wizard-modal-overlay .modal-images {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* AUTO-POST Calendar Styles */
.pvc-wizard-wrapper .autopost-container {
    padding: 24px;
    display: block !important;
}

.pvc-wizard-wrapper .autopost-calendar-wrapper {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    border: 2px solid var(--border-primary);
    max-width: 1000px;
    margin: 0 auto;
    display: block !important;
}

.pvc-wizard-wrapper .tab-content-wrapper {
    display: block !important;
}

.pvc-wizard-wrapper .autopost-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-primary);
}

.pvc-wizard-wrapper .autopost-calendar-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pvc-wizard-wrapper .autopost-calendar-nav button {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-primary);
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pvc-wizard-wrapper .autopost-calendar-nav button:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pvc-wizard-wrapper .autopost-calendar-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.pvc-wizard-wrapper .autopost-calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pvc-wizard-wrapper .autopost-calendar-day-header {
    text-align: center !important;
    font-weight: 700 !important;
    color: var(--text-secondary) !important;
    padding: 12px 8px !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.pvc-wizard-wrapper .autopost-calendar-day {
    min-height: 80px !important;
    border: 2px solid var(--border-primary) !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: var(--bg-card) !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.pvc-wizard-wrapper .autopost-calendar-day:hover:not(.other-month) {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.pvc-wizard-wrapper .autopost-calendar-day.other-month {
    opacity: 0.25;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

.pvc-wizard-wrapper .autopost-calendar-day.other-month:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-primary);
    background: var(--bg-secondary);
}

.pvc-wizard-wrapper .autopost-calendar-day.today {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.12);
    font-weight: 700;
}

.pvc-wizard-wrapper .autopost-calendar-day.today .autopost-calendar-day-number {
    color: var(--accent-primary);
    font-weight: 700;
}

.pvc-wizard-wrapper .autopost-calendar-day-number {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 6px;
    line-height: 1.2;
}

.pvc-wizard-wrapper .autopost-calendar-day-events {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    margin-top: auto;
    padding-top: 4px;
}

.pvc-wizard-wrapper .autopost-calendar-event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    flex-shrink: 0;
}

.pvc-wizard-wrapper .autopost-calendar-event-dot.youtube {
    background: #ff0000;
}

/* Video Selection Popup */
.pvc-wizard-wrapper .autopost-video-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pvc-wizard-wrapper .autopost-video-popup-container {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pvc-wizard-wrapper .autopost-video-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 2px solid var(--border-primary);
}

.pvc-wizard-wrapper .autopost-video-popup-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.pvc-wizard-wrapper .autopost-video-popup-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
}

.pvc-wizard-wrapper .autopost-video-popup-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.pvc-wizard-wrapper .autopost-video-popup-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.pvc-wizard-wrapper .autopost-video-popup-search {
    margin-bottom: 24px;
}

.pvc-wizard-wrapper .autopost-video-popup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.pvc-wizard-wrapper .autopost-video-item {
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-card);
}

.pvc-wizard-wrapper .autopost-video-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.pvc-wizard-wrapper .autopost-video-item.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.pvc-wizard-wrapper .autopost-video-item-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pvc-wizard-wrapper .autopost-video-item-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pvc-wizard-wrapper .autopost-video-item-info {
    padding: 12px;
}

.pvc-wizard-wrapper .autopost-video-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pvc-wizard-wrapper .autopost-video-item-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .popup-nav {
        position: static;
        margin-bottom: 16px;
    }

    .modal-footer {
        padding: 16px 20px;
        position: sticky;
        bottom: 0;
    }

    .popup-footer {
        flex-direction: column;
        gap: 12px;
    }

    .popup-btn {
        width: 100%;
        font-size: 1rem;
        padding: 14px;
    }

    .popup-price {
        font-size: 1.25rem;
        text-align: center;
    }
}

/* SweetAlert2 Custom Styling */
.swal2-container {
    backdrop-filter: blur(10px) !important;
}

.swal2-backdrop-show {
    backdrop-filter: blur(10px) !important;
}

.swal2-popup {
    border-radius: var(--radius-xl) !important;
    min-height: 400px;
}

/* Increase height for login/profile popups */
.swal2-popup:has(.profile-tab) {
    min-height: 750px;
    max-height: 85vh;
}

/* Also increase height for SweetAlert2 HTML container */
.swal2-popup:has(.profile-tab) .swal2-html-container {
    max-height: 70vh;
}

/* Make SweetAlert2 HTML container scrollable */
.swal2-html-container {
    max-height: 75vh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* SweetAlert2 HTML container scrollbar - Default (Dark mode) */
.swal2-html-container::-webkit-scrollbar {
    width: 12px;
}

.swal2-html-container::-webkit-scrollbar-track {
    background: #1e293b !important;
    border-radius: 10px;
}

.swal2-html-container::-webkit-scrollbar-thumb {
    background: #667eea !important;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.swal2-html-container::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6 !important;
}

/* SweetAlert2 HTML container scrollbar - Light mode */
[data-theme="light"] .swal2-html-container::-webkit-scrollbar {
    width: 12px;
}

[data-theme="light"] .swal2-html-container::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 10px;
}

[data-theme="light"] .swal2-html-container::-webkit-scrollbar-thumb {
    background: #667eea !important;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

[data-theme="light"] .swal2-html-container::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6 !important;
}

/* Upgrade Button Hover Effects */
.upgrade-pro-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upgrade-pro-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 4s infinite;
}

.upgrade-pro-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

.upgrade-pro-btn:hover::before {
    animation: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.upgrade-lifetime-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.upgrade-lifetime-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer-fast 3s infinite;
}

.upgrade-lifetime-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 5px 12px rgba(245, 158, 11, 0.25);
}

.upgrade-lifetime-btn:hover::before {
    animation: none;
}

@keyframes shimmer-fast {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Spin animation for close button */
@keyframes spinIn {
    0% {
        transform: rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg);
        opacity: 1;
    }
}

/* Favorite button styles */
.favorite-btn.liked {
    color: #ef4444 !important;
    opacity: 1 !important;
}

.favorite-btn.liked:hover {
    color: #dc2626 !important;
}

/* Make icons more visible */
.favorite-btn:not(.liked),
.share-btn {
    opacity: 0.8 !important;
}

.favorite-btn:not(.liked):hover,
.share-btn:hover {
    opacity: 1 !important;
}

/* Responsive popup width */
@media (max-width: 768px) {
    .swal2-popup {
        width: 90% !important;
    }
}

@media (max-width: 480px) {
    .platform-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .platform-logo {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .platform-name {
        font-size: 12px;
    }

    .product-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .product-actions {
        width: 100%;
        justify-content: space-between;
    }

    .modal-content {
        margin: 8px;
        max-width: calc(100vw - 16px);
        max-height: 98vh;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-header h2 {
        font-size: 1.25rem;
        margin-left: 0;
    }

    .modal-body {
        padding: 16px;
        max-height: calc(98vh - 280px);
    }

    .modal-body #modalDescription {
        margin-bottom: 16px;
        font-size: 0.9rem;
    }

    .modal-images {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 16px;
    }

    .categories {
        gap: 6px;
        margin-bottom: 16px;
    }

    .category-tag {
        padding: 6px 12px;
        font-size: 0.8125rem;
    }

    .modal-footer {
        padding: 16px;
        position: relative !important;
        border-top: 1px solid var(--border-primary);
    }

    .popup-footer {
        flex-direction: column;
        gap: 16px;
    }

    .popup-price {
        text-align: center;
        font-size: 1.5rem;
    }

    .popup-btn {
        width: 100%;
        padding: 16px;
        font-size: 1rem;
    }

    .close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
}

/* Render Output Styles - SCOPED TO PLUGIN ONLY */
.pvc-wizard-wrapper .render-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    margin-top: 24px;
}

.pvc-wizard-wrapper .render-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pvc-wizard-wrapper .render-title {
    margin: 0;
    color: var(--text-accent);
}

.pvc-wizard-wrapper .render-status {
    color: rgb(121, 120, 120);
    font-weight: 600;
    font-size: 1.0rem;
}

.pvc-wizard-wrapper .render-progress,
.wizard-modal-overlay .render-progress {
    height: 10px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.14) !important;
    border: none !important;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: none !important;
}

.wizard-modal-overlay[data-theme="dark"] .render-progress:not(.fade-out),
.pvc-wizard-wrapper[data-theme="dark"] .render-progress:not(.fade-out) {
    background: rgba(255, 255, 255, 0.12) !important;
}

.pvc-wizard-wrapper .render-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    width: 0%;
    transition: width var(--transition-smooth);
}

.pvc-wizard-wrapper .render-player video {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Videos Section Styles - SCOPED TO PLUGIN ONLY */
.pvc-wizard-wrapper .videos-section-header {
    margin-top: 64px;
    margin-bottom: 24px;
    text-align: center !important;
    width: 100%;
}

.pvc-wizard-wrapper .videos-section-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all var(--transition-smooth);
}

.pvc-wizard-wrapper .videos-section-toggle:hover {
    opacity: 0.8;
}

.pvc-wizard-wrapper .videos-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-accent);
    margin: 0;
    font-family: var(--font-display);
    text-align: center !important;
}

.pvc-wizard-wrapper .toggle-icon {
    font-size: 1.5rem;
    color: var(--text-accent);
    transition: transform var(--transition-smooth);
    display: inline-block;
}

.pvc-wizard-wrapper .videos-section-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.pvc-wizard-wrapper .videos-section-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 8px 0 0 0;
    text-align: center !important;
}

/* Collapsible Videos Content */
.pvc-wizard-wrapper .videos-section-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    will-change: max-height, opacity;
    max-height: 0;
    opacity: 0;
}

.pvc-wizard-wrapper .videos-section-content:not(.collapsed) {
    max-height: 2000px; /* enough to reveal content */
    opacity: 1;
}

.pvc-wizard-wrapper .template-filter-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.pvc-wizard-wrapper .template-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.pvc-wizard-wrapper .template-bubble:hover {
    background: var(--bg-secondary);
    border-color: var(--border-accent);
}

.pvc-wizard-wrapper .template-bubble input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pvc-wizard-wrapper .template-bubble input[type="checkbox"]:checked + span,
.pvc-wizard-wrapper .template-bubble:has(input[type="checkbox"]:checked) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Aspect Ratio Filter Bubbles */
.pvc-wizard-wrapper .aspect-ratio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.pvc-wizard-wrapper .aspect-filter-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
}

.pvc-wizard-wrapper .aspect-filter-bubble:hover {
    background: var(--bg-secondary);
    border-color: var(--border-accent);
}

.pvc-wizard-wrapper .aspect-filter-bubble input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pvc-wizard-wrapper .aspect-filter-bubble input[type="checkbox"]:checked + span,
.pvc-wizard-wrapper .aspect-filter-bubble:has(input[type="checkbox"]:checked) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.pvc-wizard-wrapper .videos-search-controls {
    margin-bottom: 24px;
}

/* History Page Modern Styling */
.pvc-wizard-wrapper .history-filters-section {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.pvc-wizard-wrapper .history-search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
    background: var(--bg-secondary);
}

.pvc-wizard-wrapper .history-search-input:focus {
    border-color: var(--accent-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.pvc-wizard-wrapper .filter-group-title {
    margin: 0 0 12px 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pvc-wizard-wrapper .history-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.pvc-wizard-wrapper .history-filter-btn:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.pvc-wizard-wrapper .history-filter-btn input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pvc-wizard-wrapper .history-filter-btn:has(input[type="checkbox"]:checked) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.pvc-wizard-wrapper .history-filter-btn:has(input[type="checkbox"]:checked) span {
    color: white;
}

.pvc-wizard-wrapper .history-filter-btn span {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Sort Buttons */
.pvc-wizard-wrapper .history-sort-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    outline: none;
}

.pvc-wizard-wrapper .history-sort-btn:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.pvc-wizard-wrapper .history-sort-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.pvc-wizard-wrapper .history-sort-btn:active {
    transform: translateY(0);
}

/* Modern Video Cards */
.pvc-wizard-wrapper .products-grid .product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pvc-wizard-wrapper .products-grid .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-primary);
}

.pvc-wizard-wrapper .products-grid .product-card .product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pvc-wizard-wrapper .products-grid .product-card .product-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pvc-wizard-wrapper .products-grid .product-card .product-image .video-placeholder {
    color: white;
    font-size: 3rem;
    opacity: 0.7;
}

.pvc-wizard-wrapper .products-grid .product-card .product-image .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.pvc-wizard-wrapper .products-grid .product-card .product-image .status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.pvc-wizard-wrapper .products-grid .product-card .product-content {
    padding: 20px;
}

.pvc-wizard-wrapper .products-grid .product-card .product-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}

.pvc-wizard-wrapper .products-grid .product-card .product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pvc-wizard-wrapper .products-grid .product-card .product-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pvc-wizard-wrapper .products-grid .product-card .product-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pvc-wizard-wrapper .products-grid .product-card .product-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.pvc-wizard-wrapper .products-grid .product-card .action-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.pvc-wizard-wrapper .products-grid .product-card .action-btn span {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.pvc-wizard-wrapper .products-grid .product-card .download-btn {
    background: var(--accent-primary);
    color: white;
}

.pvc-wizard-wrapper .products-grid .product-card .download-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pvc-wizard-wrapper .products-grid .product-card .delete-video-btn {
    background: #ef4444;
    color: white;
}

.pvc-wizard-wrapper .products-grid .product-card .delete-video-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.pvc-wizard-wrapper .products-grid .product-card .action-btn:active {
    transform: translateY(0);
}

/* Responsive History Filters */
@media (max-width: 768px) {
    .pvc-wizard-wrapper .history-filters-row {
        grid-template-columns: 1fr !important;
    }
    
    .pvc-wizard-wrapper .history-sort-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .pvc-wizard-wrapper .sort-options {
        width: 100%;
        flex-direction: column;
    }
    
    .pvc-wizard-wrapper .history-sort-btn {
        width: 100%;
    }
}

/* Force border radius on ALL elements - override any theme styles */
.pvc-wizard-wrapper .option-card,
.wizard-modal-content .option-card {
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    -moz-border-radius: 12px !important;
}

.pvc-wizard-wrapper .wizard-step,
.wizard-modal-content .wizard-step {
    border-radius: 16px !important;
    -webkit-border-radius: 16px !important;
    -moz-border-radius: 16px !important;
    overflow: visible !important;
}

/* Ensure all form inputs, buttons, and interactive elements in modal have border radius */
.pvc-wizard-wrapper input[type="text"],
.pvc-wizard-wrapper input[type="email"],
.pvc-wizard-wrapper input[type="search"],
.pvc-wizard-wrapper textarea,
.pvc-wizard-wrapper select,
.pvc-wizard-wrapper .search-input,
.pvc-wizard-wrapper .filter-dropdown,
.wizard-modal-content input[type="text"],
.wizard-modal-content input[type="email"],
.wizard-modal-content input[type="search"],
.wizard-modal-content textarea,
.wizard-modal-content select,
.wizard-modal-content .search-input,
.wizard-modal-content .filter-dropdown {
    border-radius: 12px !important;
}

/* Ensure all buttons in modal have border radius */
/* Exclude My Videos row actions (.history-video-action) — they use 8px pills; modal rule (0,3,1) was beating (0,3,0) on <button> only */
/* Exclude Bible composite search submit — uses border-radius 0 inside rounded shell */
.pvc-wizard-wrapper button:not(.wizard-modal-close):not(.remove-upload):not(.history-video-action):not(.pvc-bible-search-submit-btn),
.wizard-modal-content button:not(.wizard-modal-close):not(.remove-upload):not(.history-video-action):not(.pvc-bible-search-submit-btn) {
    border-radius: 12px !important;
}

/* Ensure specific containers in modal have border radius */
.pvc-wizard-wrapper .upload-area,
.pvc-wizard-wrapper .library-info,
.pvc-wizard-wrapper .credits-info,
.pvc-wizard-wrapper .instruction-examples,
.wizard-modal-content .upload-area,
.wizard-modal-content .library-info,
.wizard-modal-content .credits-info,
.wizard-modal-content .instruction-examples {
    border-radius: var(--radius-md) !important;
}

.pvc-wizard-wrapper .no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Mobile performance overrides: reduce heavy effects that cause scroll jank - SCOPED TO PLUGIN ONLY */
@media (max-width: 768px) {
    .pvc-wizard-wrapper .product-card {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: rgba(25, 27, 48, 0.96) !important;
        overflow: visible !important;
        box-shadow: var(--shadow-sm) !important;
    }
    
    .pvc-wizard-wrapper .product-card:hover {
        transform: none !important;
    }
    
    .pvc-wizard-wrapper .product-card {
        contain-intrinsic-size: none !important;
        /* Don't hide scrollbar - leave it visible but covered by popup */
    /* overflow: hidden !important; */
    }
}

/* --- Responsive layout: Bible, emoji, dashboard tab grids (wizard-template) --- */
.pvc-wizard-wrapper .bible-reader-container,
.wizard-modal-content .bible-reader-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    min-width: 0;
}

@media (min-width: 992px) {
    .pvc-wizard-wrapper .bible-reader-container,
    .wizard-modal-content .bible-reader-container {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
    }
}

.pvc-wizard-wrapper .emoji-grid,
.wizard-modal-content .emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

@media (min-width: 400px) {
    .pvc-wizard-wrapper .emoji-grid,
    .wizard-modal-content .emoji-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (min-width: 576px) {
    .pvc-wizard-wrapper .emoji-grid,
    .wizard-modal-content .emoji-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

/*
 * My Videos / My Scripts / scheduler — multi-column grid on tablet/desktop.
 * Uses [id$="…"] so dynamic shortcode prefixes always match; overlay path avoids wrapper edge cases;
 * explicit column counts at breakpoints so layout cannot collapse to one fat column from %/auto-fill bugs.
 */
.wizard-modal-overlay .dashboard-tab .products-grid,
.pvc-wizard-wrapper .wizard-modal-content .dashboard-tab .products-grid,
.pvc-wizard-wrapper [id$="productsGridTab"],
.pvc-wizard-wrapper [id$="scriptsGridTab"],
.wizard-modal-overlay [id$="productsGridTab"],
.wizard-modal-overlay [id$="scriptsGridTab"] {
    display: grid !important;
    gap: 18px !important;
    margin-top: 20px !important;
    justify-content: stretch !important;
    align-content: start !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.pvc-wizard-wrapper [id$="scriptsGridTab"],
.wizard-modal-overlay [id$="scriptsGridTab"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.pvc-wizard-wrapper .products-grid.scheduler-videos-grid,
.wizard-modal-overlay .products-grid.scheduler-videos-grid,
.pvc-wizard-wrapper [id$="schedulerVideosGrid"],
.wizard-modal-overlay [id$="schedulerVideosGrid"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 12px !important;
    margin-top: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (min-width: 900px) {
    .wizard-modal-overlay .dashboard-tab .products-grid,
    .pvc-wizard-wrapper .wizard-modal-content .dashboard-tab .products-grid,
    .pvc-wizard-wrapper [id$="productsGridTab"],
    .wizard-modal-overlay [id$="productsGridTab"] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .pvc-wizard-wrapper [id$="scriptsGridTab"],
    .wizard-modal-overlay [id$="scriptsGridTab"] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1200px) {
    .wizard-modal-overlay .dashboard-tab .products-grid,
    .pvc-wizard-wrapper .wizard-modal-content .dashboard-tab .products-grid,
    .pvc-wizard-wrapper [id$="productsGridTab"],
    .wizard-modal-overlay [id$="productsGridTab"] {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .pvc-wizard-wrapper [id$="scriptsGridTab"],
    .wizard-modal-overlay [id$="scriptsGridTab"] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* Grid items: allow shrinking inside tracks (prevents implicit single-column blowout) */
.wizard-modal-overlay [id$="productsGridTab"] > .history-video-card,
.wizard-modal-overlay [id$="scriptsGridTab"] > .history-script-card,
.pvc-wizard-wrapper [id$="productsGridTab"] > .history-video-card,
.pvc-wizard-wrapper [id$="scriptsGridTab"] > .history-script-card {
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

/* Legacy product-card grids in same containers */
.wizard-modal-overlay .dashboard-tab .products-grid .product-card,
.pvc-wizard-wrapper .wizard-modal-content .dashboard-tab .products-grid .product-card {
    max-width: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

@media (max-width: 599px) {
    .wizard-modal-overlay .dashboard-tab .products-grid,
    .pvc-wizard-wrapper .wizard-modal-content .dashboard-tab .products-grid,
    .pvc-wizard-wrapper [id$="productsGridTab"],
    .pvc-wizard-wrapper [id$="scriptsGridTab"],
    .wizard-modal-overlay [id$="productsGridTab"],
    .wizard-modal-overlay [id$="scriptsGridTab"] {
        grid-template-columns: 1fr !important;
    }
}

/* Share / subscription / storage autofit blocks from template */
.pvc-wizard-wrapper .share-options-grid,
.wizard-modal-content .share-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
}

.pvc-wizard-wrapper .subscription-plans-grid,
.wizard-modal-content .subscription-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 24px;
}

.pvc-wizard-wrapper .pvc-storage-info-grid,
.wizard-modal-content .pvc-storage-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 20px;
}

.pvc-wizard-wrapper .pvc-dashboard-split-2,
.wizard-modal-content .pvc-dashboard-split-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .pvc-wizard-wrapper .pvc-dashboard-split-2,
    .wizard-modal-content .pvc-dashboard-split-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.pvc-wizard-wrapper .pvc-autofit-250,
.wizard-modal-content .pvc-autofit-250 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.pvc-wizard-wrapper .pvc-autofit-200-mb,
.wizard-modal-content .pvc-autofit-200-mb {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.pvc-wizard-wrapper .pvc-autofit-200-margin,
.wizard-modal-content .pvc-autofit-200-margin {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 16px;
    margin: 20px 0;
}

.pvc-wizard-wrapper .pvc-video-list-grid,
.wizard-modal-content .pvc-video-list-grid {
    display: grid;
    gap: 12px;
    min-width: 0;
}

/* Music library track rows only (not .voice-card.library-track) */
.pvc-wizard-wrapper .music-library-grid > .library-track,
.wizard-modal-content .music-library-grid > .library-track {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.pvc-wizard-wrapper .emoji-picker,
.wizard-modal-content .emoji-picker {
    max-width: min(320px, calc(100vw - 40px));
    box-sizing: border-box;
}

/* Dashboard Sidebar — outer column does not scroll; .sidebar-nav scrolls (avoids double chrome scrollbar) */
.dashboard-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    flex-shrink: 0;
    min-height: 0;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-accent);
    margin: 0;
    font-family: var(--font-display);
}

.sidebar-logo-image {
    display: block;
    height: auto;
    width: auto;
    margin: 0;
    object-fit: contain;
}

/* Hamburger lives in .pvc-mobile-menu-bar on mobile; hidden on desktop */
.sidebar-toggle-mobile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 10px 14px;
    min-height: 44px;
    min-width: 44px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.sidebar-toggle-mobile:hover {
    background: var(--bg-secondary);
}

.pvc-mobile-menu-bar__label {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Desktop: hide mobile chrome */
@media (min-width: 769px) {
    .pvc-mobile-menu-bar {
        display: none !important;
    }

    .pvc-dashboard-sidebar-backdrop {
        display: none !important;
    }
}

/* Mobile top bar */
.pvc-mobile-menu-bar {
    display: none;
    align-items: center;
    flex-shrink: 0;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 99998;
    box-sizing: border-box;
}

.pvc-dashboard-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.45);
    -webkit-tap-highlight-color: transparent;
}

.pvc-dashboard-sidebar-backdrop.is-active {
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-sidebar {
        transition: none !important;
    }
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    gap: 4px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgb(249, 250, 251);
    color: var(--text-accent);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 0.95rem;
    width: 24px;
    height: 24px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-icon i {
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-item:hover .nav-icon i,
.nav-item.active .nav-icon i {
    color: var(--text-primary);
}

.nav-item.active .nav-icon i {
    color: var(--accent-primary);
}

.nav-text {
    font-size: 0.95rem;
}

/* Sidebar Footer with Close Button */
.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid var(--border-primary);
}

.nav-close-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    width: 100%;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.nav-close-btn:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: scale(1.02);
}

.nav-close-btn:hover .nav-icon,
.nav-close-btn:hover .nav-icon i,
.nav-close-btn:hover i {
    color: white !important;
}

.nav-close-btn:active {
    background: #c82333;
    color: white;
    border-color: #c82333;
    transform: scale(0.98);
}

.nav-close-btn .nav-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    color: inherit;
}

.nav-close-btn .nav-icon i {
    color: inherit;
}

.nav-close-btn .nav-text {
    font-size: 0.95rem;
    color: inherit;
}

/* Dashboard Content Area */
.dashboard-content {
    flex: 1;
    min-width: 0;
    /* Inner scroll pane: .wizard-modal-container uses overflow:hidden (priority layer) so this is the main content scrollbar */
    min-height: 0;
    overflow-x: clip;
    overflow-y: auto;
    padding: 0;
    height: auto;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.dashboard-tab {
    display: none;
    padding: 24px;
    box-sizing: border-box;
    min-height: 0;
    height: auto;
    overflow-x: clip;
    overflow-y: visible;
}

.dashboard-tab.active {
    display: block;
    background: var(--bg-secondary);
}

.tab-header {
    margin-bottom: 32px;
}

.tab-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-accent);
    margin: 0 0 8px 0;
    font-family: var(--font-display);
}

.tab-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 576px) {
    .wizard-modal-content .tab-title {
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .wizard-modal-content .tab-header {
        margin-bottom: 20px;
    }

    .dashboard-tab {
        padding: 16px 12px;
    }
}

.pvc-wizard-wrapper .autopost-container,
.wizard-modal-content .autopost-container {
    width: 100%;
    max-width: min(1200px, 100%);
    margin: 0 auto;
    box-sizing: border-box;
}

/* Account Content */
.account-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-primary);
}

.account-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-accent);
    margin: 0 0 20px 0;
}

.account-field {
    margin-bottom: 16px;
}

.account-field:last-child {
    margin-bottom: 0;
}

.account-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.account-field input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.account-field input[readonly] {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Settings Content */
.settings-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-primary);
}

.settings-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-accent);
    margin: 0 0 20px 0;
}

.settings-field {
    margin-bottom: 16px;
}

.settings-field:last-child {
    margin-bottom: 0;
}

.settings-field label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.settings-field input[type="checkbox"],
.settings-field input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Help Content */
.help-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 24px;
    min-width: 0;
}

.help-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-primary);
    transition: all 0.2s;
}

.help-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.help-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-accent);
    margin: 0 0 12px 0;
}

.help-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.help-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.help-link:hover {
    color: var(--accent-secondary);
}

/* Wizard Carousel Container */
.wizard-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 24px;
}

.wizard-carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    touch-action: pan-x;
}

/* Wizard Navigation Buttons */
.wizard-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    opacity: 0.9;
}

.wizard-nav-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.wizard-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.wizard-nav-prev {
    left: 16px;
}

.wizard-nav-next {
    right: 16px;
}

.wizard-nav-btn span {
    line-height: 1;
}

/* Touch swipe support */
.wizard-carousel-container {
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Mobile Responsive — sidebar = off-canvas drawer; full scroll for all nav items */
@media (max-width: 768px) {
    .wizard-modal-content {
        flex-direction: column;
        position: relative;
        min-height: 0;
    }

    .pvc-mobile-menu-bar {
        display: flex;
    }

    .dashboard-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(320px, 88vw);
        max-width: 100%;
        min-width: 0;
        height: 100dvh;
        height: 100vh;
        max-height: none !important;
        z-index: 100001;
        transform: translateX(-105%);
        transition: transform 0.25s ease-out;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
        border-right: 1px solid var(--border-primary);
        border-bottom: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        flex-shrink: 0;
    }

    .dashboard-sidebar.open {
        transform: translateX(0);
        max-height: none !important;
    }

    .dashboard-sidebar .sidebar-header {
        flex-shrink: 0;
    }

    .dashboard-sidebar .sidebar-nav {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .dashboard-sidebar .sidebar-footer {
        flex-shrink: 0;
        padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    }

    .dashboard-content {
        padding: 16px;
        flex: 1 1 0%;
        min-width: 0;
        width: 100%;
        overflow-y: auto;
    }

    .help-content {
        grid-template-columns: 1fr;
    }

    .wizard-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .wizard-nav-prev {
        left: 8px;
    }

    .wizard-nav-next {
        right: 8px;
    }
}

/* Scheduler Styles */
.pvc-wizard-wrapper .scheduler-calendar-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pvc-wizard-wrapper .scheduler-calendar-wrapper {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
}

.pvc-wizard-wrapper .scheduler-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    width: 100%;
}

.pvc-wizard-wrapper .scheduler-calendar-day {
    min-height: 80px;
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-card);
    position: relative;
}

.pvc-wizard-wrapper .scheduler-calendar-day:hover:not(.other-month):not(.past) {
    border-color: var(--accent-primary);
    background: #f0f9ff;
}

.pvc-wizard-wrapper .scheduler-calendar-day.today {
    border-color: var(--accent-primary);
    background: #f0f9ff;
}

.pvc-wizard-wrapper .scheduler-calendar-day.past {
    opacity: 0.5;
    cursor: not-allowed;
}

.pvc-wizard-wrapper .scheduler-calendar-day.other-month {
    opacity: 0.25;
    cursor: not-allowed;
}

.pvc-wizard-wrapper .scheduler-calendar-event {
    background: #6366f1;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pvc-wizard-wrapper .scheduler-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: 12px;
}

.pvc-wizard-wrapper .scheduler-video-card {
    position: relative;
    border: 2px solid var(--border-primary);
    border-radius: 8px;
    overflow: hidden;
    cursor: move;
    transition: all 0.2s;
    background: var(--bg-card);
}

.pvc-wizard-wrapper .scheduler-video-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.pvc-wizard-wrapper .scheduler-video-card[draggable="true"] {
    cursor: grab;
}

.pvc-wizard-wrapper .scheduler-video-card[draggable="true"]:active {
    cursor: grabbing;
}

.pvc-wizard-wrapper .scheduler-video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

.pvc-wizard-wrapper .scheduler-video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pvc-wizard-wrapper .scheduler-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pvc-wizard-wrapper .scheduler-video-play:hover {
    background: var(--bg-card);
    transform: translate(-50%, -50%) scale(1.1);
}

.pvc-wizard-wrapper .scheduler-video-info {
    padding: 8px;
}

.pvc-wizard-wrapper .scheduler-video-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pvc-wizard-wrapper .scheduler-filter-btn.active {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
}

.pvc-wizard-wrapper .scheduler-calendar-nav button:hover {
    background: var(--accent-primary) !important;
    color: white !important;
    border-color: var(--accent-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Wizard New Button Styles */
.pvc-wizard-wrapper .wizard-new-btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pvc-wizard-wrapper .wizard-new-btn-primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pvc-wizard-wrapper .wizard-new-btn-primary:hover:not(:disabled) {
    background: #4f46e5;
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Disabled button state - GRAY */
.pvc-wizard-wrapper .wizard-new-btn:disabled,
.pvc-wizard-wrapper .wizard-new-btn.disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
}

.pvc-wizard-wrapper .wizard-new-btn:disabled:hover,
.pvc-wizard-wrapper .wizard-new-btn.disabled:hover {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   NEW VIDEO PLAYER STYLE (Bunny Stream Style)
   ========================================================================== */

.video-render-wrapper {
    padding: 0;
}

.video-player-wrapper {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.video-player-container {
    position: relative;
    padding-bottom: 56.25%; /* Default 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    cursor: pointer;
}


.video-player-container video,
.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    object-fit: contain; /* Changed from cover to contain to preserve aspect ratio */
}

/* Play Button Overlay */
.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.play-button-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button-circle {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button-icon {
    width: 0;
    height: 0;
    border-left: 10px solid #333;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    margin-left: 3px;
}

.play-button-overlay:hover .play-button-circle {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.play-button-icon {
    width: 0;
    height: 0;
    border-left: 18px solid #333;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    margin-left: 5px;
}

.video-player-container.playing .play-button-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Ensure play button overlay is visible and above video - match test.php */
.video-player-container .play-button-overlay,
[id*="renderPlayer_"] .play-button-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Ensure video doesn't cover the overlay */
.video-player-container video,
[id*="renderPlayer_"] video {
    z-index: 1 !important;
    position: absolute;
}

/* Download Button */
.download-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, #5d18e5 0%, #3a0e8d 100%);
    color: #000;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.download-button i {
    font-size: 1rem;
}

.video-player-info {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}

.video-player-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.video-action-btn {
    flex: 1;
    min-width: 150px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.video-action-btn.download-btn {
    background: linear-gradient(180deg, #5d18e5 0%, #3a0e8d 100%);
    color: #000;
}

.video-action-btn.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.video-action-btn.startover-btn {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.2);
}

.video-action-btn.startover-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

/* Dark mode specific styles for video player */
.wizard-modal-overlay[data-theme="dark"] .video-player-wrapper {
    background: #0a0a0a;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.wizard-modal-overlay[data-theme="dark"] .video-player-info {
    background: rgba(255,255,255,0.05);
}

.wizard-modal-overlay[data-theme="dark"] .video-action-btn.download-btn {
    background: linear-gradient(180deg, #5d18e5 0%, #3a0e8d 100%);
    color: #000;
}

.wizard-modal-overlay[data-theme="dark"] .video-action-btn.download-btn:hover {
    box-shadow: 0 8px 20px rgba(91, 58, 241, 0.30);
}

.wizard-modal-overlay[data-theme="dark"] .video-action-btn.startover-btn {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.2);
}

.wizard-modal-overlay[data-theme="dark"] .video-action-btn.startover-btn:hover {
    background: rgba(255,255,255,0.15);
}

/* Light mode styles */
.pvc-wizard-wrapper:not([data-theme="dark"]) .video-player-wrapper,
.wizard-modal-overlay:not([data-theme="dark"]) .video-player-wrapper {
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.pvc-wizard-wrapper:not([data-theme="dark"]) .video-player-info,
.wizard-modal-overlay:not([data-theme="dark"]) .video-player-info {
    background: #f5f5f5;
}

.pvc-wizard-wrapper:not([data-theme="dark"]) .video-action-btn.startover-btn,
.wizard-modal-overlay:not([data-theme="dark"]) .video-action-btn.startover-btn {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.pvc-wizard-wrapper:not([data-theme="dark"]) .video-action-btn.startover-btn:hover,
.wizard-modal-overlay:not([data-theme="dark"]) .video-action-btn.startover-btn:hover {
    background: #e5e5e5;
}

/* Respect users who prefer reduced motion - SCOPED TO PLUGIN ONLY */
@media (prefers-reduced-motion: reduce) {
    .pvc-wizard-wrapper * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}