:root{--bg-primary:#fff;--bg-secondary:#fafafa;--bg-tertiary:#f5f5f5;--bg-input:#f5f5f5;--bg-input-focus:#fff;--bg-accent:#171717;--bg-accent-hover:#404040;--text-primary:#171717;--text-secondary:#525252;--text-muted:#737373;--text-placeholder:#a3a3a3;--text-inverse:#fff;--border-primary:#e5e5e5;--border-secondary:#d4d4d4;--success:#22c55e;--success-bg:#dcfce7;--success-text:#16a34a;--danger:#dc2626;--shadow-sm:0 1px 2px #0000000d;--shadow-md:0 4px 24px #00000014;--scrollbar-track:transparent;--scrollbar-thumb:#d4d4d4}@media (prefers-color-scheme:dark){:root{--bg-primary:#0a0a0a;--bg-secondary:#111;--bg-tertiary:#1a1a1a;--bg-input:#1a1a1a;--bg-input-focus:#0a0a0a;--bg-accent:#fff;--bg-accent-hover:#e5e5e5;--text-primary:#fafafa;--text-secondary:#a3a3a3;--text-muted:#737373;--text-placeholder:#525252;--text-inverse:#0a0a0a;--border-primary:#262626;--border-secondary:#404040;--success:#22c55e;--success-bg:#052e16;--success-text:#4ade80;--danger:#ef4444;--shadow-sm:0 1px 2px #0000004d;--shadow-md:0 4px 24px #0006;--scrollbar-track:transparent;--scrollbar-thumb:#404040}}.chat-container{background:var(--bg-secondary);flex-direction:column;width:100vw;height:100dvh;display:flex;position:fixed;top:0;left:0;overflow:hidden}.chat-header{background:var(--bg-primary);border-bottom:1px solid var(--border-primary);z-index:10;flex-shrink:0;justify-content:space-between;align-items:center;padding:1rem 1.5rem;display:flex}.chat-title{color:var(--text-primary);letter-spacing:-.02em;font-size:1.125rem;font-weight:600}.status-dot{background:var(--success);border-radius:50%;width:8px;height:8px;margin-left:.75rem;animation:2s ease-in-out infinite pulse;display:inline-block}.status-dot.disconnected{background:var(--text-muted);animation:none}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.chat-messages{flex-direction:column;flex:1;gap:1rem;padding:1.5rem;display:flex;overflow-y:auto}.chat-messages::-webkit-scrollbar{width:6px}.chat-messages::-webkit-scrollbar-track{background:var(--scrollbar-track)}.chat-messages::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:3px}.message-wrapper{align-items:flex-end;gap:.5rem;animation:.25s ease-out messageIn;display:flex;position:relative}@keyframes messageIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.message-wrapper.sent{justify-content:flex-end}.message-wrapper.received{justify-content:flex-start}.message-bubble{word-wrap:break-word;border-radius:16px;max-width:70%;padding:.75rem 1rem;position:relative}.message-wrapper.sent .message-bubble{background:var(--bg-accent);color:var(--text-inverse);border-bottom-right-radius:4px}.message-wrapper.received .message-bubble{background:var(--bg-primary);color:var(--text-primary);border:1px solid var(--border-primary);border-bottom-left-radius:4px}.message-text{font-size:.9375rem;line-height:1.5}.message-menu-button{color:var(--text-muted);cursor:pointer;opacity:0;background:0 0;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-self:center;align-items:center;padding:4px;transition:all .15s;display:flex}.message-wrapper:hover .message-menu-button,.message-wrapper:focus-within .message-menu-button{opacity:.6}.message-menu-button:hover{opacity:1;color:var(--text-primary)}.context-menu-backdrop{z-index:50;background:0 0;position:fixed;inset:0}.context-menu{background:var(--bg-primary);border:1px solid var(--border-primary);min-width:160px;box-shadow:var(--shadow-md);z-index:60;border-radius:12px;padding:.375rem;position:fixed}.context-menu-item{text-align:left;width:100%;color:var(--text-primary);cursor:pointer;background:0 0;border:none;border-radius:8px;padding:.5rem .75rem;font-size:.875rem;transition:background .15s}.context-menu-item:hover{background:var(--bg-tertiary)}.context-menu-item.copied{color:var(--success)}.context-menu-item.cancel-item{color:var(--text-muted)}.chat-input-container{background:var(--bg-primary);border-top:1px solid var(--border-primary);padding:1rem 1.5rem;padding-bottom:max(1rem,env(safe-area-inset-bottom));z-index:10;flex-shrink:0}.input-wrapper{gap:.75rem;max-width:900px;margin:0 auto;display:flex}.chat-input{background:var(--bg-input);color:var(--text-primary);border:1px solid #0000;border-radius:24px;outline:none;flex:1;min-height:48px;padding:.875rem 1.25rem;font-family:inherit;font-size:.9375rem;transition:all .15s}.chat-input:focus{background:var(--bg-input-focus);border-color:var(--text-primary)}.chat-input::placeholder{color:var(--text-placeholder)}.send-button{background:var(--bg-accent);color:var(--text-inverse);cursor:pointer;border:none;border-radius:24px;min-height:48px;padding:.875rem 1.75rem;font-size:.9375rem;font-weight:500;transition:all .15s}.send-button:hover{background:var(--bg-accent-hover)}.send-button:active{transform:scale(.98)}.end-button{border:1px solid var(--border-primary);color:var(--text-muted);cursor:pointer;background:0 0;border-radius:8px;padding:.625rem 1.25rem;font-size:.875rem;font-weight:500;transition:all .15s}.end-button:hover{border-color:var(--danger);color:var(--danger)}@media (min-width:1024px){.chat-header{padding:1.25rem 2rem}.chat-title{font-size:1.25rem}.chat-messages{width:100%;max-width:900px;margin:0 auto;padding:2rem}.message-bubble{max-width:60%}.chat-input-container{padding:1.25rem 2rem}}@media (min-width:768px) and (max-width:1023px){.chat-messages{padding:1.5rem}.message-bubble{max-width:72%}}@media (max-width:479px){.chat-header{padding:.875rem 1rem}.chat-title{font-size:1rem}.chat-messages{gap:.75rem;padding:1rem .75rem .5rem}.message-bubble{border-radius:14px;max-width:85%;padding:.625rem .875rem}.message-text{font-size:.875rem}.chat-input-container{padding:.75rem 1rem;padding-bottom:max(.75rem,env(safe-area-inset-bottom))}.input-wrapper{gap:.5rem}.chat-input{border-radius:20px;min-height:44px;padding:.75rem 1rem;font-size:16px}.send-button{border-radius:20px;min-height:44px;padding:.75rem 1.25rem;font-size:.875rem}.end-button{padding:.5rem 1rem;font-size:.8125rem}}.setup-container{background:var(--bg-primary);width:100vw;height:100dvh;color:var(--text-primary);flex-direction:column;justify-content:center;align-items:center;padding:2rem 1.5rem;font-family:inherit;display:flex;position:fixed;top:0;left:0;overflow-y:auto}.setup-content{z-index:1;width:100%;max-width:420px;animation:.5s ease-out fadeIn;position:relative}@keyframes fadeIn{0%{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}.logo-section{text-align:center;margin-bottom:3rem}.main-title{color:var(--text-primary);letter-spacing:-.03em;margin-bottom:.5rem;font-size:clamp(2rem,6vw,2.75rem);font-weight:700}.subtitle{color:var(--text-muted);font-size:.9375rem;font-weight:400}.card{background:var(--bg-primary);border:1px solid var(--border-primary);border-radius:16px;margin-bottom:1.5rem;padding:1.75rem}.button-group{flex-direction:column;gap:.75rem;display:flex}.primary-button{cursor:pointer;border:none;border-radius:12px;width:100%;padding:1rem;font-family:inherit;font-size:1rem;font-weight:500;transition:all .15s}.primary-button:active{transform:scale(.98)}.primary-button span{z-index:1;position:relative}.create-button{background:var(--bg-accent);color:var(--text-inverse)}.create-button:hover{background:var(--bg-accent-hover)}.join-button{background:var(--bg-tertiary);color:var(--text-primary);border:1px solid var(--border-primary)}.join-button:hover{background:var(--border-primary)}.pin-display{text-align:center;margin:2rem 0}.pin-number{color:var(--text-primary);letter-spacing:.25em;font-variant-numeric:tabular-nums;margin-bottom:.5rem;font-size:clamp(2.5rem,10vw,3.5rem);font-weight:700}.pin-label{color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;font-size:.875rem;font-weight:500}.status-text{white-space:pre-line;color:var(--text-secondary);text-align:center;font-size:.875rem;line-height:1.6}.input-field{background:var(--bg-secondary);border:1px solid var(--border-primary);width:100%;color:var(--text-primary);border-radius:10px;outline:none;min-height:48px;margin-bottom:.75rem;padding:.875rem 1rem;font-family:inherit;font-size:.9375rem;transition:all .15s}.input-field:focus{background:var(--bg-primary);border-color:var(--text-primary)}.input-field::placeholder{color:var(--text-placeholder)}.secondary-button{border:1px solid var(--border-primary);width:100%;color:var(--text-muted);cursor:pointer;background:0 0;border-radius:10px;min-height:44px;margin-top:1rem;padding:.875rem;font-family:inherit;font-size:.875rem;font-weight:500;transition:all .15s}.secondary-button:hover{border-color:var(--border-secondary);color:var(--text-primary)}.section-title{text-align:center;color:var(--text-primary);letter-spacing:-.02em;margin-bottom:1.5rem;font-size:1.25rem;font-weight:600}.hint-text{text-align:center;color:var(--text-placeholder);margin-top:1rem;font-size:.8125rem}.footer-text{text-align:center;color:var(--text-muted);margin-top:2rem;font-size:.8125rem}.heart{color:#ef4444;animation:1.2s ease-in-out infinite heartbeat;display:inline-block}@keyframes heartbeat{0%,to{transform:scale(1)}50%{transform:scale(1.15)}}.flex-center{align-items:center;display:flex}.status-text-margin{margin-bottom:1.25rem}@media (min-width:1024px){.setup-container{padding:3rem 2rem}.setup-content{max-width:460px}.card{border-radius:20px;padding:2rem}.main-title{font-size:2.5rem}.primary-button{padding:1.125rem;font-size:1rem}.pin-number{font-size:3.5rem}}@media (max-width:479px){.setup-container{justify-content:flex-start;padding:2.5rem 1rem 1.5rem}.setup-content{max-width:100%}.card{border-radius:14px;margin-bottom:1rem;padding:1.25rem}.logo-section{margin-bottom:2rem}.main-title{font-size:clamp(1.75rem,5vw,2.25rem)}.subtitle{font-size:.875rem}.primary-button{border-radius:10px;padding:.875rem;font-size:.9375rem}.pin-number{letter-spacing:.2em;font-size:clamp(2rem,8vw,2.75rem)}.pin-label{font-size:.75rem}.status-text{font-size:.8125rem}.input-field{border-radius:8px;margin-bottom:.625rem;padding:.75rem .875rem;font-size:16px}.secondary-button{border-radius:8px;margin-top:.75rem;padding:.75rem;font-size:.8125rem}.section-title{margin-bottom:1.25rem;font-size:1.125rem}.hint-text{font-size:.75rem}}.attach-button{background:var(--bg-tertiary);color:var(--text-muted);cursor:pointer;border:1px solid #0000;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;min-height:48px;padding:.875rem 1rem;font-size:1.25rem;transition:all .15s;display:flex}.attach-button:hover{background:var(--border-primary);color:var(--text-primary)}.attach-button:active{transform:scale(.98)}.file-message{background:var(--bg-secondary);border:1px solid var(--border-primary);cursor:pointer;border-radius:12px;flex-direction:column;gap:.625rem;min-width:220px;padding:.75rem;transition:all .15s;display:flex}.file-preview{border-radius:8px;flex-shrink:0;width:100%;max-height:200px;overflow:hidden}.file-image{cursor:pointer;object-fit:cover;width:100%;height:auto;max-height:200px;transition:opacity .15s;display:block}.file-image:hover{opacity:.9}.file-info{align-items:flex-start;gap:.75rem;padding:.375rem 0;display:flex}.file-icon-large{background:var(--bg-tertiary);color:var(--text-muted);border-radius:6px;flex-shrink:0;padding:.5rem;font-size:.75rem;font-weight:600}.file-details{flex:1;min-width:0}.file-name{word-break:break-word;color:var(--text-primary);margin-bottom:.125rem;font-size:.875rem;font-weight:500}.file-size{color:var(--text-muted);font-size:.75rem}.file-download-btn{background:var(--bg-accent);color:var(--text-inverse);cursor:pointer;border:none;border-radius:8px;width:100%;min-height:36px;padding:.5rem 1rem;font-size:.8125rem;font-weight:500;transition:all .15s}.file-download-btn:hover{background:var(--bg-accent-hover)}.file-download-btn:active{transform:scale(.98)}.upload-progress{background:var(--bg-primary);border:1px solid var(--border-primary);border-radius:12px;margin:.5rem 0;padding:1rem;animation:.25s ease-out slideIn}@keyframes slideIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.upload-info{color:var(--text-primary);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.75rem;margin-bottom:.625rem;font-size:.8125rem;display:flex}.progress-bar{background:var(--border-primary);border-radius:2px;height:4px;overflow:hidden}.progress-fill{background:var(--bg-accent);border-radius:2px;height:100%;transition:width .2s}@media (min-width:1024px){.file-message{flex-direction:row;gap:1rem;min-width:300px;padding:1rem}.file-preview{flex-shrink:0;width:100px;height:100px}.file-image{max-height:100px}.upload-progress{min-width:280px}}@media (max-width:479px){.file-message{border-radius:10px;min-width:180px;padding:.625rem}.file-preview,.file-image{max-height:140px}.file-icon-large{padding:.375rem;font-size:.625rem}.file-info{gap:.5rem}.file-name{font-size:.8125rem}.file-size{font-size:.6875rem}.file-download-btn{min-height:32px;padding:.4375rem .875rem;font-size:.75rem}.attach-button{border-radius:10px;min-height:44px;padding:.75rem;font-size:1.125rem}.upload-progress{min-width:160px;padding:.75rem}.upload-info{margin-bottom:.5rem;font-size:.75rem}.progress-bar{height:3px}}
