/* پیروزی بر ترس — لایهٔ افکت‌ها و انیمیشن‌های مدرن (روی style.css سوار می‌شود) */

/* ---------- گذار نرم بین صفحات (Chrome/Edge/Safari جدید؛ بقیه بدون تغییر) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: fxPageOut .16s ease both; }
::view-transition-new(root) { animation: fxPageIn .38s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fxPageOut { to { opacity: 0; } }
@keyframes fxPageIn  { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- نوار بالا هنگام اسکرول ---------- */
.app-header { transition: box-shadow .3s ease, background .3s ease; }
.app-header.scrolled { box-shadow: 0 14px 34px -16px rgba(0,0,0,.55); }

/* ---------- ورود پلکانی کارت‌ها ---------- */
.reveal:not(.in) { opacity: 0; }
.reveal.in { animation: fxCardIn .7s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes fxCardIn { from { opacity: 0; transform: translateY(26px) scale(.96); } }

/* ---------- کارت‌ها: تیلت سه‌بعدی + نورافکن دنبال‌کنندهٔ ماوس ---------- */
.podcast-card, .featured-hero { position: relative; }
.podcast-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.24), transparent 62%);
}
.podcast-card.tilting {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px) scale(1.015);
  transition: transform .12s ease-out, box-shadow .35s ease;
}
.podcast-card.tilting::after { opacity: 1; }

/* ---------- کارت ویژه: حرکت سینمایی عکس + برق نور ---------- */
.featured-hero img { animation: fxKen 24s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes fxKen { from { transform: scale(1); } to { transform: scale(1.13) translate(-2%, -1%); } }
.featured-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.16) 50%, transparent 62%);
  transform: translateX(130%); animation: fxSheen 8s ease-in-out 1.6s infinite;
}
@keyframes fxSheen { 0% { transform: translateX(130%); } 28%, 100% { transform: translateX(-130%); } }

/* ---------- ریپل دکمه‌ها ---------- */
.fx-rippling { position: relative; overflow: hidden; }
.fx-ripple {
  position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .22;
  transform: scale(0); animation: fxRipple .6s ease-out forwards;
}
@keyframes fxRipple { to { transform: scale(1); opacity: 0; } }

/* ---------- پیام شناور (به‌جای alert) ---------- */
.fx-toast {
  position: fixed; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom, 0px)); z-index: 300;
  max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 18px;
  display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; line-height: 1.7;
  color: var(--text); background: var(--menu-bg); border: 1px solid var(--border-light); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%);
  opacity: 0; transform: translate(-50%, 18px) scale(.96); pointer-events: none;
  transition: opacity .3s ease, transform .45s cubic-bezier(.2, 1.2, .3, 1);
}
.fx-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.fx-toast i { color: var(--accent-text); font-size: 15px; }

/* ---------- «ادامه شنیدن» در صفحهٔ اصلی ---------- */
.fx-continue {
  display: flex; align-items: center; gap: 14px; padding: 12px; margin-bottom: 22px; border-radius: 24px;
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
  background: var(--glass-strong); border: 1px solid var(--border-light); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(170%); backdrop-filter: blur(var(--blur)) saturate(170%);
  animation: fxCardIn .7s cubic-bezier(.2,.8,.2,1) backwards;
  transition: transform .25s ease;
}
.fx-continue:active { transform: scale(.98); }
.fx-continue img { width: 64px; height: 64px; border-radius: 18px; object-fit: cover; flex-shrink: 0; box-shadow: 0 10px 24px -10px var(--glow); }
.fx-continue .fc-info { flex: 1; min-width: 0; }
.fx-continue .fc-kicker { display: block; font-size: 11px; font-weight: 700; color: var(--accent-text); margin-bottom: 3px; }
.fx-continue b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-continue .fc-bar { height: 4px; border-radius: 4px; margin: 8px 0 5px; background: color-mix(in srgb, var(--text) 14%, transparent); overflow: hidden; }
.fx-continue .fc-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--b1), var(--a1)); }
.fx-continue small { font-size: 11px; color: var(--text2); font-variant-numeric: tabular-nums; }
.fx-continue .fc-play {
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--on-accent); background: linear-gradient(135deg, var(--b1), var(--b2));
  box-shadow: 0 10px 22px -8px var(--glow), inset 0 1px 0 rgba(255,255,255,.35);
}

/* ---------- صفحهٔ پخش ---------- */
.pulse-glow {
  position: fixed; left: 50%; top: 40%; width: min(130vw, 760px); aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); opacity: .18; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%); will-change: transform, opacity;
}
body.is-playing .ctrl-btn.play-btn::after { animation: fxBreath 2.4s ease-out infinite; }
@keyframes fxBreath { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.38); opacity: 0; } }
.wsp-color.poster { background: linear-gradient(135deg, #f59e0b, #ec4899 55%, #6366f1); }
.action-btn.active i { animation: fxWobble .6s ease; }
@keyframes fxWobble { 30% { transform: rotate(-14deg) scale(1.15); } 60% { transform: rotate(10deg); } }


/* ==========================================================================
   ✦ لایهٔ «پرداخت نهایی» — گرافیک، حرکت و جزئیات حرفه‌ای
   (روی style.css سوار می‌شود؛ هیچ نام کلاسی تغییر نکرده)
   ========================================================================== */

@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

html { scroll-behavior: smooth; }
h1, h2, h3 { text-wrap: balance; }
.card-title, .c-text, .prose p { text-wrap: pretty; }

/* ---------- اسکرول‌بار ظریف ---------- */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--a1) 45%, transparent) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--a1) 40%, transparent); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--a1) 65%, transparent); background-clip: padding-box; border: 2px solid transparent; }

/* ---------- نوار پیشرفت اسکرول (بالای صفحه) ---------- */
.fx-scroll {
  position: fixed; top: 0; right: 0; left: 0; height: 3px; z-index: 130; pointer-events: none;
  transform-origin: right center; transform: scaleX(var(--sp, 0));
  background: linear-gradient(90deg, var(--a1), var(--a2), var(--b2));
  box-shadow: 0 0 14px var(--glow);
  opacity: calc(var(--sp, 0) * 40);
}

/* ---------- درخشش دنبال‌کنندهٔ ماوس (فقط دسکتاپ) ---------- */
.fx-cursor {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .6s ease;
  background: radial-gradient(520px circle at var(--cx, 50%) var(--cy, 30%), color-mix(in srgb, var(--a1) 16%, transparent), transparent 62%);
}
.fx-cursor.on { opacity: 1; }
[data-theme="light"] .fx-cursor { background: radial-gradient(520px circle at var(--cx, 50%) var(--cy, 30%), color-mix(in srgb, var(--b1) 12%, transparent), transparent 62%); }

/* ---------- شبکهٔ نقطه‌ای محو پشت محتوا ---------- */
.home-content::before, .page-content::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none; top: 0; right: 0; left: 0; height: 420px;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 20%, transparent) 1px, transparent 1.3px);
  background-size: 22px 22px; opacity: .5;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
}

/* ---------- هدر ---------- */
.app-header::after {
  content: ''; position: absolute; right: 10%; left: 10%; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--a1), var(--a2), transparent); opacity: .45;
}
.header-logo { animation: fxLogoGlow 4.5s ease-in-out infinite; }
@keyframes fxLogoGlow {
  0%, 100% { box-shadow: 0 0 0 0 transparent, var(--shadow-sm); }
  50% { box-shadow: 0 0 0 5px var(--accent-soft), 0 8px 26px -6px var(--glow); }
}
.app-header .logo span, .auth-logo h1 span {
  background-image: linear-gradient(100deg, var(--a1), var(--a2), var(--b2), var(--a1)); background-size: 250% 100%;
  animation: fxTextFlow 7s linear infinite;
}
[data-theme="light"] .app-header .logo span, [data-theme="light"] .auth-logo h1 span {
  background-image: linear-gradient(100deg, var(--deep), var(--b2), var(--b1), var(--deep)); background-size: 250% 100%;
}
@keyframes fxTextFlow { to { background-position: -250% 0; } }
.icon-btn:hover, .theme-toggle:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm), 0 10px 22px -10px var(--glow); }
.theme-toggle:hover i { animation: fxSpin .9s cubic-bezier(.3, 1.2, .4, 1); }
@keyframes fxSpin { to { transform: rotate(360deg); } }

/* ---------- عنوان بخش‌ها ---------- */
.section-title { font-size: 18px; letter-spacing: -.2px; }
.section-title::before {
  width: 5px; height: 22px; box-shadow: 0 0 16px var(--glow);
  background: linear-gradient(180deg, var(--a1), var(--b2)); background-size: 100% 200%; animation: fxBarFlow 5s ease-in-out infinite alternate;
}
@keyframes fxBarFlow { to { background-position: 0 100%; } }
.section-title a { padding: 6px 14px; border-radius: 99px; background: var(--accent-soft); border: 1px solid var(--accent-soft2); transition: background .25s, transform .25s; }
.section-title a:hover { background: var(--accent-soft2); transform: translateX(-3px); }

/* ---------- کارت‌های پادکست ---------- */
.podcast-card { border-radius: 24px; }
.podcast-card .card-poster { background: linear-gradient(135deg, var(--accent-soft2), var(--glass-flat)); }
.podcast-card:hover { box-shadow: var(--shadow), 0 26px 46px -18px var(--glow); border-color: var(--border-light); }
.podcast-card .card-title { transition: color .25s ease; }
.podcast-card:hover .card-title { color: var(--accent-text); }
/* سایهٔ ملایم پایین پوستر + دکمهٔ پخش شناور (فقط با CSS) */
.podcast-card .card-body::after {
  content: ''; position: absolute; right: 0; left: 0; bottom: 100%; height: 64px; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 6, 18, .55), transparent);
}
/* ::before تزئینی غیرفعال — دکمه واقعی .card-play جایگزین شده */
.podcast-card .card-body::before { content: none !important; display: none !important; }
.podcast-card .card-meta { display: flex; align-items: center; gap: 4px; opacity: .9; }

/* ---------- کارت ویژه (اسلایدر) ---------- */
.hero-slider { box-shadow: var(--shadow), 0 34px 60px -30px var(--glow); }
.featured-hero .hero-badge { position: relative; overflow: hidden; }
.featured-hero .hero-badge::after {
  content: ''; position: absolute; inset: 0; transform: translateX(120%);
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); animation: fxSheen 5s ease-in-out 1s infinite;
}
.featured-hero h3 { letter-spacing: -.3px; text-shadow: 0 2px 20px color-mix(in srgb, var(--glow) 60%, transparent); }
.featured-hero:hover img { filter: saturate(1.15) brightness(1.04); }
.featured-hero .hero-play i { transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.featured-hero:hover .hero-play i { transform: scale(1.25); }
.hero-dots button { transition: width .5s ease, background .5s ease, opacity .5s ease, box-shadow .5s ease; }
.hero-dots button.on { box-shadow: 0 0 12px var(--glow); }

/* ---------- دکمه‌های اصلی: گرادیان زنده ---------- */
.featured-hero .hero-play, .btn-primary, .buy-btn, .comment-form button, .ctrl-btn.play-btn, .mini-player .mini-play {
  background: linear-gradient(120deg, var(--b1) 0%, var(--b2) 50%, var(--b1) 100%); background-size: 220% 100%; background-position: 100% 0;
  transition: background-position .6s ease, transform .2s ease, filter .2s ease, box-shadow .3s ease;
}
.featured-hero .hero-play:hover, .btn-primary:hover, .buy-btn:hover, .comment-form button:hover { background-position: 0 0; }
.buy-btn { animation: fxBuyPulse 2.8s ease-in-out infinite; }
@keyframes fxBuyPulse { 0%, 100% { box-shadow: 0 16px 34px -10px var(--glow), inset 0 1px 0 rgba(255,255,255,.35); } 50% { box-shadow: 0 16px 44px -6px var(--glow), 0 0 0 6px var(--accent-soft), inset 0 1px 0 rgba(255,255,255,.35); } }

/* ---------- چیپ‌ها و تب‌ها ---------- */
.filter-chip, .cat-chip, .tabs a { transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), background .25s, color .25s, box-shadow .25s; }
.filter-chip:hover, .cat-chip:hover, .tabs a:hover { transform: translateY(-2px); }
.filter-chip:active, .cat-chip:active, .tabs a:active { transform: scale(.95); }

/* ---------- ناوبری پایین ---------- */
.bottom-nav { box-shadow: var(--shadow), 0 24px 50px -20px var(--glow); }
.bottom-nav a { overflow: hidden; }
.bottom-nav a.active {
  background: linear-gradient(160deg, var(--accent-soft2), var(--accent-soft));
  box-shadow: inset 0 0 0 1px var(--accent-soft2), 0 8px 22px -10px var(--glow);
}
.bottom-nav a.active i { filter: drop-shadow(0 0 8px var(--glow)); }
.bottom-nav a:not(.active):hover i { transform: translateY(-3px) scale(1.08); }
.bottom-nav a:active i { transform: scale(.85); }
.bottom-nav a.active::after { width: 20px; box-shadow: 0 0 10px var(--glow); }

/* ---------- لیست‌ها و منو ---------- */
.menu-item, .settings-item { transition: background .2s ease, padding .25s ease; }
.menu-item:hover { padding-right: 22px; }
.menu-item > i:first-child { transition: transform .35s cubic-bezier(.3, 1.5, .5, 1), background .25s; }
.menu-item:hover > i:first-child { transform: rotate(-8deg) scale(1.1); }
.menu-item .arrow { transition: transform .25s ease; }
.menu-item:hover .arrow { transform: translateX(-4px); }
.row-item, .notice, .contact-card, .ticket, .panel-card, .stat-box { transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease; }
.row-item:hover, .notice:hover, .contact-card:hover, .stat-box:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 20px 36px -18px var(--glow); }
.profile-avatar { animation: fxAvatar 5s ease-in-out infinite; }
@keyframes fxAvatar { 0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft2), 0 18px 36px -10px var(--glow); } 50% { box-shadow: 0 0 0 9px var(--accent-soft), 0 22px 44px -8px var(--glow); } }

/* ---------- ورود / ثبت‌نام ---------- */
.auth-logo .brand-logo, .auth-logo .logo-icon { animation: fxFloat 6s ease-in-out infinite; }
@keyframes fxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.auth-card { animation: fxCardIn .8s cubic-bezier(.2, .8, .2, 1) .1s backwards; }
.form-group input:focus { transform: translateY(-1px); }

/* ---------- وضعیت خالی ---------- */
.empty-state i { animation: fxFloat 5s ease-in-out infinite; box-shadow: 0 18px 36px -16px var(--glow); }

/* ---------- ورود نرم محتوای صفحه ---------- */
.home-content > *:not(.reveal):not(.section-title):not(.profile-header):not(.menu-list):not(.settings-group):not(.stat-row):not(.panel-card), .page-content > *:not(.reveal):not(.section-title):not(.profile-header):not(.menu-list):not(.settings-group):not(.stat-row):not(.panel-card) { animation: fxRise .7s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes fxRise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- پیام شناور ---------- */
.fx-toast { border-inline-start: 3px solid var(--a1); }
.fx-toast i { width: 28px; height: 28px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); font-size: 13px; flex-shrink: 0; }

/* ---------- پنل صف پخش ---------- */
.q-sheet .q-backdrop { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); background: rgba(5, 4, 12, .55); }
.q-sheet .q-panel { background: color-mix(in srgb, var(--bg-2) 88%, transparent); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%); border-color: var(--border-light); }
.q-sheet .q-panel::before { content: ''; display: block; width: 42px; height: 4px; border-radius: 4px; margin: 10px auto 0; background: var(--border-light); }
.q-item { transition: background .2s ease, transform .2s ease; }
.q-item:hover { transform: translateX(-2px); }
.q-item.current { box-shadow: inset 0 0 0 1px var(--accent-soft2); }

/* ==========================================================================
   ✦ صفحهٔ پخش
   ========================================================================== */
.now-playing > * { animation: fxRise .75s cubic-bezier(.2, .8, .2, 1) backwards; }
.now-playing > *:nth-child(2) { animation-delay: .06s; }
.now-playing > *:nth-child(3) { animation-delay: .12s; }
.now-playing > *:nth-child(4) { animation-delay: .18s; }
.now-playing > *:nth-child(5) { animation-delay: .24s; }
.now-playing > *:nth-child(n+6) { animation-delay: .3s; }

/* حلقهٔ رنگی چرخان دور پوستر هنگام پخش */
.poster-wrapper::before {
  content: ''; position: absolute; inset: -4px; border-radius: 36px; z-index: -1; opacity: 0; transition: opacity .7s ease;
  background: conic-gradient(from var(--ang), var(--a1), var(--b2), var(--a2), var(--b1), var(--a1));
  filter: blur(.4px);
}
body.is-playing .poster-wrapper::before { opacity: .95; animation: fxRing 7s linear infinite; }
@keyframes fxRing { to { --ang: 360deg; } }
.poster-wrapper img { transition: transform .8s cubic-bezier(.2, .8, .2, 1), box-shadow .8s ease; }
body.is-playing .poster-wrapper img { transform: scale(1.012); box-shadow: 0 34px 70px -20px var(--glow), 0 0 0 1px var(--border-light); }
/* شناور شدن آرام پوستر هنگام پخش (با ویژگی translate تا با انیمیشن ورود تداخل نکند؛ فقط pause/run می‌شود) */
.now-playing > .poster-wrapper { animation: fxRise .75s cubic-bezier(.2, .8, .2, 1) backwards, fxFloatT 7s ease-in-out infinite paused; }
body.is-playing .now-playing > .poster-wrapper { animation-play-state: running; }
@keyframes fxFloatT { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.poster-glow { inset: -46px; }

.podcast-info h1 { background: linear-gradient(100deg, var(--text), color-mix(in srgb, var(--text) 70%, var(--a1))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.podcast-info .duration { box-shadow: 0 8px 20px -10px var(--glow); }

/* نوار پیشرفت */
.progress-track { height: 7px; transition: height .2s ease; }
.progress-bar:hover .progress-track, .progress-bar:active .progress-track { height: 10px; }
.progress-fill { background: linear-gradient(90deg, var(--b1), var(--a1), var(--a2)); box-shadow: 0 0 14px var(--glow); }
.progress-thumb { box-shadow: 0 0 0 4px var(--accent-soft2), 0 0 16px var(--glow), 0 4px 10px rgba(0, 0, 0, .35); }
.waveform { box-shadow: var(--shadow-sm), 0 20px 40px -26px var(--glow); }

/* کنترل‌ها */
.ctrl-btn:not(.play-btn):hover { transform: translateY(-2px); box-shadow: var(--shadow-sm), 0 10px 22px -10px var(--glow); }
.ctrl-btn.play-btn:hover { transform: scale(1.06); filter: brightness(1.08); }
.ctrl-btn.play-btn:active { transform: scale(.94); }
.volume-row { transition: box-shadow .3s ease; }
.volume-row:hover { box-shadow: 0 14px 30px -18px var(--glow); }
.volume-slider::-webkit-slider-thumb { transition: transform .2s ease; }
.volume-slider::-webkit-slider-thumb:hover { transform: scale(1.18); }

/* نظرات */
.comment-item { transition: transform .25s ease, border-color .25s ease; }
.comment-item:hover { transform: translateX(-3px); border-color: var(--accent-soft2); }
.comment-item .c-name::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--a1), var(--b2)); box-shadow: 0 0 8px var(--glow); }

/* ==========================================================================
   ✦ مینی‌پلیر — نسخهٔ گرافیکی (همهٔ صفحه‌ها + صفحهٔ پخش)
   ========================================================================== */
.mini-player {
  height: 76px; border-radius: 28px; padding: 0 12px 8px 10px;
  box-shadow: var(--shadow), 0 24px 46px -18px var(--glow);
  transition: transform .55s cubic-bezier(.2, 1.15, .3, 1), opacity .3s ease, box-shadow .5s ease;
}
.mini-player.playing { box-shadow: var(--shadow), 0 26px 54px -14px var(--glow); }
/* در صفحهٔ پخش ناوبری پایین نداریم → مینی‌پلیر پایین‌تر و هم‌عرض محتوا */
.mini-player.on-player { bottom: calc(14px + env(safe-area-inset-bottom)); width: min(calc(100% - 28px), 500px); }
.mini-fab.on-player { bottom: calc(20px + env(safe-area-inset-bottom)); }
body.has-mini .now-playing { padding-bottom: 150px; }

.mini-player .mini-art { position: relative; flex-shrink: 0; width: 50px; height: 50px; display: block; }
.mini-player .mini-poster { width: 50px; height: 50px; border-radius: 17px; border: 0; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .55), 0 0 0 1px var(--border-light); transition: border-radius .6s cubic-bezier(.3, 1.2, .4, 1); }
.mini-player.playing .mini-poster { border-radius: 50%; animation: fxDisc 14s linear infinite; }
@keyframes fxDisc { to { transform: rotate(360deg); } }
/* سوراخ وسط گرامافون */
.mini-player .mini-art::before {
  content: ''; position: absolute; z-index: 2; left: 50%; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%;
  background: var(--bg-1); box-shadow: 0 0 0 2px rgba(255, 255, 255, .28), inset 0 1px 3px rgba(0, 0, 0, .5);
  opacity: 0; transform: scale(.2); transition: opacity .4s ease, transform .5s cubic-bezier(.3, 1.5, .5, 1);
}
.mini-player.playing .mini-art::before { opacity: 1; transform: none; }
/* اکولایزر کوچک */
.mini-player .mini-eq {
  position: absolute; z-index: 3; right: -5px; bottom: -5px; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 5.5px;
  background: linear-gradient(135deg, var(--b1), var(--b2)); box-shadow: 0 4px 10px -2px var(--glow);
  opacity: 0; transform: scale(.3); transition: opacity .3s ease, transform .45s cubic-bezier(.3, 1.6, .5, 1);
}
.mini-player.playing .mini-eq { opacity: 1; transform: none; }
.mini-player .mini-eq b { display: block; width: 2px; height: 4px; border-radius: 2px; background: #fff; }
.mini-player.playing .mini-eq b { animation: fabEq .9s ease-in-out infinite; }
.mini-player.playing .mini-eq b:nth-child(2) { animation-delay: .15s; }
.mini-player.playing .mini-eq b:nth-child(3) { animation-delay: .3s; }
.mini-player.playing .mini-eq b:nth-child(4) { animation-delay: .45s; }
@keyframes fabEq { 0%, 100% { height: 3px; } 50% { height: 9px; } }

.mini-player .mini-title { font-size: 13.5px; font-weight: 800; }
.mini-player .mini-host { color: var(--accent-text); font-weight: 600; opacity: .9; }
.mini-player .mini-play { width: 42px; height: 42px; box-shadow: 0 10px 22px -6px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .4); transition: transform .2s ease, background-position .6s ease; }
.mini-player .mini-play:hover { transform: scale(1.08); background-position: 0 0; }
.mini-player .mini-play:active { transform: scale(.9); }
.mini-player .mp-track i { background: linear-gradient(90deg, var(--b1), var(--a1), var(--a2)); box-shadow: 0 0 10px var(--glow); }
.mini-player .mp-track { background: color-mix(in srgb, var(--text) 14%, transparent); }
.mini-fab { box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .55), 0 0 0 1px var(--border-light), 0 12px 26px -10px var(--glow); }
.mini-fab.playing { animation: fxFabPulse 2s ease-in-out infinite; }
@keyframes fxFabPulse { 0%, 100% { box-shadow: 0 10px 24px -8px rgba(0,0,0,.55), 0 0 0 1px var(--border-light), 0 0 0 0 var(--accent-soft2); } 50% { box-shadow: 0 10px 24px -8px rgba(0,0,0,.55), 0 0 0 1px var(--border-light), 0 0 0 9px transparent; } }

@media (min-width: 640px) { .mini-player { width: min(calc(100% - 28px), 460px); } }

/* ---------- ردیف دکمه‌های بالای پلیر: ۵ دکمه در یک خط (ذخیره، اشتراک، صف، تایمر، سرعت) ---------- */
.action-row { grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 480px; }
.action-btn { font-size: 11px; padding: 11px 2px 10px; gap: 7px; }
.action-btn i { width: 38px; height: 38px; border-radius: 14px; font-size: 15px; }
@media (max-width: 360px) { .action-row { gap: 6px; } .action-btn { font-size: 10px; } .action-btn i { width: 34px; height: 34px; } }

/* ---------- مینی‌پلیر در صفحه‌های باریک: جا برای عنوان بیشتر ---------- */
@media (max-width: 430px) {
  .mini-player { padding: 0 8px 8px 8px; gap: 4px; }
  .mini-player .mini-art, .mini-player .mini-poster { width: 44px; height: 44px; }
  .mini-player .mini-open { gap: 8px; }
  .mini-player .mini-ctrls { gap: 0; }
  .mini-player .mini-btn { width: 27px; height: 27px; font-size: 11.5px; }
  .mini-player .mini-btn[data-a="stop"] { font-size: 10px; }
  .mini-player .mini-play { width: 38px; height: 38px; font-size: 13px; }
  .mini-player .mini-eq { width: 20px; height: 20px; right: -4px; bottom: -4px; padding-bottom: 4.5px; }
}
