/* Lailpur Chat Room — iOS-style, purple primary, dark IMO room */
:root{
  --bg:#f2f0fa; --surface:#ffffff; --surface2:#f6f4fc; --text:#1a1333; --muted:#7a7390;
  --border:#e6e1f5; --accent:#7c3aed; --accent2:#a855f7; --gold:#f5b301; --green:#22c55e;
  --bubble:#ede9fe; --bubble-me:#7c3aed; --danger:#ef4444; --radius:18px;
  --shadow:0 8px 30px rgba(90,60,180,.14);
}
[data-theme="dark"]{
  --bg:#0f0d1a; --surface:#1b1830; --surface2:#241f3d; --text:#f1eefc; --muted:#9a93b8;
  --border:#2e2850; --bubble:#2c2650; --shadow:0 8px 30px rgba(0,0,0,.5);
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--text); min-height:100vh;}
.hidden{display:none !important}
.screen{min-height:100vh}
button{font-family:inherit; cursor:pointer; border:none; background:none; color:inherit}
input{font-family:inherit}
.error{color:var(--danger); font-size:13px}
.banner{background:#fef3c7; color:#92400e; padding:10px 14px; font-size:13px; text-align:center}
[data-theme="dark"] .banner{background:#451a03; color:#fde68a}

/* Join */
#join-screen{display:flex; align-items:center; justify-content:center; padding:20px;
  background:linear-gradient(160deg,#7c3aed,#a855f7 55%,#ec4899);}
.join-card{background:var(--surface); border-radius:28px; padding:28px 24px; width:100%; max-width:380px;
  text-align:center; box-shadow:var(--shadow); animation:pop .35s ease}
@keyframes pop{from{transform:scale(.94); opacity:0} to{transform:scale(1); opacity:1}}
.join-logo{font-size:52px}
.join-card h1{margin:8px 0 4px; font-size:26px}
.join-sub{color:var(--muted); margin:0 0 18px; font-size:14px}
.photo-picker{display:flex; flex-direction:column; align-items:center; gap:6px; margin-bottom:14px; cursor:pointer}
#photo-preview{width:96px; height:96px; border-radius:50%; background:var(--surface2); border:3px dashed var(--accent);
  display:flex; align-items:center; justify-content:center; font-size:36px; overflow:hidden; object-fit:cover}
#photo-preview img{width:100%; height:100%; object-fit:cover}
.photo-hint{font-size:12px; color:var(--accent); font-weight:600}
#join-name,#join-invite{width:100%; padding:13px 16px; margin-bottom:10px; border:1.5px solid var(--border);
  border-radius:14px; font-size:16px; background:var(--surface2); color:var(--text); outline:none}
#join-name:focus,#join-invite:focus{border-color:var(--accent)}
.btn-primary{width:100%; padding:14px; border-radius:16px; background:linear-gradient(135deg,#7c3aed,#a855f7);
  color:#fff; font-size:17px; font-weight:700; box-shadow:0 6px 18px rgba(124,58,237,.4)}
.btn-primary:active{transform:scale(.97)}
.join-note{font-size:11px; color:var(--muted)}

/* Top bar */
#topbar{display:flex; align-items:center; gap:10px; padding:12px 14px; background:var(--surface);
  border-bottom:1px solid var(--border); position:sticky; top:0; z-index:20}
.brand{display:flex; align-items:center; gap:8px; font-weight:800; font-size:17px; flex:1; min-width:0}
.brand-logo{font-size:22px}
.brand-name{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.icon-btn{width:38px; height:38px; border-radius:50%; background:var(--surface2); font-size:18px;
  display:inline-flex; align-items:center; justify-content:center}
.icon-btn:active{transform:scale(.92)}
.me-avatar{width:38px; height:38px; border-radius:50%; object-fit:cover; border:2px solid var(--gold); cursor:pointer}
#online-strip{padding:8px 16px; font-size:13px; color:var(--muted); background:var(--surface);
  border-bottom:1px solid var(--border); white-space:nowrap; overflow:hidden}
#online-strip #online-names{display:inline-block; animation:scrollx 22s linear infinite}
@keyframes scrollx{0%{transform:translateX(0)} 100%{transform:translateX(-40%)}}

/* Tabs */
#tabs{display:flex; gap:6px; padding:10px 12px; overflow-x:auto; background:var(--bg)}
.tab{flex:0 0 auto; padding:9px 14px; border-radius:999px; background:var(--surface); font-size:13.5px;
  font-weight:600; border:1px solid var(--border)}
.tab.active{background:var(--accent); color:#fff; border-color:var(--accent)}
.view{padding:14px; max-width:720px; margin:0 auto}
.card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px; margin-bottom:12px; box-shadow:var(--shadow)}
.card h2{margin:0 0 6px; font-size:18px}
.card h3{margin:0 0 8px; font-size:16px}
.card p{color:var(--muted); font-size:14px; margin:4px 0}
.btn{display:inline-block; padding:10px 18px; border-radius:12px; background:var(--accent); color:#fff;
  font-weight:700; font-size:14px}
.btn.ghost{background:var(--surface2); color:var(--text); border:1px solid var(--border)}
.btn.gold{background:linear-gradient(135deg,#f59e0b,#f5b301); color:#3b2503}
.btn.danger{background:var(--danger)}
.btn:disabled{opacity:.5}
.room-item{display:flex; align-items:center; gap:12px; padding:12px; background:var(--surface);
  border:1px solid var(--border); border-radius:var(--radius); margin-bottom:10px; cursor:pointer}
.room-item:active{transform:scale(.98)}
.room-icon{width:52px; height:52px; border-radius:16px; background:linear-gradient(135deg,#7c3aed,#ec4899);
  display:flex; align-items:center; justify-content:center; font-size:24px; color:#fff; overflow:hidden; flex:0 0 auto}
.room-icon img{width:100%; height:100%; object-fit:cover}
.room-item .ri-name{font-weight:700; font-size:16px}
.room-item .ri-meta{font-size:12.5px; color:var(--muted)}
.room-item .ri-badge{margin-left:auto; background:var(--accent); color:#fff; border-radius:999px;
  font-size:11px; font-weight:700; padding:3px 8px}
.input,select.input,textarea.input{width:100%; padding:12px 14px; border:1.5px solid var(--border); border-radius:12px;
  background:var(--surface2); color:var(--text); font-size:15px; outline:none; margin-bottom:10px}
.input:focus{border-color:var(--accent)}

/* IMO room view */
#room-view{background:#000; color:#fff; min-height:100vh; display:flex; flex-direction:column}
.room-header{display:flex; align-items:center; gap:10px; padding:12px}
.room-avatar{width:48px; height:48px; border-radius:14px; background:#2a2a2e; object-fit:cover; flex:0 0 auto}
.room-title{flex:1; min-width:0}
.room-name-row{display:flex; align-items:center; gap:8px}
#room-name{font-size:18px; font-weight:800; font-style:italic; letter-spacing:.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.plus-btn{width:30px; height:30px; border-radius:50%; background:#0a84ff; color:#fff; font-size:20px; line-height:1; flex:0 0 auto}
.room-members{font-size:12.5px; color:#a1a1aa}
.room-head-actions{display:flex; gap:8px; align-items:center}
.icon-btn.light{background:rgba(255,255,255,.12); color:#fff}
.room-call-btn{width:40px; height:40px; border-radius:50%; background:#22c55e; font-size:19px}
.rank-row{display:flex; align-items:center; gap:8px; padding:4px 14px 10px}
.rank-pill{background:#1c1c1e; border:1px solid #333; padding:7px 12px; border-radius:999px; font-size:13px; font-weight:700}
.rank-top{display:flex; align-items:center; gap:6px; font-size:13px; color:#d4d4d8}
.rank-top img{width:26px; height:26px; border-radius:50%; object-fit:cover}
.seat-grid{display:grid; grid-template-columns:repeat(5,1fr); gap:14px 8px; padding:6px 18px 14px}
.seat{display:flex; flex-direction:column; align-items:center; gap:5px; cursor:pointer}
.seat-circle{width:62px; height:62px; border-radius:50%; border:2px dashed #3f3f46; background:#18181b;
  display:flex; align-items:center; justify-content:center; font-size:26px; position:relative; overflow:hidden}
.seat-circle img{width:100%; height:100%; object-fit:cover}
.seat.host .seat-circle{border:2px solid var(--green); color:var(--green)}
.seat.vip-seat .seat-circle{border-color:var(--gold)}
.seat.locked .seat-circle{color:#a1a1aa}
.seat.occupied .seat-circle{border-style:solid; border-color:#71717a}
.seat-label{font-size:12px; color:#d4d4d8}
.seat .vip-tag{font-size:10px; color:var(--gold); font-weight:800; margin-top:-4px}
#announcements{padding:0 14px}
.announce{background:#18181b; border:1px solid #27272a; border-radius:16px; padding:14px; margin-bottom:10px;
  font-size:14px; line-height:1.55; color:#e4e4e7; display:flex; gap:10px}
.announce .mega{font-size:18px; flex:0 0 auto}
.announce .a-more{text-align:center; color:#a1a1aa; font-size:16px}
#room-chat{flex:1; display:flex; flex-direction:column; min-height:300px}
#area-tabs{display:flex; gap:8px; padding:0 14px 8px}
.area-tab{padding:7px 14px; border-radius:999px; background:#1c1c1e; color:#d4d4d8; font-size:13px; font-weight:600}
.area-tab.active{background:#0a84ff; color:#fff}
#join-lines{padding:0 14px}
.join-line{display:flex; align-items:center; gap:8px; padding:6px 0; font-size:13.5px; color:#a1a1aa}
.join-line img{width:26px; height:26px; border-radius:50%; object-fit:cover}
.join-line b{color:#fff}
#messages{flex:1; padding:10px 14px 16px; overflow-y:auto; display:flex; flex-direction:column; gap:8px}
.msg{max-width:78%; display:flex; gap:8px; align-items:flex-end; animation:pop .25s ease}
.msg.me{align-self:flex-end; flex-direction:row-reverse}
.msg .m-av{width:30px; height:30px; border-radius:50%; object-fit:cover; flex:0 0 auto}
.msg .m-body{background:#26262b; padding:9px 12px; border-radius:16px; border-bottom-left-radius:4px; font-size:14.5px; line-height:1.45; word-break:break-word}
.msg.me .m-body{background:#0a84ff; border-bottom-left-radius:16px; border-bottom-right-radius:4px}
.msg .m-name{font-size:11px; color:#a1a1aa; margin-bottom:2px; font-weight:700}
.msg.me .m-name{display:none}
.msg .m-media{max-width:220px; border-radius:12px; display:block}
.msg .m-gift{font-size:34px; text-align:center}
.msg .m-sys{font-size:11px; color:#71717a; margin-top:2px}
.msg.vip-msg .m-body{border:1.5px solid var(--gold); background:#3a2f00}
.msg.king-msg{max-width:92%}
.msg.king-msg .m-body{background:linear-gradient(135deg,#f59e0b,#b45309); border:2px solid var(--gold); border-radius:18px 18px 18px 4px; font-weight:600}
.msg .m-actions{font-size:11px; color:#71717a; cursor:pointer}
#composer{display:flex; gap:8px; align-items:center; padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  background:#0c0c0e; border-top:1px solid #1f1f23; position:sticky; bottom:0}
#composer input{flex:1; min-width:0; background:#1c1c1e; border:none; border-radius:999px; color:#fff;
  padding:12px 16px; font-size:15px; outline:none}
.cbtn{width:40px; height:40px; border-radius:50%; background:#1c1c1e; font-size:19px; flex:0 0 auto}
.gift-btn{width:48px; height:48px; border-radius:50%; background:#0a84ff; font-size:24px; flex:0 0 auto}
.send-btn{width:42px; height:42px; border-radius:50%; background:var(--accent); color:#fff; font-size:18px; flex:0 0 auto}
.recording{color:#ef4444 !important; animation:blink 1s infinite}
@keyframes blink{50%{opacity:.4}}

/* Call dock */
.call-dock{background:#111827; border:1px solid #374151; border-radius:18px; margin:0 14px 12px; padding:12px}
.call-dock .cd-head{display:flex; justify-content:space-between; align-items:center; font-weight:700}
.call-dock .cd-timer{font-variant-numeric:tabular-nums; color:#4ade80}
.call-seats{display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:10px}
.call-seat{background:#1f2937; border-radius:12px; padding:8px; text-align:center; font-size:12px; min-height:64px}
.call-seat.vip-call{border:1.5px solid var(--gold)}
.call-seat img{width:34px; height:34px; border-radius:50%; object-fit:cover}
.call-seat .muted-tag{color:#f87171}
.call-controls{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap}
.call-controls .btn{padding:8px 12px; font-size:13px}
.music-box{margin-top:10px; background:#0f172a; border-radius:12px; padding:10px}
.music-box iframe{width:100%; height:170px; border:0; border-radius:10px}

/* VIP / badges */
.badges{display:inline-flex; gap:3px; flex-wrap:wrap; vertical-align:middle}
.badge{font-size:9px; font-weight:800; padding:2px 5px; border-radius:5px; background:linear-gradient(135deg,#f59e0b,#f5b301); color:#3b2503}
.badge.vip{background:linear-gradient(135deg,#7c3aed,#a855f7); color:#fff}
.name-sparkle{color:var(--gold); font-weight:800; text-shadow:0 0 8px rgba(245,179,1,.8); animation:shine 2s infinite}
@keyframes shine{50%{text-shadow:0 0 16px rgba(245,179,1,1)}}
.level-bar{height:10px; background:var(--surface2); border-radius:99px; overflow:hidden}
.level-bar > div{height:100%; background:linear-gradient(90deg,#f59e0b,#f5b301)}
.gift-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:10px}
.gift-item{background:var(--surface2); border-radius:14px; padding:12px 6px; text-align:center; cursor:pointer; border:2px solid transparent}
.gift-item.sel{border-color:var(--gold)}
.gift-item .g-emoji{font-size:30px}
.gift-item .g-name{font-size:12px; font-weight:700}
.gift-item .g-cost{font-size:11px; color:var(--muted)}
.big-gift{position:fixed; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:none; z-index:99}
.big-gift span{font-size:120px; animation:giftpop 1.6s ease forwards}
@keyframes giftpop{0%{transform:scale(.3); opacity:0} 30%{transform:scale(1.2); opacity:1} 100%{transform:scale(1); opacity:0}}
.leader-row{display:flex; align-items:center; gap:10px; padding:10px 4px; border-bottom:1px solid var(--border)}
.leader-row img{width:38px; height:38px; border-radius:50%; object-fit:cover}
.leader-row .lr-rank{font-weight:800; width:26px; text-align:center}

/* Modal / toast */
#modal-backdrop{position:fixed; inset:0; background:rgba(0,0,0,.55); display:flex; align-items:flex-end; justify-content:center; z-index:50}
#modal{background:var(--surface); color:var(--text); width:100%; max-width:520px; border-radius:24px 24px 0 0;
  padding:20px; max-height:82vh; overflow-y:auto; animation:slideup .3s ease}
@keyframes slideup{from{transform:translateY(40px); opacity:0} to{transform:none; opacity:1}}
#modal h3{margin:0 0 12px}
#toast{position:fixed; left:50%; bottom:90px; transform:translateX(-50%); background:#111; color:#fff;
  padding:10px 18px; border-radius:999px; font-size:14px; z-index:99; box-shadow:var(--shadow)}
.picker-row{display:flex; flex-wrap:wrap; gap:6px}
.picker-row button{font-size:26px; padding:6px; background:var(--surface2); border-radius:12px}
.list-row{display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--border)}
.list-row img{width:40px; height:40px; border-radius:50%; object-fit:cover}
.list-row .lr-name{font-weight:700}
.list-row .lr-sub{font-size:12px; color:var(--muted)}
.chip{display:inline-block; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:700; background:var(--surface2)}
.chip.green{background:#dcfce7; color:#166534}
.chip.red{background:#fee2e2; color:#991b1b}
.chip.gold{background:#fef3c7; color:#92400e}
@media (max-width:520px){ .seat-circle{width:54px; height:54px} .seat-grid{gap:12px 6px; padding:6px 12px 12px} }

/* Join name plates — styled by VIP level (higher = flashier) */
.join-plate{display:flex; align-items:center; gap:10px; padding:10px 12px; margin:8px 0;
  background:#1c1c1e; border:1px solid #333; border-radius:16px; color:#fff; animation:pop .3s ease}
.join-plate img{width:40px; height:40px; border-radius:50%; object-fit:cover; flex:0 0 auto}
.join-plate .jp-name{font-weight:800; font-size:15px}
.join-plate .jp-sub{font-size:12px; color:#a1a1aa}
.join-plate.vip{border-color:var(--gold); background:linear-gradient(135deg,#3a2f00,#1c1c1e)}
.join-plate.vip .jp-name{color:var(--gold)}
.join-plate.vip-high{border:2px solid var(--gold); background:linear-gradient(135deg,#4a3800,#2a2100);
  box-shadow:0 0 14px rgba(245,179,1,.45)}
.join-plate.vip-high .jp-name{color:var(--gold); text-shadow:0 0 8px rgba(245,179,1,.7)}
.join-plate.vip-elite{border:2px solid var(--gold); background:linear-gradient(135deg,#f59e0b,#7c3aed);
  box-shadow:0 0 18px rgba(245,179,1,.6); animation:pop .3s ease, shine 2s infinite}
.join-plate.vip-elite .jp-name{color:#fff; text-shadow:0 0 10px rgba(255,255,255,.9)}
.join-plate.vip-supreme{border:2px solid var(--gold); background:linear-gradient(135deg,#f59e0b,#f5b301,#b45309);
  box-shadow:0 0 22px rgba(245,179,1,.8); animation:pop .3s ease, shine 1.5s infinite}
.join-plate.vip-supreme .jp-name{color:#fff; text-shadow:0 0 12px rgba(255,255,255,1)}

/* Full-screen group view — no rooms list / sidebar while inside a group */
body.in-room #topbar, body.in-room #online-strip, body.in-room #home-tabs, body.in-room #views, body.in-room #bottombar{display:none !important}
body.in-room #room-view{position:fixed; inset:0; z-index:40; height:100dvh; overflow-y:auto}

/* ---------- IMO-style home ---------- */
#home-tabs{display:flex; gap:2px; padding:0 8px; overflow-x:auto; background:var(--surface); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:15}
.htab{flex:1 0 auto; padding:12px 10px 10px; font-size:14px; font-weight:700; color:var(--muted); border-bottom:3px solid transparent; white-space:nowrap; position:relative}
.htab.active{color:#0a84ff; border-bottom-color:#0a84ff}
.htab-badge{position:absolute; top:4px; right:2px; min-width:17px; height:17px; padding:0 4px; border-radius:999px; background:#22c55e; color:#fff; font-size:10px; font-weight:800; display:inline-flex; align-items:center; justify-content:center}
#views{padding-bottom:76px}
#bottombar{position:fixed; left:0; right:0; bottom:0; z-index:30; display:flex; align-items:center; justify-content:space-between; padding:10px 16px calc(10px + env(safe-area-inset-bottom)); background:var(--surface); border-top:1px solid var(--border)}
.fab-plus{width:44px; height:44px; border-radius:50%; color:#0a84ff; font-size:30px; line-height:1}
.fab-search{width:44px; height:44px; border-radius:50%; color:#0a84ff; font-size:22px}
.bottombar-title{font-size:13px; font-weight:700; color:var(--muted)}
.btn-google{width:100%; padding:13px; border-radius:14px; background:#fff; color:#1f1f1f; border:1.5px solid #dadce0; font-size:16px; font-weight:700; display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:6px}
.btn-google .g-logo{width:22px; height:22px; border-radius:50%; background:#4285f4; color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:14px; font-weight:800}
.join-divider{display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; margin:12px 0}
.join-divider::before,.join-divider::after{content:''; flex:1; height:1px; background:var(--border)}
.home-sec{margin-bottom:18px}
.sec-head{display:flex; align-items:center; justify-content:space-between; margin:4px 2px 10px}
.sec-head h3{margin:0; font-size:17px}
.sec-link{font-size:13px; color:#0a84ff; font-weight:700; cursor:pointer}
.invite-line{font-size:13px; color:var(--muted); background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:10px 12px; margin-bottom:12px}
.stories-row{display:flex; gap:14px; overflow-x:auto; padding:6px 2px 12px}
.story-item{flex:0 0 auto; width:64px; text-align:center; cursor:pointer}
.story-circle{width:60px; height:60px; border-radius:50%; border:3px solid var(--border); overflow:hidden; position:relative; background:var(--surface2); display:flex; align-items:center; justify-content:center; font-size:24px}
.story-circle img{width:100%; height:100%; object-fit:cover}
.story-circle.has-story{border-color:#22c55e}
.story-circle.add{border-style:dashed; border-color:var(--accent)}
.story-plus{position:absolute; right:-2px; bottom:-2px; width:20px; height:20px; border-radius:50%; background:#0a84ff; color:#fff; font-size:13px; display:flex; align-items:center; justify-content:center}
.story-name{font-size:11.5px; margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.story-view img{width:100%; border-radius:16px; max-height:60vh; object-fit:cover}
.story-view-meta{display:flex; align-items:center; gap:8px; margin-top:10px}
.story-view-meta img{width:36px; height:36px; border-radius:50%; object-fit:cover}
.chat-row{display:flex; align-items:center; gap:12px; padding:12px 4px; border-bottom:1px solid var(--border); cursor:pointer}
.chat-row img{width:52px; height:52px; border-radius:50%; object-fit:cover; flex:0 0 auto}
.chat-mid{flex:1; min-width:0}
.chat-name{font-weight:700; font-size:15.5px}
.chat-preview{font-size:13.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.chat-right{text-align:right; flex:0 0 auto}
.chat-time{font-size:12px; color:var(--muted)}
.chat-count{min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:#22c55e; color:#fff; font-size:11px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; margin-top:4px}
.contact-mini{display:flex; align-items:center; gap:12px; padding:10px 4px; border-bottom:1px solid var(--border); cursor:pointer}
.contact-mini img{width:44px; height:44px; border-radius:50%; object-fit:cover}
.wave-btn{font-size:22px; flex:0 0 auto}
.myroom-row{display:flex; gap:12px; overflow-x:auto; padding:2px 2px 8px}
.myroom-card{flex:0 0 auto; width:112px; border-radius:18px; overflow:hidden; background:var(--surface); border:1px solid var(--border); cursor:pointer; position:relative}
.myroom-card img{width:112px; height:112px; object-fit:cover; display:block}
.myroom-card.create{display:flex; flex-direction:column; align-items:center; justify-content:center; height:150px; background:var(--surface2)}
.mr-plus{font-size:36px; color:var(--muted)}
.mr-name{font-size:13px; font-weight:700; padding:8px 6px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.mr-badges{position:absolute; left:6px; bottom:38px; display:flex; gap:4px}
.mr-pill{background:rgba(0,0,0,.6); color:#fff; font-size:10.5px; font-weight:700; padding:2px 7px; border-radius:999px}
.chip-row{display:flex; gap:8px; overflow-x:auto; padding:2px 2px 12px}
.chip-btn{flex:0 0 auto; padding:8px 16px; border-radius:999px; background:var(--surface); border:1px solid var(--border); font-size:13.5px; font-weight:700}
.chip-btn.active{background:#111; color:#fff; border-color:#111}
[data-theme="dark"] .chip-btn.active{background:#fff; color:#111; border-color:#fff}
.rec-room-card{background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:14px; margin-bottom:12px; cursor:pointer}
.rec-head{display:flex; align-items:center; gap:10px}
.rec-icon{width:46px; height:46px; border-radius:12px; object-fit:cover; flex:0 0 auto}
.rec-title{flex:1; min-width:0}
.rec-count{font-size:12px; font-weight:700; background:var(--surface2); border-radius:999px; padding:4px 10px; white-space:nowrap}
.rec-last{font-size:13.5px; color:var(--muted); margin-top:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.rec-avatars{display:flex; align-items:center; gap:4px; margin-top:10px}
.rec-avatars img{width:34px; height:34px; border-radius:50%; object-fit:cover; border:2px solid var(--surface)}
.active-pill{position:fixed; left:50%; bottom:78px; transform:translateX(-50%); background:#111; color:#fff; padding:10px 18px; border-radius:999px; font-size:13px; font-weight:700; z-index:25; box-shadow:var(--shadow); white-space:nowrap}
[data-theme="dark"] .active-pill{background:#fff; color:#111}
.rank-cards{display:grid; grid-template-columns:1.2fr 1fr; gap:10px}
.rank-card{border-radius:20px; padding:14px; color:#fff; cursor:pointer; min-height:150px}
.rank-card.gold{background:linear-gradient(160deg,#f59e0b,#f97316)}
.rank-card.blue{background:linear-gradient(160deg,#2563eb,#0ea5e9)}
.rank-card.purple{background:linear-gradient(160deg,#7c3aed,#a855f7); grid-column:1 / -1}
.rc-title{font-size:13px; font-weight:700; opacity:.95; margin-bottom:8px}
.rank-card img{width:52px; height:52px; border-radius:50%; object-fit:cover; border:2px solid rgba(255,255,255,.7)}
.rc-name{font-weight:800; font-size:15px; margin-top:6px}
.rc-sub{font-size:12.5px; opacity:.9}
.explore-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.explore-card{background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:10px; cursor:pointer; position:relative}
.ex-img{width:100%; height:120px; object-fit:cover; border-radius:12px; display:block}
.ex-listen{position:absolute; top:16px; right:16px; background:rgba(0,0,0,.6); color:#fff; font-size:11px; font-weight:700; padding:3px 8px; border-radius:999px}
.ex-name{font-weight:700; font-size:14px; margin-top:8px}
.ex-sub{font-size:12px; color:var(--muted); margin-top:2px}
.contact-action{display:flex; align-items:center; gap:14px; padding:14px 2px; border-bottom:1px solid var(--border); cursor:pointer; font-size:16px; font-weight:600}
.contact-action:last-child{border-bottom:none}
.ca-ic{width:40px; height:40px; border-radius:50%; background:var(--surface2); display:flex; align-items:center; justify-content:center; font-size:19px}
.ca-badge{min-width:22px; height:22px; padding:0 6px; border-radius:999px; background:#22c55e; color:#fff; font-size:12px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; margin-left:auto}
.ca-arrow{margin-left:auto; color:var(--muted); font-size:20px}
.contact-action .ca-badge + .ca-arrow{margin-left:0}
.contact-row{display:flex; align-items:center; gap:12px; padding:11px 4px; border-bottom:1px solid var(--border); cursor:pointer}
.contact-row img{width:48px; height:48px; border-radius:50%; object-fit:cover}
.call-btn{font-size:22px; color:#0a84ff; flex:0 0 auto}
.badge.bot{background:linear-gradient(135deg,#4c1d95,#7c3aed); color:#fff}
.msg.bot-msg .m-body{border:1.5px solid #7c3aed; background:#2e1065; color:#fff}
[data-theme="light"] .msg.bot-msg .m-body{background:#ede9fe; color:#1a1333}
#view-shorts{padding:0 0 14px}
.shorts-head{display:flex; align-items:center; justify-content:space-between; padding:6px 4px 10px}
.shorts-head h3{margin:0; font-size:17px}
.shorts-feed{height:calc(100dvh - 268px); min-height:420px; overflow-y:auto; scroll-snap-type:y mandatory; border-radius:18px; background:#000}
.short-item{height:100%; scroll-snap-align:start; position:relative; background:#000}
.short-item video{width:100%; height:100%; object-fit:cover; display:block}
.short-info{position:absolute; left:12px; bottom:16px; right:76px; color:#fff; text-shadow:0 1px 6px rgba(0,0,0,.7)}
.short-user{display:flex; align-items:center; gap:8px; font-size:15px; margin-bottom:6px}
.short-user img{width:36px; height:36px; border-radius:50%; object-fit:cover; border:2px solid #fff}
.short-caption{font-size:13.5px; line-height:1.4}
.short-actions{position:absolute; right:10px; bottom:24px; display:flex; flex-direction:column; gap:16px; align-items:center}
.short-act{background:none; color:#fff; font-size:26px; display:flex; flex-direction:column; align-items:center; gap:2px; text-shadow:0 1px 6px rgba(0,0,0,.7)}
.short-act span{font-size:12px; font-weight:700}
/* ---------- v2 polish: gradient header, glass cards, motion, empty states ---------- */
:root{ --grad:linear-gradient(135deg,#7c3aed,#a855f7 50%,#ec4899); }
/* gradient header (scrolls away; tabs stick instead) */
#topbar{position:static; padding:14px 14px 12px; background:linear-gradient(135deg,#7c3aed,#a855f7 55%,#ec4899); color:#fff; box-shadow:0 6px 20px rgba(124,58,237,.35)}
#topbar .brand-name{color:#fff}
#topbar .icon-btn{background:rgba(255,255,255,.22); color:#fff}
#topbar .me-avatar{border-color:#fff}
/* online strip: label fixed, names scroll inside their own mask — never overlapping the label */
#online-strip{display:flex; align-items:center; gap:8px; overflow:hidden}
#online-strip .online-label{flex:0 0 auto; font-weight:700; color:var(--text)}
#online-strip .online-mask{flex:1; min-width:0; overflow:hidden; white-space:nowrap; -webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent); mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}
/* stylish tab bar: gradient pill for the active tab */
#home-tabs{gap:6px; padding:10px 12px}
.htab{padding:9px 14px; font-size:13.5px; border-radius:999px; border-bottom:none; transition:all .2s ease}
.htab:active{transform:scale(.96)}
.htab.active{color:#fff; background:linear-gradient(135deg,#7c3aed,#ec4899); box-shadow:0 4px 14px rgba(124,58,237,.4)}
.htab.active .htab-badge{background:#fff; color:#7c3aed}
/* glass cards + gradient buttons + motion */
.card, .rec-room-card, .explore-card{border-radius:22px; box-shadow:0 10px 28px rgba(90,60,180,.12)}
[data-theme="dark"] .card, [data-theme="dark"] .rec-room-card, [data-theme="dark"] .explore-card{box-shadow:0 10px 28px rgba(0,0,0,.45)}
.btn, .btn-primary{background:var(--grad); box-shadow:0 6px 16px rgba(124,58,237,.35); transition:transform .15s ease, box-shadow .2s ease}
.btn:active, .btn-primary:active{transform:scale(.96)}
.btn.ghost{background:var(--surface2); box-shadow:none}
.sec-head h3{font-size:19px; letter-spacing:-.2px}
.chat-row, .contact-row, .contact-mini, .rec-room-card, .explore-card, .myroom-card{transition:transform .15s ease, box-shadow .2s ease}
.chat-row:active, .contact-row:active, .contact-mini:active, .rec-room-card:active, .explore-card:active, .myroom-card:active{transform:scale(.98)}
.chip-btn{transition:all .2s ease}
.chip-btn.active{background:var(--grad); border-color:transparent; color:#fff; box-shadow:0 4px 12px rgba(124,58,237,.35)}
[data-theme="dark"] .chip-btn.active{background:var(--grad); color:#fff; border-color:transparent}
.story-circle.has-story{border:3px solid transparent; background:linear-gradient(var(--surface),var(--surface)) padding-box, linear-gradient(135deg,#f59e0b,#ec4899,#7c3aed) border-box}
.story-item{transition:transform .15s ease}
.story-item:active{transform:scale(.94)}
.rank-card{box-shadow:0 10px 24px rgba(0,0,0,.18)}
.join-card{border-radius:32px}
#bottombar{background:rgba(255,255,255,.88); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px)}
[data-theme="dark"] #bottombar{background:rgba(27,24,48,.88)}
.fab-plus{background:var(--grad); color:#fff; box-shadow:0 6px 16px rgba(124,58,237,.4)}
/* attractive empty states */
.empty-state{text-align:center; padding:36px 20px; background:var(--surface); border:1px solid var(--border); border-radius:24px; box-shadow:0 10px 28px rgba(90,60,180,.12)}
.empty-state .es-icon{width:84px; height:84px; margin:0 auto 14px; border-radius:50%; background:var(--grad); display:flex; align-items:center; justify-content:center; font-size:40px; box-shadow:0 8px 20px rgba(124,58,237,.4)}
.empty-state h3{margin:0 0 6px; font-size:19px}
.empty-state p{color:var(--muted); font-size:14px; margin:0 0 16px}
