:root{--bg-color: #0f172a;--text-color: #f8fafc;--primary-color: #3b82f6;--primary-hover: #2563eb;--surface-color: #1e293b;--border-color: #334155;--font-family: "Inter", system-ui, -apple-system, sans-serif}body{margin:0;font-family:var(--font-family);background-color:var(--bg-color);color:var(--text-color);min-height:100vh;display:flex;flex-direction:column;align-items:center}#app{width:100%;max-width:1000px;padding:2rem;box-sizing:border-box}header{text-align:center;margin-bottom:2rem}h1{font-size:2.5rem;font-weight:800;background:linear-gradient(to right,#60a5fa,#a78bfa);-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin:0}.main-flow{display:flex;flex-direction:column;gap:1.5rem}.row{display:flex;justify-content:center;align-items:center;gap:1rem}.image-block{width:300px;height:300px;background-color:var(--surface-color);border-radius:1.5rem;border:2px solid var(--border-color);overflow:hidden;cursor:pointer;transition:all .3s ease;position:relative;box-shadow:0 4px 6px -1px #0000001a}.image-block:hover{border-color:var(--primary-color);transform:translateY(-4px);box-shadow:0 10px 15px -3px #0003}.block-content{width:100%;height:100%;display:flex;align-items:center;justify-content:center;position:relative}.block-content canvas,.block-content img{width:100%;height:100%;object-fit:cover;display:block}.placeholder-text{position:absolute;color:#94a3b8;font-weight:600;pointer-events:none;background:#0f172acc;padding:.5rem 1rem;border-radius:.5rem}.exchange-wrapper{display:flex;align-items:center;justify-content:center}#exchangeBtn{background-color:var(--surface-color);color:var(--text-color);border:1px solid var(--border-color);border-radius:50%;width:48px;height:48px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .3s ease}#exchangeBtn:hover{background-color:var(--primary-color);color:#fff;transform:rotate(180deg);border-color:var(--primary-color)}.generate-controls{display:flex;align-items:center;gap:1rem;background-color:var(--surface-color);padding:.75rem 1.5rem;border-radius:1rem;border:1px solid var(--border-color)}.setting-group{display:flex;align-items:center;gap:.5rem}.setting-group label{color:#94a3b8;font-size:.9rem;font-weight:600;text-transform:uppercase}.setting-group input,.setting-group select{background:transparent;border:none;border-bottom:1px solid var(--border-color);color:var(--text-color);font-family:inherit;font-size:1.1rem;width:4rem;text-align:center;padding:.25rem;appearance:none;-webkit-appearance:none;cursor:pointer}.setting-group input:focus,.setting-group select:focus{outline:none;border-color:var(--primary-color)}.setting-group select option{background-color:var(--surface-color);color:var(--text-color)}#processBtn{background-color:var(--primary-color);color:#fff;border:none;padding:.75rem 2rem;border-radius:.75rem;font-weight:700;font-size:1rem;cursor:pointer;transition:all .2s ease;text-transform:uppercase;letter-spacing:.05em;display:flex;align-items:center;gap:.5rem}.block-label{position:absolute;top:1rem;left:1rem;background-color:#0f172a99;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);padding:.25rem .75rem;border-radius:.5rem;font-size:.8rem;font-weight:600;color:#cbd5e1;pointer-events:none;border:1px solid rgba(255,255,255,.1)}#processBtn:hover:not(:disabled){background-color:var(--primary-hover);transform:translateY(-1px);box-shadow:0 4px 6px -1px #3b82f666}#processBtn:disabled{opacity:.5;cursor:not-allowed;background-color:#475569}.result-block{width:100%;max-width:800px;min-height:400px;background-color:var(--surface-color);border-radius:1.5rem;border:2px solid var(--border-color);overflow:hidden;position:relative;display:flex;align-items:center;justify-content:center}.result-block canvas{max-width:100%;max-height:100%;object-fit:contain}.result-actions{position:absolute;bottom:1.5rem;right:1.5rem;display:flex;gap:.75rem}.result-actions button{background-color:#0f172acc;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);color:#fff;border:1px solid rgba(255,255,255,.1);border-radius:50%;width:48px;height:48px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}.result-actions button:hover:not(:disabled){background-color:var(--primary-color);transform:scale(1.1)}.result-actions button:disabled{opacity:0;pointer-events:none}.modal{display:none;position:fixed;z-index:100;left:0;top:0;width:100%;height:100%;background-color:#000000b3;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);align-items:center;justify-content:center}.modal.show{display:flex}.modal-content{background-color:var(--surface-color);border:1px solid var(--border-color);border-radius:1.5rem;width:90%;max-width:600px;max-height:80vh;display:flex;flex-direction:column;box-shadow:0 25px 50px -12px #00000080;animation:modalPop .3s cubic-bezier(.175,.885,.32,1.275)}@keyframes modalPop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.modal-header{padding:1.5rem;border-bottom:1px solid var(--border-color);display:flex;justify-content:space-between;align-items:center}.modal-header h2{margin:0;font-size:1.25rem}.close-modal{font-size:2rem;line-height:1;cursor:pointer;color:#94a3b8}.close-modal:hover{color:#fff}.modal-body{padding:1.5rem;overflow-y:auto;display:flex;flex-direction:column;gap:1.5rem}.upload-section{border-top:1px solid var(--border-color);padding-top:1.5rem}.upload-btn-large{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;background-color:#0f172a;border:2px dashed var(--border-color);border-radius:1rem;padding:2rem;cursor:pointer;transition:all .2s ease;color:#94a3b8}.upload-btn-large:hover{border-color:var(--primary-color);color:var(--text-color);background-color:#3b82f61a}.upload-btn-large input{display:none}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:1rem}.gallery-item{aspect-ratio:1;border-radius:.75rem;overflow:hidden;cursor:pointer;border:2px solid transparent;transition:all .2s ease}.gallery-item img{width:100%;height:100%;object-fit:cover}.gallery-item:hover{border-color:var(--primary-color);transform:scale(1.05)}@media(max-width:768px){.top-row{flex-direction:column}.exchange-wrapper{transform:rotate(90deg)}.image-block{width:100%;max-width:300px}}
