*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#0f0f0f;color:#e0e0e0;min-height:100vh}.app{max-width:900px;margin:0 auto;padding:2rem 1rem;text-align:center}h1{margin-bottom:2rem;font-size:1.8rem;color:#fff}h2{margin-bottom:1rem;font-size:1.2rem;color:#ccc}.lobby{display:flex;flex-direction:column;align-items:center;gap:1.5rem}.card{background:#1a1a2e;border-radius:12px;padding:2rem;width:100%;max-width:420px}.divider{color:#666;font-size:.9rem;text-transform:uppercase;letter-spacing:2px}input{width:100%;padding:.75rem 1rem;border:1px solid #333;border-radius:8px;background:#0f0f1a;color:#fff;font-size:1rem;margin-bottom:1rem;text-align:center;letter-spacing:2px;outline:none;transition:border-color .2s}input:focus{border-color:#4a6cf7}input::placeholder{color:#555;letter-spacing:normal}button{padding:.75rem 2rem;border:none;border-radius:8px;font-size:1rem;cursor:pointer;transition:background .2s,opacity .2s;background:#4a6cf7;color:#fff;font-weight:600}button:hover:not(:disabled){background:#3b5de7}button:disabled{opacity:.5;cursor:not-allowed}.btn-secondary{background:#333;color:#ccc}.btn-secondary:hover:not(:disabled){background:#444}.error{color:#f55;margin-top:1rem;font-size:.9rem}.status-banner{color:#ffb74d;font-size:.9rem;animation:pulse 2s infinite}.waiting .status-banner{margin-bottom:1rem}.warning{color:#ffcc80;background:#ffb74d1a;border:1px solid rgba(255,183,77,.3);border-radius:8px;padding:.6rem 1rem;font-size:.85rem;max-width:800px}.waiting{display:flex;flex-direction:column;align-items:center}.block-label{color:#888;font-size:.85rem;margin-bottom:.6rem}.share-block{padding-bottom:1.25rem;margin-bottom:1.25rem;border-bottom:1px solid #26263d}.link-input{padding:.6rem .75rem;font-size:.8rem;letter-spacing:0;color:#4a6cf7;cursor:pointer;margin-bottom:.5rem;text-overflow:ellipsis}.link-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem}.link-actions>button{flex:1 1 140px;padding:.55rem .75rem;font-size:.85rem;white-space:nowrap}.copy-btn{padding:.5rem 1rem;font-size:.85rem;white-space:nowrap;background:#2a2a3a;color:#e0e0e0}.copy-btn:hover:not(:disabled){background:#3a3a4a}.share-row{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem}.share-btn{display:flex;align-items:center;justify-content:center;padding:.5rem .25rem;border:1px solid #333;border-radius:8px;background:#0f0f1a;color:#ccc;font-family:inherit;font-size:.75rem;font-weight:600;white-space:nowrap;text-decoration:none;cursor:pointer;transition:background .2s,color .2s,border-color .2s}.share-btn:hover{background:#1f1f33;color:#fff}.share-btn.tg:hover{background:#229ed9;border-color:#229ed9;color:#fff}.share-btn.wa:hover{background:#25d366;border-color:#25d366;color:#0f0f1a}.key-block{margin-bottom:1.25rem}.key-display{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.5rem}.key{font-family:Courier New,monospace;font-size:1.25rem;font-weight:700;color:#4a6cf7;letter-spacing:2px;background:#0f0f1a;padding:.45rem .8rem;border-radius:8px;border:1px solid #333;-webkit-user-select:all;user-select:all}.hint{color:#888;font-size:.9rem;margin-bottom:1.5rem;animation:pulse 2s infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.4}}@media(max-width:460px){.card{padding:1.5rem 1.25rem}.share-row{grid-template-columns:repeat(2,1fr)}}.call{display:flex;flex-direction:column;align-items:center;gap:1.5rem}.videos{position:relative;width:100%;max-width:800px;aspect-ratio:16 / 9;background:#111;border-radius:12px;overflow:hidden}.video-container video{display:block;width:100%;height:100%;object-fit:cover}.remote-video-container{width:100%;height:100%;position:relative}.remote-video-container video{object-fit:contain;background:#000}.video-placeholder{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#666;font-size:1.1rem}.local-video-container{position:absolute;bottom:12px;right:12px;z-index:2;width:180px;aspect-ratio:4 / 3;border-radius:8px;overflow:hidden;border:2px solid #333;background:#000;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;box-shadow:0 4px 16px #00000080}.local-video-container.dragging{cursor:grabbing;border-color:#4a6cf7}.local-video-container video{pointer-events:none}.video-label{position:absolute;bottom:8px;left:8px;background:#0009;padding:2px 8px;border-radius:4px;font-size:.75rem;color:#ccc}.controls{display:flex;flex-wrap:wrap;justify-content:center;gap:1rem}.call-banners{display:flex;flex-direction:column;align-items:center;gap:.5rem}.call-banners:empty{display:none}.camera-switch{position:relative}.camera-menu{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);z-index:10;min-width:200px;list-style:none;padding:.35rem;background:#1a1a2e;border:1px solid #333;border-radius:10px;box-shadow:0 8px 24px #0009}.camera-menu button{width:100%;padding:.6rem .8rem;background:transparent;color:#e0e0e0;font-size:.9rem;font-weight:500;text-align:left;white-space:nowrap}.camera-menu button:hover:not(:disabled){background:#2a2a3a}.camera-menu button.current{color:#4a6cf7;font-weight:700}.camera-menu button.current:before{content:"✓ "}.saved-rooms ul,.stored-list{list-style:none;display:flex;flex-direction:column;gap:.5rem}.storage-card .block-label{margin-bottom:.75rem;line-height:1.4}.stored-list{margin-top:1rem}.saved-rooms li,.stored-list li{display:flex;align-items:center;gap:.5rem;padding:.5rem .5rem .5rem .75rem;background:#0f0f1a;border:1px solid #333;border-radius:8px;text-align:left}.saved-info{flex:1;min-width:0;display:flex;flex-direction:column}.saved-name{color:#fff;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.saved-key{color:#666;font-family:Courier New,monospace;font-size:.75rem}.saved-enter{padding:.5rem 1rem;font-size:.85rem}.saved-forget{padding:.5rem .7rem;font-size:.85rem}.saved-badge{color:#8fa4ff;font-size:.85rem;margin-bottom:1rem}.waiting .link-actions{justify-content:center}.waiting-preview{padding-bottom:1.25rem;margin-bottom:1.25rem;border-bottom:1px solid #26263d}.waiting-video{position:relative;margin-bottom:.75rem;border-radius:10px;overflow:hidden;background:#000}.waiting-video video{display:block;width:100%;max-height:38vh;object-fit:contain}.waiting-preview .controls{gap:.6rem}.waiting-preview .control-btn{width:46px;height:46px;font-size:1.25rem}.modal{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:1rem;background:#000000b3}.save-form .block-label{margin-bottom:1rem;line-height:1.4}.save-form input{letter-spacing:normal}.toast{position:fixed;top:calc(16px + env(safe-area-inset-top));left:50%;transform:translate(-50%);z-index:60;width:max-content;max-width:calc(100% - 32px);padding:.6rem 1rem;background:#1a1a2e;border:1px solid #4a6cf7;border-radius:8px;color:#e0e0e0;font-size:.9rem;box-shadow:0 8px 24px #0009}.recordings{position:fixed;top:calc(64px + env(safe-area-inset-top));left:50%;transform:translate(-50%);z-index:55;width:max-content;max-width:calc(100% - 32px);display:flex;flex-direction:column;gap:.5rem}.recording-item{display:flex;align-items:center;gap:.75rem;padding:.5rem .5rem .5rem 1rem;background:#1a1a2e;border:1px solid #2e7d32;border-radius:8px;box-shadow:0 8px 24px #0009;font-size:.85rem;text-align:left}.recording-name{min-width:0;overflow-wrap:anywhere}.recording-item a{flex-shrink:0;color:#8fa4ff;font-weight:600}.recording-item button{flex-shrink:0;padding:.3rem .6rem;font-size:.85rem}.call.expanded{position:fixed;inset:0;z-index:5;gap:0;background:#000}.call.expanded .call-banners{position:absolute;top:calc(12px + env(safe-area-inset-top));left:12px;right:12px;z-index:3}.call.expanded .status-banner{background:#000000a6;padding:.4rem .8rem;border-radius:8px}.call.expanded .warning{background:#281e0ae6}.call.expanded .videos{flex:1;max-width:none;aspect-ratio:auto;border-radius:0;background:#000}.call.expanded .local-video-container{top:calc(12px + env(safe-area-inset-top));bottom:auto;right:12px}.call.expanded .controls{position:absolute;left:0;right:0;bottom:0;z-index:4;padding:1.5rem .5rem calc(16px + env(safe-area-inset-bottom));background:linear-gradient(transparent,#000000b3)}@media(max-width:768px){.app.in-call{padding:0;max-width:none}.app.in-call h1,.remote-video-container .video-label{display:none}.local-video-container{width:28vw;max-width:140px;min-width:90px}.call .controls{gap:min(.6rem,1vw)}.controls .control-btn{width:min(46px,8.6vw);height:min(46px,8.6vw);font-size:min(1.2rem,4.8vw)}}.control-btn{width:56px;height:56px;border-radius:50%;font-size:1.5rem;display:flex;align-items:center;justify-content:center;padding:0;background:#2a2a3a}.control-btn:hover{background:#3a3a4a}.control-btn svg{width:1em;height:1em;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.control-btn.active{background:#c00}.control-btn.sharing{background:#2e7d32}.control-btn.effect{background:#3949ab}.control-btn svg .filled{fill:currentColor;stroke:none}.control-btn .rec-dot{color:#f44336}.control-btn.recording{background:#c00}.chat-btn{position:relative}.chat-btn .unread{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#f44336;color:#fff;font-size:.7rem;font-weight:700;line-height:20px}.rec-badges{position:absolute;top:12px;left:12px;z-index:3;display:flex;flex-direction:column;align-items:flex-start;gap:6px;pointer-events:none}.call.expanded .rec-badges{top:calc(12px + env(safe-area-inset-top))}.rec-badge{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:6px;background:#000000a6;color:#fff;font-size:.8rem;font-variant-numeric:tabular-nums;white-space:nowrap}.rec-badge:before{content:"";width:8px;height:8px;border-radius:50%;background:#f44336;animation:pulse 1.5s infinite}.chat-panel{position:fixed;top:0;right:0;bottom:0;z-index:30;width:min(380px,100%);display:flex;flex-direction:column;background:#14142a;border-left:1px solid #2a2a40;box-shadow:-8px 0 24px #00000080;text-align:left;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}@media(min-width:769px){.app.chat-open{margin-right:380px}.app.chat-open .call.expanded{right:380px}}.chat-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-bottom:1px solid #2a2a40;font-weight:600;color:#fff}.chat-close{padding:.3rem .6rem;background:transparent;color:#aaa;font-size:1rem}.chat-close:hover:not(:disabled){background:#2a2a3a}.chat-storage{display:flex;align-items:center;gap:.5rem;padding:.4rem 1rem;border-bottom:1px solid #2a2a40;color:#999;font-size:.75rem;line-height:1.3}.chat-storage span{flex:1;min-width:0;overflow-wrap:anywhere}.chat-storage button{flex-shrink:0;padding:.25rem .6rem;background:#2a2a3a;font-size:.75rem}.chat-list{flex:1;overflow-y:auto;padding:.75rem;display:flex;flex-direction:column;gap:.5rem}.chat-empty{margin:auto 0;color:#777;font-size:.85rem;text-align:center;line-height:1.4}.chat-msg{max-width:85%;padding:.45rem .7rem .3rem;border-radius:10px;background:#24243a;align-self:flex-start;overflow-wrap:anywhere}.chat-msg.me{align-self:flex-end;background:#2f3f8f}.chat-text{white-space:pre-wrap;font-size:.95rem;line-height:1.35}.chat-time{display:block;margin-top:2px;color:#999;font-size:.7rem;text-align:right}.chat-file{display:flex;flex-direction:column;gap:4px;min-width:180px}.chat-image img{display:block;max-width:100%;max-height:220px;border-radius:6px}.chat-file-row{display:flex;gap:.5rem;align-items:baseline;justify-content:space-between}.chat-file-name{font-size:.9rem;font-weight:600}.chat-file-size{flex-shrink:0;color:#aaa;font-size:.75rem}.chat-file progress{width:100%;height:6px}.chat-file-status{color:#aaa;font-size:.75rem}.chat-file-status:empty{display:none}.chat-file-status.failed{color:#f77}.chat-download{align-self:flex-start;padding:.3rem .8rem;border-radius:6px;background:#4a6cf7;color:#fff;font-size:.85rem;font-weight:600;text-decoration:none}.chat-form{display:flex;align-items:flex-end;gap:.4rem;padding:.6rem;border-top:1px solid #2a2a40}.chat-form textarea{flex:1;min-height:40px;max-height:120px;padding:.55rem .75rem;border:1px solid #333;border-radius:8px;background:#0f0f1a;color:#fff;font:inherit;font-size:.95rem;resize:none;outline:none;field-sizing:content}.chat-form textarea:focus{border-color:#4a6cf7}.chat-attach,.chat-send{flex-shrink:0;width:40px;height:40px;padding:0;font-size:1.1rem}.chat-attach{background:#2a2a3a}.chat-drop{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#4a6cf740;border:2px dashed #4a6cf7;color:#fff;font-weight:600;pointer-events:none}.control-btn.hangup{background:#d32f2f;transform:rotate(135deg)}.control-btn.hangup:hover{background:#b71c1c}
