/*
Theme Name: Bibak Music Ultra
Theme URI: https://www.bibakmusic.com
Author: Bibak Music Dev Team
Description: پوسته اختصاصی بی‌باک موزیک - نسخه ۱۵ با سئوی پیشرفته، پست‌های پیش‌نویس لوکس پلی‌لیست و چیدمان متقارن.
Version: 15.0.0
Requires PHP: 8.0
Text Domain: bibak-theme
*/

/* فونت‌های لوکس وزیرمتن لوکال */
@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #e11d48; /* افزایش جزئی غلظت برای پاس شدن کنتراست فونت سفید */
    --bg-body: #FAF4EE;
    --bg-card: #ffffff;
    --border-color: #f1e4d8;
    --text-main: #1f1815;
    --text-muted: #5e524b; /* تیره و خواناتر شدن متن‌های خاکستری جهت پاس شدن قطعی WCAG */
    --biscuit-light: #FAF4EE;
    --player-bg: rgba(255, 255, 255, 0.98);
    --radius-xl: 18px;
    --radius-md: 12px;
    --bottom-ad-offset: 120px;
}

[data-theme="dark"] {
    --primary: #fb7185;
    --bg-body: #0d0f15;
    --bg-card: #141822;
    --border-color: #242a3a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --biscuit-light: #0d0f15;
    --player-bg: rgba(20, 24, 34, 0.98);
}

html, body { margin: 0; padding: 0; width: 100%; max-width: 100vw; overflow-x: hidden !important; box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
body { font-family: 'Vazirmatn', Tahoma, sans-serif; background: var(--bg-body); color: var(--text-main); line-height: 1.8; padding-bottom: 125px; direction: rtl; }
.container { max-width: 1050px; margin: 0 auto; padding: 0 16px; width: 100%; }

.glass-header { position: sticky; top: 0; z-index: 1000; background: var(--player-bg); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-color); padding: 10px 0; }
.header-content { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.logo { font-size: 20px; font-weight: 900; text-decoration: none; color: var(--text-main); white-space: nowrap; }
.logo span { color: var(--primary); }

.search-pill { display: flex; align-items: center; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 50px; padding: 6px 14px; width: 280px; }
.search-pill input { border: none; background: transparent; outline: none; width: 100%; font-family: inherit; color: var(--text-main); font-size: 13px; }

.header-btn-group { display: flex; gap: 6px; align-items: center; }
.theme-btn { background: var(--bg-card); border: 1px solid var(--border-color); padding: 6px 12px; border-radius: 50px; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 700; color: var(--text-main); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; text-decoration: none; }

.mobile-search-toggle { display: none; }
.mobile-search-drawer { display: none; }

.radio-section { margin: 18px 0 22px; display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.radio-tag { background: var(--bg-card); border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 50px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.radio-tag.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.station-inspect-btn { font-size: 12px; opacity: 0.7; padding: 2px; }
.station-inspect-btn:hover { opacity: 1; transform: scale(1.1); }

/* ==========================================================================
   دکمه پاستیلی زمردی ساخت پلی‌لیست در نوار رادیو (ساده، فلت و بدون سایه)
   ========================================================================== */
.create-playlist-pill {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #047857 !important;
    padding: 6px 14px !important;
    border-radius: 50px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: none !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
    user-select: none;
    flex-shrink: 0;
}
.create-playlist-pill:hover {
    background: #d1fae5 !important;
    border-color: #6ee7b7 !important;
    color: #065f46 !important;
    box-shadow: none !important;
    transform: none !important;
}
.create-playlist-pill .pl-pill-icon {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
}

[data-theme="dark"] .create-playlist-pill {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: #6ee7b7 !important;
    box-shadow: none !important;
}
[data-theme="dark"] .create-playlist-pill:hover {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #a7f3d0 !important;
}

.main-layout-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; margin-top: 15px; width: 100%; min-width: 0; }
.content-area { width: 100%; min-width: 0; }
.posts-list { width: 100%; min-width: 0; }
.single-card, .track-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 24px; margin-bottom: 16px; }

.track-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: var(--radius-md); width: 100%; min-width: 0; box-sizing: border-box; }
.track-cover { flex-shrink: 0; }
.track-cover img { width: 68px; height: 68px; border-radius: 12px; object-fit: cover; display: block; }
.track-body { flex: 1; min-width: 0; overflow: hidden; }
.track-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-title a { text-decoration: none; color: var(--text-main); }
.track-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.track-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.circle-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--bg-body); color: var(--text-main); cursor: pointer; display: grid; place-items: center; font-size: 13px; transition: all 0.2s ease; flex-shrink: 0; }
.circle-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(244, 63, 94, 0.08); transform: translateY(-1px); }

.dl-btn { background: var(--primary); color: #fff; text-decoration: none; font-size: 12px; font-weight: 700; padding: 8px 16px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; border: none; cursor: pointer; transition: 0.2s; white-space: nowrap; flex-shrink: 0; }
.dl-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.copy-btn { background: var(--bg-body); border: 1px solid var(--border-color); color: var(--text-main); font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 10px; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.copy-btn:hover { border-color: var(--primary); color: var(--primary); }

.song-header-area { margin-bottom: 18px; text-align: center; }
.song-meta-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 10px; }
.chip-badge { background: var(--bg-body); border: 1px solid var(--border-color); padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.chip-artist { color: var(--text-main); font-weight: 800; border-color: var(--primary); }
.song-page-title { font-size: 24px; font-weight: 900; line-height: 1.5; margin: 0 auto; color: var(--text-main); text-align: center; word-break: break-word; max-width: 800px; }

.song-cover-top { max-width: 380px; margin: 15px auto 25px; text-align: center; }
.song-cover-top img { width: 100%; border-radius: 20px; aspect-ratio: 1/1; object-fit: cover; display: block; border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.06); }

.song-description-text { line-height: 2; font-size: 14.5px; color: var(--text-main); margin-bottom: 25px; }

.online-player-bar { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 20px; margin: 20px 0; display: flex; align-items: center; gap: 16px; }
.play-big-circle { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); border: none; color: #fff; font-size: 18px; cursor: pointer; display: grid; place-items: center; }

.download-box { margin-top: 20px; }
.download-title { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dl-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.quality-badge { font-weight: 800; font-size: 14px; color: var(--primary); }
.dl-actions { display: flex; gap: 8px; }

.post-bottom-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 25px;
    padding: 12px 16px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.lyrics-card { background: var(--bg-body); border: 1px dashed var(--border-color); border-radius: var(--radius-md); padding: 22px; margin-top: 25px; text-align: center; line-height: 2.2; font-size: 14px; }

.related-songs-box { margin-top: 35px; border-top: 1px solid var(--border-color); padding-top: 25px; }
.related-title { font-size: 16px; font-weight: 800; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.related-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px 14px; display: flex; gap: 12px; align-items: center; min-width: 0; }
.related-thumb img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.related-info { flex: 1; min-width: 0; }
.related-info h4 { font-size: 12px; margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.related-info h4 a { color: var(--text-main); text-decoration: none; }

.playlist-post-track {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: 0.2s;
}
.playlist-post-track:hover { border-color: var(--primary); transform: translateY(-1px); }

.comments-section-wrap { margin-top: 40px; border-top: 1px solid var(--border-color); padding-top: 25px; }
.comments-header-title { font-size: 16px; font-weight: 800; margin-bottom: 20px; }
.luxury-comment-list { list-style: none; padding: 0; margin: 0 0 30px; }
.luxury-comment-list .comment-body { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.luxury-comment-list .comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.luxury-comment-list .avatar { border-radius: 50%; border: 2px solid var(--primary); }
.luxury-input { width: 100%; border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 14px; font-family: inherit; font-size: 13px; background: var(--bg-card); color: var(--text-main); box-sizing: border-box; }

.sticky-player { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 1050px; background: var(--player-bg); border: 1px solid var(--border-color); border-radius: 20px; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; box-shadow: 0 12px 35px rgba(0,0,0,0.14); z-index: 2000; direction: rtl; }
.player-left-col { display: flex; align-items: center; gap: 12px; width: 200px; min-width: 180px; }
.mini-cover { width: 45px; height: 45px; border-radius: 10px; object-fit: cover; }
.mini-title { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { font-size: 11px; color: var(--text-muted); }

.player-center-col { flex: 1; display: flex; flex-direction: column; align-items: center; max-width: 450px; }
.player-buttons-row { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; direction: rtl; }

.player-icon-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid transparent; background: transparent;
    color: var(--text-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; transition: all 0.2s ease;
}
.player-icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(244, 63, 94, 0.08);
    transform: translateY(-1px);
}
.player-icon-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.45);
    transform: scale(1.1);
}

.progress-bar-wrap { width: 100%; display: flex; align-items: center; gap: 8px; direction: ltr; }
.time-label { font-size: 11px; color: var(--text-muted); min-width: 30px; text-align: center; }
.timeline-track { flex: 1; height: 6px; background: var(--border-color); border-radius: 10px; cursor: pointer; position: relative; }
.timeline-fill { width: 0%; height: 100%; background: var(--primary); border-radius: 10px; pointer-events: none; }

.player-right-col { display: flex; align-items: center; gap: 12px; }
.player-volume-wrap { display: flex; align-items: center; gap: 6px; direction: ltr !important; }
.volume-slider { width: 70px; height: 4px; -webkit-appearance: none; background: var(--border-color); border-radius: 5px; outline: none; cursor: pointer; direction: ltr !important; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); cursor: pointer; }

.queue-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 8px; border-bottom: 1px dashed var(--border-color); font-size: 12px; transition: 0.2s; }
.queue-row.active { background: rgba(244,63,94,0.1); border-color: var(--primary); font-weight: 800; color: var(--primary); }
.queue-link-icon { font-size: 12px; text-decoration: none; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border-color); }

.custom-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 3000; display: flex; justify-content: center; align-items: center; padding: 20px; }
.modal-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 22px; width: 100%; max-width: 480px; box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
.modal-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; margin-bottom: 12px; overflow-x: auto; }
.modal-tab-btn { background: none; border: none; font-family: inherit; font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 6px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.modal-tab-btn.active { background: var(--bg-body); color: var(--primary); }
.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }
.items-scroll-list { max-height: 260px; overflow-y: auto; }

#send-radio-station-modal { z-index: 4000 !important; }
.station-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.station-select-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px; cursor: pointer; text-align: center; font-size: 12px; font-weight: 700; transition: 0.2s; }
.station-select-card:hover { border-color: var(--primary); color: var(--primary); background: rgba(244,63,94,0.06); }

.playlist-quick-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px;
    margin-top: 10px;
}

.site-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 25px 0; width: 100%; }
.site-pagination a, .site-pagination span { background: var(--bg-card); border: 1px solid var(--border-color); padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--text-main); font-weight: 700; font-size: 13px; }
.site-pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (max-width: 768px) {
    .container { padding: 0 14px; }
    .main-layout-grid, .dl-grid { grid-template-columns: 1fr; width: 100%; }
    .search-pill { display: none; }
    .mobile-search-toggle { display: inline-flex; }

    .header-content { gap: 8px; }
    .btn-text { display: none; }
    .btn-compact { padding: 6px 10px; font-size: 14px; }
    
    .sticky-player { flex-direction: column; width: calc(100% - 20px); padding: 10px; }
    .player-left-col, .player-center-col, .player-right-col { width: 100%; max-width: 100%; justify-content: center; }

    /* بازطراحی لوکس، درشت و اپلیکیشنی کارت‌های ترانه در موبایل */
    .track-card {
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        padding: 15px !important;
        gap: 14px !important;
        border-radius: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* کاور بزرگ، واضح و جذاب در موبایل */
    .track-cover {
        flex-shrink: 0 !important;
    }
    .track-cover img {
        width: 66px !important;
        height: 66px !important;
        border-radius: 14px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
    }
    
    /* بدنه کارت و عنوان درشت و خوانا */
    .track-body {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    .track-title {
        font-size: 14.5px !important;
        font-weight: 800 !important;
        line-height: 1.55 !important;
        margin-bottom: 6px !important;
        white-space: normal !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .track-meta {
        font-size: 12px !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
        white-space: normal !important;
        line-height: 1.4 !important;
    }
    .track-meta .meta-date {
        display: inline-block !important;
    }

    /* نوار اختصاصی دکمه‌ها در پایین کارت با ابعاد بزرگ و ارگونومیک */
    .track-actions {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        border-top: 1px dashed var(--border-color) !important;
        padding-top: 11px !important;
        margin-top: 2px !important;
    }
    .circle-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 14px !important;
        flex-shrink: 0 !important;
    }
    .dl-btn {
        flex: 1 !important;
        height: 38px !important;
        padding: 0 16px !important;
        font-size: 12.5px !important;
        font-weight: 800 !important;
        border-radius: 10px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
}
/* ==========================================================================
   استایل فوق‌لوکس و شیشه‌ای پنل کشویی سرچ موبایل
   ========================================================================== */
.mobile-search-drawer {
    display: none;
    background: var(--player-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0 14px;
    animation: drawerSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-search-drawer.is-open {
    display: block !important;
}

@keyframes drawerSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-search-form {
    display: flex !important;
    align-items: center !important;
    background: var(--bg-body) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 50px !important;
    padding: 4px 6px 4px 14px !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.mobile-search-form:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15) !important;
}

#mobile-search-input {
    flex: 1 !important;
    min-width: 0 !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-family: inherit !important;
    font-size: 13.5px !important;
    color: var(--text-main) !important;
    padding: 6px 0 !important;
    direction: rtl !important;
}

#mobile-search-input::placeholder {
    color: var(--text-muted) !important;
    font-size: 12.5px !important;
}

.mobile-search-submit {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: none !important;
    background: var(--primary) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: grid !important;
    place-items: center !important;
    font-size: 14px !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
}

.mobile-search-submit:active {
    transform: scale(0.92) !important;
}