:root { --bg:#09090b; --panel:#111114; --panel2:#18181c; --line:#27272d; --text:#f4f4f5; --muted:#8b8b95; --red:#e5484d; --red2:#ff5b61; --green:#55c48b; }
* { box-sizing:border-box; }
html, body { margin:0; width:100%; height:100%; overflow:hidden; font-family:Inter,Segoe UI,sans-serif; background:var(--bg); color:var(--text); }
button,input,textarea { font:inherit; }
button { color:inherit; }
.shell { width:100vw; height:100vh; background:radial-gradient(circle at 78% 22%,rgba(229,72,77,.09),transparent 34%),var(--bg); }
.titlebar { height:44px; display:flex; justify-content:space-between; align-items:center; padding-left:16px; background:rgba(9,9,11,.92); border-bottom:1px solid #18181b; -webkit-app-region:drag; }
.brand { display:flex; align-items:center; gap:9px; font-size:13px; font-weight:700; letter-spacing:.2px; }.brand img{width:25px;height:25px;object-fit:contain}.window-actions{-webkit-app-region:no-drag;height:100%;display:flex}.window-actions button{width:46px;border:0;background:transparent;color:#85858e;font-size:17px;transition:.2s}.window-actions button:hover{background:#242428;color:white}.window-actions .danger:hover{background:#c42b32}
.hidden{display:none!important}.auth-view{height:calc(100vh - 44px);display:grid;place-items:center;padding:28px}.auth-card{width:min(430px,100%);padding:32px 38px;border:1px solid var(--line);border-radius:28px;background:rgba(19,19,23,.78);box-shadow:0 30px 80px rgba(0,0,0,.45);backdrop-filter:blur(20px);animation:rise .65s cubic-bezier(.16,1,.3,1)}
.hero-logo{display:block;width:72px;height:72px;object-fit:contain;margin:0 auto 18px;filter:drop-shadow(0 8px 28px rgba(229,72,77,.28))}.eyebrow{text-align:center;font-size:10px;letter-spacing:3px;color:var(--red2);font-weight:800}.auth-card h1{text-align:center;margin:8px 0 10px;font-size:32px;line-height:1.12}.auth-card h1 span{color:var(--red2)}.sub{text-align:center;color:var(--muted);font-size:14px;line-height:1.55;margin:0 auto 22px;max-width:330px}
label{display:block;color:#a1a1aa;font-size:11px;font-weight:700;margin-top:12px}input,textarea{width:100%;border:1px solid var(--line);outline:0;color:var(--text);background:#0d0d10;transition:border-color .2s,box-shadow .2s,transform .2s}label input{margin-top:7px;padding:12px 14px;border-radius:12px}input:focus,textarea:focus{border-color:rgba(229,72,77,.8);box-shadow:0 0 0 4px rgba(229,72,77,.1)}.primary{width:100%;margin-top:18px;padding:13px;border:0;border-radius:13px;background:linear-gradient(135deg,var(--red),#bd2530);font-weight:800;box-shadow:0 9px 24px rgba(205,43,52,.22);transition:.25s}.primary:hover{transform:translateY(-2px);filter:brightness(1.08)}.primary:active{transform:scale(.98)}.link{display:block;margin:13px auto 0;border:0;background:none;color:#a5a5ad;font-size:12px}.link:hover{color:white}.error{height:15px;text-align:center;color:#ff7479;font-size:12px;margin:8px 0 -8px}
.app-view{height:calc(100vh - 44px);display:grid;grid-template-columns:300px 1fr;animation:fade .4s ease}aside{padding:18px 14px;border-right:1px solid var(--line);background:rgba(15,15,18,.8)}.profile{display:flex;align-items:center;gap:11px;padding:6px 7px 19px}.profile>div:nth-child(2){min-width:0;flex:1}.profile strong,.profile small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile small{margin-top:4px;color:var(--muted);font-size:11px}.profile small i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:5px}.profile button{border:0;background:transparent;color:var(--muted);font-size:20px}.avatar{display:grid;place-items:center;width:42px;height:42px;flex:none;border-radius:15px;background:linear-gradient(145deg,#e5484d,#78161e);font-weight:800;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}.avatar.small{width:38px;height:38px;border-radius:13px}.search{position:relative}.search span{position:absolute;left:13px;top:9px;color:var(--muted);font-size:20px}.search input{border-radius:13px;padding:11px 12px 11px 39px}.section-label{margin:22px 10px 8px;color:#65656d;font-size:10px;font-weight:800;letter-spacing:1.5px}.users{display:flex;flex-direction:column;gap:5px}.user{display:flex;align-items:center;gap:11px;width:100%;padding:10px;border:0;border-radius:15px;background:transparent;text-align:left;transition:.22s}.user:hover,.user.active{background:var(--panel2);transform:translateX(3px)}.user .avatar{width:36px;height:36px;border-radius:12px}.user span{flex:1}.dot{width:7px;height:7px!important;flex:none!important;border-radius:50%;background:#45454d}.dot.online{background:var(--green);box-shadow:0 0 0 3px rgba(85,196,139,.12)}
.chat{min-width:0;position:relative}.empty-state{height:100%;display:grid;place-content:center;text-align:center;color:var(--muted)}.empty-state img{width:105px;height:105px;object-fit:contain;margin:auto;opacity:.6;filter:grayscale(.35)}.empty-state h2{color:#ddd;margin:20px 0 7px}.empty-state p{margin:0;font-size:14px}.chat-content{height:100%;display:grid;grid-template-rows:67px 1fr auto}.chat-header{display:flex;align-items:center;gap:11px;padding:13px 24px;border-bottom:1px solid var(--line);background:rgba(13,13,16,.7);backdrop-filter:blur(18px)}.chat-header strong,.chat-header small{display:block}.chat-header small{font-size:11px;color:var(--muted);margin-top:3px}.messages{overflow-y:auto;padding:25px 28px;display:flex;flex-direction:column;gap:7px;scroll-behavior:smooth}.message{max-width:68%;padding:11px 14px;border-radius:18px 18px 18px 6px;background:var(--panel2);font-size:14px;line-height:1.45;animation:pop .28s cubic-bezier(.2,.8,.2,1);word-break:break-word}.message.mine{align-self:flex-end;border-radius:18px 18px 6px 18px;background:linear-gradient(135deg,#cc3540,#9c202b)}.message time{display:block;margin-top:5px;color:rgba(255,255,255,.46);font-size:9px;text-align:right}.composer{display:flex;align-items:flex-end;gap:10px;margin:0 24px 22px;padding:7px 8px 7px 16px;border:1px solid var(--line);border-radius:20px;background:#111115;transition:.2s}.composer:focus-within{border-color:#603034;box-shadow:0 10px 35px rgba(0,0,0,.25)}.composer textarea{resize:none;max-height:120px;padding:10px 0;border:0;background:transparent;box-shadow:none;line-height:1.45}.composer button{width:42px;height:42px;border:0;border-radius:14px;background:var(--red);transition:.2s}.composer button:hover{transform:scale(1.06) rotate(-4deg);background:var(--red2)}
::-webkit-scrollbar{width:7px}::-webkit-scrollbar-thumb{background:#29292f;border-radius:9px}@keyframes rise{from{opacity:0;transform:translateY(18px) scale(.98)}to{opacity:1;transform:none}}@keyframes fade{from{opacity:0}to{opacity:1}}@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.97)}to{opacity:1;transform:none}}
@media(max-width:950px){.app-view{grid-template-columns:250px 1fr}.auth-card{padding:25px}.message{max-width:80%}}
.icon-sprite{position:absolute;width:0;height:0;overflow:hidden}.icon-button svg,.header-action svg,.composer button svg,.call-control svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.header-action svg,.call-control svg{width:22px;height:22px}.profile .icon-button{display:grid;place-items:center;width:32px;height:32px;border-radius:10px}.profile .icon-button:hover{background:#24242a;color:white}.composer .attach{font-size:initial}
.modal-backdrop{position:fixed;z-index:40;inset:44px 0 0;display:grid;place-items:center;padding:24px;background:rgba(0,0,0,.7);backdrop-filter:blur(12px);animation:fade .22s ease}.settings-card{width:min(470px,100%);padding:26px;border:1px solid #303037;border-radius:26px;background:#141418;box-shadow:0 30px 90px #000;animation:rise .35s cubic-bezier(.16,1,.3,1)}.settings-card header{display:flex;align-items:flex-start;justify-content:space-between}.settings-card h2{margin:3px 0 18px;font-size:25px}.settings-card .eyebrow{text-align:left;margin:0}.settings-card .icon-button{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:#1d1d22}.settings-card label{margin-top:16px}.settings-card select{width:100%;margin-top:7px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;outline:0;background:#0d0d10;color:var(--text)}.settings-card select:focus{border-color:var(--red)}.meter{height:7px;margin:11px 1px;border-radius:10px;background:#25252b;overflow:hidden}.meter i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#58c78d,#f0b35a,#e5484d);transition:width .08s}.secondary{width:100%;padding:11px;border:1px solid #33333a;border-radius:12px;background:#202026;color:#ddd}.secondary:hover{background:#292930}.audio-hint{min-height:34px;color:var(--muted);font-size:12px;line-height:1.45}
.back-button{display:none;width:40px;height:40px;border:0;border-radius:13px;background:#1b1b20;color:#ddd;font-size:30px;line-height:1}.web-client .titlebar{display:none}.web-client .app-view,.web-client .auth-view{height:100vh;height:100dvh}.web-client .call-overlay,.web-client .modal-backdrop{inset:0}
@media(max-width:700px){
  html,body,.shell{height:100%;height:100dvh}.titlebar{height:40px}.brand span{font-size:12px}.window-actions button{width:40px}.app-view{height:calc(100dvh - 40px);display:block}.app-view aside{height:100%;border:0;padding:14px 12px}.app-view .chat{display:none;height:100%}.app-view.chat-open aside{display:none}.app-view.chat-open .chat{display:block}.back-button{display:grid;place-items:center}.profile{padding:4px 5px 15px}.profile .avatar{width:40px;height:40px}.search input{padding-top:13px;padding-bottom:13px}.user{min-height:58px}.chat-content{grid-template-rows:64px 1fr auto}.chat-header{padding:10px 12px;gap:9px}.messages{padding:16px 12px;gap:8px}.message{max-width:86%;padding:10px 12px}.composer{margin:0 10px calc(10px + env(safe-area-inset-bottom));border-radius:18px}.composer textarea{font-size:16px}.composer button{width:40px;height:40px}.empty-state{padding:24px}.auth-view{height:calc(100dvh - 40px);padding:14px;overflow:auto}.web-client .auth-view{height:100dvh}.auth-card{padding:24px 20px;border-radius:24px}.hero-logo{width:58px;height:58px;margin-bottom:12px}.auth-card h1{font-size:27px}.sub{font-size:13px;margin-bottom:16px}.call-overlay{inset:40px 0 0}.web-client .call-overlay{inset:0}.call-overlay video#localVideo{right:12px;bottom:100px;width:120px;border-radius:14px}.call-actions{bottom:calc(18px + env(safe-area-inset-bottom));gap:9px}.call-control{width:52px;height:52px;border-radius:17px}.call-avatar{width:82px;height:82px}.call-info h2{font-size:24px}.modal-backdrop{inset:40px 0 0;padding:12px;align-items:end}.web-client .modal-backdrop{inset:0}.settings-card{padding:22px 18px calc(20px + env(safe-area-inset-bottom));border-radius:25px 25px 0 0;max-height:92dvh;overflow:auto}.settings-card select{font-size:16px}.image-attachment{max-width:72vw}.attachment-card b{max-width:180px}
}
.call-overlay video#remoteVideo{opacity:0;transition:opacity .25s ease}.call-overlay video#remoteVideo.screen-active{opacity:1}
.image-link{display:block;margin-top:7px;border-radius:15px;overflow:hidden;background:#0a0a0c;line-height:0}.image-attachment{display:block;width:auto;max-width:min(560px,65vw);height:auto;max-height:62vh;margin:0;border-radius:15px;object-fit:contain}.message:has(.image-link){padding:6px;background:#19191d}.message.mine:has(.image-link){background:linear-gradient(135deg,#cc3540,#9c202b)}
.splash{position:fixed;z-index:100;inset:0;display:grid;place-content:center;justify-items:center;background:#08080a;overflow:hidden;transition:opacity .65s ease,visibility .65s}.splash.done{opacity:0;visibility:hidden}.splash-glow{position:absolute;left:50%;top:50%;width:460px;height:460px;transform:translate(-50%,-50%) scale(.5);border-radius:50%;background:radial-gradient(circle,rgba(229,72,77,.22),rgba(229,72,77,.04) 38%,transparent 70%);animation:splashGlow 1.8s cubic-bezier(.16,1,.3,1) forwards}.splash img{position:relative;width:108px;height:108px;object-fit:contain;opacity:0;filter:drop-shadow(0 14px 40px rgba(229,72,77,.35));animation:splashLogo 1.25s .12s cubic-bezier(.16,1,.3,1) forwards}.splash-word{position:relative;margin-top:22px;font-size:15px;font-weight:900;letter-spacing:5px;opacity:0;transform:translateY(8px);animation:splashText .7s .72s ease forwards}.splash-word span{color:var(--red2)}.splash-line{position:relative;width:150px;height:2px;margin-top:18px;border-radius:5px;background:#222228;overflow:hidden;opacity:0;animation:splashText .4s .9s ease forwards}.splash-line i{display:block;width:45%;height:100%;border-radius:inherit;background:linear-gradient(90deg,transparent,var(--red2),transparent);animation:splashLoad 1s .9s ease-in-out infinite}
@keyframes splashLogo{0%{opacity:0;transform:scale(.55) rotate(-8deg)}55%{opacity:1;transform:scale(1.08) rotate(2deg)}100%{opacity:1;transform:scale(1) rotate(0)}}@keyframes splashGlow{to{transform:translate(-50%,-50%) scale(1)}}@keyframes splashText{to{opacity:1;transform:none}}@keyframes splashLoad{from{transform:translateX(-110%)}to{transform:translateX(330%)}}
@media(max-width:700px){.image-attachment{max-width:76vw;max-height:52vh}.splash img{width:88px;height:88px}.splash-glow{width:320px;height:320px}}
.side-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:0 0 14px;padding:4px;border-radius:14px;background:#0b0b0e}.side-tabs button{padding:9px 6px;border:0;border-radius:10px;background:transparent;color:#777780;font-size:11px;font-weight:800;transition:.2s}.side-tabs button.active{background:#242429;color:#fff;box-shadow:0 4px 12px rgba(0,0,0,.25)}.create-room{width:100%;padding:12px;border:1px solid #3a2529;border-radius:13px;background:rgba(229,72,77,.09);color:#ff7278;font-weight:800}.create-room:hover{background:rgba(229,72,77,.16)}.room-item span{display:flex;min-width:0;flex-direction:column}.room-item span small{margin-top:3px;color:var(--muted);font-size:10px}.room-item .avatar{font-size:15px;background:linear-gradient(145deg,#28282e,#151519)}
.room-view{height:100%;display:grid;grid-template-rows:70px 1fr 96px;background:radial-gradient(circle at 50% 42%,rgba(229,72,77,.1),transparent 35%)}.room-view>header{display:flex;align-items:center;gap:12px;padding:12px 24px;border-bottom:1px solid var(--line)}.room-view h2{margin:2px 0 0}.room-view .eyebrow{text-align:left;margin:0}.room-stage{display:grid;place-content:center;justify-items:center;text-align:center}.room-orbit{padding:24px;border:1px solid rgba(229,72,77,.16);border-radius:42px;box-shadow:0 0 80px rgba(229,72,77,.1)}.room-stage h3{margin:22px 0 5px}.room-stage>p{margin:0;color:var(--muted);font-size:13px}.room-members{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;max-width:520px;margin-top:22px}.room-members span{padding:7px 11px;border:1px solid var(--line);border-radius:20px;background:#17171b;font-size:11px}.room-controls{display:flex;justify-content:center;align-items:center;gap:12px}.toggle-row{display:flex!important;align-items:center;gap:9px}.toggle-row input{width:18px;height:18px;margin:0;accent-color:var(--red)}
@media(max-width:700px){.side-tabs{margin-bottom:12px}.room-view{grid-template-rows:64px 1fr 84px}.room-view>header{padding:10px 12px}.room-view .back-button{display:grid}.room-orbit{padding:18px}.room-members{padding:0 16px}.create-room{padding:13px}}
.call-overlay.active-call{inset:auto 22px 22px auto;width:330px;height:178px;border:1px solid #34343b;border-radius:24px;background:rgba(13,13,16,.96);box-shadow:0 24px 80px rgba(0,0,0,.58);backdrop-filter:blur(20px);overflow:hidden}.call-overlay.active-call .call-shade{background:radial-gradient(circle at 50% 25%,rgba(229,72,77,.12),transparent 65%)}.call-overlay.active-call .call-info{display:flex;align-items:center;gap:12px;position:absolute;left:18px;top:17px;text-align:left}.call-overlay.active-call .call-avatar{width:44px;height:44px;border-radius:14px;font-size:16px}.call-overlay.active-call .call-info h2{margin:0 0 4px;font-size:15px}.call-overlay.active-call .call-info p{font-size:10px}.call-overlay.active-call .call-actions{bottom:16px;gap:8px}.call-overlay.active-call .call-control{width:43px;height:43px;border-radius:14px}.call-overlay.active-call video#localVideo{display:none}.call-overlay.active-call video#remoteVideo{border-radius:inherit}.call-overlay.active-call.screen-mode{width:min(520px,44vw);height:340px}.call-overlay.active-call.screen-mode .call-info{display:none}.call-overlay.active-call.screen-mode .call-actions{padding:5px 8px;border-radius:17px;background:rgba(10,10,12,.72)}
@media(max-width:700px){.call-overlay.active-call{inset:auto 10px calc(10px + env(safe-area-inset-bottom)) 10px;width:auto;height:160px;border-radius:22px}.call-overlay.active-call.screen-mode{width:auto;height:270px}.call-overlay.active-call .call-actions{bottom:12px}}
.profile-identity{display:flex;align-items:center;gap:11px;min-width:0;flex:1;padding:0;border:0;background:transparent;text-align:left}.profile-identity>div:last-child{min-width:0;flex:1}.profile-identity:hover strong{color:#ff7379}.avatar.has-image{background-position:center;background-size:cover;background-repeat:no-repeat;color:transparent}.owner-crown{display:inline-block;margin-left:6px;color:#f2bd45;font-size:.95em;filter:drop-shadow(0 2px 6px rgba(242,189,69,.28));vertical-align:1px}.profile-editor{display:flex;align-items:center;gap:16px;margin:6px 0 18px}.profile-avatar{width:76px;height:76px;border-radius:24px;font-size:26px}.profile-editor>div:last-child{display:flex;flex-direction:column;align-items:flex-start;gap:7px}.profile-editor .secondary{width:auto;padding:9px 13px}.profile-editor small,.profile-login{color:var(--muted);font-size:11px}.profile-login{margin:14px 0 0}.profile-login b{color:#ddd}.settings-card textarea{width:100%;margin-top:7px;padding:12px 14px;resize:vertical;border:1px solid var(--line);border-radius:12px;outline:0;background:#0d0d10;color:var(--text)}.settings-card textarea:focus{border-color:var(--red)}.room-row{display:flex;align-items:center;gap:5px}.room-row .room-item{flex:1;min-width:0}.room-delete{display:grid;place-items:center;width:34px;height:34px;flex:none;border:1px solid #3a2529;border-radius:11px;background:rgba(229,72,77,.08);color:#e65e64;font-size:21px;transition:.2s}.room-delete:hover{background:#bd2933;color:#fff}.room-members .owner-crown{margin-left:5px}
.settings-card input[type="range"]{display:block;width:100%;margin:10px 0 2px;padding:0;accent-color:var(--red);box-shadow:none}.settings-card label>span{float:right;color:var(--red2)}
.chat-person{flex:1}.header-action{width:40px;height:40px;border:1px solid var(--line);border-radius:13px;background:#17171b;font-size:19px;transition:.2s}.header-action:hover{background:var(--red);border-color:var(--red);transform:scale(1.05)}
.receipt{margin-left:5px;font-weight:800}.receipt.read{color:#ffd3d5}.attachment-card{display:flex;align-items:center;gap:10px;margin-top:7px;padding:10px 12px;border-radius:12px;background:rgba(0,0,0,.22);color:white;text-decoration:none}.attachment-card:hover{background:rgba(0,0,0,.34)}.attachment-card b{max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.attachment-card small{display:block;color:rgba(255,255,255,.55)}.image-attachment{display:block;max-width:min(360px,55vw);max-height:300px;border-radius:12px;margin-top:8px;object-fit:contain}
.composer{padding-left:8px}.compose-main{flex:1;min-width:0}.composer .attach{background:#222228;color:#b7b7bf;font-size:23px}.composer .send{background:var(--red)}.file-preview{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;margin:2px 0 3px;border-radius:10px;background:#222228;color:#d3d3d8;font-size:11px}.file-preview button{width:22px;height:22px;background:transparent;color:#888;font-size:14px}
.call-overlay{position:fixed;z-index:20;inset:44px 0 0;background:#08080a;display:grid;place-items:center;overflow:hidden;animation:fade .3s ease}.call-overlay video#remoteVideo{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#08080a}.call-overlay video#localVideo{position:absolute;z-index:3;right:24px;bottom:96px;width:220px;aspect-ratio:16/10;object-fit:cover;border-radius:20px;border:1px solid #36363d;background:#141418;box-shadow:0 16px 50px #000}.call-shade{position:absolute;inset:0;background:radial-gradient(circle,rgba(229,72,77,.1),transparent 42%),linear-gradient(transparent 60%,rgba(0,0,0,.7));pointer-events:none}.call-info{z-index:2;text-align:center}.call-avatar{width:96px;height:96px;border-radius:30px;margin:auto;font-size:32px;box-shadow:0 20px 60px rgba(229,72,77,.25)}.call-info h2{margin:20px 0 6px;font-size:28px}.call-info p{margin:0;color:var(--muted)}.call-actions{position:absolute;z-index:4;bottom:26px;display:flex;gap:14px}.call-control{width:56px;height:56px;border:1px solid #35353c;border-radius:19px;background:rgba(34,34,40,.92);font-size:20px;transition:.2s;backdrop-filter:blur(12px)}.call-control:hover{transform:translateY(-3px);background:#34343b}.call-control.off{background:#f1f1f2;color:#111}.call-control.hang{background:#d93642;border-color:#d93642}.call-control.accept{background:#39ad72;border-color:#39ad72}
