.history-context-overlay{position:fixed;inset:0;background:rgba(15,23,42,.45);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:11900;display:flex;justify-content:flex-start;align-items:stretch;animation:overlayFade .2s ease}.history-context-menu{position:relative;background:#fff;border-radius:0 16px 16px 0;box-shadow:12px 0 30px rgba(0,0,0,.2);z-index:11901;height:100vh;width:min(420px,92vw);max-width:480px;overflow:hidden;display:flex;flex-direction:column;animation:slideInLeft .25s ease}@keyframes slideInLeft{0%{opacity:0;transform:translateX(-24px)}to{opacity:1;transform:translateX(0)}}@keyframes overlayFade{0%{opacity:0}to{opacity:1}}.history-menu-header{display:flex;align-items:center;justify-content:space-between;padding:calc(16px + env(safe-area-inset-top)) 20px 16px;border-bottom:1px solid #e5e7eb;background:#f9fafb;border-radius:0 16px 0 0}.history-menu-title{display:flex;align-items:center;gap:8px}.history-menu-title h3{margin:0;font-size:16px;font-weight:600;color:#1f2937;font-family:Montserrat,sans-serif}.history-menu-title .iconify{color:#6b7280}.history-count{background:#000;color:#fff;padding:2px 8px;border-radius:12px;font-size:12px;font-weight:600;font-family:Montserrat,sans-serif}.history-menu-close{background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:6px;transition:background .2s;color:#6b7280}.history-menu-close:hover{background:#e5e7eb}.history-menu-content{padding:12px;overflow-y:auto;flex:1 1 auto;min-height:0;max-height:none}.dark-mode .history-context-menu,body.dark-mode .history-context-menu{background:#2b2b2b;border:1px solid #444;box-shadow:0 12px 30px rgba(0,0,0,.45)}.dark-mode .history-menu-header,body.dark-mode .history-menu-header{background:#333;border-bottom-color:#444}.dark-mode .history-menu-title .iconify,.dark-mode .history-menu-title h3,body.dark-mode .history-menu-title .iconify,body.dark-mode .history-menu-title h3{color:#fff}.dark-mode .history-count,body.dark-mode .history-count{background:#fff;color:#000}.dark-mode .history-menu-close,body.dark-mode .history-menu-close{color:#fff}.dark-mode .history-menu-close:hover,body.dark-mode .history-menu-close:hover{background:#444}.dark-mode .history-empty,body.dark-mode .history-empty{color:#bbb}.dark-mode .history-empty .iconify,body.dark-mode .history-empty .iconify{color:#777}.dark-mode .history-item,body.dark-mode .history-item{background:#2a2a2a}.dark-mode .history-item:hover,body.dark-mode .history-item:hover{background:#333}.dark-mode .history-item-date,.dark-mode .history-item-delete,body.dark-mode .history-item-date,body.dark-mode .history-item-delete{color:#bbb}.dark-mode .history-item-delete:hover:not(:disabled),body.dark-mode .history-item-delete:hover:not(:disabled){background:rgba(230,0,0,.12);color:#ff6b6b}.dark-mode .history-image-box,.dark-mode .history-item-prompt,body.dark-mode .history-image-box,body.dark-mode .history-item-prompt{background:#333}.dark-mode .history-item-prompt .iconify,body.dark-mode .history-item-prompt .iconify{color:#bbb}.dark-mode .history-item-prompt p,body.dark-mode .history-item-prompt p{color:#fff}.history-empty{padding:40px 20px;text-align:center;color:#9ca3af}.history-empty .iconify{margin-bottom:12px;color:#d1d5db}.history-empty p{margin:0;font-size:14px;font-family:Montserrat,sans-serif}.history-list{display:flex;flex-direction:column;gap:12px}.history-item{background:#f9fafb;border-radius:10px;padding:12px;transition:background .2s}.history-item:hover{background:#f3f4f6}.history-item-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.history-item-date{font-size:12px;color:#6b7280;font-family:Montserrat,sans-serif}.history-item-delete{background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background .2s,color .2s;color:#6b7280}.history-item-delete:hover:not(:disabled){background:#fee2e2;color:#dc2626}.history-item-delete:disabled{opacity:.5;cursor:not-allowed}.history-item-images{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}.history-image-box{position:relative;border-radius:8px;overflow:hidden;background:#e5e7eb;aspect-ratio:1;cursor:pointer;transition:transform .2s,box-shadow .2s}.history-image-box:hover{transform:scale(1.02);box-shadow:0 4px 12px rgba(0,0,0,.1)}.history-image-box img,.history-image-box video{width:100%;height:100%;object-fit:cover}.history-image-box video{display:block}.history-image-box.history-image-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:default;background:#f3f4f6}.history-image-box.history-image-empty:hover{transform:none;box-shadow:none}.history-image-box.history-image-empty .iconify{color:#9ca3af}.history-image-label{position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.7);color:#fff;font-size:10px;font-weight:600;padding:4px 6px;text-align:center;font-family:Montserrat,sans-serif}.history-image-box.history-image-empty .history-image-label{position:static;background:transparent;color:#9ca3af;font-size:11px}.history-item-prompt{display:flex;align-items:flex-start;gap:6px;margin-bottom:8px;padding:8px;background:#fff;border-radius:6px}.history-item-prompt .iconify{flex-shrink:0;color:#6b7280;margin-top:2px}.history-item-prompt p{margin:0;font-size:12px;color:#374151;line-height:1.5;font-family:Montserrat,sans-serif;word-break:break-word}.history-item-footer{display:flex;align-items:center;justify-content:flex-end}.history-item-status{font-size:11px;font-weight:600;padding:3px 8px;border-radius:12px;font-family:Montserrat,sans-serif}.history-status-pending{background:#fef3c7;color:#92400e}.history-status-processing{background:#dbeafe;color:#1e40af}.history-status-completed{background:#d1fae5;color:#065f46}.history-status-failed{background:#fee2e2;color:#991b1b}.history-delete-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:12050;animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.history-delete-modal{background:#fff;padding:28px;border-radius:16px;width:90%;max-width:400px;box-shadow:0 20px 40px rgba(0,0,0,.15);text-align:center;animation:scaleIn .2s ease}@keyframes scaleIn{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.history-delete-modal-icon{margin-bottom:16px}.history-delete-modal-icon .iconify{color:#ef4444}.history-delete-modal h3{margin:0 0 8px;font-size:18px;font-weight:600;color:#1f2937;font-family:Montserrat,sans-serif}.history-delete-modal p{margin:0 0 24px;font-size:14px;color:#6b7280;line-height:1.5;font-family:Montserrat,sans-serif}.history-delete-modal-actions{display:flex;gap:10px;justify-content:center}.history-delete-modal-cancel,.history-delete-modal-confirm{padding:12px 24px;border:none;border-radius:10px;cursor:pointer;font-family:Montserrat,sans-serif;font-weight:500;font-size:14px;transition:all .2s}.history-delete-modal-cancel{background:#f3f4f6;color:#374151}.history-delete-modal-cancel:hover:not(:disabled){background:#e5e7eb}.history-delete-modal-confirm{background:#ef4444;color:#fff}.history-delete-modal-confirm:hover:not(:disabled){background:#dc2626}.history-delete-modal-cancel:disabled,.history-delete-modal-confirm:disabled{opacity:.5;cursor:not-allowed}@media (max-width:768px){.history-context-overlay{padding:12px}.history-context-menu{width:calc(100vw - 24px);max-width:calc(100vw - 24px);height:calc(100vh - 24px);border-radius:16px}.history-menu-header{padding:12px 16px}.history-menu-content{padding:8px}.history-item{padding:10px}.history-delete-modal{padding:20px}}.dark-mode .history-context-overlay,body.dark-mode .history-context-overlay{background:rgba(0,0,0,.6)}.image-to-video-panel-overlay{position:fixed;inset:0;z-index:12000;display:flex;align-items:stretch;justify-content:flex-start;background:rgba(15,23,42,.45);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);animation:imageToVideoOverlayFade .2s ease}.image-to-video-panel{position:relative;z-index:12001;width:min(430px,92vw);max-width:480px;height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:#fff;border-radius:0 16px 16px 0;box-shadow:12px 0 30px rgba(0,0,0,.2);animation:imageToVideoSlideInLeft .25s ease;font-family:Montserrat,sans-serif}@keyframes imageToVideoSlideInLeft{0%{opacity:0;transform:translateX(-24px)}to{opacity:1;transform:translateX(0)}}@keyframes imageToVideoOverlayFade{0%{opacity:0}to{opacity:1}}.image-to-video-panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(16px + env(safe-area-inset-top)) 20px 16px;border-bottom:1px solid #e5e7eb;background:#f9fafb;border-radius:0 16px 0 0}.image-to-video-panel-title{display:flex;align-items:center;gap:8px;min-width:0}.image-to-video-panel-title h3{margin:0;font-size:16px;font-weight:600;color:#1f2937}.image-to-video-panel-title .iconify,.image-to-video-panel-title .local-icon{color:#6b7280;flex-shrink:0}.image-to-video-panel-close{border:none;background:transparent;color:#6b7280;border-radius:6px;padding:4px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .2s}.image-to-video-panel-close:hover{background:#e5e7eb}.image-to-video-panel-content{flex:1;overflow-y:auto;padding:16px 20px}.image-to-video-source-preview{width:100%;aspect-ratio:16/10;border-radius:12px;overflow:hidden;background:#f3f4f6;border:1px solid #e5e7eb;margin-bottom:14px}.image-to-video-source-preview img{width:100%;height:100%;display:block;object-fit:contain}.image-to-video-panel-error,.image-to-video-panel-state{display:flex;align-items:center;justify-content:center;gap:8px;min-height:56px;padding:12px;border-radius:12px;background:#f8fafc;color:#64748b;font-size:13px;font-weight:500;text-align:center}.image-to-video-panel-error{background:#fef2f2;color:#b91c1c}.image-to-video-panel-state-column{flex-direction:column}.image-to-video-reload{border:1px solid #d1d5db;background:#fff;color:#111827;border-radius:10px;padding:8px 12px;font-size:12px;font-weight:700;font-family:Montserrat,sans-serif;cursor:pointer}.image-to-video-reload:hover{background:#eef2ff;border-color:#c7d2fe}.image-to-video-model-select-block{margin-bottom:16px}.image-to-video-model-label{display:block;margin-bottom:8px;font-size:14px;font-weight:600;color:#333}.image-to-video-model-select-row{display:flex;align-items:center;gap:10px}.image-to-video-model-logo{width:38px;height:38px;border-radius:10px;background:#f3f5fa;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;color:#64748b}.image-to-video-model-logo img{width:100%;height:100%;object-fit:cover;display:block}.image-to-video-model-select-control{position:relative;flex:1;min-width:0}.image-to-video-model-select-button{width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 12px;border:1px solid #d1d5db;border-radius:8px;background:#fff;color:#111827;font-family:Montserrat,sans-serif;font-size:13px;font-weight:700;line-height:1.2;cursor:pointer;outline:none;transition:border-color .2s,box-shadow .2s,background .2s}.image-to-video-model-select-button:focus,.image-to-video-model-select-button:hover{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.08)}.image-to-video-model-select-button:disabled{opacity:.65;cursor:not-allowed}.image-to-video-model-select-button .iconify,.image-to-video-model-select-button .local-icon{color:#64748b;flex-shrink:0}.image-to-video-model-selected-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-to-video-model-menu{position:absolute;z-index:12010;top:calc(100% + 6px);left:-48px;right:0;max-height:min(330px,50vh);overflow-y:auto;padding:6px;border:1px solid #d1d5db;border-radius:12px;background:#fff;box-shadow:0 16px 36px rgba(15,23,42,.18)}.image-to-video-model-option{width:100%;min-height:48px;display:flex;align-items:center;gap:10px;padding:8px 10px;border:none;border-radius:8px;background:transparent;color:#111827;font-family:Montserrat,sans-serif;cursor:pointer;text-align:left}.image-to-video-model-option.selected,.image-to-video-model-option:hover{background:#f1f5f9}.image-to-video-model-option-logo{width:32px;height:32px;border-radius:8px;background:#f3f5fa;color:#64748b;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}.image-to-video-model-option-logo img{width:100%;height:100%;display:block;object-fit:cover}.image-to-video-model-option-text{min-width:0;display:flex;flex:1;flex-direction:column;gap:2px}.image-to-video-model-option-subtitle,.image-to-video-model-option-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-to-video-model-option-title{font-size:13px;font-weight:700}.image-to-video-model-option-subtitle{font-size:11px;font-weight:500;color:#64748b}.image-to-video-model-option>.iconify,.image-to-video-model-option>.local-icon{color:#111827;flex-shrink:0}.image-to-video-model-hint{margin:6px 0 0 48px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:500;color:#64748b}.image-to-video-prompt-block{margin-bottom:14px}.image-to-video-prompt-block label{display:block;margin-bottom:8px;font-size:14px;font-weight:600;color:#333}.image-to-video-prompt-block textarea{width:100%;min-height:96px;resize:vertical;padding:10px 12px;border:1px solid #d1d5db;border-radius:8px;font-size:14px;line-height:1.5;font-family:Montserrat,sans-serif;color:#111827;background:#fff;box-sizing:border-box}.image-to-video-prompt-block textarea:focus{outline:none;border-color:#3b82f6}.image-to-video-field{margin-bottom:0}.image-to-video-field .neurogenFormGroup,.image-to-video-panel [class*=neurogenFormGroup]{margin-bottom:16px}.image-to-video-panel-footer{flex-shrink:0;padding:12px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid #e5e7eb;background:#fff}.image-to-video-cost{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;font-size:12px;color:#64748b}.image-to-video-cost strong{color:#111827;font-weight:700;text-align:right}.image-to-video-submit{width:100%;min-height:46px;border:none;border-radius:12px;background:#111827;color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:14px;font-weight:700;font-family:Montserrat,sans-serif;cursor:pointer;transition:background .2s,transform .2s}.image-to-video-submit:hover:not(:disabled){background:#000;transform:translateY(-1px)}.image-to-video-submit:disabled{opacity:.55;cursor:not-allowed;transform:none}@media (max-width:768px){.image-to-video-panel-overlay{padding:12px}.image-to-video-panel{width:calc(100vw - 24px);max-width:calc(100vw - 24px);height:calc(100vh - 24px);height:calc(100dvh - 24px);border-radius:16px}.image-to-video-panel-header{padding:12px 16px;border-radius:16px 16px 0 0}.image-to-video-panel-content{padding:12px 16px}.image-to-video-panel-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}}.dark-mode .image-to-video-panel,body.dark-mode .image-to-video-panel{background:#2b2b2b;border:1px solid #444;box-shadow:0 12px 30px rgba(0,0,0,.45)}.dark-mode .image-to-video-panel-overlay,body.dark-mode .image-to-video-panel-overlay{background:rgba(0,0,0,.6)}.dark-mode .image-to-video-panel-footer,.dark-mode .image-to-video-panel-header,body.dark-mode .image-to-video-panel-footer,body.dark-mode .image-to-video-panel-header{background:#333;border-color:#444}.dark-mode .image-to-video-panel-close,.dark-mode .image-to-video-panel-title .local-icon,.dark-mode .image-to-video-panel-title h3,body.dark-mode .image-to-video-panel-close,body.dark-mode .image-to-video-panel-title .local-icon,body.dark-mode .image-to-video-panel-title h3{color:#fff}.dark-mode .image-to-video-panel-close:hover,body.dark-mode .image-to-video-panel-close:hover{background:#444}.dark-mode .image-to-video-model-menu,.dark-mode .image-to-video-model-select-button,.dark-mode .image-to-video-prompt-block textarea,.dark-mode .image-to-video-source-preview,body.dark-mode .image-to-video-model-menu,body.dark-mode .image-to-video-model-select-button,body.dark-mode .image-to-video-prompt-block textarea,body.dark-mode .image-to-video-source-preview{background:#3e3d3d;border-color:#555;color:#fff}.dark-mode .image-to-video-model-select-button:focus,.dark-mode .image-to-video-model-select-button:hover,body.dark-mode .image-to-video-model-select-button:focus,body.dark-mode .image-to-video-model-select-button:hover{border-color:#fff;background:#333;box-shadow:0 0 0 3px rgba(255,255,255,.08)}.dark-mode .image-to-video-model-option,body.dark-mode .image-to-video-model-option{color:#fff}.dark-mode .image-to-video-model-option.selected,.dark-mode .image-to-video-model-option:hover,body.dark-mode .image-to-video-model-option.selected,body.dark-mode .image-to-video-model-option:hover{background:#333}.dark-mode .image-to-video-cost strong,.dark-mode .image-to-video-model-label,.dark-mode .image-to-video-prompt-block label,body.dark-mode .image-to-video-cost strong,body.dark-mode .image-to-video-model-label,body.dark-mode .image-to-video-prompt-block label{color:#fff}.dark-mode .image-to-video-cost,.dark-mode .image-to-video-model-hint,.dark-mode .image-to-video-model-option-subtitle,.dark-mode .image-to-video-model-option>.iconify,.dark-mode .image-to-video-model-option>.local-icon,.dark-mode .image-to-video-model-select-button .iconify,.dark-mode .image-to-video-model-select-button .local-icon,body.dark-mode .image-to-video-cost,body.dark-mode .image-to-video-model-hint,body.dark-mode .image-to-video-model-option-subtitle,body.dark-mode .image-to-video-model-option>.iconify,body.dark-mode .image-to-video-model-option>.local-icon,body.dark-mode .image-to-video-model-select-button .iconify,body.dark-mode .image-to-video-model-select-button .local-icon{color:#cbd5e1}.dark-mode .image-to-video-panel-state,body.dark-mode .image-to-video-panel-state{background:#333;color:#cbd5e1}.dark-mode .image-to-video-reload,body.dark-mode .image-to-video-reload{background:#3e3d3d;border-color:#555;color:#fff}