/*
Theme Name: Neyzar Music
Description: قالب اختصاصی نیزار موزیک (مشابه رادیو جوان)
Author: شما
Version: 1.0
*/


:root {
    --bg-color: #121212;
    --surface-color: #181818;
    --surface-hover: #282828;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --primary-color: #1db954; /* رنگ سبز مشابه اسپاتیفای */
}

/* --- تنظیمات پایه --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    padding-bottom: 90px; /* جا باز کردن برای پلیر ثابت پایین */
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- هدر (منو و لوگو) --- */
.site-header {
    background-color: #000000;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.site-logo h2 {
    font-size: 24px;
    font-weight: bold;
}

.site-navigation ul {
    display: flex;
    list-style: none; /* حذف نقطه‌های منو */
    gap: 20px;
}

.site-navigation a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

.site-navigation a:hover {
    color: var(--text-primary);
}

/* --- محتوای اصلی و گرید آهنگ‌ها --- */
.site-main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    border: 1px solid #333333; /* کادر دور بخش اصلی آهنگ‌ها */
    border-radius: 10px; /* گرد کردن گوشه‌های کادر */
    background-color: #151515; /* کمی تغییر رنگ پس‌زمینه داخل کادر */
}


.site-main h1 {
    margin-bottom: 20px;
    font-size: 22px;
}

.tracks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* --- کارت آهنگ‌ها --- */
.track-card {
    background-color: #181818;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* جلوگیری از بیرون زدن محتوا */
    min-width: 0; /* این ترفند برای جلوگیری از شکسته شدن Grid بسیار مهم است */
}

/* برای زیباتر شدن، در حالت هاور (وقتی موس روی آن می‌رود) رنگ کادر را روشن‌تر کنیم: */
.track-card:hover {
    background-color: var(--surface-hover);
    border-color: #555555; 
}


.track-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
}

.track-cover {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1; /* مربع کردن عکس‌ها */
    object-fit: cover; /* جلوگیری از کشیده شدن عکس */
    display: block;
}

/* دکمه پخش روی کاور */
.play-btn-overlay {
    width: 40px !important; /* کوچک‌تر کردن دکمه */
    height: 40px !important;
    padding: 0 !important; /* حذف فاصله‌های اضافی */
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10;
}
.play-btn-overlay svg {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
}

.track-card:hover .play-btn-overlay {
    opacity: 1;
    transform: translateY(0);
}

.track-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-info .artist-name {
    font-size: 14px;
    color: var(--text-secondary);
}

/* --- پلیر ثابت پایین صفحه --- */
.neyzar-music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background-color: #181818;
    border-top: 1px solid #282828;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 30%;
}

.player-info img {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
}

#player-title {
    font-size: 14px;
    font-weight: bold;
}

.player-controls {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.player-controls audio {
    width: 100%;
    max-width: 500px;
    outline: none;
}
/* استایل‌های موزیک پلیر اختصاصی */
.neyzar-custom-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #111;
    border-top: 1px solid #333;
    padding: 10px 20px;
    z-index: 9999;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.5);
}

.player-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    color: #fff;
}

.player-track-info {
    display: flex;
    align-items: center;
    width: 25%;
}

.player-track-info img {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    margin-left: 15px; /* برای راست‌چین */
}

.player-text {
    display: flex;
    flex-direction: column;
}

#player-title { font-weight: bold; font-size: 14px; }
#player-artist { font-size: 12px; color: #aaa; margin-top: 5px; }

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.ctrl-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.ctrl-btn:hover { color: var(--primary-color, #1db954); }

.play-pause-btn {
    background-color: #fff;
    color: #000;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    justify-content: center;
}

.play-pause-btn:hover {
    transform: scale(1.05);
    color: #000;
}

.player-progress-area {
    display: flex;
    align-items: center;
    width: 35%;
    gap: 10px;
    font-size: 12px;
}

#progress-bar {
    flex-grow: 1;
    cursor: pointer;
    accent-color: var(--primary-color, #1db954);
}
/* --- Single Track Page Styles --- */
.single-track-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.track-header {
    display: flex;
    gap: 40px;
    align-items: center;
    background-color: var(--surface-color, #1e1e1e);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 40px;
}

.track-cover-large {
    flex-shrink: 0;
    width: 300px;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.track-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.track-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.track-title {
    font-size: 32px;
    margin: 0 0 10px 0;
    color: #fff;
}

.track-artist {
    font-size: 20px;
    color: #aaaaaa;
    margin: 0 0 30px 0;
    font-weight: normal;
}

.play-single-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #e50914; /* رنگ قرمز شبیه پلتفرم‌های معروف */
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-single-btn:hover {
    background-color: #f40612;
    transform: scale(1.05);
}

.track-lyrics {
    background-color: var(--surface-color, #1e1e1e);
    padding: 30px;
    border-radius: 15px;
}

.track-lyrics h3 {
    margin-top: 0;
    color: #fff;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.lyrics-content {
    line-height: 2;
    color: #cccccc;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .track-header {
        flex-direction: column;
        text-align: center;
    }
    .track-info {
        align-items: center;
    }
    .track-cover-large {
        width: 250px;
        height: 250px;
    }
}
#ajax-content{
    opacity:1;
    transition:opacity .3s ease;
}

#ajax-content.fade-out{
    opacity:0;
}
.track-info {
    padding: 15px;
    text-align: center;
    background: #181818;
    display: block;
}
.track-info h3 {
    margin: 0 0 5px 0;
    font-size: 12px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}
.track-info h3 a {
    color: #fff;
    text-decoration: none;
}