/* ============================================================
   TOKENS — هماهنگ با پالت اصلی سایت (طلایی/زرشکی)
   دقیقاً همون متغیرهای صفحات آرشیو و مراسمات
   ============================================================ */
:root{
  --bg: #100d0e;
  --bg-soft: rgba(255,255,255,0.045);
  --bg-soft-strong: rgba(255,255,255,0.07);
  --border-soft: rgba(201,151,74,0.18);
  --border-soft-strong: rgba(201,151,74,0.32);
  --gold: #c9974a;
  --gold-light: #eccb84;
  --maroon: #6e1b26;
  --maroon-light: #9c2e3b;
  --text: #f3ede2;
  --text-muted: rgba(243,237,226,0.55);
  --radius-lg: 20px;
  --radius-md: 14px;
  --ease: cubic-bezier(.22,1,.36,1);

  /* alias نگه‌داشته شده برای سازگاری با کدهای قدیمی */
  --neon: var(--gold);
}

/* ============================================================
   عنوان صفحه — هم‌استایل با بقیه‌ی صفحات
   ============================================================ */
h2{
  position: relative;
  margin-top: 30px;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  animation: fadeInDown .8s var(--ease);
}

h2::after{
  content: "";
  display: block;
  width: 90px;
  height: 1px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}

@keyframes fadeIn{
  0%{ opacity: 0; transform: translateY(20px); }
  100%{ opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown{
  0%{ opacity: 0; transform: translateY(-20px); }
  100%{ opacity: 1; transform: translateY(0); }
}

/* ============================================================
   دراپ‌داون تعداد نمایش (کاستوم)
   ============================================================ */
.dropdown-wrapper{
  position: relative;
  display: inline-block;
  z-index: 1000;
  animation: fadeIn .7s var(--ease) .1s both;
}

.dropdown-btn{
  background: var(--bg-soft);
  backdrop-filter: blur(10px); /* یک نمونه‌ی تکی روی صفحه -> بی‌خطر برای اسکرول */
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
 

.dm{
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  z-index: 1001;

  background: rgba(16,13,14,0.95);
  backdrop-filter: blur(15px); /* تکی -> بی‌خطر */

  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);

  padding: 8px;
  min-width: 120px;
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}

.dm.show{
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}

.dm a{
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-soft);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}

 

.dm hr{
  margin: 0;
  border-color: var(--border-soft);
  opacity: .5;
}

/* ============================================================
   نوار فیلتر (بروزرسانی / ترتیب / سبک / مناسبت)
   ============================================================ */
.filter-wrapper{
  animation: fadeIn .8s var(--ease) .1s both;
}

.filter-btn{
  background: var(--bg-soft) !important;
  border: 1px solid var(--border-soft) !important;
  color: var(--text) !important;
  border-radius: 30px !important;
  padding: 8px 20px !important;
  font-size: 13px !important;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease) !important;
}

.filter-btn:focus{
  border-color: var(--gold) !important;
  color: var(--gold-light) !important;
  box-shadow: 0 0 10px rgba(201,151,74,0.25) !important;
}

.filter-top .filter-btn{
  cursor: default;
  color: var(--text-muted) !important;
}

.filter-item .dropdown-menu{
  background: rgba(16,13,14,0.95);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.filter-item .dropdown-item{
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.filter-item .dropdown-item:focus{
  color: var(--gold-light);
  background: rgba(201,151,74,0.12);
}

.filter-item .dropdown-menu hr{
  margin: 2px 0;
  border-color: var(--border-soft);
  opacity: .5;
}

/* ============================================================
   لیست آثار صوتی
   نکته‌ی مهم برای اسکرول: تا ۲۰۰ آیتم در هر صفحه ممکنه رندر بشه،
   پس هیچ backdrop-filter روی خود کارت‌ها گذاشته نشده (فقط
   گرادیان/رنگ ساده که تقریباً هزینه‌ی رندر نداره).
   ============================================================ */
.audio-card{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
  contain: layout paint;
}
 

.img-audio img{
  margin: 10px;
  height: 50px;
  width: 50px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-soft);
  transition: border-color .3s var(--ease);
}

 
.card-body{
  flex: 1;
  min-width: 0;
  margin-top: 0;
  color: var(--text);
  border-radius: 10px;
  height: 75px;
}

.title-row{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}

.card-title{
  margin-top: 0;
  margin-bottom: 0;
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .3s var(--ease);
}

.card-title{
  color: var(--gold-light);
}

/* نشانگر اکولایزر — فقط وقتی کارت در حال پخشه نمایش داده میشه */
.now-playing-eq{
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  flex: 0 0 auto;
}

.now-playing-eq i{
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--gold-light);
  animation: eqBar .9s ease-in-out infinite;
}

.now-playing-eq i:nth-child(1){ animation-delay: 0s; }
.now-playing-eq i:nth-child(2){ animation-delay: .2s; }
.now-playing-eq i:nth-child(3){ animation-delay: .4s; }

@keyframes eqBar{
  0%, 100%{ height: 4px; }
  50%{ height: 12px; }
}

/* ============================================================
   کارتِ در حال پخش — استایل مجزا و واضح
   ============================================================ */
.audio-card.playing{
  background: linear-gradient(135deg, rgba(201,151,74,0.18), rgba(110,27,38,0.1));
  border-color: var(--gold);
  box-shadow:
    inset 3px 0 0 var(--gold),
    0 8px 22px rgba(0,0,0,0.35),
    0 0 16px rgba(201,151,74,0.2);
}

.audio-card.playing .card-title{
  color: var(--gold-light);
}

.audio-card.playing .img-audio img{
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(201,151,74,0.5);
}

.audio-card.playing .now-playing-eq{
  display: inline-flex;
}

.audio-card.playing .play-btn{
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  animation: playPulse 1.8s ease-in-out infinite;
}

@keyframes playPulse{
  0%, 100%{ box-shadow: 0 0 0 0 rgba(201,151,74,0.45); }
  50%{ box-shadow: 0 0 0 7px rgba(201,151,74,0); }
}

.audio-meta{
  color: var(--text-muted);
  margin-top: 5px;
  margin-bottom: 0;
  font-size: 13px;
}

.audio-style-tag{
  color: var(--gold);
  opacity: .9;
  margin: 0;
  font-size: 12px;
  padding-bottom: 20px;
}

/* دکمه‌های سمت اکشن */
.actions{
  display: flex;
  gap: 8px;
}

.play-btn,
.download-btn{
  margin: 0;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #1c1408;
  background-color: var(--gold);
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}
 

/* جداکننده‌ی بخش‌ها */
.section-divider{
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 12px;
  box-sizing: border-box;
}

.section-divider::before{
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-soft-strong) 15%, var(--gold) 50%, var(--border-soft-strong) 85%, transparent);
}

.section-divider::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, var(--gold-light), var(--maroon));
  border-radius: 2px;
}

/* ============================================================
   پلیر پایین صفحه — تک نمونه، بلور بی‌خطره
   ============================================================ */
#bottomAudioPlayer{
  position: fixed;
  bottom: -120px;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(16,13,14,0.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-soft);
  color: var(--text);
  z-index: 15000;
  transition: bottom .4s var(--ease);
}

#bottomAudioPlayer.show{
  bottom: 0;
}

.close-btn{
  position: absolute;
  top: -25px;
  right: 15px;
  width: 35px;
  height: 35px;
  padding-top: 5px;
  background: rgba(16,13,14,0.92);
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(201,151,74,0.25);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
 

.player-left{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.cover{
  width: 50px;
  height: 50px;
  background: var(--bg-soft-strong);
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  flex: 0 0 auto;
}

.info span{
  font-weight: bold;
  color: var(--text);
}

.info small{
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.player-center{
  flex: 1;
  max-width: 500px;
}

.controls{
  text-align: center;
  margin-bottom: 5px;
}

.controls button{
  background: var(--gold);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #1c1408;
  font-size: 16px;
  cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease);
}

 

.progress-container{
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
  unicode-bidi: bidi-override;
  color: var(--text-muted);
  font-size: 12px;
}

#progressBar,
#volume{
  accent-color: var(--gold);
}

#progressBar{
  flex: 1;
}

.player-right{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  flex: 0 0 auto;
}

#volume{
  width: 100px;
}

@media (max-width: 768px){
  .player-right{
    display: none;
  }
  .cover{
    width: 40px;
    height: 40px;
  }
}

/* ============================================================
   Pagination
   بلور از تک‌تک دکمه‌ها به کانتینر مشترک منتقل شد (یک بار
   محاسبه به‌جای N بار روی هر لینک صفحه).
   ============================================================ */
.pagination{
  gap: 8px;
  background: var(--bg-soft);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 8px;
  width: fit-content;
  margin: 0 auto;
}

.pagination .page-link{
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  min-width: 40px;
  text-align: center;
  transition: transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}

 

.pagination .page-item.active .page-link{
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1c1408;
  font-weight: bold;
  box-shadow: 0 0 12px rgba(201,151,74,0.45);
  border-color: transparent;
}

.pagination .page-item.disabled .page-link{
  opacity: .4;
  cursor: not-allowed;
  background: transparent;
}

.top-header{ z-index: 15000 !important; }
.mobile-menu{ z-index: 15001 !important; }

/* ===== موبایل: حذف باقی‌مانده‌ی بلورها برای اسکرول کاملاً نرم ===== */
@media (max-width: 768px){
  .pagination,
  .dropdown-btn,
  .dm,
  .filter-item .dropdown-menu{
    backdrop-filter: none;
    background-color: rgba(16,13,14,0.92);
  }

  * {
    font-size: inherit;
  }
}

 

.filter-wrapper{
    position: relative;
    z-index: 15;
}

.filter-item .dropdown-menu{
    z-index: 20001 !important;
}
.audio-card{
    position: relative;
    z-index: 1;
}

.dropdown-menu a:hover{
  color: #100d0e;
}
.dropdown-menu  {
  background-color: #000000 !important;
}
.dropdown-btn:hover{
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(201,151,74,0.3);
}

 .audio-card > a{
    display: flex;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    align-items: center;
}