*{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;overflow:hidden;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;background-color:#f5f7fa}.chat-wrapper{display:flex;flex-direction:column;height:100vh;width:100%;padding:20px;background-color:#f5f7fa}.brand-header{display:flex;align-items:center;gap:12px;padding:15px 20px;background:#fff;border-radius:16px;box-shadow:0 4px 15px #0000000d;width:100%;max-width:800px;margin:20px auto;position:relative}.brand-logo{width:42px;height:42px;display:flex;justify-content:center;align-items:center;background:linear-gradient(135deg,#4a6cf7,#6b4ecf);border-radius:12px;color:#fff}.brand-name{display:flex;flex-direction:column}.brand-main{font-size:1.5rem;font-weight:700;color:#333;background:linear-gradient(135deg,#4a6cf7,#6b4ecf);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.brand-version{font-size:.85rem;font-weight:500;color:#666;background:linear-gradient(135deg,#8e8e8e,#5a5a5a);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin-top:-4px}.message-counter{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:4px;min-width:140px;align-items:center}.counter-text{font-size:.8rem;font-weight:700;color:#666;text-align:center;white-space:nowrap}.counter-bar{width:100%;height:5px;background:#e0e0e0;border-radius:3px;overflow:hidden;position:relative;box-shadow:inset 0 1px 2px #0000001a}.counter-fill{height:100%;background:linear-gradient(90deg,#4a6cf7,#6b4ecf);border-radius:2px;transition:width .3s ease;position:relative}.counter-fill:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.3) 50%,transparent 100%);animation:shimmer 2s infinite}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}.header-actions{display:flex;align-items:center;gap:8px;margin-left:auto}.export-btn,.import-btn{background:none;border:none;cursor:pointer;padding:8px;border-radius:8px;color:#666;transition:all .3s ease;display:flex;align-items:center;justify-content:center}.export-btn:hover,.import-btn:hover{background:#0000000d;color:#333;transform:scale(1.1)}.export-btn:disabled{opacity:.4;cursor:not-allowed;transform:none}.export-btn:disabled:hover{background:none;color:#666;transform:none}.theme-toggle{background:none;border:none;cursor:pointer;padding:8px;border-radius:8px;color:#666;transition:all .3s ease;display:flex;align-items:center;justify-content:center}.theme-toggle:hover{background:#0000000d;color:#333;transform:scale(1.1)}.chat-container{flex:1;width:100%;max-width:800px;background:#fff;border-radius:24px;box-shadow:0 10px 30px #00000014;display:flex;flex-direction:column;overflow:hidden;border:1px solid #eaeaea;margin:0 auto}.empty-state{flex:1;display:flex;justify-content:center;align-items:center;padding:40px;background-color:#f8f9fa}.empty-state-content{text-align:center;max-width:500px}.empty-state-icon{margin:0 auto 30px;width:80px;height:80px;display:flex;justify-content:center;align-items:center;background:#4a6cf7;border-radius:50%;color:#fff;animation:float 3s ease-in-out infinite}.empty-state h1{font-size:2.5rem;font-weight:700;color:#333;margin:0 0 15px}.empty-state p{font-size:1.2rem;color:#666;margin:0 0 30px;font-weight:500}.empty-state-hints{margin-top:30px}.empty-state-hints span{display:block;font-weight:600;color:#555;margin-bottom:15px;font-size:.9rem;letter-spacing:.5px}.hint-bubbles{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}.hint-bubble{background:#fff;border:1px solid #eaeaea;padding:8px 16px;border-radius:20px;font-size:.85rem;color:#555;cursor:pointer;transition:all .3s ease;box-shadow:0 2px 5px #0000000d}.hint-bubble:hover{background:#f0f4ff;border-color:#4a6cf7;transform:translateY(-2px);box-shadow:0 4px 8px #0000001a}.chat-history{flex:1;padding:30px;overflow-y:auto;display:flex;flex-direction:column;gap:20px}.message-wrapper{display:flex;flex-direction:column;max-width:80%}.message-wrapper.user{align-self:flex-end}.message-wrapper.bot{align-self:flex-start}.message-wrapper.system{align-self:center}.bubble{padding:16px 20px;border-radius:18px;position:relative;animation:fadeInUp .3s ease-out;box-shadow:0 2px 8px #0000000d;line-height:1.5;font-size:1rem;word-wrap:break-word}.bubble.user{background:#4a6cf7;color:#fff;border-bottom-right-radius:4px}.bubble.bot{background:#fff;color:#333;border:1px solid #eaeaea;border-bottom-left-radius:4px}.bubble.system{background:#ffeb3b;color:#333;border-radius:12px;font-weight:600;text-align:center;padding:10px 20px;align-self:center;box-shadow:0 2px 8px #ffeb3b4d}.bubble.system.isLimitReached{background:linear-gradient(135deg,#ff6b6b,#ee5a52);color:#fff;box-shadow:0 4px 15px #ff6b6b66;border:2px solid #ff5252;animation:limitPulse 2s infinite}@keyframes limitPulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}.bubble.loading{display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:20px;min-height:60px;background:linear-gradient(135deg,#f8f9fa,#e9ecef);border:1px solid #eaeaea;border-radius:18px 18px 18px 4px}.bubble.loading:before{content:"MirosAI pisze";font-size:.85rem;color:#666;margin-right:10px;font-weight:500}.bubble.loading span{display:inline-block;width:10px;height:10px;border-radius:50%;background:linear-gradient(135deg,#4a6cf7,#6b4ecf);animation:loading 1.6s infinite ease-in-out both;box-shadow:0 2px 4px #4a6cf733}.bubble.loading span:nth-child(1){animation-delay:-.32s}.bubble.loading span:nth-child(2){animation-delay:-.16s}.bubble.loading span:nth-child(3){animation-delay:0s}.message-timestamp{font-size:.75rem;color:#ffffffb3;margin-top:8px;text-align:right;font-weight:400}.bubble.bot .message-timestamp{color:#00000080;text-align:left}.bubble.system .message-timestamp{color:#0009;text-align:center}.message-footer{display:flex;justify-content:space-between;align-items:center;margin-top:8px}.bubble.user .message-footer{justify-content:flex-end}.bubble.bot .message-footer{justify-content:flex-start}.bubble.system .message-footer{justify-content:center}.copy-btn{background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;opacity:.6;transition:all .2s ease;display:flex;align-items:center;justify-content:center}.copy-btn:hover{opacity:1;background:#ffffff1a;transform:scale(1.1)}.bubble.bot .copy-btn{color:#00000080}.bubble.bot .copy-btn:hover{background:#0000000d}.bubble.user .copy-btn{color:#ffffffb3}.bubble.user .copy-btn:hover{background:#ffffff1a}.retry-btn{background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;opacity:.7;transition:all .2s ease;display:flex;align-items:center;justify-content:center;color:#ff6b6b}.retry-btn:hover{opacity:1;background:#ff6b6b1a;transform:scale(1.1)}.bubble.system .retry-btn{color:#ff6b6b}.bubble.system .retry-btn:hover{background:#ff6b6b1a}.regenerate-btn{background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;opacity:.7;transition:all .2s ease;display:flex;align-items:center;justify-content:center;color:#4a6cf7}.regenerate-btn:hover{opacity:1;background:#4a6cf71a;transform:scale(1.1)}.bubble.bot .regenerate-btn{color:#4a6cf7}.bubble.bot .regenerate-btn:hover{background:#4a6cf71a}.input-bar{display:flex;align-items:center;padding:15px 20px;background:#fff;border-top:1px solid #eaeaea;gap:12px}.input-container{flex:1;position:relative}.chat-input{width:100%;padding:14px 60px 14px 20px;border:2px solid #eaeaea;border-radius:24px;font-size:1rem;outline:none;transition:all .3s ease;background:#fafafa}.chat-input:focus{border-color:#4a6cf7;background:#fff;box-shadow:0 0 0 3px #4a6cf71a}.chat-input:disabled{background:#f5f5f5;color:#999;cursor:not-allowed;opacity:.7}.chat-input:disabled::placeholder{color:#ccc}.char-counter{position:absolute;right:15px;top:50%;transform:translateY(-50%);font-size:.75rem;color:#999;pointer-events:none;font-weight:500}.char-counter.warning{color:#ff6b6b}.char-counter.danger{color:#f44;font-weight:600}.icon-btn{width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .3s ease;border:none;outline:none;background:#f8f9fa;color:#4a6cf7}.icon-btn:hover{background:#4a6cf7;color:#fff;transform:translateY(-2px);box-shadow:0 4px 12px #4a6cf74d}.icon-btn.clear{color:#ff6b6b}.icon-btn.clear:hover{background:#ff6b6b;color:#fff}.icon-btn.send{background:#4a6cf7;color:#fff}.icon-btn.send:hover{transform:scale(1.05);box-shadow:0 5px 15px #4a6cf766}.icon-btn.stop{background:#ff6b6b;color:#fff}.icon-btn.stop:hover{transform:scale(1.05);box-shadow:0 5px 15px #ff6b6b66}.icon-btn:disabled{opacity:.6;cursor:not-allowed;transform:none}.icon-btn:disabled:hover{transform:none;box-shadow:none}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes float{0%{transform:translateY(0)}50%{transform:translateY(-10px)}to{transform:translateY(0)}}@keyframes loading{0%,80%,to{transform:scale(.8);opacity:.5}40%{transform:scale(1.2);opacity:1}}.bubble p{margin:0 0 1em}.bubble h1,.bubble h2,.bubble h3{margin:1em 0 .5em;color:inherit}.bubble ul,.bubble ol{padding-left:1.5em;margin:1em 0}.bubble code{background:#0000000d;padding:2px 6px;border-radius:4px;font-family:Courier New,Courier,monospace;font-size:.9em}.bubble pre{background:#0000000d;padding:15px;border-radius:8px;overflow-x:auto;margin:1em 0}.bubble a{color:#4a6cf7;text-decoration:underline}.bubble blockquote{border-left:3px solid #4a6cf7;padding-left:15px;margin:1em 0;color:#555;font-style:italic}@media (max-width: 768px){.chat-wrapper{padding:8px}.brand-header{padding:10px 12px;margin:8px auto 12px;border-radius:12px;flex-wrap:wrap;gap:8px}.brand-logo{width:32px;height:32px}.brand-main{font-size:1.2rem}.brand-version{font-size:.75rem}.message-counter{min-width:70px}.counter-text{font-size:.6rem}.counter-bar{height:3px}.header-actions{gap:4px}.export-btn,.import-btn,.theme-toggle{padding:6px}.export-btn svg,.import-btn svg{width:16px;height:16px}.theme-toggle svg{width:18px;height:18px}.chat-container{height:calc(100vh - 100px);margin:0 auto;border-radius:16px}.empty-state{padding:20px}.empty-state h1{font-size:1.8rem}.empty-state p{font-size:1rem}.empty-state-icon{width:60px;height:60px}.chat-history{padding:15px;gap:12px}.message-wrapper{max-width:95%}.bubble{padding:12px 16px;font-size:.95rem}.input-bar{padding:10px 12px;gap:8px}.chat-input{padding:12px 50px 12px 16px;font-size:.95rem}.char-counter{right:12px;font-size:.7rem}.icon-btn{width:40px;height:40px}.copy-btn,.retry-btn,.regenerate-btn{padding:6px}.copy-btn svg,.retry-btn svg,.regenerate-btn svg{width:12px;height:12px}}@media (max-width: 480px){.chat-wrapper{padding:5px}.brand-header{padding:8px 10px;margin:5px auto 8px;flex-direction:column;align-items:flex-start;gap:8px}.brand-name{order:1}.header-actions{order:2;margin-left:0;align-self:flex-end}.chat-container{height:calc(100vh - 90px);margin:0;border-radius:12px}.empty-state{padding:15px}.empty-state h1{font-size:1.6rem}.empty-state p{font-size:.9rem}.empty-state-content{max-width:100%}.hint-bubbles{flex-direction:column;align-items:center}.hint-bubble{width:100%;max-width:250px;padding:6px 12px;font-size:.8rem}.chat-history{padding:12px;gap:10px}.message-wrapper{max-width:98%}.bubble{padding:10px 14px;font-size:.9rem}.input-bar{padding:8px 10px;gap:6px}.chat-input{padding:10px 45px 10px 14px;font-size:.9rem}.char-counter{right:10px;font-size:.65rem}.icon-btn{width:36px;height:36px}.copy-btn,.retry-btn,.regenerate-btn{padding:4px}.copy-btn svg,.retry-btn svg,.regenerate-btn svg{width:10px;height:10px}.message-footer{gap:4px}.message-timestamp{font-size:.7rem}}.chat-history::-webkit-scrollbar{width:8px}.chat-history::-webkit-scrollbar-track{background:transparent}.chat-history::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:4px}.chat-history::-webkit-scrollbar-thumb:hover{background:#999}body{overflow:hidden;touch-action:manipulation}body,.chat-wrapper{overscroll-behavior:none;-webkit-overflow-scrolling:touch}.chat-input{touch-action:manipulation;-webkit-tap-highlight-color:transparent}.icon-btn,.copy-btn,.retry-btn,.regenerate-btn,.export-btn,.import-btn,.theme-toggle{touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.hint-bubble{touch-action:manipulation;-webkit-tap-highlight-color:transparent}@media (max-width: 768px){.icon-btn{min-width:44px;min-height:44px}.copy-btn,.retry-btn,.regenerate-btn{min-width:32px;min-height:32px}.export-btn,.import-btn,.theme-toggle{min-width:36px;min-height:36px}.hint-bubble{min-height:36px;display:flex;align-items:center;justify-content:center}}@media (max-width: 768px){.chat-history{touch-action:pan-y}.bubble{touch-action:manipulation}}.footer{text-align:center;padding:1rem 2rem;margin-top:1rem;background:#ffffff0d;border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.1)}.footer p{margin:0;color:#717070cc;font-size:.9rem;line-height:1.5}.footer-link{color:#667eea;text-decoration:none;font-weight:600;transition:all .3s ease;margin-left:.5rem}.footer-link:hover{color:#764ba2;text-decoration:underline;transform:translateY(-1px)}.chat-wrapper.dark-mode{background-color:#1a1a1a}.chat-wrapper.dark-mode .brand-header{background:#2d2d2d;color:#e0e0e0}.chat-wrapper.dark-mode .brand-main{color:#e0e0e0}.chat-wrapper.dark-mode .brand-version,.chat-wrapper.dark-mode .counter-text{color:#999}.chat-wrapper.dark-mode .counter-bar{background:#404040}.chat-wrapper.dark-mode .counter-fill{background:linear-gradient(90deg,#4a6cf7,#6b4ecf)}.chat-wrapper.dark-mode .theme-toggle{color:#999}.chat-wrapper.dark-mode .theme-toggle:hover{background:#ffffff1a;color:#e0e0e0}.chat-wrapper.dark-mode .export-btn,.chat-wrapper.dark-mode .import-btn{color:#999}.chat-wrapper.dark-mode .export-btn:hover,.chat-wrapper.dark-mode .import-btn:hover{background:#ffffff1a;color:#e0e0e0}.chat-wrapper.dark-mode .export-btn:disabled{opacity:.3}.chat-wrapper.dark-mode .export-btn:disabled:hover{background:none;color:#999}.chat-wrapper.dark-mode .chat-container{background:#2d2d2d;border-color:#404040}.chat-wrapper.dark-mode .empty-state{background-color:#2d2d2d}.chat-wrapper.dark-mode .empty-state h1{color:#e0e0e0}.chat-wrapper.dark-mode .empty-state p{color:#999}.chat-wrapper.dark-mode .hint-bubble{background:#404040;border-color:#555;color:#e0e0e0}.chat-wrapper.dark-mode .hint-bubble:hover{background:#4a6cf7;border-color:#4a6cf7}.chat-wrapper.dark-mode .bubble.bot{background:#404040;color:#e0e0e0;border-color:#555}.chat-wrapper.dark-mode .bubble.user{background:#4a6cf7;color:#fff}.chat-wrapper.dark-mode .bubble.system{background:#ffeb3b;color:#333}.chat-wrapper.dark-mode .bubble.loading{background:linear-gradient(135deg,#404040,#2d2d2d);border-color:#555}.chat-wrapper.dark-mode .bubble.loading:before{color:#999}.chat-wrapper.dark-mode .message-timestamp{color:#ffffffb3}.chat-wrapper.dark-mode .bubble.bot .message-timestamp{color:#ffffff80}.chat-wrapper.dark-mode .bubble.system .message-timestamp{color:#0009}.chat-wrapper.dark-mode .input-bar{background:#2d2d2d;border-color:#404040}.chat-wrapper.dark-mode .chat-input{background:#404040;border-color:#555;color:#e0e0e0}.chat-wrapper.dark-mode .chat-input:focus{background:#2d2d2d;border-color:#4a6cf7}.chat-wrapper.dark-mode .chat-input:disabled{background:#404040;color:#666}.chat-wrapper.dark-mode .chat-input:disabled::placeholder{color:#555}.chat-wrapper.dark-mode .chat-input::placeholder{color:#999}.chat-wrapper.dark-mode .char-counter{color:#999}.chat-wrapper.dark-mode .char-counter.warning{color:#ff6b6b}.chat-wrapper.dark-mode .char-counter.danger{color:#f44}.chat-wrapper.dark-mode .icon-btn{background:#404040;color:#4a6cf7}.chat-wrapper.dark-mode .icon-btn:hover{background:#4a6cf7;color:#fff}.chat-wrapper.dark-mode .icon-btn.clear{color:#ff6b6b}.chat-wrapper.dark-mode .icon-btn.clear:hover{background:#ff6b6b;color:#fff}.chat-wrapper.dark-mode .copy-btn{color:#ffffff80}.chat-wrapper.dark-mode .copy-btn:hover{background:#ffffff1a}.chat-wrapper.dark-mode .bubble.user .copy-btn{color:#ffffffb3}.chat-wrapper.dark-mode .bubble.user .copy-btn:hover{background:#ffffff1a}.chat-wrapper.dark-mode .footer{background:#ffffff0d;border-color:#ffffff1a}.chat-wrapper.dark-mode .footer p{color:#fff9}.chat-wrapper.dark-mode .footer-link{color:#667eea}.chat-wrapper.dark-mode .footer-link:hover{color:#764ba2}
