:root{--app-text-color: #f5f8ff;--tg-theme-bg-color: #071127;--tg-theme-text-color: #e8eefc;--tg-theme-hint-color: #8f9dbd;--tg-theme-link-color: #7fb2ff;--tg-theme-button-color: #5d8fe8;--tg-theme-button-text-color: #f5f8ff}.loading-screen,.error-screen{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px}.spinner{width:36px;height:36px;border:3px solid rgba(36,129,204,.2);border-top-color:var(--tg-theme-button-color);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.error-icon{font-size:40px}.greeting{color:var(--tg-theme-hint-color);margin:0 0 12px;font-size:14px;line-height:1.35;word-break:break-word}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:radial-gradient(1200px 700px at 50% 20%,rgba(70,119,212,.22),transparent 65%),radial-gradient(700px 500px at 50% 80%,rgba(40,83,166,.24),transparent 70%),#050b1b;color:var(--app-text-color);margin:0;padding:0;box-sizing:border-box;min-height:100vh}html{background:#050b1b}.container{padding:22px 22px 110px;max-width:680px;margin:0 auto}.container,.container h1,.container h2,.upload-section,.balances-card,.balances-card h3,.balance-pill,.plan-card,.plan-top h3,.plan-price,.balance-value{color:var(--app-text-color)!important}h1,h2{margin-top:0;color:var(--app-text-color)}.error{color:#ff3b30;text-align:center;font-weight:700}.form-section{background:#0000000d;padding:15px;border-radius:12px;margin-bottom:20px}.form-group{margin-bottom:12px;display:flex;flex-direction:column}label{font-size:14px;margin-bottom:5px;color:var(--tg-theme-hint-color)}input,select,textarea{padding:10px;border:1px solid rgba(131,165,238,.4);border-radius:12px;font-size:16px;background-color:#040c1d8c;color:var(--app-text-color)}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--tg-theme-button-color)}button{background:linear-gradient(180deg,#4f7fd8,#3f68b7);color:var(--tg-theme-button-text-color);border:none;padding:12px;border-radius:14px;font-size:16px;font-weight:700;cursor:pointer;transition:opacity .2s;width:100%}button:disabled{opacity:.6}button:active{opacity:.8}.jobs-list{list-style:none;padding:0}.job-item{background:#00000005;border:1px solid #eee;padding:15px;border-radius:10px;margin-bottom:10px}.job-header{display:flex;justify-content:space-between;align-items:center}.status{font-size:12px;padding:4px 8px;border-radius:12px;font-weight:700}.status.pending{background:#ffeaa7;color:#b2bec3}.status.completed{background:#55efc4;color:#00b894}.job-desc{margin:8px 0;font-size:14px;color:var(--tg-theme-hint-color)}.job-date{font-size:12px;color:#bdc3c7}.job-item{cursor:pointer;transition:border-color .15s}.job-item.selected{border-color:var(--tg-theme-button-color);background:#2481cc0d}.upload-section{background:#081127a6;border:1px solid rgba(131,165,238,.2);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:18px;border-radius:18px;margin-bottom:20px}.placeholder-section h2{margin:0}.upload-section h2{font-size:16px;margin-bottom:12px}.file-upload{display:flex;flex-direction:column;gap:12px}.file-upload-disabled{opacity:.95}.upload-picker{display:flex;flex-direction:column;gap:6px}.pick-btn{background:var(--tg-theme-button-color);color:var(--tg-theme-button-text-color);padding:10px 16px;border-radius:8px;font-size:15px;width:auto}.upload-plus-tile{width:110px;height:110px;border:2px dashed rgba(132,172,255,.7);border-radius:20px;background:#3056a333;display:flex;align-items:center;justify-content:center;padding:0}.upload-plus-icon{font-size:48px;line-height:1;color:#8ec0ff;font-weight:300}.upload-hint{font-size:12px;color:var(--tg-theme-hint-color)}.file-queue{display:flex;flex-direction:column;gap:8px}.file-card{background:#00000008;border:1px solid #eee;border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}.file-info{display:flex;justify-content:space-between;align-items:center}.file-name{font-weight:500;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70%}.file-size{font-size:12px;color:var(--tg-theme-hint-color)}.file-status-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.file-status-badge{font-size:12px;font-weight:600;padding:2px 8px;border-radius:10px}.file-error{font-size:12px;color:#d63031;flex:1}.remove-btn{width:auto;padding:2px 8px;font-size:12px;background:#eee;color:#666;border-radius:6px;margin-left:auto}.progress-bar{flex:1;height:4px;background:#eee;border-radius:2px;overflow:hidden}.progress-fill{height:100%;background:var(--tg-theme-button-color);border-radius:2px;transition:width .2s}.upload-btn{background:#00b894;color:#fff;margin-top:4px}.assets-list{display:flex;flex-direction:column;gap:8px}.assets-list h3{font-size:16px;font-weight:700;margin:0 0 8px;color:var(--tg-theme-hint-color)}.asset-card{display:flex;align-items:center;justify-content:space-between;background:#041e3fb8;border:1px solid rgba(0,199,255,.35);border-radius:14px;padding:12px 14px;box-shadow:inset 0 0 0 1px #4982dd1f}.asset-info{display:flex;flex-direction:column;gap:2px}.asset-name{font-size:16px;font-weight:700}.asset-size{font-size:13px;color:var(--tg-theme-hint-color)}.delete-btn{width:34px;min-width:34px;height:34px;background:#0e2e5bbf;color:#9fb6df;border:1px solid rgba(151,187,241,.35);font-size:20px;line-height:1;padding:0;border-radius:10px;display:flex;align-items:center;justify-content:center}.delete-btn:active{background:#c4354c33}.status.created{background:#f0f0f0;color:#666}.status.collecting_assets{background:#dfe6e9;color:#636e72}.status.ready_for_generation{background:#d4edda;color:#155724}.status.queued{background:#ffe9c7;color:#8a5a00}.status.processing{background:#74b9ff;color:#0984e3}.status.done{background:#55efc4;color:#00b894}.status.failed{background:#fab1a0;color:#d63031}.status.cancelled{background:#eee;color:#999}.job-status-details{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}.job-status-text{font-size:13px;color:var(--tg-theme-hint-color)}.job-progress-wrapper{display:flex;align-items:center;gap:8px}.job-progress-bar{flex:1;height:8px;border-radius:999px;background:#e6e6e6;overflow:hidden}.job-progress-fill{height:100%;background:var(--tg-theme-button-color);transition:width .3s ease}.job-progress-percent{font-size:12px;min-width:36px;text-align:right;color:var(--tg-theme-hint-color)}.job-error-message{margin:0;font-size:13px;color:#d63031}.start-generation-btn{margin-bottom:12px}.results-section{margin-top:14px}.results-section h3{margin:0 0 8px;font-size:14px}.results-list{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}.result-item{border:1px solid #e8e8e8;border-radius:10px;overflow:hidden;background:#00000005}.result-preview-link{display:block;width:100%;aspect-ratio:1 / 1;background:#f3f3f3}.result-preview-image{width:100%;height:100%;object-fit:cover;display:block}.result-preview-fallback{display:flex;align-items:center;justify-content:center;min-height:120px;font-size:12px;color:var(--tg-theme-hint-color)}.result-meta{padding:8px;display:flex;flex-direction:column;gap:4px}.result-filename{font-size:12px;word-break:break-word}.result-download-link{font-size:12px;color:var(--tg-theme-link-color);text-decoration:none}.model-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px}.model-switch-btn{width:100%;font-size:14px;font-weight:600;padding:10px 12px;border:1px solid rgba(124,155,226,.35);border-radius:10px;background:#0f1e44a6;color:#8f9dbd}.model-switch-btn.active{background:linear-gradient(180deg,#5f95ea,#4d79ca);color:var(--tg-theme-button-text-color);border-color:#9fc3ffbf;opacity:1}.model-switch-btn:not(.active){opacity:.6}.create-submit-btn{margin-top:14px}.bottom-tabs{position:fixed;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:#040a19e6;border-top:1px solid rgba(131,165,238,.22);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);z-index:900}.bottom-tab{background:transparent;border:1px solid transparent;border-radius:10px;color:var(--tg-theme-hint-color);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:54px;padding:6px 4px}.bottom-tab-icon{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center}.bottom-tab-icon svg{width:20px;height:20px}.bottom-tab-label{font-size:11px;font-weight:600}.bottom-tab.active{color:#9ec5ff;border-color:#77a9ff73;background:#5c91ec24}.inline-error{color:#d63031;font-size:13px;margin:6px 0 0}.popup-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px}.popup-card{width:min(420px,100%);background:var(--tg-theme-bg-color);color:var(--app-text-color);border-radius:14px;padding:16px;box-shadow:0 12px 32px #0000004d}.popup-card h3{margin:0 0 8px;font-size:18px}.popup-card p{margin:0 0 14px;color:var(--tg-theme-hint-color);font-size:14px}.popup-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.popup-btn{width:100%}.popup-btn.secondary{background:#e6e6e6;color:#444}.popup-btn.primary{background:var(--tg-theme-button-color);color:var(--tg-theme-button-text-color)}.balances-card{background:#0a1834b8;border:1px solid rgba(131,165,238,.2);border-radius:14px;padding:14px;margin-bottom:14px}.balances-card h3{margin:0 0 10px;font-size:15px}.balances-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.balance-pill{display:flex;justify-content:space-between;align-items:center;background:#060e1fa6;border:1px solid rgba(131,165,238,.26);border-radius:10px;padding:10px 12px}.balance-model{color:var(--tg-theme-hint-color);font-size:13px;font-weight:600}.balance-value{font-size:16px;font-weight:700}.plans-list{display:grid;grid-template-columns:1fr;gap:10px}.plans-list.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-model-filter{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:10px}.shop-filter-btn{width:100%;padding:10px 12px;border-radius:10px;background:#0f1e44a6;border:1px solid rgba(124,155,226,.35);color:#8f9dbd;font-size:13px;font-weight:600;line-height:1.2;min-height:44px;white-space:normal}.shop-filter-btn.active{background:linear-gradient(180deg,#5f95ea,#4d79ca);color:var(--tg-theme-button-text-color);border-color:#9fc3ffbf}.plan-card{background:#0a1834b8;border:1px solid rgba(131,165,238,.2);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:8px}.plan-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:2px}.plan-top h3{margin:0;font-size:15px;line-height:1.2;white-space:nowrap}.plan-price{font-size:14px;font-weight:700;white-space:nowrap}.plan-combo-breakdown{margin:8px 0 10px}.plan-combo-breakdown p{margin:0;color:var(--tg-theme-hint-color);font-size:13px;line-height:1.35}.buy-plan-btn{width:100%}.buy-plan-btn.compact{width:auto;min-width:84px;padding:8px 12px;font-size:14px;border-radius:10px;align-self:flex-start}.payment-popup{display:flex;flex-direction:column;gap:10px}.payment-meta{margin:0;color:var(--tg-theme-hint-color)}.payment-link{margin:0;font-size:13px;word-break:break-all;color:var(--tg-theme-link-color)}.payment-actions{display:grid;grid-template-columns:1fr;gap:8px}.create-balance-card{margin-top:8px;padding:10px 12px;border-radius:12px;background:linear-gradient(135deg,#5080dc47,#26468657);border:1px solid rgba(148,190,255,.45);display:flex;align-items:center;justify-content:space-between;gap:10px}.create-balance-label{font-size:12px;color:#c6dafd}.create-balance-value{font-size:22px;font-weight:800;line-height:1;color:#f5f8ff}@media (max-width: 380px){.plans-list.compact{grid-template-columns:1fr}}.transactions-card{margin-top:14px;background:#08142cb3;border:1px solid rgba(131,165,238,.2);border-radius:12px;padding:12px}.transactions-card h3{margin:0 0 10px;font-size:15px}.transactions-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}.transaction-item{display:grid;grid-template-columns:64px 60px 1fr;gap:6px;align-items:center;font-size:13px;color:var(--tg-theme-hint-color)}.tx-delta{font-weight:700}.tx-delta.plus{color:#2ecc71}.tx-delta.minus{color:#ff6b6b}
