/* StreamHub website: launch list. Loaded after app.css, so these rules win. */

/* ---------- back button + Streams link in the top bar ---------- */
.backbtn { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; margin-left:-8px; border-radius:50%; border:0; background:transparent; color:var(--text); cursor:pointer; flex:none; }
.backbtn:hover { background:rgba(255,255,255,.1); }
.backbtn[hidden] { display:none; }
.streamsnav { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:20px; background:rgba(255,255,255,.08); color:var(--text); font-weight:700; font-size:14px; white-space:nowrap; }
.streamsnav:hover { background:rgba(255,255,255,.16); }
@media (max-width:520px) { .streamsnav span { display:none; } .streamsnav { padding:6px; } }

/* ---------- an X on every pop-up ---------- */
.sheet { position:relative; }
.sheetx { position:absolute; top:8px; right:8px; width:32px; height:32px; border-radius:50%; border:0; background:rgba(255,255,255,.1); color:var(--text); font-size:16px; line-height:1; cursor:pointer; z-index:3; }
.sheetx:hover { background:rgba(255,255,255,.2); }
.sheet > h3:first-of-type { padding-right:38px; }
.sheet > .bothead, .sheet > div:first-child, .sheet > .row:first-child { padding-right:40px; }   /* a button at the right end of a pop-up's title row must not sit under the X */

/* ---------- tiles: little profile picture, boost + rank badges ---------- */
.tile { position:relative; }
.tileav { position:absolute; right:8px; bottom:8px; z-index:3; border-radius:50%; box-shadow:0 0 0 2px rgba(255,255,255,.85), 0 2px 8px rgba(0,0,0,.5); cursor:pointer; }
.tileav .avatar { cursor:pointer; }
.badge.boostb { background:#7a5cff; }
.rankb { background:rgba(0,0,0,.6); color:#fff; font-weight:800; font-size:12px; border-radius:10px; padding:2px 8px; margin-right:6px; }
#trend-tags { margin-bottom:10px; }

/* ---------- tiny animated emojis in chat ---------- */
.em { display:inline-block; font-size:.9em; line-height:1; transform-origin:50% 85%; animation:emo0 1.6s ease-in-out infinite; }
.em1 { animation-name:emo1; animation-duration:2s; } .em2 { animation-name:emo2; animation-duration:1.3s; } .em3 { animation-name:emo3; animation-duration:2.4s; }
@keyframes emo0 { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-2px) scale(1.18); } }
@keyframes emo1 { 0%,100% { transform:rotate(-10deg); } 50% { transform:rotate(10deg); } }
@keyframes emo2 { 0%,100% { transform:scale(1); } 50% { transform:scale(1.3); } }
@keyframes emo3 { 0%,70%,100% { transform:translateY(0) rotate(0); } 80% { transform:translateY(-3px) rotate(-14deg); } 90% { transform:translateY(0) rotate(14deg); } }
@media (prefers-reduced-motion:reduce) { .em { animation:none; } }
.chatform { position:relative; align-items:center; }
.emobtn { background:rgba(0,0,0,.45); border:1px solid rgba(255,255,255,.25); border-radius:50%; width:36px; height:36px; flex:none; font-size:18px; cursor:pointer; padding:0; }
.emotray { position:absolute; left:10px; bottom:54px; z-index:20; display:grid; grid-template-columns:repeat(8,1fr); gap:2px; padding:6px; background:rgba(14,14,20,.96); border:1px solid var(--line); border-radius:14px; box-shadow:0 8px 24px rgba(0,0,0,.5); }
.emotray[hidden] { display:none; }
.emopick { background:none; border:0; font-size:20px; padding:4px; border-radius:8px; cursor:pointer; }
.emopick:hover { background:rgba(255,255,255,.14); }
.vstag { font-size:11px; font-weight:800; color:#ffd34d; }
.chatlog .m.fromvs { opacity:.92; }

/* ---------- voice only: the streamer's picture is centred on every screen ---------- */
.audioonly { align-items:center; justify-content:center; text-align:center; }
.audioonly .voiceav { display:flex; justify-content:center; margin:0 auto 4px; }
.audioonly .voiceav .avatar { box-shadow:0 0 0 4px rgba(255,255,255,.18), 0 0 32px rgba(122,92,255,.5); }
.audioonly .vwave { align-self:center; }

/* ---------- goal box: hide / show ---------- */
.goalslot { pointer-events:none; }
.goalslot .goalx { pointer-events:auto; position:absolute; top:-10px; right:-10px; width:28px; height:28px; border-radius:50%; border:0; background:rgba(0,0,0,.75); color:#fff; font-size:11px; cursor:pointer; line-height:1; }
.goalslot { position:absolute; }
.goalchip { position:absolute; left:10px; top:150px; z-index:7; width:32px; height:32px; border-radius:50%; border:0; background:rgba(0,0,0,.55); font-size:16px; cursor:pointer; padding:0; }
.goalchip[hidden] { display:none; }

/* ---------- versus: end button ---------- */
.vs .endvs, .endvs { display:block; margin:6px auto 0; padding:6px 16px; border-radius:18px; border:1.5px solid rgba(255,255,255,.55); background:rgba(190,30,60,.85); color:#fff; font-weight:800; font-size:13px; cursor:pointer; }
.endvs[hidden] { display:none; }

/* ---------- the "Live" pill never covers the streamer's name: the name shrinks, the pill keeps its size ---------- */
.topbar { gap:6px; }
.topbar .pill { flex:1 1 0; min-width:0; overflow:hidden; }
.topbar .livepill { flex:none; margin-left:auto; position:static; max-width:46%; overflow:hidden; text-overflow:ellipsis; }
.topbar .roundbtn, .topbar .soundbtn { flex:none; }
.pill .t { overflow:hidden; }

/* ---------- consistent sizes: text on the stage scales with the stage, the same on a phone browser and a desktop ---------- */
.stage { font-size:clamp(12px, 3.6cqw, 16px); }
.chatlog .m { font-size:1em; } .ptitle { font-size:1.07em; }

/* ---------- WEBSITE STREAMS ARE LANDSCAPE (16:9). Phones and narrow windows keep the tall screen. ---------- */
@media (min-width:820px) and (min-aspect-ratio:1/1) {
  .stage { width:min(100%, calc((100vh - var(--hdr) - 24px) * 16 / 9), 1280px); aspect-ratio:16/9; font-size:clamp(12px, 1.25cqw, 16px); }
  .media video.vid, .media canvas, .vs .panel video { object-fit:contain; }   /* a tall phone stream is shown whole, with bars at the sides */
  .chatmount { right:auto; width:min(38%, 420px); height:52%; }
  .chatlog { padding:0 8px 4px 12px; }
  .ptitle { top:54px; right:auto; max-width:60%; }
  .ptitle.withbox { right:auto; }
  .goalslot, .goalchip { top:96px; }
  .vs { top:60px; }
  .vs .panels { height:28.125cqw; }
  .col { bottom:20px; }
  .boxslot, .gboxslot { z-index:9; }   /* guest / date boxes the streamer drags over the chat column stay on top so they can be tapped */
  .gfloat.dbox, .gfloat.gbox { width:calc(var(--w, 36cqw) * .32); max-width:20cqw; }   /* the 9:16 guest tile must fit the wide stage: same share of its height as on a tall one */
  .unmute { top:64px; }
}

/* ---------- admin ---------- */
.admingroups { margin-bottom:4px; }
.kvgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:8px 16px; }
.kv { display:flex; flex-direction:column; font-size:14px; } .kv span { font-size:12px; }
.urow .badge { margin-left:4px; } .badge.warn { background:#a8641a; }
.mgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:10px; margin-top:12px; }
.mcard { margin:0; padding:8px; overflow:hidden; }

/* ---------- narrow screens: the top bar must fit with the new Streams link ---------- */
@media (max-width:520px) {
  header { gap:4px; padding:0 10px; }
  header .logo { font-size:17px; white-space:nowrap; }
  header .logo::before { width:20px; height:20px; margin-right:6px; vertical-align:-4px; }
  header nav { gap:0; min-width:0; }
  #nav a[href^="#/u/"] .mute { display:none; }
  header .logo { font-size:0; } header .logo::before { margin-right:0; width:26px; height:26px; vertical-align:-8px; }   /* only the logo mark: the icons + Go live + your picture need the room */
  .adminnav span { display:none; }
  #nav a.btn.small.danger { font-size:0; padding:6px 9px; } #nav a.btn.small.danger::before { content:"⚠"; font-size:15px; }
  #nav .btn.small { padding:6px 10px; }
  .settings-nav, .navi { padding:5px; }
  .navi { width:32px; height:32px; } .streamsnav { padding:5px; } .settings-nav { padding:4px; } #nav a.btn.small.danger { padding:6px 4px !important; min-width:0; }   /* admins have two more buttons (Shop, Meet) plus the Admin link: keep the whole bar inside a 390px phone */
}
@media (max-width:380px) { header .logo { font-size:0; } header .logo::before { margin-right:0; width:26px; height:26px; vertical-align:-8px; } }
.topbar .pill { flex:0 1 auto; max-width:calc(100% - 150px); }
.tile > div:last-of-type { padding-right:40px; }
#nav .btn { white-space:nowrap; }
.adminnav { display:inline-flex; align-items:center; gap:6px; }
@media (min-width:820px) and (min-aspect-ratio:1/1) { .golivebar { left:40%; right:84px; bottom:20px; } }

/* ======================================================================
   Glowy, classy 3D buttons. The purple follows the site theme colour (--accent), so the App Themes still work.
   ====================================================================== */
.btn, button.btn {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 82%, #fff) 0%, var(--accent) 100%);
  color: #fff; border: 0; border-bottom: 3px solid color-mix(in srgb, var(--accent) 60%, #000);
  border-radius: 12px; font-weight: 600;
  box-shadow: 0 4px 15px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform .15s ease, box-shadow .15s ease, border-bottom-width .15s ease, filter .15s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 1px; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 20%, transparent); }
.btn.small { border-radius: 10px; border-bottom-width: 2px; }
.btn.danger, .btn.small.danger { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); border-bottom-color: #9f1239; box-shadow: 0 4px 15px rgba(244, 63, 94, .35); }
.btn.ghost, .btn.small.ghost, .btn.ghost.small {
  background: rgba(30, 41, 59, .7); color: #f8fafc; border: 1px solid rgba(255, 255, 255, .12); border-bottom: 3px solid rgba(15, 23, 42, .9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.btn.ghost:active:not(:disabled) { border-bottom-width: 1px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.btn:disabled, .btn.disabled { filter: none; box-shadow: none; }

/* round buttons over the video: the glass circle is the button (.roundbtn) or the icon circle inside the side buttons (.round i) */
.roundbtn, .round i {
  background: var(--glass-bg, rgba(15, 23, 42, .65)); -webkit-backdrop-filter: var(--glass-blur, blur(10px)); backdrop-filter: var(--glass-blur, blur(10px));
  border: var(--glass-border, 1px solid rgba(255, 255, 255, .15)); box-shadow: var(--glow-shadow, 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent));
  border-radius: 50%; transition: border-color .2s ease, box-shadow .2s ease, transform .1s ease;
}
.round, .round.menubtn, .round.heartbtn { background: none; border: 0; box-shadow: none; }
.roundbtn:hover, .round:hover i { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 45%, transparent); filter: none; }
.roundbtn:active, .round:active i { transform: scale(.94); }
.round.on i { background: var(--accent); border-color: var(--accent); }

/* chips and pills */
.chip { background: rgba(30, 41, 59, .8); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }   /* .pill follows the App Theme glass (app.css) */
.livepill { border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.chip { border-radius: 20px; }
.chip.on { background: var(--accent); border-color: var(--accent); }

@media (max-width:640px) { footer.legal a { display:inline-block; padding:9px 6px; } }

/* ---------- small screens: nothing may push the page wider than the screen ---------- */
@media (max-width:900px) {
  #nav a[href^="#/u/"] .mute { display:none; }   /* the @name beside your picture */
  .streamsnav span { display:none; } .streamsnav { padding:6px; }
  .adminnav span { display:none; }
  #nav a.btn.small.danger { font-size:0; padding:6px 9px; } #nav a.btn.small.danger::before { content:"⚠"; font-size:15px; }
}
@media (max-width:640px) {
  .counts { overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  .counts::-webkit-scrollbar { display:none; }
  .counts button { flex:0 0 auto; min-width:76px; padding-left:10px; padding-right:10px; white-space:nowrap; }
}
@media (max-width:460px) { #nav .btn.live .golbl { display:none; } #nav .btn.live { padding:7px 10px; } .adminnav { display:none; } }   /* Go live keeps just its camera; the Admin shield is under "Admin tools" on your profile page on a phone */
@media (max-width:640px) { .admingroups { flex-wrap:wrap; overflow:visible; gap:6px 14px; } .admingroups .tab { padding:7px 10px; font-size:14px; } }

/* a voice-only streamer inside a Versus battle: photo + voice wave in their half */
.vs .panel { min-width:0; }
.vs .panel .vsvoice { z-index:2; padding:6px; gap:4px; overflow:hidden; box-sizing:border-box; }
.vs .panel .vsvoice .vwave { position:static; inset:auto; background:transparent; width:86%; max-width:100%; height:auto; aspect-ratio:16/6; margin:0; flex:0 0 auto; }
.vs .panel .vsvoice b { font-size:clamp(10px, 2.2cqw, 14px); }
.vs .panel .nm, .vs .panel .crown, .vs .panel .vschip { z-index:4; }

/* ---------- verify your account ---------- */
.vbanner { display:flex; align-items:center; gap:10px; margin:10px 0; padding:10px 12px; border-radius:14px; background:var(--glass-bg, rgba(30,41,59,.7)); border:1px solid var(--glass-line, rgba(255,255,255,.14)); }
.vbanner .mute { font-size:12px; }
.vbanner .iconx { background:none; border:0; color:var(--mute); font-size:16px; padding:6px; min-width:32px; min-height:32px; cursor:pointer; }
.vrow { padding:10px 0; border-bottom:1px solid rgba(255,255,255,.08); }
.vrow.ok { display:flex; gap:8px; align-items:center; }
.vrow .row { display:flex; gap:8px; margin-top:8px; }
.vrow .row input { flex:1; min-width:0; }
.gift.locked { opacity:.55; }

/* admin > Money > Profit calculator */
.pc-tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.pc-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:10px 14px; margin-bottom:10px; }
.pc-field { display:flex; flex-direction:column; gap:3px; font-size:13px; }
.pc-field small { font-size:11px; }
.pc-field input, .pc-field select { width:100%; box-sizing:border-box; }
.pc-table td { vertical-align:top; white-space:normal; }
.pc-table td.pc-num { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; font-weight:600; }
.pc-table tr.pc-total td { border-top:2px solid var(--line); font-weight:700; }
.pc-table tr.pc-keep td.pc-num { font-size:18px; }
@media (max-width:520px) { .pc-grid { grid-template-columns:1fr; } }
