*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}:root{font-family:Inter,system-ui,-apple-system,sans-serif;line-height:1.5;font-weight:400;color:#e8e8f0;background-color:#13131f;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{margin:0;min-width:320px;min-height:100vh}#root{width:100%;height:100%}.chat-panel{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;min-width:0;position:relative;overflow:visible;gap:12px}.ws-stages-container{position:absolute;top:50%;right:-200px;transform:translateY(-50%);display:flex;flex-direction:column;gap:8px;z-index:1000;pointer-events:none}.ws-stage-animation{animation:wsstageFadeIn .3s ease-out;opacity:0;animation-fill-mode:forwards}.ws-stage-text{display:inline-block;background:#667eeae6;color:#fff;padding:6px 12px;border-radius:20px;font-size:11px;font-weight:600;white-space:nowrap;box-shadow:0 4px 12px #667eea66;border:1px solid rgba(255,255,255,.2);letter-spacing:.3px}.theme-red .ws-stage-text{background:#ff6b6be6;box-shadow:0 4px 12px #ff6b6b66}.theme-light .ws-stage-text{background:#4c6ef5e6;box-shadow:0 4px 12px #4c6ef566}@keyframes wstageFadeIn{0%{opacity:0;transform:translate(20px)}50%{opacity:1;transform:translate(-5px)}to{opacity:1;transform:translate(0)}}.chat-container{width:100%;max-width:600px;height:82vh;display:flex;flex-direction:column;overflow:hidden;border-radius:20px;box-shadow:0 10px 40px #0006;transition:all .3s ease}.chat-panel.theme-dark .chat-container{background:#1e1e2e;border:1px solid #2e2e4a}.chat-panel.theme-red .chat-container{background:#2a1a1a;border:1px solid #4a2a2a}.chat-panel.theme-light .chat-container{background:#fff;border:1px solid #e0e0e0}.chat-panel.theme-mixed .chat-container{background:linear-gradient(180deg,#1e1e2e,#2a1a1a);border:1px solid #3a3a4a}.chat-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid rgba(255,255,255,.1);position:relative}.theme-dark .chat-header{background:#252540}.theme-red .chat-header{background:#3a2020}.theme-light .chat-header{background:#f5f5f5}.theme-mixed .chat-header{background:linear-gradient(90deg,#252540,#3a2020)}.users-counter{display:flex;align-items:center;gap:6px;background:#667eea33;padding:6px 12px;border-radius:20px;border:1px solid rgba(102,126,234,.3)}.users-icon{font-size:14px}.users-count{font-size:13px;font-weight:600;color:#667eea}.theme-light .users-count{color:#56d}.chat-header-center{display:flex;align-items:center;gap:10px;flex:1;justify-content:center}.chat-header-avatar{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;color:#fff;flex-shrink:0;box-shadow:0 4px 10px #667eea4d}.theme-red .chat-header-avatar{background:linear-gradient(135deg,#ff6b6b,#c92a2a)}.theme-light .chat-header-avatar{background:linear-gradient(135deg,#4c6ef5,#5f3dc4)}.chat-header-name{font-size:16px;font-weight:600;color:#e2e2f0}.theme-light .chat-header-name{color:#333}.theme-toggle{background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:50%;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:20px;transition:all .3s ease}.theme-toggle:hover{background:#fff3;transform:rotate(180deg)}.theme-light .theme-toggle{background:#0000000d;border:1px solid rgba(0,0,0,.1)}.chat-subtitle-outer{padding:8px 20px;text-align:center;font-size:13px;font-weight:600;color:#ffffffb3;background:#667eea26;border-radius:20px;font-style:italic;letter-spacing:.5px;max-width:600px;width:100%;box-shadow:0 2px 8px #0000001a}.theme-light .chat-subtitle-outer{color:#333;background:#4c6ef51f}.theme-red .chat-subtitle-outer{background:#ff6b6b26}.chat-subtitle{display:none}.connection-status{display:flex;align-items:center;gap:6px;padding:8px 20px;background:#0003;border-bottom:1px solid rgba(255,255,255,.05)}.theme-light .connection-status{background:#00000008}.status-indicator{font-size:12px}.latency-text{font-size:12px;font-weight:500;color:#a5a5c8}.theme-light .latency-text{color:#444;font-weight:600}.chat-messages{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:16px}.theme-dark .chat-messages{background:#1a1a2a}.theme-red .chat-messages{background:#221515}.theme-light .chat-messages{background:#fafafa}.theme-mixed .chat-messages{background:linear-gradient(180deg,#1a1a2a,#221515)}.chat-messages::-webkit-scrollbar{width:8px}.chat-messages::-webkit-scrollbar-track{background:transparent}.chat-messages::-webkit-scrollbar-thumb{background:#ffffff1a;border-radius:4px}.theme-light .chat-messages::-webkit-scrollbar-thumb{background:#0000001a}.message-wrapper{display:flex;flex-direction:column;max-width:75%}.message-wrapper.own{align-self:flex-end;align-items:flex-end}.message-wrapper.other{align-self:flex-start;align-items:flex-start}.message-timestamp{font-size:10px;color:#6b6b8a;margin-bottom:6px;padding:0 6px;font-weight:500}.theme-light .message-timestamp{color:#666;font-weight:600}.message-bubble-container{display:flex;align-items:flex-end;gap:8px}.message-wrapper.other .message-bubble-container{flex-direction:row}.message-wrapper.own .message-bubble-container{flex-direction:row-reverse}.message-bubble{padding:12px 16px;border-radius:18px;word-break:break-word;box-shadow:0 2px 8px #0000001a;transition:transform .2s ease}.message-bubble:hover{transform:translateY(-2px)}.message-bubble.own{background:linear-gradient(135deg,#667eea,#764ba2);border-bottom-right-radius:6px}.message-bubble.other{background:#2a2a45;border-bottom-left-radius:6px}.theme-red .message-bubble.own{background:linear-gradient(135deg,#ff6b6b,#c92a2a)}.theme-red .message-bubble.other{background:#3a2525}.theme-light .message-bubble.own{background:linear-gradient(135deg,#4c6ef5,#5f3dc4)}.theme-light .message-bubble.other{background:#e9ecef}.message-user{display:block;font-size:11px;font-weight:700;margin-bottom:4px;color:#ffffffb3;text-transform:uppercase;letter-spacing:.5px}.theme-light .message-bubble.other .message-user{color:#555;font-weight:800}.message-text{margin:0;font-size:14px;line-height:1.5;color:#fff}.theme-light .message-bubble.other .message-text{color:#222;font-weight:500}.message-latency{font-size:10px;font-weight:600;color:#ffd43b;background:#ffd43b1a;padding:2px 6px;border-radius:8px;white-space:nowrap;align-self:flex-end;margin-bottom:4px;border:1px solid rgba(255,212,59,.3);display:flex;align-items:center;gap:3px}.desync-indicator{font-size:9px;display:inline-block;animation:pulse-warning 2s ease-in-out infinite}@keyframes pulse-warning{0%,to{opacity:1}50%{opacity:.5}}.typing-indicator{display:flex;align-items:center;gap:6px;padding:8px 20px;background:#667eea1a;border-top:1px solid rgba(102,126,234,.2);min-height:40px}.theme-light .typing-indicator{background:#667eea0d}.typing-text{font-size:12px;color:#667eea;font-weight:500;font-style:italic}.theme-light .typing-text{color:#56d}.typing-dots{display:flex;gap:3px}.typing-dots span{width:4px;height:4px;border-radius:50%;background:#667eea;animation:typing-bounce 1.4s infinite}.theme-light .typing-dots span{background:#56d}.typing-dots span:nth-child(2){animation-delay:.2s}.typing-dots span:nth-child(3){animation-delay:.4s}@keyframes typing-bounce{0%,60%,to{transform:translateY(0)}30%{transform:translateY(-6px)}}.chat-input-area{display:flex;gap:10px;padding:16px 20px;border-top:1px solid rgba(255,255,255,.1)}.theme-dark .chat-input-area{background:#252540}.theme-red .chat-input-area{background:#3a2020}.theme-light .chat-input-area{background:#f5f5f5}.theme-mixed .chat-input-area{background:linear-gradient(90deg,#252540,#3a2020)}.chat-input{flex:1;padding:12px 18px;border:2px solid transparent;border-radius:25px;font-size:14px;outline:none;transition:all .3s ease}.theme-dark .chat-input{background:#1a1a2e;color:#e8e8f0;border-color:#3a3a5c}.theme-red .chat-input{background:#2a1515;color:#e8e8f0;border-color:#4a2a2a}.theme-light .chat-input{background:#fff;color:#333;border-color:#ddd}.theme-mixed .chat-input{background:#1a1a2e;color:#e8e8f0;border-color:#3a3a5c}.chat-input::placeholder{color:#6b6b8a}.theme-light .chat-input::placeholder{color:#999}.chat-input:focus{border-color:#667eea;box-shadow:0 0 0 3px #667eea1a}.chat-send-btn{padding:12px 24px;border:none;border-radius:25px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:all .3s ease;white-space:nowrap;box-shadow:0 4px 12px #667eea4d}.theme-red .chat-send-btn{background:linear-gradient(135deg,#ff6b6b,#c92a2a);box-shadow:0 4px 12px #ff6b6b4d}.theme-light .chat-send-btn{background:linear-gradient(135deg,#4c6ef5,#5f3dc4);box-shadow:0 4px 12px #4c6ef54d}.chat-send-btn:hover{transform:translateY(-2px);box-shadow:0 6px 16px #667eea66}.chat-send-btn:active{transform:translateY(0)}.chat-footer{padding:12px 20px;text-align:center;font-size:12px;color:#ffffff80;border-top:1px solid rgba(255,255,255,.05);background:#00000026;display:flex;align-items:center;justify-content:center;gap:4px}.theme-light .chat-footer{color:#444;background:#00000005;font-weight:600}.github-link{display:inline-flex;align-items:center;gap:4px;color:#667eea;text-decoration:none;font-weight:600;transition:all .2s ease;line-height:1}.github-link:hover{color:#764ba2;text-decoration:underline}.theme-red .github-link{color:#ff6b6b}.theme-red .github-link:hover{color:#c92a2a}.theme-light .github-link{color:#4c6ef5}.theme-light .github-link:hover{color:#5f3dc4}.github-icon{fill:currentColor;vertical-align:middle}@media(max-width:768px){.chat-panel{padding:10px;gap:8px}.ws-stages-container{display:none}.chat-subtitle-outer{font-size:11px;padding:6px 16px;letter-spacing:.3px}.chat-container{max-width:100%;height:95vh;border-radius:15px}.chat-header{padding:12px 16px}.chat-header-center{gap:8px}.chat-header-avatar{width:36px;height:36px;font-size:16px}.chat-header-name{font-size:14px}.users-counter{padding:5px 10px}.users-count{font-size:12px}.theme-toggle{width:36px;height:36px;font-size:18px}.chat-subtitle{padding:8px 16px;font-size:10px}.connection-status{padding:6px 16px}.status-indicator{font-size:10px}.latency-text{font-size:11px}.chat-messages{padding:16px;gap:12px}.message-wrapper{max-width:85%}.message-bubble{padding:10px 14px}.message-text{font-size:13px}.chat-input-area{padding:12px 16px}.chat-input{padding:10px 16px;font-size:13px}.chat-send-btn{padding:10px 20px;font-size:13px}.chat-footer{padding:10px 16px;font-size:10px}.github-icon{width:14px;height:14px}}@media(max-width:480px){.chat-subtitle-outer{font-size:10px;padding:5px 12px}.chat-header-name{display:none}.users-count{font-size:11px}.message-wrapper{max-width:90%}.chat-send-btn{padding:10px 16px}}.app{width:100%;height:100vh;display:flex;justify-content:center;align-items:center;transition:background-color .3s ease}.theme-dark{background:linear-gradient(135deg,#1a1a2e,#16213e)}.theme-red{background:linear-gradient(135deg,#2d1b1b,#4a1616)}.theme-light{background:linear-gradient(135deg,#f5f5f5,#e0e0e0)}.theme-mixed{background:linear-gradient(135deg,#1a1a2e,#4a1616,#16213e)}.error-screen{width:100%;height:100vh;display:flex;justify-content:center;align-items:center;background:linear-gradient(135deg,#2d1b1b,#1a1a2e)}.error-container{background:#ffffff0d;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.1);border-radius:20px;padding:40px;text-align:center;max-width:500px;box-shadow:0 8px 32px #0000004d}.error-container h1{color:#ff6b6b;margin-bottom:20px;font-size:2rem}.error-container p{color:#fff;margin-bottom:30px;font-size:1.1rem}.error-container button{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;padding:12px 30px;border-radius:25px;font-size:1rem;cursor:pointer;transition:transform .2s,box-shadow .2s}.error-container button:hover{transform:translateY(-2px);box-shadow:0 5px 15px #667eea66}@media(max-width:768px){.app{padding:10px}.error-container{padding:30px 20px;margin:20px}.error-container h1{font-size:1.5rem}.error-container p{font-size:1rem}}
