/* ═══════════════════════════════════════════════════════════
   Life Line: Music Room Mini App
   طراحی: اسپاتیفای + Discord Listening Party + Telegram Mini App
   تم تیره #050711 با نئون بنفش / صورتی / فیروزه‌ای
   فونت Vazirmatn (محلی) + آیکون‌های Bootstrap (محلی)
   ═══════════════════════════════════════════════════════════ */

/* ── فونت Inter (محلی: بدون وابستگی به CDN) ── */
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ── فونت Vazirmatn (محلی: بدون وابستگی به CDN) ── */
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050711;
  --bg2: #080B18;
  --bg3: #0B1020;
  --card: rgba(255, 255, 255, .045);
  --card-strong: rgba(255, 255, 255, .07);
  --card-border: rgba(255, 255, 255, .09);
  --text: #F4F6FF;
  --hint: #8B93B8;
  --purple: #8B5CF6;
  --purple-2: #A855F7;
  --pink: #EC4899;
  --pink-2: #F472B6;
  --cyan: #22D3EE;
  --ok: #34D399;
  --danger: #FB7185;
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .55);
  --glow-purple: 0 8px 30px rgba(139, 92, 246, .4);
  --glow-pink: 0 8px 30px rgba(236, 72, 153, .4);
  --grad-main: linear-gradient(135deg, var(--purple), var(--pink));
  font-size: 16px;
}

/* تم روشن تلگرام */
body.light {
  --bg: #EFF1FB;
  --bg2: #E7EAF8;
  --bg3: #E0E4F6;
  --card: rgba(255, 255, 255, .72);
  --card-strong: rgba(255, 255, 255, .85);
  --card-border: rgba(90, 90, 160, .16);
  --text: #171A2E;
  --hint: #5C6680;
  --shadow: 0 14px 40px rgba(80, 70, 180, .18);
  --glow-purple: 0 8px 24px rgba(139, 92, 246, .28);
  --glow-pink: 0 8px 24px rgba(236, 72, 153, .25);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  min-height: 100%;
  background:
    radial-gradient(120% 55% at 50% -10%, var(--bg3) 0%, var(--bg) 60%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
  user-select: none;
  overflow-x: hidden;
  transition: background .4s;
}

/* آیکون‌های Bootstrap: هم‌تراز با متن */
.bi { line-height: 1; vertical-align: -0.125em; }
button .bi { margin-inline-end: 0; }

/* ── پس‌زمینه: aurora + ستاره ── */
#bg-glow {
  position: fixed;
  inset: -30% -20% auto -20%;
  height: 95%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(34% 48% at 20% 22%, rgba(139, 92, 246, .22), transparent 70%),
    radial-gradient(38% 52% at 80% 16%, rgba(236, 72, 153, .16), transparent 70%),
    radial-gradient(46% 60% at 50% 90%, rgba(34, 211, 238, .12), transparent 72%);
  filter: blur(12px);
  /* بهینه‌سازی داغی گوشی: aurora ایستاست (حرکتِ یک لایهٔ blur شده گران‌ترین انیمیشن صفحه بود) */
  animation: none;
}
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(1px 1px at 12% 24%, rgba(255,255,255,.8), transparent 100%),
    radial-gradient(1px 1px at 34% 12%, rgba(255,255,255,.5), transparent 100%),
    radial-gradient(1.5px 1.5px at 58% 30%, rgba(255,255,255,.7), transparent 100%),
    radial-gradient(1px 1px at 78% 8%, rgba(255,255,255,.6), transparent 100%),
    radial-gradient(1px 1px at 90% 42%, rgba(255,255,255,.5), transparent 100%),
    radial-gradient(1.5px 1.5px at 22% 70%, rgba(255,255,255,.45), transparent 100%),
    radial-gradient(1px 1px at 66% 66%, rgba(255,255,255,.5), transparent 100%),
    radial-gradient(1px 1px at 44% 88%, rgba(255,255,255,.4), transparent 100%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
  50%  { transform: translate3d(3%, 3%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1); }
}
@keyframes twinkle {
  from { opacity: .35; }
  to   { opacity: .6; }
}

#app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px 16px 130px;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 40px; height: 40px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
  color: #fff;
  background: var(--grad-main);
  box-shadow: var(--glow-purple);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.app-name { font-weight: 900; font-size: 17px; letter-spacing: .3px; }
.app-tag { font-size: 11px; color: var(--hint); }

.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 13px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform .12s, background .2s, box-shadow .2s;
}
.icon-btn:active { transform: scale(.9); }

.conn-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--hint);
  box-shadow: 0 0 0 4px rgba(139, 147, 184, .15);
  transition: background .3s, box-shadow .3s;
}
.conn-dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .18), 0 0 14px rgba(52, 211, 153, .7); }
.conn-dot.bad { background: var(--danger); box-shadow: 0 0 0 4px rgba(251, 113, 133, .18); }

/* ── Room header ── */
.room-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--card-strong), var(--card));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35);
}
.room-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.room-avatar {
  width: 40px; height: 40px;
  flex: none;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: var(--glow-purple);
}
.room-meta { min-width: 0; line-height: 1.35; }
.room-meta h2 { font-size: 16.5px; font-weight: 800; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-owner { font-size: 11.5px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-stats { font-size: 11.5px; color: var(--hint); }
.room-stats span { color: var(--cyan); font-weight: 700; }

.room-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.btn-invite {
  display: inline-flex; align-items: center; gap: 6px;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 800;
  color: #fff;
  background: var(--grad-main);
  box-shadow: var(--glow-pink);
  cursor: pointer;
  transition: transform .12s, box-shadow .2s;
}
.btn-invite:active { transform: scale(.94); }

/* ── رادیو: نشان LIVE + خروج + یادداشت رادیو ── */
.radio-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .6px;
  color: #fff;
  background: linear-gradient(135deg, #FB7185, #F43F5E);
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(244, 63, 94, .55);
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 10px rgba(244, 63, 94, .4); }
  50%      { box-shadow: 0 0 20px rgba(244, 63, 94, .85); }
}
.btn-leave {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 13px;
  border: 1px solid rgba(251, 113, 133, .4);
  background: rgba(251, 113, 133, .12);
  color: #FB7185;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .12s, background .2s;
}
.btn-leave:active { transform: scale(.9); background: rgba(251, 113, 133, .25); }

.radio-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(244, 63, 94, .35);
  background: linear-gradient(135deg, rgba(244, 63, 94, .12), rgba(139, 92, 246, .1));
  color: var(--hint);
  font-size: 13px;
}
.radio-note strong {
  color: #FB7185;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.radio-note i { font-size: 16px; }
.radio-listen { border-color: rgba(34, 211, 238, .35); }

/* عکس کانال به‌عنوان آرت‌ورک دیسک */
.disc img#discImg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 2;
}
.disc img#discImg + .disc-label { display: none; }

/* ── Search ── */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--card);
  backdrop-filter: blur(12px);
}
.search-box i { color: var(--hint); font-size: 16px; }
.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
}

/* ── Profile ── */
.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--card-strong), var(--card));
  backdrop-filter: blur(16px);
  margin-bottom: 16px;
}
.profile-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.profile-meta strong { font-size: 15.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-meta > span { font-size: 12.5px; color: var(--hint); }
.profile-radio { color: #FB7185 !important; font-weight: 700; font-size: 12px; }
.profile-actions { display: flex; gap: 10px; }
.profile-actions .btn-ghost { flex: 1; }

/* ── Tab panels ── */
.tab-panel { display: none; animation: fadeIn .3s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Stage: waveform + vinyl ── */
.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 8px;
}
.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 66px;
  opacity: .35;
  transition: opacity .5s;
}
.wave i {
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  height: 16px;
  animation: waveBounce 1.1s ease-in-out infinite;
}
.wave i:nth-child(2n) { animation-delay: .14s; }
.wave i:nth-child(3n) { animation-delay: .28s; }
.wave i:nth-child(5n) { animation-delay: .42s; }
.wave i:nth-child(7n) { animation-delay: .56s; }
.stage.playing .wave { opacity: .95; }
@keyframes waveBounce {
  0%, 100% { transform: scaleY(.35); }
  50%      { transform: scaleY(1); }
}

.art {
  position: relative;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
/* هالهٔ نور پشت وینیل */
.art::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, .5), rgba(236, 72, 153, .22) 55%, transparent 72%);
  filter: blur(22px);
  opacity: .55;
  transition: opacity .5s;
}
.art.playing::before { opacity: 1; }

/* حلقهٔ نئونی دور وینیل */
.ring {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 8%, var(--purple), var(--pink), var(--cyan), transparent 88%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  opacity: .55;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, .8));
  transition: opacity .5s;
}
.art.playing .ring { opacity: 1; animation: ringSpin 3.2s linear infinite; will-change: transform; }
@keyframes ringSpin { to { transform: rotate(360deg); } }

.disc {
  width: 146px; height: 146px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #141A2C 0 2px, #0A0E1C 2px 4px);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: var(--shadow), inset 0 0 34px rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  z-index: 1;
  will-change: transform;
}
.disc::before {
  content: "";
  position: absolute; inset: 27px;
  border-radius: 50%;
  background: var(--grad-main);
  opacity: .9;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .35);
}
.disc-label {
  position: relative;
  font-size: 30px;
  color: #fff;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .5));
}
.art.playing .disc { animation: spin 9s linear infinite; }
.art:not(.playing) .disc { box-shadow: var(--shadow), inset 0 0 44px rgba(0, 0, 0, .65); }
@keyframes spin { to { transform: rotate(360deg); } }

/* اکولایزر داخل وینیل */
.eq {
  position: absolute;
  bottom: 0;
  z-index: 2;
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 26px;
  opacity: 0;
  transition: opacity .35s;
}
.art.playing .eq { opacity: 1; }
.eq i {
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--pink-2), var(--purple));
  height: 7px;
  animation: eq 1s ease-in-out infinite;
}
.eq i:nth-child(2) { animation-delay: .12s; }
.eq i:nth-child(3) { animation-delay: .24s; }
.eq i:nth-child(4) { animation-delay: .36s; }
.eq i:nth-child(5) { animation-delay: .48s; }
@keyframes eq { 0%,100% { height: 7px; } 50% { height: 26px; } }

/* ── Track info ── */
.track-info { text-align: center; margin-bottom: 8px; }
.track-info h1 {
  font-size: 19px; font-weight: 800;
  margin-bottom: 3px; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-info p { color: var(--hint); font-size: 14.5px; }

/* ── Progress ── */
.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.seek-wrap { flex: 1; min-width: 0; position: relative; }
.progress input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  background: transparent;
  position: relative;
  z-index: 2;
  cursor: pointer;
}
.progress input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--purple);
  box-shadow: 0 0 12px rgba(139, 92, 246, .7);
}
.progress input[type="range"]:disabled::-webkit-slider-thumb { background: var(--hint); border-color: var(--hint); box-shadow: none; }
.progress input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--purple);
}
.bar-fill {
  position: absolute;
  left: 0;
  top: 13px;
  height: 6px;
  border-radius: 4px;
  background: var(--card-strong);
  overflow: hidden;
  pointer-events: none;
}
.bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(139, 92, 246, .6);
}
.times {
  display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--hint);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.seek-btn {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--hint);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform .12s, color .2s, background .2s, opacity .2s;
}
.seek-btn:active { transform: scale(.9); color: var(--text); }
.seek-btn:disabled { opacity: .35; }

/* ── Controls ── */
.controls { margin-bottom: 8px; }
.ctrl-row { display: flex; justify-content: center; align-items: center; gap: 14px; }
.ctrl {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  position: relative;
  transition: transform .12s, background .2s, box-shadow .2s, color .2s, border-color .2s;
}
.ctrl:active { transform: scale(.88); }
.ctrl.big {
  width: 68px; height: 68px;
  background: var(--grad-main);
  border: none;
  font-size: 27px;
  color: #fff;
  box-shadow: 0 10px 34px rgba(236, 72, 153, .55), 0 0 0 1px rgba(255, 255, 255, .12);
  animation: glowPulse 2.6s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 10px 34px rgba(236, 72, 153, .5), 0 0 0 1px rgba(255,255,255,.12); }
  50%      { box-shadow: 0 10px 44px rgba(236, 72, 153, .8), 0 0 22px rgba(139, 92, 246, .5), 0 0 0 1px rgba(255,255,255,.16); }
}
.ctrl.cc-on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: var(--glow-purple);
}
.ctrl.side { width: 42px; height: 42px; color: var(--hint); font-size: 16px; }
.ctrl.side.on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: var(--glow-purple);
}
.ctrl .dot {
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.member-note {
  text-align: center;
  color: var(--hint);
  font-size: 14.5px;
  line-height: 1.9;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}
.member-note small { opacity: .8; }

/* ── Volume ── */
.volume {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  color: var(--hint);
  font-size: 15px;
}
.volume input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 5px;
  border-radius: 4px;
  background: var(--card-strong);
  cursor: pointer;
}
.volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--purple);
  box-shadow: 0 0 10px rgba(139, 92, 246, .6);
}
.volume input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--purple);
}

.hint { min-height: 18px; text-align: center; font-size: 12.5px; color: var(--hint); margin-bottom: 8px; }

/* ── Members card ── */
.members-card {
  background: linear-gradient(135deg, var(--card-strong), var(--card));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.members-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.members-head h3 { font-size: 15px; font-weight: 800; }
.see-all {
  border: none;
  background: none;
  color: var(--purple-2);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 10px;
  transition: transform .12s, background .2s;
}
.see-all:active { transform: scale(.94); background: var(--card); }

.member-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}
.member-strip::-webkit-scrollbar { display: none; }

.member-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 60px;
  flex: none;
}
.member-chip strong {
  font-size: 11.5px;
  font-weight: 700;
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-chip .mrole { font-size: 10px; color: var(--hint); }
.member-chip .me-tag, .member-meta .me-tag { color: var(--cyan); font-weight: 700; font-size: 10.5px; }
/* آواتار + حلقهٔ گوش دادن + نشان آنلاین */
.avatar-ring {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  padding: 0;
  background: transparent;
}
.avatar-ring .avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px;
  overflow: hidden;
  border: 0;
}
.avatar-ring .avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ring .online {
  position: absolute;
  bottom: -3px; right: -1px;
  transform: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ok);
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(52, 211, 153, .8);
  animation: blinkDot 1.8s ease-in-out infinite;
}
@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}

/* ── Panel head ── */
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.panel-head h2 { font-size: 17px; font-weight: 800; }
.count-badge {
  background: var(--grad-main);
  color: #fff;
  font-size: 12.5px; font-weight: 700;
  padding: 3px 11px;
  border-radius: 20px;
  box-shadow: var(--glow-purple);
}

/* ── Playlist / Queue ── */
.track-list { display: flex; flex-direction: column; gap: 9px; }
.track-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform .12s, background .2s, border-color .2s;
}
.track-item:active { transform: scale(.985); background: var(--card-strong); }
.track-item.current {
  border-color: rgba(139, 92, 246, .55);
  background: linear-gradient(90deg, rgba(139, 92, 246, .16), transparent);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .18);
}
.track-num {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 11px;
  background: var(--card-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--hint);
}
.track-item.current .track-num { background: var(--grad-main); color: #fff; box-shadow: var(--glow-purple); }
.track-thumb {
  width: 40px; height: 40px;
  flex: none;
  border-radius: 11px;
  overflow: hidden;
  background: var(--card-strong);
  border: 1px solid rgba(139, 92, 246, .25);
}
.track-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.track-meta { flex: 1; min-width: 0; }
.track-meta strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-meta span { font-size: 12px; color: var(--hint); display: block; }
.track-dur { font-size: 12px; color: var(--hint); font-variant-numeric: tabular-nums; flex: none; }
.track-item.not-ready { cursor: default; opacity: .82; }
.track-item.not-ready:active { transform: none; }
.dl-status { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11.5px; color: #b79bff; }
.dl-status .dl-spin { display: inline-block; }
.dl-status .dl-pct {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .3px;
  background: linear-gradient(90deg, #a855f7, #ec4899, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.dl-wrap .dl-bar { margin-top: 3px; }
.dl-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #b79bff;
  font-size: 13px;
  padding: 14px 0;
}
.dl-big .dl-spin { font-size: 26px; color: #a855f7; }
.dl-big .dl-spin i { animation: spin 1.1s linear infinite; display: inline-block; }
.dl-big-pct {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #a855f7, #ec4899, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dl-big .dl-bar { width: min(240px, 70%); }
.dl-bar {
  margin-top: 5px;
  height: 4px;
  border-radius: 99px;
  background: rgba(139, 92, 246, .15);
  overflow: hidden;
}
.dl-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #a855f7, #ec4899, #22d3ee);
  transition: width .6s ease;
}
.dl-fill.dl-spin-fill {
  width: 40%;
  animation: dlIndeterminate 1.4s ease-in-out infinite;
}
@keyframes dlIndeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}
.track-del {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(244, 63, 94, .35);
  background: rgba(244, 63, 94, .10);
  color: #fb7185;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: transform .12s, background .2s, border-color .2s;
}
.track-del:active { transform: scale(.9); background: rgba(244, 63, 94, .22); border-color: rgba(244, 63, 94, .6); }

.empty-note {
  text-align: center;
  color: var(--hint);
  font-size: 14.5px;
  line-height: 2;
  padding: 30px 10px;
}

/* ── Members list ── */
.member-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.member-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  backdrop-filter: blur(12px);
}
.member-item .avatar-ring { width: 46px; height: 46px; }
.member-meta { flex: 1; min-width: 0; }
.member-meta strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-meta span { font-size: 12px; color: var(--hint); }
.role-badge {
  font-size: 11.5px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  flex: none;
}
.role-badge.owner { background: linear-gradient(135deg, #F7B733, #FC4A1A); color: #fff; box-shadow: 0 4px 12px rgba(247, 183, 51, .4); }
.role-badge.member { background: var(--card-strong); color: var(--hint); }

/* ── Invite card ── */
.invite-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, .16), rgba(236, 72, 153, .12));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.invite-text { display: flex; flex-direction: column; gap: 2px; }
.invite-text strong { font-size: 14.5px; }
.invite-text span { font-size: 12px; color: var(--hint); }

.btn-primary {
  border: none;
  background: var(--grad-main);
  color: #fff;
  font-size: 14px; font-weight: 700;
  padding: 11px 18px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: var(--glow-pink);
  transition: transform .12s, box-shadow .2s;
}
.btn-primary:active { transform: scale(.95); }
.btn-ghost {
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 14px; font-weight: 600;
  padding: 11px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .12s, background .2s;
}
.btn-ghost:active { transform: scale(.95); }

/* ── Bottom navigation ── */
.bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(92vw, 440px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(10, 14, 28, .82);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .55);
}
.nav-item {
  border: none;
  background: transparent;
  color: var(--hint);
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 12px;
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: transform .12s, color .2s, background .25s, box-shadow .25s;
}
.nav-item span { font-size: 10px; font-weight: 700; }
.nav-item:active { transform: scale(.9); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 92, 246, .28), rgba(236, 72, 153, .22));
  box-shadow: 0 4px 18px rgba(139, 92, 246, .35), inset 0 0 0 1px rgba(139, 92, 246, .35);
}

/* ── Home: ساخت/ورود به اتاق داخل مینیاپ ── */
#homeScreen {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}
.dashboard-home{max-width:720px;margin:0 auto;padding:28px 18px 12px}.dashboard-kicker{color:#9e8cff;font-size:11px;letter-spacing:2px;font-weight:700}.dashboard-title{font-size:42px;margin:6px 0 0;background:linear-gradient(120deg,#fff,#c7b8ff);-webkit-background-clip:text;color:transparent}.dashboard-subtitle{margin:0 0 22px;color:#b7b2c8;font-size:18px}.dashboard-search{display:flex;align-items:center;gap:10px;padding:13px 15px;border:1px solid #302a55;background:#111127cc;border-radius:16px;box-shadow:0 0 25px #6f4cff18}.dashboard-search i{color:#9e8cff}.dashboard-search input{flex:1;background:transparent;border:0;outline:0;color:#fff;font:inherit}.dashboard-section-head{display:flex;justify-content:space-between;align-items:center;margin:28px 2px 12px}.dashboard-section-head h2{font-size:19px;margin:0}.discover-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.discover-card{position:relative;overflow:hidden;display:flex;align-items:center;gap:12px;padding:14px;border:1px solid #302653;border-radius:20px;background:linear-gradient(145deg,#17152fdd,#0d1021ee);box-shadow:0 12px 30px #0005;cursor:pointer}.channel-art{width:76px;height:76px;border-radius:18px;display:grid;place-items:center;flex:none;background:linear-gradient(135deg,#8d5bff,#f04fc8 55%,#24d8e8);font-size:30px;color:#fff;box-shadow:0 0 24px #9c5cff66}.channel-copy{min-width:0;flex:1}.channel-copy h3{margin:0;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.channel-copy p{margin:3px 0 10px;color:#9e97b4;font-size:12px}.channel-stats{display:flex;gap:10px;color:#aaa4be;font-size:11px}.needs-admin{margin:6px 0 0;color:#fbbf24;font-size:11px;display:flex;align-items:center;gap:5px}.needs-admin i{color:#f59e0b}.listen-btn{position:absolute;right:12px;bottom:12px;border:0;border-radius:999px;padding:7px 11px;background:#8d5bff;color:#fff;font-weight:700}.legacy-home-actions{max-width:720px;margin:8px auto 100px;padding:0 18px}.legacy-home-actions .home-btn{width:100%;margin-top:10px}
.home-hero{margin:18px 0 20px;display:flex;overflow:hidden;width:100%;aspect-ratio:4/1;min-height:150px;max-height:220px;border:1px solid #3a2d70;border-radius:18px;background-image:linear-gradient(90deg,rgba(4,5,22,.88) 0%,rgba(7,5,27,.56) 38%,rgba(4,5,22,.06) 72%),url("/photo/photo_2026-08-10_12-38-52.jpg");background-size:cover;background-position:center;background-repeat:no-repeat;box-shadow:0 18px 50px #05000f99}.home-hero>div:first-child{padding:18px;position:relative;z-index:2;display:flex;align-items:flex-end}.hero-eyebrow{font-size:10px;letter-spacing:1.5px;color:#c08cff}.home-hero h2{font-size:24px;margin:8px 0}.home-hero p{color:#d4cee6;max-width:290px;line-height:1.55;margin:0 0 16px}.hero-cta{border:0;border-radius:14px;padding:12px 18px;color:#fff;font-weight:800;background:linear-gradient(100deg,#673cff,#e43bba);box-shadow:0 8px 25px #8a45ff66}.home-hero .hero-cta,.home-hero .hero-join{padding:8px 12px;border-radius:10px;font-size:12px}.hero-art{display:none}
.home-actions{display:flex;gap:8px;max-width:420px;margin:4px auto 100px;padding:0 18px}.home-actions .home-btn{flex:1;max-width:none;padding:10px 12px;font-size:13px}.discover-card{min-height:180px}
.channel-art img{width:100%;height:100%;display:block;object-fit:cover;border-radius:inherit}
.life-home{max-width:980px!important;width:100%;align-items:stretch!important;text-align:left!important;justify-content:flex-start!important;padding:22px clamp(16px,4vw,42px) 120px!important;gap:0!important}.life-head{display:flex;align-items:center;gap:12px;margin-bottom:22px}.life-mark{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#874bff,#e94dbb);font-size:25px;box-shadow:0 0 25px #9b42ff88}.life-head h1{margin:0;font-size:28px}.life-head p{margin:2px 0 0;color:#a9a3c2}.life-head-actions{margin-left:auto;display:flex;align-items:center;gap:14px}.round-action{width:42px;height:42px;border-radius:50%;border:1px solid #31264f;background:#0e1021;color:#fff}.home-avatar{width:42px;height:42px;border-radius:50%;border:2px solid #d059ff;background:linear-gradient(135deg,#653cff,#e73db9)}.hero-buttons{display:flex;gap:8px}.hero-join{border:1px solid #7043cc;border-radius:14px;padding:12px 18px;color:#fff;background:#241744aa;font-weight:700}.life-home .dashboard-search{margin-bottom:24px}.life-home .dashboard-section-head{margin:16px 0 14px}.life-home .discover-grid{display:flex;overflow-x:auto;gap:14px;padding:4px 2px 16px;scroll-snap-type:x mandatory}.life-home .discover-card{min-width:230px;width:230px;min-height:260px;display:block;padding:12px;scroll-snap-align:start}.life-home .channel-art{width:100%;height:145px;margin-bottom:12px}.life-home .channel-copy h3{font-size:18px}.life-home .listen-btn{right:12px;bottom:12px;width:42px;height:42px;padding:0}.life-home .home-logo,.life-home~.home-logo{display:none}@media(max-width:560px){.life-home{padding-top:16px!important}.life-head h1{font-size:24px}.life-home .home-hero{min-height:135px}.life-home .hero-art{min-width:120px}.life-home .discover-card{min-width:70vw;width:70vw}}
.owner-admin{margin:22px 0;padding:18px;border:1px solid #6439a8;border-radius:20px;background:linear-gradient(145deg,#17122f,#0c0d1b);box-shadow:0 0 30px #8c3dff22}.admin-add{display:flex;gap:10px}.admin-add input{min-width:0;flex:1;border:1px solid #392d62;border-radius:14px;background:#090b19;color:#fff;padding:12px 14px;outline:0}.admin-add input:focus{border-color:#a34dff;box-shadow:0 0 18px #a34dff33}.admin-tip{margin:10px 0 0;color:#9e97b4;font-size:12px;display:flex;align-items:center;gap:6px}.admin-tip i{color:#ff5f8f}@media(max-width:480px){.home-hero{min-height:125px}.hero-art{min-width:115px}.home-hero>div:first-child{padding:14px}.home-hero h2{font-size:20px}.home-hero p{font-size:13px}.hero-art:before{width:86px;height:86px;left:15%}.admin-add{flex-direction:column}.discover-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory}.discover-card{min-width:82vw;scroll-snap-align:start}}
.avatar,.avatar-ring{position:relative;flex:0 0 auto;overflow:hidden}.avatar img,.avatar-ring img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
#homeScreen>.home-logo,#homeScreen>.home-title,#homeScreen>.home-sub{display:none}.bottom-nav{overflow-x:auto;scrollbar-width:none}.bottom-nav::-webkit-scrollbar{display:none}.bottom-nav .nav-item{min-width:54px}
.home-logo {
  width: 84px; height: 84px;
  border-radius: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
  color: #fff;
  background: var(--grad-main);
  box-shadow: var(--glow-purple);
  animation: pulse 2.4s ease-in-out infinite;
  margin-bottom: 6px;
}
.home-title { font-size: 26px; font-weight: 900; }
.home-sub { color: var(--hint); font-size: 14px; margin-bottom: 8px; }
.home-btn { width: 100%; max-width: 320px; padding: 14px; font-size: 15px; }
.join-row { display: flex; gap: 8px; width: 100%; max-width: 320px; }
.join-row input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px;
  outline: none;
}
.join-row input:focus { border-color: var(--purple); box-shadow: var(--glow-purple); }
.home-hint { min-height: 20px; color: var(--hint); font-size: 13px; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  z-index: 50;
  background: rgba(4, 6, 12, .7);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
.modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  padding: 20px 20px 26px;
  animation: slideUp .28s ease;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .6);
}
@keyframes slideUp { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-head h3 { font-size: 16.5px; font-weight: 800; }
.modal-sub { color: var(--hint); font-size: 13px; margin-bottom: 12px; }
.invite-link {
  background: var(--card);
  border: 1px dashed var(--card-border);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  color: var(--text);
  direction: ltr;
  text-align: center;
  word-break: break-all;
  margin-bottom: 14px;
  font-family: ui-monospace, Consolas, monospace;
}
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn-primary, .modal-actions .btn-ghost { flex: 1; }

/* ── Join modal (ورود با کد) ── */
.join-modal-input {
  display: flex;
  gap: 8px;
  align-items: center;
}
.join-modal-input input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.join-modal-input input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
.join-modal-input .btn-primary { padding: 12px 18px; flex: none; }
.modal-tip { text-align: center; color: var(--hint); font-size: 12px; margin-top: 14px; }

/* ── Unlock audio ── */
.unlock-backdrop {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(4, 6, 12, .78);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .25s ease;
}
.unlock-card {
  max-width: 340px;
  width: 100%;
  background: linear-gradient(160deg, var(--bg2), var(--bg3));
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: slideUp .3s ease;
}
.unlock-icon {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--grad-main);
  color: #fff;
  font-size: 34px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow-pink);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.unlock-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.unlock-card p { color: var(--hint); font-size: 13.5px; line-height: 1.9; margin-bottom: 18px; }
.unlock-card .btn-primary { width: 100%; padding: 14px; font-size: 15px; }

/* ── Fatal ── */
#fatal {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  text-align: center;
  padding: 30px;
  line-height: 2;
}

/* ── Responsive ── */
@media (max-width: 380px) {
  .art { width: 152px; height: 152px; }
  .disc { width: 130px; height: 130px; }
  .disc::before { inset: 24px; }
  .disc-label { font-size: 27px; }
  .stage { gap: 6px; }
  .ctrl-row { gap: 12px; }
  .ctrl { width: 44px; height: 44px; }
  .ctrl.big { width: 64px; height: 64px; }
  .ctrl.side { width: 38px; height: 38px; }
}

/* صفحه‌های کوتاه: همه‌چیز در یک نگاه، بدون اسکرول */
@media (max-height: 720px) {
  #app { padding: 8px 14px 116px; }
  .topbar { margin-bottom: 8px; }
  .room-card { margin-bottom: 10px; }
  .art { width: 146px; height: 146px; }
  .disc { width: 124px; height: 124px; }
  .disc::before { inset: 22px; }
  .disc-label { font-size: 25px; }
  .wave { height: 54px; }
  .track-info { margin-bottom: 6px; }
  .track-info h1 { font-size: 17px; }
  .ctrl { width: 44px; height: 44px; }
  .ctrl.big { width: 64px; height: 64px; }
  .ctrl.side { width: 38px; height: 38px; }
  .ctrl-row { gap: 12px; }
}
@media (max-height: 620px) {
  .art { width: 122px; height: 122px; }
  .disc { width: 104px; height: 104px; }
  .disc::before { inset: 18px; }
  .disc-label { font-size: 21px; }
  .wave { height: 44px; }
  .eq { height: 20px; }
  .eq i { height: 5px; }
  .avatar-ring { width: 42px; height: 42px; }
  .member-chip { width: 54px; }
  .members-card { padding: 10px; }
  .member-strip { gap: 8px; }
}

@media (min-width: 800px) {
  #app { max-width: 560px; }
  .art { width: 260px; height: 260px; }
  .disc { width: 220px; height: 220px; }
  .bottom-nav { width: min(70vw, 480px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Home hero, user presence and compact looping radio carousel */
.home-hero > div:first-child {
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}
.home-hero .hero-title {
  margin: 0;
  color: #fff;
  font-size: clamp(15px, 3vw, 20px);
  font-weight: 800;
  letter-spacing: -.25px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .75);
}
.bottom-nav.home-only .nav-item:not(#navHome):not(#navProfile):not(#navReferral) { display: none; }
.bottom-nav.home-only { width: 222px; justify-content: space-around; }
.bottom-nav.home-only #navReferral { display: flex; }
.bottom-nav.admin-mode .nav-item:not(#navHome):not(#navAdmin):not(#navProfile) { display: none; }
.bottom-nav.admin-mode { width: min(92vw, 250px); justify-content: space-around; }
.bottom-nav:not(.home-only):not(.admin-mode) #navHome,
.bottom-nav:not(.home-only):not(.admin-mode) #navAdmin,
.bottom-nav:not(.home-only):not(.admin-mode) #navProfile { display: none; }
.home-avatar {
  position: relative;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 0 22px rgba(208, 89, 255, .38);
}
.home-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.home-avatar::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -3px;
  width: 10px;
  height: 10px;
  border: 2px solid #080a16;
  border-radius: 50%;
  background: #35e88f;
  box-shadow: 0 0 0 0 rgba(53, 232, 143, .65);
  animation: home-online-pulse 1.7s ease-out infinite;
}
@keyframes home-online-pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 232, 143, .7); }
  70% { box-shadow: 0 0 0 7px rgba(53, 232, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 232, 143, 0); }
}
.life-home .discover-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 8px;
  padding: 3px 1px 12px;
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  scrollbar-width: none;
  touch-action: pan-x;
  cursor: grab;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
}
.life-home .discover-grid::-webkit-scrollbar { display: none; }
.life-home .discover-grid.is-dragging { cursor: grabbing; }
.life-home .discover-card {
  flex: 0 0 calc((100% - 16px) / 3);
  min-width: 0;
  width: auto;
  min-height: 184px;
  padding: 7px;
  border-color: rgba(139, 92, 246, .28);
  border-radius: 15px;
  background: linear-gradient(155deg, rgba(31, 25, 61, .96), rgba(10, 13, 30, .98));
  box-shadow: 0 9px 24px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04);
  scroll-snap-align: none !important;
}
.life-home .channel-art {
  width: 100%;
  height: auto;
  aspect-ratio: 1.25 / 1;
  margin-bottom: 7px;
  border-radius: 11px;
  font-size: 22px;
  box-shadow: 0 5px 16px rgba(139, 92, 246, .25);
}
.life-home .channel-copy h3 {
  font-size: 11px;
  line-height: 1.35;
}
.life-home .channel-copy > p {
  margin: 2px 0 5px;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.life-home .channel-stats {
  position: absolute;
  left: 8px;
  bottom: 9px;
  padding: 0;
  font-size: 9px;
  gap: 7px;
}
.life-home .needs-admin { display: none; }
.life-home .channel-stats span { display: inline-flex; align-items: center; gap: 3px; }
.life-home .channel-stats i { font-size: 10px; color: #b8a0ff; }
.life-home .channel-stats b { font-size: 9px; font-weight: 700; color: #d8d2ed; }
.life-home .listen-btn {
  right: 7px;
  bottom: 7px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, .42);
}
@media (max-width: 480px) {
  .home-hero > div:first-child { padding: 13px; }
  .life-home .discover-card { min-height: 172px; }
}

/* Compact room header and glass profile/more menus */
.room-card {
  position: relative;
  justify-content: flex-start;
  min-height: 34px;
  margin-bottom: 10px;
  padding: 2px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.room-avatar,
.room-owner,
.room-stats { display: none; }
.room-info { gap: 0; min-width: 0; }
.room-meta { min-width: 0; }
.room-meta h2 { font-size: 16px; max-width: min(62vw, 270px); }
.room-actions { gap: 7px; }
.room-actions .radio-badge { order: -1; }
.room-actions .btn-leave { width: 32px; height: 32px; border-radius: 10px; }
.more-wrap { position: relative; }
.more-menu,
.home-user-menu {
  position: absolute;
  z-index: 80;
  min-width: 154px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  background: rgba(18, 16, 40, .78);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(20px);
}
.more-menu { top: calc(100% + 9px); right: 0; }
.more-menu-item,
.home-user-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 0;
  border-radius: 11px;
  color: var(--text);
  background: transparent;
  font: 600 12px/1.2 inherit;
  text-align: left;
  cursor: pointer;
}
.more-menu-item:hover,
.home-user-menu button:hover { background: rgba(139, 92, 246, .2); }
.home-profile-wrap { position: relative; }
.home-avatar { padding: 0; cursor: pointer; font-family: inherit; }
.home-user-menu { top: calc(100% + 10px); right: 0; }
.home-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 3, 12, .52);
  backdrop-filter: blur(7px);
}
.home-profile-card {
  position: relative;
  width: min(100%, 320px);
  padding: 28px 22px 24px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 24px;
  background: rgba(19, 17, 43, .76);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(24px);
}
.home-profile-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: var(--hint);
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
}
.home-profile-main { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
.home-profile-main .avatar { border: 2px solid #d059ff; border-radius: 50%; box-shadow: 0 0 25px rgba(208, 89, 255, .35); }
.home-profile-main h3 { margin-top: 4px; font-size: 19px; }
.home-profile-main p { color: var(--hint); font-size: 12px; }
.home-profile-main .role-badge { margin-top: 4px; }
.referral-hero { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: radial-gradient(circle at 30% 25%, rgba(217, 70, 239, .55), rgba(139, 92, 246, .35)); font-size: 30px; color: #fff; box-shadow: 0 8px 28px rgba(208, 89, 255, .4); }
.referral-sub { max-width: 260px; color: var(--hint); font-size: 12.5px; line-height: 1.6; }
.referral-list-title { display: flex; align-items: center; gap: 6px; margin: 18px 0 8px; font-size: 13px; color: #d9ccff; }
.referral-list-title i { color: var(--cyan); }
.referral-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; padding-right: 2px; }
.referral-friend { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 13px; background: rgba(255, 255, 255, .045); }
.referral-friend img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 12px rgba(139, 92, 246, .35); }
.referral-friend .avatar { border: 1px solid rgba(139, 92, 246, .4); box-shadow: none; font-size: 13px; }
.referral-friend .rf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; }
.referral-friend .rf-info strong { font-size: 13px; }
.referral-friend .rf-info span { font-size: 11px; color: var(--hint); }
.referral-friend > i { color: #34d399; font-size: 15px; }
.referral-empty { display: flex; align-items: center; gap: 8px; color: var(--hint); font-size: 12.5px; padding: 14px 0; text-align: center; justify-content: center; }

.leave-top-btn {
  color: #fb7185;
  border-color: rgba(244, 63, 94, .35);
  background: rgba(244, 63, 94, .10);
}
.admin-screen {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  min-height: calc(100vh - 120px);
  margin: 0 auto;
  padding: 28px 18px 130px;
}
.admin-page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.admin-page-head h2 { margin: 0; font-size: 24px; }
.admin-page-head p { margin: 3px 0 0; color: var(--hint); font-size: 12px; }
.admin-page-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #874bff, #e94dbb);
  box-shadow: 0 0 22px rgba(139, 92, 246, .35);
}
.avatar,
.avatar-ring .avatar {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #653cff, #e73db9);
  background-position: center;
}
.avatar img,
.avatar-ring .avatar img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: 50%;
}
.avatar-ring { overflow: visible; }
.home-avatar img { object-position: 50% 50%; }
.home-mini-player {
  position: fixed;
  z-index: 38;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 460px);
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 17px;
  color: var(--text);
  background: rgba(18, 16, 40, .82);
  box-shadow: 0 16px 45px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(22px);
  text-align: left;
  cursor: pointer;
}
.home-mini-player:active { transform: translateX(-50%) scale(.985); }
.mini-player-art {
  width: 47px;
  height: 47px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  color: #fff;
  font-size: 21px;
  background: linear-gradient(135deg, #653cff, #e73db9);
}
.mini-player-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.mini-player-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.mini-player-copy { display: flex; align-items: center; min-width: 0; gap: 6px; font-size: 11px; white-space: nowrap; }
.mini-player-copy strong, .mini-player-copy > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.mini-player-copy strong { font-size: 12px; }
.mini-player-copy > span:last-child { color: var(--hint); }
.mini-player-separator { color: var(--purple-2); flex: none; }
.mini-player-progress-row { display: flex; align-items: center; gap: 8px; }
.mini-player-track { height: 4px; flex: 1; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.mini-player-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--grad-main); transition: width .12s linear; }
.mini-player-progress-row > span:last-child { flex: none; color: var(--hint); font-size: 9px; font-variant-numeric: tabular-nums; }

/* ── SoundCloud search results ── */
.search-hint { margin: 0 0 14px; color: var(--hint); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.search-hint i { color: #9e8cff; }
.sc-result {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform .12s, border-color .2s, box-shadow .2s;
}
.sc-result:active { transform: scale(.985); }
.sc-result:hover { border-color: rgba(139, 92, 246, .45); box-shadow: 0 0 22px rgba(139, 92, 246, .18); }
.sc-art {
  width: 46px; height: 46px; flex: none;
  border-radius: 13px; overflow: hidden;
  background: linear-gradient(135deg, #8d5bff, #f04fc8 60%, #24d8e8);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.sc-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-meta { flex: 1; min-width: 0; }
.sc-meta strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-meta span { font-size: 11.5px; color: var(--hint); }
.sc-add {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #8d5bff, #e94dbb);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; box-shadow: 0 0 16px rgba(139, 92, 246, .45);
}

/* ── Admin channel list (with delete) ── */
.admin-channel-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.admin-channel-head {
  display: flex; justify-content: space-between;
  font-size: 11px; letter-spacing: 1.5px; color: var(--hint);
  text-transform: uppercase; padding: 0 2px;
}
.admin-channel-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(9, 11, 25, .7);
  border: 1px solid #302a55;
  border-radius: 14px;
  padding: 11px 12px 11px 14px;
  transition: border-color .2s;
}
.admin-channel-row:hover { border-color: rgba(139, 92, 246, .4); }
.admin-channel-name {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-channel-name i { color: #9e8cff; flex: none; }
.admin-channel-name small { color: var(--hint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.needs-admin-tag {
  flex: none; font-style: normal; font-size: 10px; color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, .4); border-radius: 999px; padding: 2px 8px;
}
.admin-channel-del {
  width: 34px; height: 34px; flex: none;
  border: 1px solid rgba(244, 63, 94, .35);
  border-radius: 11px;
  background: rgba(244, 63, 94, .1);
  color: #fb7185;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer;
  transition: background .15s, transform .1s;
}
.admin-channel-del:active { transform: scale(.94); }
.admin-channel-del.confirming {
  border-color: rgba(34, 197, 94, .5);
  background: rgba(34, 197, 94, .15);
  color: #4ade80;
}
.admin-empty { margin: 6px 0 0; color: var(--hint); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.admin-empty i { color: #9e8cff; }

/* ── Storage card (admin panel) ── */
.storage-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.storage-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hint);
  font-size: 13px;
  padding: 8px 2px;
}
.storage-loading i { color: var(--purple); }
.storage-row { display: flex; gap: 10px; }
.storage-metric {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg3);
  border: 1px solid var(--card-border);
}
.storage-metric strong { font-size: 14.5px; font-weight: 800; color: var(--text); }
.storage-metric span { font-size: 10.5px; color: var(--hint); font-weight: 600; }
.storage-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--bg3);
  overflow: hidden;
  border: 1px solid var(--card-border);
}
.storage-bar-used {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
}
.storage-sub {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: var(--hint);
  flex-wrap: wrap;
}
.storage-clean { width: 100%; margin-top: 2px; }
.storage-clean.confirming {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 8px 30px rgba(239, 68, 68, .35);
}

/* ── Live downloads (admin panel) ── */
.storage-dls-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
}
.storage-dls-head > span {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.storage-dls-head > span i { color: var(--cyan); }
.storage-dls-head .see-all {
  background: none;
  border: 1px solid var(--card-border);
  color: var(--hint);
  font: 700 11px/1 inherit;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.storage-dls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.storage-dl-empty {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--hint);
  font-size: 12px;
  padding: 6px 2px;
}
.storage-dl-empty i { color: #34d399; }
.storage-dl-item {
  padding: 10px;
  border-radius: 12px;
  background: var(--bg3);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.storage-dl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.storage-dl-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.storage-dl-title i { color: var(--purple); }
.storage-dl-pct {
  font-size: 11.5px;
  font-weight: 900;
  color: var(--cyan);
  flex: none;
}
.storage-dl-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}
.storage-dl-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--bg3);
}
.storage-dl-bar.on span {
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition: width .8s ease;
}
.storage-dl-sub {
  font-size: 10px;
  color: var(--hint);
  display: flex;
  align-items: center;
  gap: 5px;
}
.storage-dl-stage { color: var(--pink-2); font-weight: 700; }

/* ── Download toast (بالای تب Search) ── */
.dl-toast {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, .18), rgba(236, 72, 153, .12));
  border: 1px solid rgba(139, 92, 246, .35);
  color: #e6e0ff;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 22px rgba(139, 92, 246, .18);
  animation: fadeIn .25s ease;
}
.dl-toast.ok { border-color: rgba(52, 211, 153, .45); background: linear-gradient(135deg, rgba(52, 211, 153, .16), rgba(34, 211, 238, .1)); color: #c9f7e4; }
.dl-toast.err { border-color: rgba(244, 63, 94, .45); background: linear-gradient(135deg, rgba(244, 63, 94, .16), rgba(236, 72, 153, .1)); color: #ffd9df; }
.dl-toast .dl-spin { flex: none; width: 22px; height: 22px; display: grid; place-items: center; color: #b79bff; }
.dl-toast .dl-spin i, .dl-spin-inline { animation: spin 1.1s linear infinite; display: inline-block; }
.dl-toast .dl-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Search locked (رادیو: فقط ادمین) ── */
.search-lock {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 18px;
  border: 1px dashed rgba(139, 92, 246, .35);
  border-radius: var(--radius);
  background: rgba(139, 92, 246, .06);
  color: var(--hint);
  text-align: center;
}
.search-lock i { font-size: 26px; color: #9e8cff; margin-bottom: 4px; }
.search-lock strong { color: #cfc6ff; font-size: 14px; }
.search-lock span { font-size: 12px; max-width: 260px; }

/* ── Admin role badge (رادیو) ── */
.role-badge.admin {
  background: linear-gradient(135deg, #7C3AED, #22D3EE);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, .45);
}

/* ── دکمه ارتقا/تنزل admin در لیست اعضا (فقط مالک رادیو) ── */
.member-admin-btn {
  width: 34px; height: 34px; flex: none;
  border: 1px solid rgba(139, 92, 246, .4);
  border-radius: 11px;
  background: rgba(139, 92, 246, .12);
  color: #b79bff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer;
  transition: background .15s, transform .1s;
}
.member-admin-btn:active { transform: scale(.92); }
.member-admin-btn.on {
  border-color: rgba(34, 211, 238, .5);
  background: rgba(34, 211, 238, .12);
  color: #67e8f9;
}

/* ── Empty Radios (رادیو خالی) ── */
.radio-block-head { margin: 22px 0 12px; }
.radio-block-head h3 { font-size: 16px; margin: 0; color: #e6e0ff; }
.life-home .channel-art.radio-art {
  background: linear-gradient(135deg, #7b2ff7, #2f8bf7 60%, #19d3c5);
  box-shadow: 0 0 24px #2f8bf766;
}

/* ── Room Chat ── */
/* وقتی چت باز است، فقط کانتینر چت اسکرول می‌شود: نه خودِ صفحه (رفع «اسکرول بی‌نهایت») */
html.chat-open, body.chat-open { overflow: hidden; height: 100%; }
#tab-chat.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);  /* fallback برای WebView های قدیمی */
  height: calc(100dvh - 150px); /* جدیدتر: JS ارتفاع دقیق را با کیبورد تنظیم می‌کند */
  overflow: hidden;
}
.chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.chat-muted-banner {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(255, 95, 143, .14), rgba(208, 89, 255, .10));
  border: 1px solid rgba(255, 95, 143, .35);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
  color: #ffb3c9; font-size: 13px;
}
.chat-muted-banner i { color: #ff5f8f; font-size: 16px; }
.chat-list {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  min-height: 100%;
  padding: 4px 2px 14px;
}
.chat-row { display: flex; gap: 9px; align-items: flex-start; animation: fadeIn .25s ease; touch-action: pan-y; }
.chat-row.mine { flex-direction: row-reverse; }
.chat-col { display: flex; flex-direction: column; gap: 3px; max-width: 82%; }
.chat-meta { display: flex; align-items: baseline; gap: 8px; padding: 0 4px; }
.chat-meta strong { font-size: 12px; color: #c9b6f7; font-weight: 700; }
.chat-meta span { font-size: 10.5px; color: var(--hint); }
.chat-bubble {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px 16px 16px 6px;
  padding: 10px 13px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
}
.chat-row.mine .chat-bubble {
  background: linear-gradient(135deg, rgba(139, 92, 246, .28), rgba(217, 70, 239, .18));
  border-color: rgba(139, 92, 246, .5);
  border-radius: 16px 16px 6px 16px;
  box-shadow: 0 4px 18px rgba(139, 92, 246, .22);
}
.chat-bubble p { margin: 0; font-size: 14px; line-height: 1.5; color: #f0ecfa; word-break: break-word; white-space: pre-wrap; }
.chat-quote {
  display: flex; flex-direction: column; gap: 1px;
  border-left: 3px solid #a34dff;
  background: rgba(139, 92, 246, .13);
  border-radius: 8px;
  padding: 5px 9px;
  margin-bottom: 7px;
}
.chat-quote strong { font-size: 11.5px; color: #c9b6f7; }
.chat-quote span { font-size: 12px; color: #b9b0d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-actions {
  display: flex; gap: 4px; margin-top: 7px; justify-content: flex-end;
  opacity: .55; transition: opacity .2s;
}
.chat-bubble:hover .chat-actions { opacity: 1; }
.chat-act {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  color: #b9b0d6;
  width: 26px; height: 26px; border-radius: 9px;
  display: grid; place-items: center;
  font-size: 12px; cursor: pointer;
  transition: transform .12s, color .2s, border-color .2s;
}
.chat-act:active { transform: scale(.88); }
.chat-act:hover { color: #ff5f8f; border-color: rgba(255, 95, 143, .5); }
.chat-act.on { color: #ff5f8f; border-color: rgba(255, 95, 143, .6); background: rgba(255, 95, 143, .12); }
.chat-composer {
  flex: 0 0 auto;
  padding: 10px 2px 4px;
  border-top: 1px solid rgba(139, 92, 246, .16);
  background: linear-gradient(180deg, transparent, #070a16 22%);
}
.chat-input-row { display: flex; gap: 9px; align-items: center; }
.chat-composer input {
  flex: 1; min-width: 0;
  border: 1px solid #372b5e; border-radius: 16px;
  background: #0d1022; color: #fff;
  padding: 12px 16px; font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.chat-composer input:focus { border-color: #a34dff; box-shadow: 0 0 16px rgba(163, 77, 255, .28); }
.chat-composer input:disabled { opacity: .5; }
.chat-reply-bar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(139, 92, 246, .15);
  border: 1px solid rgba(139, 92, 246, .38);
  border-radius: 13px;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.chat-reply-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat-reply-copy strong { font-size: 12px; color: #c9b6f7; font-weight: 700; }
.chat-reply-copy span { font-size: 12px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-reply-cancel {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .06);
  color: #b9b0d6; font-size: 12px; cursor: pointer;
  display: grid; place-items: center;
}
.chat-reply-cancel:active { transform: scale(.9); }
.chat-send {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%;
  border: none; color: #fff; font-size: 17px; cursor: pointer;
  background: var(--grad-main); box-shadow: var(--glow-purple);
  display: grid; place-items: center;
  transition: transform .12s, box-shadow .2s;
}
.chat-send:active { transform: scale(.9); }
.chat-send:disabled { opacity: .5; box-shadow: none; }
.chat-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--hint); font-size: 13px; text-align: center;
  padding: 34px 12px;
}
.chat-empty i { font-size: 30px; color: #6d5fa8; }
@media (max-width: 480px) {
  .chat-col { max-width: 76%; }
}

/* ── Unread badge on Chat nav ── */
.nav-item { position: relative; }
.nav-badge {
  position: absolute; top: 1px; right: 1px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff5f8f, #d0457c);
  color: #fff; font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
  border: 1.5px solid #0b0e1e;
  box-shadow: 0 0 10px rgba(255, 95, 143, .6);
  animation: badgePop .3s ease;
}
@keyframes badgePop {
  0% { transform: scale(.4); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Chat action sheet (long-press / right-click) ── */
.chat-sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
}
.chat-sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 5, 12, .62);
  backdrop-filter: blur(3px);
  animation: fadeIn .2s ease;
}
.chat-sheet-card {
  position: relative;
  width: min(94vw, 420px);
  margin-bottom: 96px;
  background: linear-gradient(160deg, #14132b, #0b0d1d);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .6);
  animation: sheetUp .25s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.chat-sheet-item {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  border: none; background: transparent;
  color: var(--text); font: 700 14px/1 inherit;
  padding: 13px 14px;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.chat-sheet-item i { font-size: 16px; color: #a78bfa; width: 22px; text-align: center; }
.chat-sheet-item:active { background: rgba(255, 255, 255, .06); }
.chat-sheet-item.danger { color: #ff8fa5; }
.chat-sheet-item.danger i { color: #ff5f8f; }
.chat-sheet-item:last-child { margin-top: 4px; border-top: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; justify-content: center; color: var(--hint); }

/* ── بهینهسازی داغی گوشی ── */
body.paused-anim * { animation-play-state: paused !important; }

/* کاربرانی که حرکت کم را ترجیح میدهند: چرخشها و انیمیشنهای سنگین خاموش */
@media (prefers-reduced-motion: reduce) {
  .art.playing .ring, .art.playing .disc, .eq i, .ctrl.big { animation: none !important; }
  .stars, #bg-glow { animation: none !important; }
}

/* ── Cinema (تماشای همزمان) ── */
.coins-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 800; color: #ffe08a;
  background: linear-gradient(135deg, rgba(250, 204, 21, .14), rgba(217, 119, 6, .12));
  border: 1px solid rgba(250, 204, 21, .35);
  box-shadow: 0 0 16px rgba(250, 204, 21, .18);
  white-space: nowrap;
}

/* ── Language switch (ENG / FA) ── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, .05);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--hint);
  font: 800 11.5px/1 inherit;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s ease;
}
.lang-btn.active {
  color: #fff;
  background: var(--grad-main);
  box-shadow: 0 2px 12px rgba(139, 92, 246, .45);
}

/* ── Welcome / onboarding popup: بالای صفحه ── */
.welcome-backdrop {
  position: fixed; inset: 0;
  z-index: 95;
  background: rgba(4, 6, 12, .8);
  backdrop-filter: blur(12px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 18px;
  overflow-y: auto;
  animation: fadeIn .25s ease;
}
.welcome-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin-top: 4vh;
  background: linear-gradient(165deg, #0d1024, #0a0d1e 60%, #101332);
  border: 1px solid rgba(139, 92, 246, .35);
  border-radius: 26px;
  padding: 26px 22px 24px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65), 0 0 60px rgba(139, 92, 246, .18);
  animation: slideDown .35s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes slideDown {
  from { transform: translateY(-34px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.welcome-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--hint);
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  font-size: 14px;
}
.welcome-icon {
  width: 74px; height: 74px;
  margin: 0 auto 12px;
  border-radius: 24px;
  display: grid; place-items: center;
  font-size: 36px; color: #fff;
  background: var(--grad-main);
  box-shadow: 0 0 34px rgba(236, 72, 153, .5);
  animation: pulse 2.4s ease-in-out infinite;
}
.welcome-card h3 { font-size: 21px; font-weight: 900; margin-bottom: 4px; }
.welcome-sub { color: var(--hint); font-size: 13px; margin-bottom: 18px; }
.welcome-features {
  display: flex; flex-direction: column; gap: 9px;
  text-align: left;
  margin-bottom: 20px;
}
.welcome-feature {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .07);
}
.wf-icon {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  font-size: 15px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, .16);
}
.welcome-feature strong { display: block; font-size: 13.5px; font-weight: 800; }
.welcome-feature small { display: block; color: var(--hint); font-size: 11.5px; line-height: 1.65; margin-top: 2px; }
.welcome-card .btn-primary { width: 100%; padding: 14px; font-size: 15px; }

/* ── حالت فارسی (RTL) ── */
.lang-fa,
.lang-fa body { font-family: "Vazirmatn", "Inter", system-ui, -apple-system, sans-serif !important; }

/* اعداد فارسی: ss01 ارقام لاتین را به ۰-۹ تبدیل می‌کند؛ tnum هم‌عرض می‌کند
   تا تایمرها (۰۰:۰۳) با تغییر عدد نلرزند. فقط برای متن‌های UI: محتوای
   کاربر (چت) و کدها/لینک‌ها/یوزرنیم‌ها باید لاتین بمانند. */
.lang-fa,
.lang-fa body,
.lang-fa .lang-fa-body,
.lang-fa main,
.lang-fa header,
.lang-fa section,
.lang-fa button,
.lang-fa span,
.lang-fa div,
.lang-fa p,
.lang-fa h1,
.lang-fa h2,
.lang-fa h3,
.lang-fa h4,
.lang-fa strong,
.lang-fa small,
.lang-fa em,
.lang-fa b,
.lang-fa label,
.lang-fa .times,
.lang-fa .count-badge,
.lang-fa .room-stats,
.lang-fa .member-strip,
.lang-fa .member-item,
.lang-fa .track-item,
.lang-fa .storage-metric,
.lang-fa .storage-dl-pct,
.lang-fa .ng-q-size,
.lang-fa .dl-pct,
.lang-fa .chat-meta,
.lang-fa .cinema-chat-meta,
.lang-fa .hero-eyebrow,
.lang-fa .discover-card .channel-stats,
.lang-fa .discover-card .channel-copy h3,
.lang-fa .mini-player-time {
  font-feature-settings: "ss01", "tnum";
}
/* کدها، یوزرنیم‌ها، لینک‌ها و پیام‌های کاربر نباید تغییر کنند */
.lang-fa input,
.lang-fa textarea,
.lang-fa .chat-bubble p,
.lang-fa .cinema-chat-bubble p,
.lang-fa .chat-quote span,
.lang-fa .cinema-chat-quote span,
.lang-fa #roomCode,
.lang-fa #cinemaCode,
.lang-fa .room-owner,
.lang-fa #inviteLink,
.lang-fa .invite-link,
.lang-fa .channel-copy p,
.lang-fa .member-meta span,
.lang-fa .profile-meta span,
.lang-fa .home-profile-main p,
.lang-fa .admin-channel-name,
.lang-fa .more-menu,
.lang-fa .sc-meta,
.lang-fa .chat-meta strong,
.lang-fa .cinema-chat-meta strong,
.lang-fa .ng-arrow {
  font-feature-settings: normal;
}
/* آیکون‌های جهت‌دار در RTL آینه می‌شوند تا معنی «جلو/عقب/بستن» درست بماند */
.lang-fa .bi-arrow-left,
.lang-fa .bi-chevron-right,
.lang-fa .bi-box-arrow-left { transform: scaleX(-1); }
.lang-fa .welcome-features { text-align: right; }
.lang-fa .chat-row.mine .chat-col { align-items: flex-end; }
.lang-fa .referral-friend .rf-info { text-align: right; }
.lang-fa .referral-list-title,
.lang-fa .referral-sub { text-align: right; }
.lang-fa .more-menu,
.lang-fa .home-user-menu { left: 0; right: auto; }
.lang-fa .cinema-chat-drawer-head h3,
.lang-fa .cinema-chat-head h3,
.lang-fa .more-menu-item,
.lang-fa .home-user-menu button { text-align: right; }
.lang-fa .chat-bubble,
.lang-fa .chat-input-row,
.lang-fa .cinema-chat-input-row { direction: rtl; }
.lang-fa .welcome-close { right: auto; left: 12px; }
.lang-fa .role-badge { margin-right: 0; margin-left: auto; }
.lang-fa .chat-row { direction: rtl; }
.lang-fa .chat-row.mine { direction: ltr; }
.lang-fa .chat-row.mine .chat-col { direction: rtl; text-align: right; }
.lang-fa .times { direction: ltr; justify-content: space-between; }
.lang-fa .seek-wrap { direction: ltr; }
.lang-fa .mini-player-progress-row { direction: ltr; }
.cinema-block-head { margin-top: 26px; }
.cinema-tip b { color: #ffe08a; }
.cinema-tip i { color: #facc15; }

#cinemaScreen {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px calc(108px + env(safe-area-inset-bottom));
}
.cinema-head {
  display: flex; align-items: center; gap: 12px;
}
.cinema-title { flex: 1; min-width: 0; }
.cinema-title h2 {
  font-size: 18px; font-weight: 900; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cinema-title .room-stats { font-size: 12px; color: var(--hint); }
.cinema-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.cinema-leave-top {
  width: 38px; height: 38px; border-radius: 50%;
  color: #fb7185; border-color: rgba(251, 113, 133, .35);
  background: rgba(244, 63, 94, .10);
}

.cinema-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg3), var(--bg2));
  border: 1px solid rgba(139, 92, 246, .28);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .45), 0 0 26px rgba(139, 92, 246, .14);
}
.cinema-stage iframe, .cinema-stage video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; background: #000;
}
.cinema-empty, .cinema-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--hint); text-align: center; padding: 20px;
}
.cinema-empty i { font-size: 38px; color: rgba(139, 92, 246, .55); }
.cinema-empty strong { color: var(--text); font-size: 15px; }
.cinema-empty span { font-size: 12.5px; line-height: 1.7; }
.cinema-loading i { font-size: 22px; color: var(--purple); }
.cinema-loading { color: #c9b6f7; font-size: 13px; }

.cinema-progress {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--card-strong), var(--card));
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 10px 14px;
}
.cinema-progress .seek-wrap { flex: 1; }
.cinema-tab-panel { display: flex; flex-direction: column; gap: 14px; }
.cinema-tab-panel[hidden] { display: none; }
.cinema-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(92vw, 440px);
  display: flex; gap: 10px;
  padding: 6px;
  background: rgba(10, 14, 28, .88);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .55);
}
.cinema-nav-item {
  position: relative;
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 10px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--hint);
  font: 800 13.5px/1 inherit;
  cursor: pointer;
  transition: none;
}
.cinema-nav-item i { font-size: 15px; }
.cinema-nav-item.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, .35), rgba(217, 70, 239, .25));
  color: #fff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, .25);
}
.cinema-nav-badge {
  position: absolute;
  top: 4px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #ec4899; color: #fff;
  font-size: 9px; font-weight: 800; line-height: 16px;
  text-align: center;
}

/* دکمهٔ تمام‌صفحه در استیج سینما */
.cinema-fs {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 5;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(5, 7, 17, .55);
  color: #fff;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: none;
}
.cinema-fs:active { transform: none; }

/* سینما: هیچ انیمیشن دکمه‌ای (glow/فشار) نمی‌خواهیم */
#cinemaScreen .ctrl.big { animation: none; box-shadow: 0 10px 34px rgba(236, 72, 153, .55); }
#cinemaScreen .ctrl,
#cinemaScreen .seek-btn,
#cinemaScreen .icon-btn,
#cinemaScreen .btn-ghost,
#cinemaScreen .hero-cta,
#cinemaScreen .cinema-fs { transition: none; }
#cinemaScreen .ctrl:active,
#cinemaScreen .seek-btn:active,
#cinemaScreen .icon-btn:active,
#cinemaScreen .btn-ghost:active,
#cinemaScreen .hero-cta:active { transform: none; }

/* Android WebView fallback وقتی Fullscreen API توسط Telegram محدود شده است */
body.cinema-fallback-fullscreen { overflow: hidden !important; }
body.cinema-fallback-fullscreen #cinemaScreen {
  position: fixed; inset: 0; z-index: 100;
  width: 100%; max-width: none; min-height: 100dvh;
  margin: 0; padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: #000; overflow-y: auto;
}
body.cinema-fallback-fullscreen #cinemaScreen .cinema-stage {
  aspect-ratio: auto; height: calc(100dvh - 16px); min-height: 220px; border-radius: 0; border: 0; box-shadow: none;
}
body.cinema-fallback-fullscreen #cinemaScreen .cinema-stage video { object-fit: contain; }
body.cinema-fallback-fullscreen #cinemaScreen > .cinema-tab-panel:not(#cinemaViewTab),
body.cinema-fallback-fullscreen #cinemaScreen .cinema-head,
body.cinema-fallback-fullscreen #cinemaScreen .cinema-nav,
body.cinema-fallback-fullscreen #cinemaScreen .cinema-progress,
body.cinema-fallback-fullscreen #cinemaScreen .controls,
body.cinema-fallback-fullscreen #cinemaScreen .track-list,
body.cinema-fallback-fullscreen #cinemaScreen .members-card { display: none !important; }

/* Native fullscreen: کل صفحهٔ سینما فول‌اسکرین می‌شود تا دکمهٔ چت کناری هم دیده شود …
   فقط stage (ویدیو) و کنترل‌های روی آن نمایش داده می‌شوند. */
#cinemaScreen:fullscreen,
#cinemaScreen:-webkit-full-screen {
  width: 100vw; height: 100vh; max-width: none; min-height: 100dvh;
  margin: 0; padding: 0; background: #000; overflow: hidden;
}
#cinemaScreen:fullscreen .cinema-stage,
#cinemaScreen:-webkit-full-screen .cinema-stage {
  position: absolute; inset: 0; width: 100vw; height: 100vh;
  aspect-ratio: auto; border-radius: 0; border: 0; box-shadow: none;
  background: #000; overflow: hidden;
}
#cinemaScreen:fullscreen .cinema-stage video,
#cinemaScreen:-webkit-full-screen .cinema-stage video { object-fit: contain; }
#cinemaScreen:fullscreen > .cinema-tab-panel:not(#cinemaViewTab),
#cinemaScreen:fullscreen .cinema-head,
#cinemaScreen:fullscreen .cinema-nav,
#cinemaScreen:fullscreen .cinema-progress,
#cinemaScreen:fullscreen .controls,
#cinemaScreen:fullscreen .track-list,
#cinemaScreen:fullscreen .members-card,
#cinemaScreen:-webkit-full-screen > .cinema-tab-panel:not(#cinemaViewTab),
#cinemaScreen:-webkit-full-screen .cinema-head,
#cinemaScreen:-webkit-full-screen .cinema-nav,
#cinemaScreen:-webkit-full-screen .cinema-progress,
#cinemaScreen:-webkit-full-screen .controls,
#cinemaScreen:-webkit-full-screen .track-list,
#cinemaScreen:-webkit-full-screen .members-card { display: none !important; }
#cinemaScreen:fullscreen .cinema-chat-drawer,
#cinemaScreen:-webkit-full-screen .cinema-chat-drawer { z-index: 120; }

/* فول‌اسکرین دسکتاپ: فقط ویدیو + دکمه‌ی چت کناری؛ کلیک روی ویدیو = پخش/توقف */
#cinemaScreen:fullscreen .cinema-stage,
#cinemaScreen:-webkit-full-screen .cinema-stage { cursor: pointer; }

.cinema-link-box {
  background: linear-gradient(135deg, var(--card-strong), var(--card));
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.cinema-link-box label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; color: #d9ccff;
}
.cinema-link-box label i { color: var(--purple); font-size: 15px; }
.cinema-link-tip {
  margin: 0; font-size: 12px; color: var(--hint); line-height: 1.6;
  display: flex; gap: 6px; align-items: flex-start;
}
.cinema-link-tip i { color: var(--cyan); }
.cinema-add { display: flex; gap: 8px; }
.cinema-add input {
  flex: 1; min-width: 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--text);
  font: inherit;
  outline: 0;
}
.cinema-add input:focus { border-color: rgba(139, 92, 246, .55); }
.cinema-leave { display: flex; justify-content: center; padding-top: 4px; }
.cinema-leave .btn-ghost {
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, .4);
  background: rgba(244, 63, 94, .10);
  color: #fb7185;
  font: 800 13.5px/1 inherit;
  cursor: pointer;
}
.cinema-leave .btn-ghost:active { transform: scale(.97); }

/* ── Cinema chat: immediately below the player ── */
.cinema-chat-card {
  display: flex; flex-direction: column; gap: 9px;
  background: linear-gradient(150deg, rgba(16, 20, 41, .96), rgba(10, 13, 28, .96));
  border: 1px solid rgba(139, 92, 246, .25);
  border-radius: 20px;
  padding: 12px;
  min-height: 0;
  flex: 1 1 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
.cinema-chat-head { display: flex; align-items: center; gap: 8px; }
.cinema-chat-head h3 { font-size: 14px; font-weight: 850; flex: 1; }
.cinema-chat-head h3 i { color: var(--purple); margin-right: 5px; }
.cinema-chat-live { color: #6ee7b7; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; }
.cinema-chat-live i { font-size: 11px; }
.cinema-chat-unread { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; background: #ec4899; color: #fff; font-size: 10px; font-weight: 800; }
.cinema-chat-muted { display: flex; align-items: center; gap: 8px; color: #ffb3c9; background: rgba(255, 95, 143, .12); border: 1px solid rgba(255, 95, 143, .28); border-radius: 12px; padding: 8px 10px; font-size: 11.5px; }
.cinema-chat-muted i { color: #ff5f8f; }
.cinema-chat-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.cinema-chat-list { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 100%; padding: 2px 1px 7px; }
.cinema-chat-empty { display: flex; min-height: 180px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: var(--hint); font-size: 12px; text-align: center; }
.cinema-chat-empty i { color: #6d5fa8; font-size: 27px; }
.cinema-chat-row { display: flex; align-items: flex-start; gap: 7px; touch-action: pan-y; }
.cinema-chat-row.mine { flex-direction: row-reverse; }
.cinema-chat-col { max-width: 82%; display: flex; flex-direction: column; gap: 2px; }
.cinema-chat-meta { display: flex; align-items: baseline; gap: 6px; padding: 0 3px; }
.cinema-chat-meta strong { color: #c9b6f7; font-size: 11px; }
.cinema-chat-meta span { color: var(--hint); font-size: 9px; }
.cinema-chat-bubble { position: relative; padding: 7px 9px; border: 1px solid var(--card-border); border-radius: 13px 13px 13px 5px; background: rgba(255,255,255,.055); }
.cinema-chat-row.mine .cinema-chat-bubble { border-color: rgba(139, 92, 246, .4); border-radius: 13px 13px 5px 13px; background: linear-gradient(135deg, rgba(139,92,246,.24), rgba(217,70,239,.13)); }
.cinema-chat-bubble p { margin: 0; color: #f0ecfa; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.cinema-chat-quote { display: flex; flex-direction: column; gap: 1px; padding: 4px 7px; margin-bottom: 5px; border-left: 2px solid #a34dff; background: rgba(139,92,246,.13); border-radius: 6px; }
.cinema-chat-quote strong { color: #c9b6f7; font-size: 10px; }
.cinema-chat-quote span { color: #b9b0d6; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cinema-chat-actions { display: flex; justify-content: flex-end; gap: 3px; margin-top: 5px; opacity: .6; }
.cinema-chat-act { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.05); color: #b9b0d6; font-size: 10px; }
.cinema-chat-act.danger { color: #ff8fa5; }
.cinema-chat-composer { padding-top: 8px; border-top: 1px solid rgba(139,92,246,.15); }
.cinema-chat-reply { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 6px; border: 1px solid rgba(139,92,246,.28); border-radius: 10px; background: rgba(139,92,246,.12); }
.cinema-chat-reply > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cinema-chat-reply strong { color: #c9b6f7; font-size: 10px; }
.cinema-chat-reply small { color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cinema-chat-reply button { width: 25px; height: 25px; border: 0; border-radius: 7px; background: rgba(255,255,255,.06); color: var(--hint); }
.cinema-chat-input-row { display: flex; gap: 7px; align-items: center; }
.cinema-chat-input-row input { flex: 1; min-width: 0; padding: 10px 12px; color: #fff; background: #0d1022; border: 1px solid #372b5e; border-radius: 13px; outline: none; font: inherit; font-size: 12px; }
.cinema-chat-input-row input:focus { border-color: #a34dff; box-shadow: 0 0 12px rgba(163,77,255,.22); }
.cinema-chat-input-row input:disabled { opacity: .5; }
.cinema-chat-input-row > button { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; color: #fff; background: var(--grad-main); box-shadow: var(--glow-purple); }
.cinema-chat-input-row > button:disabled { opacity: .5; box-shadow: none; }

/* ── Cinema chat: full-height tab + fullscreen side drawer ── */
#cinemaChatTab { flex: 1 1 auto; min-height: 0; }
#cinemaChatTab .cinema-chat-card { max-height: calc(100dvh - 210px); }

.cinema-chat-drawer-btn {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 90;
  width: 46px; height: 56px;
  border: 1px solid rgba(139, 92, 246, .55);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, rgba(139, 92, 246, .92), rgba(217, 70, 239, .88));
  color: #fff;
  font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: -8px 0 26px rgba(139, 92, 246, .4);
}
.cinema-chat-drawer-badge {
  position: absolute;
  top: -5px; left: -6px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: #ec4899; color: #fff;
  font-size: 10px; font-weight: 800; line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(5, 7, 17, .7);
}
.cinema-chat-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(26vw, 360px);
  min-width: 264px;
  max-width: 88vw;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 12px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(160deg, rgba(16, 20, 41, .985), rgba(10, 13, 28, .985));
  border-left: 1px solid rgba(139, 92, 246, .38);
  box-shadow: -20px 0 52px rgba(0, 0, 0, .55);
  animation: cinemaDrawerIn .2s ease;
}
.cinema-chat-drawer[hidden] { display: none; }
@keyframes cinemaDrawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.cinema-chat-drawer-head {
  display: flex; align-items: center; gap: 8px;
}
.cinema-chat-drawer-head h3 { flex: 1; margin: 0; font-size: 14px; font-weight: 850; }
.cinema-chat-drawer-head h3 i { color: var(--purple); margin-right: 5px; }
.cinema-chat-drawer-head button {
  width: 32px; height: 32px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  color: #c9b6f7;
  font-size: 14px;
  cursor: pointer;
}

/* ── Home profile coins/referral ── */
.home-profile-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 13px;
  background: rgba(255, 255, 255, .04);
}
.home-profile-lang > span { font-size: 12px; font-weight: 700; color: var(--hint); }
.home-profile-lang .lang-switch { border-color: rgba(255, 255, 255, .14); }
.lang-fa .home-profile-lang { direction: rtl; }
.referral-box { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px; border: 1px solid rgba(139,92,246,.28); border-radius: 13px; background: rgba(139,92,246,.1); text-align: left; }
.referral-box > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.referral-box strong { font-size: 11px; color: #d9ccff; }
.referral-box strong i { color: #f9a8d4; }
.referral-box span { font-size: 11px; color: var(--cyan); font-weight: 800; letter-spacing: 1px; }
.referral-box button { flex: none; border: 1px solid rgba(139,92,246,.38); border-radius: 9px; padding: 7px 9px; background: rgba(139,92,246,.16); color: #fff; font: 700 10px/1 inherit; }

/* ── Home profile coins ── */
.home-profile-top {
  display: flex; justify-content: flex-start;
  padding: 2px 0 4px;
}
.home-profile-card .home-profile-top .coins-pill { font-size: 12px; }

/* ── جستجوی فیلم/سریال (nilfgaard.top) ── */
.ng-results { display: flex; flex-direction: column; gap: 10px; }
.ng-item {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--card-strong), var(--card));
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 10px 12px;
  cursor: pointer;
  transition: none;
}
.ng-item:active { transform: scale(.985); }
.ng-poster-wrap { flex: none; }
.ng-poster {
  width: 48px; height: 68px; flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg3);
  border: 1px solid rgba(255, 255, 255, .08);
  display: block;
}
.ng-noimg { display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--hint); }
.ng-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ng-info strong {
  font-size: 13.5px; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ng-info span { font-size: 11.5px; color: var(--hint); display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.ng-star { color: #f6c700; font-size: 10px; }
.ng-arrow { color: var(--hint); font-size: 14px; }
.ng-hint {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 18px 12px; color: var(--hint); font-size: 13px; text-align: center;
}
.ng-hint i { color: var(--purple); }

/* ── پاپ‌آپ انتخاب فیلم/سریال ── */
.ng-modal {
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 18px;
}
.ng-modal-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: -34px;
  position: relative;
  z-index: 2;
}
.ng-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 4px 2px 8px;
}
.ng-hero {
  display: flex;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(139, 92, 246, .18), rgba(236, 72, 153, .08) 45%, rgba(34, 211, 238, .06));
  border: 1px solid rgba(139, 92, 246, .25);
}
.ng-hero-poster {
  width: 92px;
  height: 132px;
  flex: none;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg3);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  display: block;
}
.ng-hero-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ng-hero-title {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ng-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ng-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #d6d9f5;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 4px 9px;
}
.ng-badge.imdb { color: #f6c700; }
.ng-badge.imdb i { font-size: 9px; }
.ng-badge.type {
  background: linear-gradient(135deg, rgba(139, 92, 246, .5), rgba(217, 70, 239, .4));
  border-color: transparent;
  color: #fff;
}
.ng-dubsub { display: flex; flex-wrap: wrap; gap: 6px; }
.ng-metaline { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--txt-dim, #93a0b8); }
.ng-metaline span { display: flex; align-items: center; gap: 5px; line-height: 1.5; }
.ng-desc { margin: 2px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--txt-dim, #93a0b8); }
.ng-ds-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 10px;
}
.ng-ds-chip.dub { color: #f9a8d4; background: rgba(236, 72, 153, .16); border: 1px solid rgba(236, 72, 153, .3); }
.ng-ds-chip.sub { color: #67e8f9; background: rgba(34, 211, 238, .14); border: 1px solid rgba(34, 211, 238, .28); }
.ng-ds-chip.orig { color: #a5b4cf; background: rgba(148, 163, 184, .14); border: 1px solid rgba(148, 163, 184, .28); }
.ng-step { display: flex; flex-direction: column; gap: 8px; }
.ng-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
}
.ng-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.ng-group-icon {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.ng-group-icon.dub { color: #f9a8d4; background: rgba(236, 72, 153, .18); }
.ng-group-icon.sub { color: #67e8f9; background: rgba(34, 211, 238, .16); }
.ng-group-icon.orig { color: #a5b4cf; background: rgba(148, 163, 184, .18); }
.ng-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: #d9ccff;
  margin-top: 2px;
}
.ng-label i { color: var(--purple); }
.ng-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ng-chip {
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--hint);
  font: 700 12.5px/1 inherit;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: none;
}
.ng-chip.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, .4), rgba(217, 70, 239, .3));
  color: #fff;
  border-color: transparent;
}
.ng-q {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-direction: column;
  padding: 8px 16px 7px;
}
.ng-q-label { font-weight: 800; }
.ng-q-size {
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  opacity: .9;
}
.ng-q-grp {
  font-size: 9.5px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 7px;
}
.ng-q-grp.dub { color: #f9a8d4; background: rgba(236, 72, 153, .16); }
.ng-q-grp.sub { color: #67e8f9; background: rgba(34, 211, 238, .14); }
.ng-q-grp.orig { color: #a5b4cf; background: rgba(148, 163, 184, .16); }
.ng-add { width: 100%; margin-top: 2px; }
.ng-add:disabled { opacity: .5; cursor: default; }
