*{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#0f0f0f;color:#fff;height:100vh;overflow:hidden;transition:background-color .3s ease,color .3s ease}[data-theme=light] body{background:#fff;color:#1a1a1a}#root{height:100vh}.app{display:grid;grid-template-columns:1fr 1fr;height:100vh}.chat-panel{display:flex;flex-direction:column;border-right:1px solid #2a2a2a;background:linear-gradient(145deg,#1a1a1a,#0f0f0f);height:100vh;position:relative}.chat-header{padding:1.5rem;border-bottom:1px solid #2a2a2a;background:#1a1a1af2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);position:sticky;top:0;z-index:10}.header-content{display:flex;align-items:center;justify-content:space-between;gap:1rem}.header-actions{display:flex;align-items:center;gap:.5rem}.logo-section{display:flex;align-items:center;gap:1rem}.logo-icon{width:48px;height:48px;background:linear-gradient(135deg,#3b82f6,#1d4ed8);border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:24px;box-shadow:0 4px 12px #3b82f64d}.chat-header h1{font-size:1.5rem;font-weight:700;color:#fff;margin:0}.header-subtitle{font-size:.9rem;color:#888;margin:.25rem 0 0}.chat-messages{flex:1;overflow-y:auto;overflow-x:hidden;padding:2rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem;scroll-behavior:smooth}.welcome-message{text-align:center;max-width:480px;margin:auto;padding:2rem;background:#2a2a2a4d;border:1px solid #333;border-radius:16px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.welcome-icon{font-size:3rem;margin-bottom:1rem}.welcome-message h3{color:#fff;font-size:1.5rem;margin:0 0 .5rem;font-weight:600}.welcome-message>p{color:#aaa;font-size:1rem;margin-bottom:2rem}.examples-section,.test-mode-section{margin-top:1.5rem}.examples-section h4,.test-mode-section h4{color:#fff;font-size:1rem;margin-bottom:1rem;text-align:left}.example-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;text-align:left}.example-item{padding:.75rem;background:#3b82f61a;border:1px solid rgba(59,130,246,.2);border-radius:8px;color:#ccc;font-size:.9rem;transition:all .2s ease}.example-item:hover{background:#3b82f626;border-color:#3b82f64d}.test-mode-section{background:#10101080;padding:1rem;border-radius:8px;border:1px solid #2a2a2a}.test-examples{text-align:left;color:#999;font-size:.85rem;line-height:1.6}.test-examples code{background:#333;padding:.2rem .4rem;border-radius:4px;color:#60a5fa;font-family:Monaco,Menlo,monospace}.message-wrapper{display:flex;width:100%}.message-wrapper.user{justify-content:flex-end}.message-wrapper.assistant{justify-content:flex-start}.message{display:flex;align-items:flex-start;gap:.75rem;max-width:75%;padding:1rem 1.25rem;border-radius:16px;position:relative;box-shadow:0 2px 8px #0000001a}.message.user{background:linear-gradient(135deg,#3b82f6,#1d4ed8);color:#fff;border-bottom-right-radius:4px}.message.assistant{background:#2a2a2acc;color:#e5e5e5;border:1px solid #333;border-bottom-left-radius:4px}.message-avatar{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0;background:#ffffff1a}.message-content{flex:1;word-wrap:break-word;line-height:1.5}.chat-input-container{padding:1.5rem;border-top:1px solid #2a2a2a;background:#101216f2;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 -4px 12px #0003}.input-form{display:flex;flex-direction:column;gap:.75rem}.input-wrapper{display:flex;gap:.75rem;align-items:flex-end}.input-field-container{flex:1;position:relative;background:#2a2a2a99;border:2px solid #333;border-radius:16px;transition:all .3s ease;overflow:hidden}.input-field-container:focus-within{border-color:#3b82f6;box-shadow:0 0 0 4px #3b82f61a;background:#2a2a2acc}.chat-input{width:100%;background:transparent;border:none;color:#fff;padding:1rem 1.25rem;font-size:1rem;line-height:1.5;outline:none;resize:none;font-family:inherit;min-height:24px;max-height:120px;overflow-y:auto}.chat-input::placeholder{color:#777}.input-actions{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1.25rem 1rem;gap:1rem}.character-count{font-size:.75rem;color:#666}.count-normal{color:#888}.count-warning{color:#f59e0b}.send-button{background:#3b82f633;color:#666;border:2px solid #333;padding:.75rem;border-radius:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s ease;min-width:44px;height:44px;position:relative;overflow:hidden}.send-button.active{background:linear-gradient(135deg,#3b82f6,#1d4ed8);color:#fff;border-color:#3b82f6;box-shadow:0 2px 8px #3b82f64d}.send-button.active:hover:not(:disabled){background:linear-gradient(135deg,#2563eb,#1e40af);box-shadow:0 4px 16px #3b82f666;transform:translateY(-1px)}.send-button:disabled{cursor:not-allowed;transform:none}.button-spinner{width:16px;height:16px;border:2px solid transparent;border-top:2px solid currentColor;border-radius:50%;animation:spin 1s linear infinite}.input-hints{display:flex;justify-content:space-between;align-items:center;font-size:.75rem;color:#666;padding:0 .5rem}.hint{display:flex;align-items:center;gap:.25rem}.code-panel{display:flex;flex-direction:column;background:#0f0f0f;height:100vh}.code-tabs{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #333;background:#1a1a1a;flex-shrink:0;position:sticky;top:0;z-index:10;padding:0 1rem}.tab-buttons{display:flex}.code-tab{padding:.75rem 1rem;background:none;border:none;color:#999;cursor:pointer;font-size:.9rem;border-bottom:2px solid transparent;display:flex}.code-tab.active{color:#fff;border-bottom-color:#2563eb}.code-actions{display:flex;gap:.5rem;align-items:center}.history-controls{display:flex;gap:.25rem;align-items:center;padding-right:.5rem;border-right:1px solid #555}.copy-button,.validate-button,.export-button,.history-button{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background:#333;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:.8rem;transition:all .2s}.history-button{padding:.5rem;min-width:32px;height:32px;justify-content:center}.history-button:disabled{opacity:.5;cursor:not-allowed}.export-button{background:#3b82f6}.export-button:hover{background:#2563eb}.validate-button{background:#059669}.validate-button:hover{background:#047857}.copy-button:hover{background:#444}.copy-button:active,.validate-button:active,.export-button:active,.history-button:active{transform:scale(.95)}.history-button:hover:not(:disabled){background:#444}.code-editor{flex:1;display:flex;flex-direction:column;min-height:0}.code-content{flex:1;overflow:auto;background:#0f0f0f;min-height:0}.preview-container{flex:1;background:#fff}.preview-iframe{width:100%;height:100%;border:none}.loading{display:flex;align-items:center;gap:.75rem;color:#aaa;font-style:italic}.loading-message{background:#2a2a2a99!important;border:1px solid #444!important;animation:pulse 2s infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.7}}.spinner{width:16px;height:16px;border:2px solid #333;border-top:2px solid #3b82f6;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.chat-input::-webkit-scrollbar{width:4px}.chat-input::-webkit-scrollbar-track{background:transparent}.chat-input::-webkit-scrollbar-thumb{background:#555;border-radius:2px}.chat-input::-webkit-scrollbar-thumb:hover{background:#666}.input-field-container:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,transparent,#3b82f6,transparent);opacity:0;transition:opacity .3s ease}.input-field-container:focus-within:before{opacity:1}.send-button.active{animation:pulse-glow 2s infinite}@keyframes pulse-glow{0%,to{box-shadow:0 2px 8px #3b82f64d}50%{box-shadow:0 2px 16px #3b82f680}}.typing-indicator{display:flex;align-items:center;gap:.5rem;padding:.5rem 0;color:#888;font-size:.85rem;font-style:italic}.typing-dots{display:flex;gap:.25rem}.typing-dot{width:4px;height:4px;background:#888;border-radius:50%;animation:typing 1.4s infinite ease-in-out}.typing-dot:nth-child(1){animation-delay:-.32s}.typing-dot:nth-child(2){animation-delay:-.16s}@keyframes typing{0%,80%,to{transform:scale(0);opacity:.5}40%{transform:scale(1);opacity:1}}.chat-input:focus{outline:none}.input-field-container:focus-within{transform:translateY(-1px)}.error-message{background:#dc35451a!important;border:1px solid rgba(220,53,69,.3)!important}.error-text{color:#ff6b6b}.error-text strong{color:#ff5252}.validation-panel{position:fixed;top:20px;right:20px;width:400px;max-height:500px;background:#1a1a1a;border:1px solid #333;border-radius:12px;box-shadow:0 8px 32px #0000004d;z-index:1000;overflow:hidden;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.validation-header{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:1px solid #333;background:#1a1a1af2}.validation-title{display:flex;align-items:center;gap:.5rem;font-weight:600;color:#fff}.error-icon{color:#ff6b6b}.warning-icon{color:#f59e0b}.success-icon{color:#10b981}.close-button{background:none;border:none;color:#999;cursor:pointer;padding:.25rem;border-radius:4px;transition:all .2s}.close-button:hover{background:#333;color:#fff}.validation-content{max-height:400px;overflow-y:auto;padding:1rem}.validation-section{margin-bottom:1rem}.validation-section:last-child{margin-bottom:0}.section-title{display:flex;align-items:center;gap:.5rem;font-size:.9rem;font-weight:600;margin-bottom:.5rem;color:#fff}.error-title{color:#ff6b6b}.warning-title{color:#f59e0b}.validation-list{display:flex;flex-direction:column;gap:.5rem}.validation-item{padding:.75rem;border-radius:6px;font-size:.85rem;line-height:1.4}.error-item{background:#dc35451a;border:1px solid rgba(220,53,69,.2)}.warning-item{background:#f59e0b1a;border:1px solid rgba(245,158,11,.2)}.error-type,.warning-type{font-weight:600;margin-right:.5rem}.error-type{color:#ff6b6b}.warning-type{color:#f59e0b}.error-message,.warning-message{color:#e5e5e5}.validation-success{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:1rem;text-align:center;color:#10b981}.validation-success p{margin:0;font-weight:500}.export-panel-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:2000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.export-panel{background:#1a1a1a;border:1px solid #333;border-radius:16px;width:90%;max-width:600px;max-height:80vh;overflow:hidden;box-shadow:0 20px 60px #00000080}.export-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid #333;background:#1a1a1af2}.export-header h3{margin:0;color:#fff;font-size:1.25rem;font-weight:600}.export-content{padding:1.5rem;max-height:60vh;overflow-y:auto}.project-name-section{margin-bottom:2rem}.project-name-section label{display:block;margin-bottom:.5rem;color:#e5e5e5;font-weight:500}.project-name-input{width:100%;padding:.75rem;background:#333;border:1px solid #555;border-radius:8px;color:#fff;font-size:1rem;transition:all .2s}.project-name-input:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.export-section,.copy-section{margin-bottom:2rem}.export-section:last-child,.copy-section:last-child{margin-bottom:0}.export-section h4,.copy-section h4{margin:0 0 1rem;color:#fff;font-size:1rem;font-weight:600}.export-options{display:grid;gap:1rem}.export-option{display:flex;align-items:center;gap:1rem;padding:1rem;background:#333;border:1px solid #555;border-radius:12px;color:#fff;cursor:pointer;transition:all .2s;text-align:left}.export-option:hover{background:#444;border-color:var(--option-color);transform:translateY(-2px);box-shadow:0 4px 12px #0000004d}.export-option svg{color:var(--option-color);flex-shrink:0}.option-content{flex:1}.option-title{font-weight:600;margin-bottom:.25rem}.option-description{font-size:.85rem;color:#aaa}.copy-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.75rem}.copy-option{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#333;border:1px solid #555;border-radius:8px;color:#fff;cursor:pointer;transition:all .2s;font-size:.9rem}.copy-option:hover:not(:disabled){background:#444;border-color:var(--option-color)}.copy-option:disabled{opacity:.5;cursor:not-allowed}.copy-option svg:first-child{color:var(--option-color)}.copied-icon{color:#10b981!important}.theme-toggle{background:#2a2a2a99;border:2px solid #333;color:#999;padding:.5rem;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s ease;min-width:40px;height:40px}.theme-toggle:hover{background:#2a2a2acc;border-color:#555;color:#fff;transform:translateY(-1px)}.help-button{background:#2a2a2a99;border:2px solid #333;color:#999;padding:.5rem;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s ease;min-width:40px;height:40px}.help-button:hover{background:#2a2a2acc;border-color:#555;color:#fff;transform:translateY(-1px)}[data-theme=light] .chat-panel{background:linear-gradient(145deg,#f8f9fa,#fff);border-right-color:#e5e7eb}[data-theme=light] .chat-header{background:#f8f9faf2;border-bottom-color:#e5e7eb}[data-theme=light] .chat-header h1{color:#1a1a1a}[data-theme=light] .header-subtitle{color:#6b7280}[data-theme=light] .welcome-message{background:#fffc;border-color:#e5e7eb;color:#1a1a1a}[data-theme=light] .welcome-message h3{color:#1a1a1a}[data-theme=light] .welcome-message>p{color:#6b7280}[data-theme=light] .examples-section h4,[data-theme=light] .test-mode-section h4{color:#1a1a1a}[data-theme=light] .example-item{background:#3b82f61a;border-color:#3b82f633;color:#374151}[data-theme=light] .example-item:hover{background:#3b82f626;border-color:#3b82f64d}[data-theme=light] .test-mode-section{background:#f3f4f6cc;border-color:#e5e7eb}[data-theme=light] .test-examples{color:#6b7280}[data-theme=light] .test-examples code{background:#f3f4f6;color:#3b82f6}[data-theme=light] .message.user{background:linear-gradient(135deg,#3b82f6,#1d4ed8);color:#fff}[data-theme=light] .message.assistant{background:#ffffffe6;color:#1a1a1a;border-color:#e5e7eb}[data-theme=light] .message-avatar{background:#0000001a}[data-theme=light] .chat-input-container{background:#f8f9faf2;border-top-color:#e5e7eb}[data-theme=light] .input-field-container{background:#fffc;border-color:#e5e7eb}[data-theme=light] .input-field-container:focus-within{border-color:#3b82f6;background:#fffffff2}[data-theme=light] .chat-input{color:#1a1a1a}[data-theme=light] .chat-input::placeholder{color:#9ca3af}[data-theme=light] .count-normal{color:#6b7280}[data-theme=light] .count-warning{color:#f59e0b}[data-theme=light] .send-button{background:#3b82f633;color:#6b7280;border-color:#e5e7eb}[data-theme=light] .send-button.active{background:linear-gradient(135deg,#3b82f6,#1d4ed8);color:#fff;border-color:#3b82f6}[data-theme=light] .hint{color:#6b7280}[data-theme=light] .code-panel{background:#fff}[data-theme=light] .code-tabs{background:#f8f9fa;border-bottom-color:#e5e7eb}[data-theme=light] .code-tab{color:#6b7280}[data-theme=light] .code-tab.active{color:#1a1a1a;border-bottom-color:#2563eb}[data-theme=light] .copy-button,[data-theme=light] .validate-button,[data-theme=light] .export-button,[data-theme=light] .history-button{background:#e5e7eb;color:#374151}[data-theme=light] .history-controls{border-right-color:#d1d5db}[data-theme=light] .history-button:hover:not(:disabled){background:#d1d5db}[data-theme=light] .copy-button:hover{background:#d1d5db}[data-theme=light] .code-content,[data-theme=light] .preview-container{background:#fff}[data-theme=light] .theme-toggle{background:#fffc;border-color:#e5e7eb;color:#6b7280}[data-theme=light] .theme-toggle:hover{background:#fffffff2;border-color:#d1d5db;color:#374151}[data-theme=light] .help-button{background:#fffc;border-color:#e5e7eb;color:#6b7280}[data-theme=light] .help-button:hover{background:#fffffff2;border-color:#d1d5db;color:#374151}.shortcuts-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:3000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.shortcuts-panel{background:#1a1a1a;border:1px solid #333;border-radius:16px;width:90%;max-width:500px;max-height:80vh;overflow:hidden;box-shadow:0 20px 60px #00000080}.shortcuts-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid #333;background:#1a1a1af2}.shortcuts-title{display:flex;align-items:center;gap:.5rem;color:#fff;font-weight:600}.shortcuts-title h3{margin:0;font-size:1.25rem}.shortcuts-content{padding:1.5rem;max-height:60vh;overflow-y:auto}.shortcuts-category{margin-bottom:2rem}.shortcuts-category:last-child{margin-bottom:0}.shortcuts-category h4{margin:0 0 1rem;color:#fff;font-size:1rem;font-weight:600}.shortcuts-list{display:flex;flex-direction:column;gap:.75rem}.shortcut-item{display:flex;justify-content:space-between;align-items:center;padding:.75rem;background:#333;border-radius:8px;transition:background .2s}.shortcut-item:hover{background:#444}.shortcut-keys{display:flex;align-items:center;gap:.25rem}.key{background:#555;color:#fff;padding:.25rem .5rem;border-radius:4px;font-size:.8rem;font-family:Monaco,Menlo,monospace;font-weight:500;border:1px solid #666}.key-separator{color:#999;font-size:.8rem;margin:0 .25rem}.shortcut-description{color:#e5e5e5;font-size:.9rem}[data-theme=light] .shortcuts-panel{background:#fff;border-color:#e5e7eb}[data-theme=light] .shortcuts-header{background:#f8f9faf2;border-bottom-color:#e5e7eb}[data-theme=light] .shortcuts-title,[data-theme=light] .shortcuts-category h4{color:#1a1a1a}[data-theme=light] .shortcut-item{background:#f8f9fa}[data-theme=light] .shortcut-item:hover{background:#e5e7eb}[data-theme=light] .key{background:#e5e7eb;color:#374151;border-color:#d1d5db}[data-theme=light] .key-separator{color:#6b7280}[data-theme=light] .shortcut-description{color:#374151}.history-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:3000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.history-panel{background:#1a1a1a;border:1px solid #333;border-radius:16px;width:90%;max-width:600px;max-height:80vh;overflow:hidden;box-shadow:0 20px 60px #00000080}.history-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid #333;background:#1a1a1af2}.history-title{display:flex;align-items:center;gap:.5rem;color:#fff;font-weight:600}.history-title h3{margin:0;font-size:1.25rem}.history-count{color:#999;font-size:.9rem;font-weight:400}.history-actions{display:flex;align-items:center;gap:.5rem}.history-action-btn{background:#333;border:1px solid #555;color:#999;padding:.5rem;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;min-width:32px;height:32px}.history-action-btn:hover:not(:disabled){background:#444;color:#fff;border-color:#666}.history-action-btn:disabled{opacity:.5;cursor:not-allowed}.history-action-btn.danger:hover:not(:disabled){background:#dc3545;border-color:#dc3545;color:#fff}.history-content{padding:1.5rem;max-height:60vh;overflow-y:auto}.history-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;text-align:center;color:#999}.empty-icon{opacity:.5;margin-bottom:1rem}.history-empty p{margin:.5rem 0;font-size:1rem}.empty-subtitle{font-size:.9rem;color:#666}.history-list{display:flex;flex-direction:column;gap:.75rem}.history-item{background:#333;border:1px solid #555;border-radius:8px;padding:1rem;cursor:pointer;transition:all .2s;position:relative}.history-item:hover{background:#444;border-color:#666}.history-item.active{background:#3b82f61a;border-color:#3b82f6}.history-item-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.history-item-time{display:flex;align-items:center;gap:.5rem;color:#999;font-size:.85rem}.history-item-date{color:#666;margin-left:.5rem}.history-item-index{background:#555;color:#fff;padding:.25rem .5rem;border-radius:4px;font-size:.8rem;font-weight:600}.history-item-message{display:flex;align-items:center;gap:.5rem;color:#e5e5e5;font-size:.9rem;margin-bottom:.5rem}.history-item-preview{color:#999;font-size:.85rem;font-family:Monaco,Menlo,monospace}.history-item-current{position:absolute;top:.5rem;right:.5rem;background:#3b82f6;color:#fff;padding:.25rem .5rem;border-radius:4px;font-size:.75rem;font-weight:600}[data-theme=light] .history-panel{background:#fff;border-color:#e5e7eb}[data-theme=light] .history-header{background:#f8f9faf2;border-bottom-color:#e5e7eb}[data-theme=light] .history-title{color:#1a1a1a}[data-theme=light] .history-count{color:#6b7280}[data-theme=light] .history-action-btn{background:#e5e7eb;border-color:#d1d5db;color:#6b7280}[data-theme=light] .history-action-btn:hover:not(:disabled){background:#d1d5db;color:#374151;border-color:#9ca3af}[data-theme=light] .history-item{background:#f8f9fa;border-color:#e5e7eb}[data-theme=light] .history-item:hover{background:#e5e7eb;border-color:#d1d5db}[data-theme=light] .history-item.active{background:#3b82f61a;border-color:#3b82f6}[data-theme=light] .history-item-time{color:#6b7280}[data-theme=light] .history-item-date{color:#9ca3af}[data-theme=light] .history-item-index{background:#d1d5db;color:#374151}[data-theme=light] .history-item-message{color:#374151}[data-theme=light] .history-item-preview{color:#6b7280}@media (max-width: 768px){.input-hints{flex-direction:column;align-items:flex-start;gap:.25rem}.chat-input-container{padding:1rem}.input-actions{padding:.5rem 1rem .75rem}}
