/*
Theme Name: MSB Music - نسخه نهایی PWA
Version: 10.4.1
*/

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-card: #1212128a;
    --bg-elevated: #1e1e1e;
    --hover: #2a2a30;
    --primary: #1ed760;
    --primary-hover: #1fdf64;
    --text: #ffffff;
    --text-sec: #b3b3b3;
    --text-muted: #6b6b6b;
    --border: #2a2a2a;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg-primary);
    color: var(--text);
    direction: rtl;
    overflow-x: hidden;
}

/* ========== ساختار اصلی ========== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-container {
    flex: 1;
    margin-right: 260px;
    min-height: 100vh;
    padding-bottom: 90px;
    width: calc(100% - 260px);
    max-width: calc(100% - 260px);
    overflow-x: hidden;
}

.main-content {
    padding: 20px 24px;
    max-width: 1200px;
    margin: 0 auto;
    transition: opacity 0.2s ease;
    width: 100%;
}

@media (max-width: 1200px) {
    .main-content {
        max-width: 100%;
        padding: 20px;
    }
}

@media (max-width: 991px) {
    .main-container {
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }
    .main-content {
        padding: 14px 16px;
        padding-bottom: 130px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px 2px;
        padding-bottom: 18px;
    }
}

/* ========== سایدبار دسکتاپ ========== */
.desktop-sidebar {
    width: 260px;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--border);
    z-index: 100;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-logo {
    text-align: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.sidebar-logo img {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin-bottom: 10px;
}

.sidebar-logo h2 {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ========== جستجوی دسکتاپ ========== */
.sidebar-search {
    margin: 0 16px 20px;
    position: relative;
}

.sidebar-search-box {
    position: relative;
    background: var(--bg-card);
    border-radius: 40px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.sidebar-search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.2);
}

.sidebar-search-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-sec);
    font-size: 14px;
    pointer-events: none;
}

.sidebar-search-box input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    background: transparent;
    border: none;
    border-radius: 40px;
    color: var(--text);
    font-size: 13px;
    font-family: 'Vazirmatn', sans-serif;
}

.sidebar-search-box input::placeholder {
    color: var(--text-sec);
    font-size: 12px;
}

.sidebar-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-radius: 16px;
    z-index: 1000;
    max-height: 360px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.sidebar-search-results.show { display: block; }

.sidebar-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.sidebar-search-item:hover { background: var(--hover); }
.sidebar-search-item img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.sidebar-search-info { flex: 1; }
.sidebar-search-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-search-artist { font-size: 11px; color: var(--text-sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ========== منوی سایدبار ========== */
.sidebar-menu { list-style: none; padding: 0 16px; }
.sidebar-menu li { margin-bottom: 4px; }
.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-sec);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}
.sidebar-menu li a i { width: 22px; font-size: 16px; }
.sidebar-menu li a:hover,
.sidebar-menu li a.active { background: var(--hover); color: var(--primary); }

/* ========== بخش کاربری سایدبار ========== */
.sidebar-user-section { margin-top: 0px; padding: 0px 10px;}
.sidebar-user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 4px 10px;
    border-radius: 10px;
    color: var(--text-sec);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}
.sidebar-user-link i { width: 22px; font-size: 16px; }
.sidebar-user-link:hover { background: var(--hover); color: var(--primary); }

.sidebar-divider { height: 1px; background: var(--border); margin: 16px; }

/* ========== هدر موبایل ========== */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.mobile-header .logo { display: flex; align-items: center; gap: 8px; }
.mobile-header .logo img { width: 28px; height: 28px; border-radius: 8px; }
.mobile-header .logo span {
    font-size: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mobile-buttons { display: flex; gap: 8px; }

.mobile-search-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}
.mobile-search-btn:hover { background: rgba(30, 215, 96, 0.15); color: var(--primary); }

@media (max-width: 991px) {
    .desktop-sidebar { display: none; }
    .mobile-header { display: flex; justify-content: space-between; align-items: center; }
}

/* ========== بخش‌های عمومی ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 28px 0 14px;
}

.section-title { display: flex; align-items: center; gap: 8px; }
.section-title i { font-size: 20px; color: var(--primary); }
.section-title h2 { font-size: 18px; font-weight: 700; }

.view-all {
    color: var(--text-sec);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}
.view-all:hover { color: var(--primary); }

.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin-bottom: 20px;
    border: none;
}

/* ========== شبکه کارت‌ها - اصلاح شده برای نمایش بهتر ========== */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.music-card, .app-song-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s;
    cursor: pointer;
}
.music-card:hover, .app-song-card:hover { background: var(--hover); transform: translateY(-4px); }

.music-thumbnail, .app-song-cover {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.music-thumbnail img, .app-song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.music-card:hover .music-thumbnail img,
.app-song-card:hover .app-song-cover img { transform: scale(1.05); }

.play-btn-overlay, .app-play-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}
.music-card:hover .play-btn-overlay,
.app-song-card:hover .app-play-btn { opacity: 1; transform: translateY(0); }

.play-btn-overlay i, .app-play-btn i { color: #000; font-size: 14px; }

.music-details, .app-song-info { text-align: right; }

.song-title, .app-song-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artist-name, .app-song-artist {
    font-size: 11px;
    color: var(--text-sec);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== صفحات دسته‌بندی و برچسب ========== */
.category-page-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--bg-primary);
    min-height: 100vh;
}

.app-category-header {
    width: 100%;
    padding: 16px 16px 20px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-bottom: 1px solid var(--border);
}

.app-header-top { display: flex; align-items: center; justify-content: space-between; }

.app-back-btn, .app-share-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.app-back-btn:hover, .app-share-btn:hover { background: var(--primary); color: #000; }

.app-header-title {
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0 8px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-description-box {
    margin: 0 16px 16px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 12px;
    border-right: 3px solid var(--primary);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-sec);
}

.app-songs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.app-songs-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.app-songs-title i { color: var(--primary); }

.app-header-actions { display: flex; align-items: center; gap: 12px; }

.app-play-all-btn {
    background: linear-gradient(135deg, var(--primary), #0e8e3e);
    color: #000;
    border: none;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: 'Vazirmatn', sans-serif;
}
.app-play-all-btn:hover { transform: scale(1.02); opacity: 0.95; }

.app-view-toggle {
    display: flex;
    gap: 6px;
    background: var(--bg-card);
    padding: 3px;
    border-radius: 30px;
}

.app-view-btn {
    background: none;
    border: none;
    color: var(--text-sec);
    padding: 6px 12px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
}
.app-view-btn.active { background: var(--primary); color: #000; }

/* ========== نمای گرید ========== */
.app-grid-view {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px 20px;
}
@media (min-width: 480px) { .app-grid-view { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .app-grid-view { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
@media (min-width: 1200px) { .app-grid-view { grid-template-columns: repeat(5, 1fr); } }

/* ========== نمای لیست ========== */
.app-list-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px 20px;
}

.app-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: 12px;
    transition: all 0.2s;
    cursor: pointer;
}
.app-list-item:hover { background: var(--hover); }

.app-list-number {
    width: 32px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sec);
    text-align: center;
}

.app-list-cover {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.app-list-cover img { width: 100%; height: 100%; object-fit: cover; }

.app-list-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
}
.app-list-item:hover .app-list-play { opacity: 1; }

.app-list-info { flex: 1; min-width: 0; }
.app-list-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-list-artist {
    font-size: 11px;
    color: var(--text-sec);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-list-actions { display: flex; gap: 6px; }
.app-list-download, .app-list-more {
    width: 30px;
    height: 30px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sec);
    text-decoration: none;
    transition: all 0.2s;
}
.app-list-download:hover, .app-list-more:hover { background: var(--primary); color: #000; }

.app-video-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(231, 76, 60, 0.9);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-video-badge i { color: white; font-size: 11px; }

.app-empty {
    text-align: center;
    padding: 60px 20px;
}
.app-empty i { font-size: 48px; color: var(--text-sec); margin-bottom: 16px; }

/* ========== صفحه تک آهنگ ========== */
.app-song-page { max-width: 1000px; margin: 0 auto; background: var(--bg-primary); min-height: 100vh; }

.app-page-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}
.app-page-title span { font-size: 16px; font-weight: 500; color: var(--text-sec); }

.app-cover-section { padding: 30px 20px 20px; display: flex; justify-content: center; }
.app-cover-wrapper {
    position: relative;
    width: 240px;
    height: 240px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
@media (min-width: 768px) { .app-cover-wrapper { width: 280px; height: 280px; } }
@media (max-width: 480px) { .app-cover-wrapper { width: 200px; height: 200px; } }

.app-cover-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.app-cover-wrapper:hover .app-cover-image { transform: scale(1.05); }
.app-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.4));
    pointer-events: none;
}

.app-song-info-center { text-align: center; padding: 0 20px 20px; }
.app-song-title-main { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
@media (max-width: 480px) { .app-song-title-main { font-size: 22px; } }

.app-artist-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}
.app-artist-wrapper i { color: var(--primary); font-size: 14px; }
.app-artist-link, .app-artist-name { font-size: 16px; color: var(--text-sec); text-decoration: none; }
.app-artist-link:hover { color: var(--primary); }

.app-song-stats { display: flex; justify-content: center; gap: 20px; }
.app-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 5px 12px;
    border-radius: 30px;
}

.app-action-buttons { display: flex; justify-content: center; gap: 16px; padding: 0 20px 24px; flex-wrap: wrap; }
.app-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
}
.app-action-btn.play-btn { background: linear-gradient(135deg, var(--primary), #0e8e3e); color: #000; }
.app-action-btn.play-btn:hover { transform: scale(1.02); }
.app-action-btn.download-btn { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.app-action-btn.download-btn:hover { background: var(--hover); }

/* ========== پاپ‌آپ دانلود ========== */
.app-download-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.app-download-popup.open { display: flex; }

.download-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.download-popup-container {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: var(--bg-elevated);
    border-radius: 28px;
    overflow: hidden;
}
.download-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.download-popup-header span { font-size: 16px; font-weight: 600; }
.close-popup-btn {
    background: none;
    border: none;
    color: var(--text-sec);
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.close-popup-btn:hover { background: var(--hover); }

.download-popup-body { padding: 16px; max-height: 500px; overflow-y: auto; }
.download-popup-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    margin-bottom: 10px;
}
.download-popup-item:hover { background: var(--hover); transform: translateX(-4px); }
.download-popup-item i:first-child {
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
}
.download-popup-item div { flex: 1; }
.download-popup-item .quality { display: block; font-size: 14px; font-weight: 600; }
.download-popup-item .size { display: block; font-size: 11px; color: var(--text-sec); }

/* ========== پلیر ویدیو ========== */
.app-video-player-inline { position: relative; z-index: 2; margin: 16px 20px; border-radius: 20px; overflow: hidden; background: #000; }
.app-video-player-placeholder { display: none; width: 100%; min-height: 1px; }
.video-player-wrapper { width: 100%; }
.video-js { width: 100%; border-radius: 20px; }
/* دکمه بزرگ پخش با استایل اصلی Video.js نمایش داده می‌شود. */

@media (max-width: 991px) {
    .app-video-player-inline.is-floating {
        position: fixed;
        top: var(--msb-video-floating-top, max(8px, env(safe-area-inset-top)));
        right: 10px;
        left: 10px;
        width: auto;
        margin: 0;
        z-index: 60;
        border-radius: 16px;
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
        transform: translateZ(0);
    }

    body.admin-bar .app-video-player-inline.is-floating {
        top: var(--msb-video-floating-top, 54px);
    }

    .app-video-player-inline.is-floating .video-js,
    .app-video-player-inline.is-floating .video-player-wrapper {
        border-radius: 16px;
    }
}

/* ========== لیست ترک‌های آلبوم ========== */
.app-track-list {
    background: var(--bg-card);
    margin: 16px 20px;
    border-radius: 20px;
    overflow: hidden;
}
.track-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.track-list-header h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.track-count {
    font-size: 11px;
    color: var(--text-sec);
    background: var(--bg-secondary);
    padding: 3px 10px;
    border-radius: 20px;
}
.track-item-app {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.track-item-app:hover { background: var(--hover); }
.track-number-app {
    width: 40px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sec);
    text-align: center;
}
.track-info-app { flex: 1; }
.track-name-app { font-size: 13px; font-weight: 500; }
.track-actions-app { display: flex; gap: 6px; }
.track-play-app, .track-download-app {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-sec);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.track-play-app:hover, .track-download-app:hover { background: var(--primary); color: #000; }

/* ========== اطلاعات اثر ========== */
.app-info-cards {
    margin: 16px 20px;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 14px 18px;
}
.info-cards-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}
.info-cards-grid-app {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.info-card-app {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 14px;
}
.info-card-app i {
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
}
.info-label-app { font-size: 9px; color: var(--text-sec); display: block; }
.info-value-app { font-size: 12px; font-weight: 500; }

.mix-description {
    margin-top: 18px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border-right: 3px solid var(--primary);
}
.mix-description h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.mix-description p { font-size: 13px; line-height: 1.8; color: var(--text-sec); text-align: justify;}

/* ========== متن آهنگ ========== */
.app-lyrics {
    margin: 16px 20px;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 18px;
}
.lyrics-header-app {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}
.lyrics-header-app h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.copy-lyrics-app {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-sec);
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Vazirmatn', sans-serif;
}
.copy-lyrics-app:hover { background: var(--primary); color: #000; }
.lyrics-content-app {
    white-space: pre-line;
    line-height: 1.8;
    color: var(--text-sec);
    font-size: 13px;
    max-height: 400px;
    overflow-y: auto;
    direction: rtl;
    text-align: center;
}

/* ========== آهنگ‌های مرتبط ========== */
.app-related { margin: 16px 20px; }
.related-header-app {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.related-header-app h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.related-see-all { font-size: 11px; color: var(--primary); text-decoration: none; }

.related-list-app {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.related-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: 12px;
    transition: all 0.2s;
    cursor: pointer;
}
.related-list-item:hover { background: var(--hover); }
.related-list-cover {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}
.related-list-cover img { width: 100%; height: 100%; object-fit: cover; }
.related-list-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.related-list-item:hover .related-list-play { opacity: 1; }
.related-list-play i { color: #000; font-size: 12px; }
.related-list-info { flex: 1; min-width: 0; }
.related-list-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.related-list-artist {
    font-size: 11px;
    color: var(--text-sec);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.related-list-actions { flex-shrink: 0; }
.related-list-more {
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sec);
    text-decoration: none;
    transition: all 0.2s;
}
.related-list-more:hover { background: var(--primary); color: #000; }
@media (min-width: 768px) { .related-list-app { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (min-width: 992px) { .related-list-app { grid-template-columns: repeat(3, 1fr); } }

/* ========== نظرات ========== */
.app-comments {
    margin: 16px 20px 32px;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 18px;
}
.comments-header-app {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.comments-header-app h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.comments-count-app {
    font-size: 11px;
    color: var(--text-sec);
    background: var(--bg-secondary);
    padding: 3px 10px;
    border-radius: 20px;
}
.comment-input-wrapper, .comment-textarea-wrapper { margin-bottom: 10px; }
.comment-input-app input, .comment-input-app textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
}
.comment-input-app input:focus, .comment-input-app textarea:focus { outline: none; border-color: var(--primary); }
.comment-input-app button {
    background: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.comments-list-app { margin-top: 18px; }
.comment-item-app {
    display: flex;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.comment-avatar-app i { font-size: 32px; color: var(--text-sec); }
.comment-content-app { flex: 1; }
.comment-author-app {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 12px;
}
.comment-text-app { font-size: 12px; color: var(--text-sec); line-height: 1.5; margin-bottom: 5px; }
.comment-date-app { font-size: 9px; color: var(--text-muted); }

.comment-message {
    margin-top: 12px;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
}
.comment-message.success { background: rgba(29, 185, 84, 0.15); color: var(--primary); }
.comment-message.error { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.no-comments-app { text-align: center; padding: 30px 20px; color: var(--text-sec); }
.no-comments-app i { font-size: 40px; margin-bottom: 12px; display: block; opacity: 0.5; }

/* ========== منوی پایین موبایل ========== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    padding: 8px 16px 12px;
    z-index: 999;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-sec);
    font-size: 12px;
    transition: all 0.2s;
}
.nav-item i { font-size: 22px; }
.nav-item.active, .nav-item:hover { color: var(--primary); }
@media (max-width: 991px) { .bottom-nav { display: flex; } }

/* ========== پلیر اصلی و مودال ========== */
.new-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 260px;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    z-index: 1000;
    padding: 8px 20px;
    direction: ltr;
}
@media (max-width: 991px) {
    .new-player { right: 0; bottom: 65px; border-right: none; }
}
.new-player-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
.new-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 2;
    min-width: 0;
    cursor: pointer;
}
.new-player-cover {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    transition: box-shadow 0.35s ease, border-color 0.35s ease;
}
.new-player-cover.is-playing {
    box-shadow: 0 0 12px rgba(30, 215, 96, 0.26), 0 8px 18px rgba(0, 0, 0, 0.35);
    animation: msb-cover-live-glow 2.8s ease-in-out infinite;
}
@media (max-width: 480px) { .new-player-cover { width: 36px; height: 36px; } }
.new-player-details { flex: 1; min-width: 0; }
.new-player-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: right;
}
@media (max-width: 480px) { .new-player-title { font-size: 11px; } }
.new-player-artist {
    font-size: 12px;
    color: var(--text-sec);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: right;
}
@media (max-width: 480px) { .new-player-artist { font-size: 10px; } }
.new-player-controls { display: flex; align-items: center; gap: 12px; }
.new-player-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.new-player-btn:hover { background: var(--hover); color: var(--primary); }
@media (max-width: 480px) { .new-player-btn { width: 32px; height: 32px; font-size: 14px; } }
.new-player-play {
    background: var(--primary);
    color: #000;
    width: 44px;
    height: 44px;
}
.new-player-play:hover { background: #fff; transform: scale(1.05); }
@media (max-width: 480px) { .new-player-play { width: 36px; height: 36px; } }
.new-player-progress { width: 150px; }
@media (max-width: 480px) { .new-player-progress { width: 70px; } }
@media (min-width: 992px) { .new-player-progress { width: 180px; } }

/* نوار پیشرفت */
.new-progress-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    overflow: visible;
    touch-action: none;
    user-select: none;
}
.new-progress-bar:hover { height: 8px; }
.new-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #0e8e3e);
    border-radius: 10px;
    width: 0%;
    pointer-events: none;
}
.progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    border: 2px solid #fff;
    left: 0%;
    opacity: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto;
    z-index: 2;
}
.new-progress-bar:hover .progress-thumb,
.new-progress-bar.is-seeking .progress-thumb {
    transform: translate(-50%, -50%) scale(1.12);
}

/* مودال پلیر */
.player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.98), rgba(10,10,10,0.98));
    backdrop-filter: blur(30px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    direction: ltr;
}
.player-modal.active { display: flex; }
.player-modal-content { text-align: center; max-width: 480px; width: 90%; position: relative; }
.player-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.player-modal-close:hover { background: var(--primary); color: #000; transform: rotate(90deg); }
.player-modal-cover {
    width: 220px;
    height: 220px;
    border-radius: 28px;
    object-fit: cover;
    margin: 10px auto;
    border: none;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.52);
    transition: box-shadow 0.35s ease, border-color 0.35s ease;
}
.player-modal-cover.is-playing {
    box-shadow: 0 0 22px rgba(30, 215, 96, 0.24), 0 18px 42px rgba(0, 0, 0, 0.52);
    animation: msb-cover-live-glow 3s ease-in-out infinite;
}
@media (max-width: 480px) { .player-modal-cover { width: 180px; height: 180px; } }
@keyframes msb-cover-live-glow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(30, 215, 96, 0)) saturate(1);
    }
    50% {
        filter: drop-shadow(0 0 6px rgba(30, 215, 96, 0.2)) saturate(1.05);
    }
}
@media (prefers-reduced-motion: reduce) {
    .new-player-cover.is-playing,
    .player-modal-cover.is-playing {
        animation: none;
    }
}
.player-modal-title {
    font-size: 24px;
    font-weight: 800;
    margin-top: 20px;
    margin-bottom: 6px;
    direction: rtl;
    background: linear-gradient(135deg, #fff, #ddd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
@media (max-width: 480px) { .player-modal-title { font-size: 20px; } }
.player-modal-artist { font-size: 15px; color: var(--text-sec); margin-bottom: 20px; direction: rtl; }

.modal-progress-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    overflow: visible;
    touch-action: none;
    user-select: none;
}
.modal-progress-bar:hover { height: 8px; }
.modal-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #0e8e3e);
    border-radius: 10px;
    width: 0%;
    pointer-events: none;
}
.modal-progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    border: 2px solid #fff;
    left: 0%;
    opacity: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto;
    z-index: 2;
}
.modal-progress-bar:hover .modal-progress-thumb,
.modal-progress-bar.is-seeking .modal-progress-thumb {
    transform: translate(-50%, -50%) scale(1.12);
}
.modal-progress-time {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-sec);
}

.player-modal-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 24px 0;
}
.modal-control-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal-control-btn:hover { background: rgba(255, 255, 255, 0.15); transform: scale(1.05); }
.modal-play-btn {
    background: linear-gradient(135deg, var(--primary), #0e8e3e);
    color: #fff;
    width: 64px;
    height: 64px;
    font-size: 24px;
}
.shuffle-btn.active, .repeat-btn.active { color: var(--primary); background: rgba(29, 185, 84, 0.2); }

.player-modal-extra {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
    direction: rtl;
}
.modal-extra-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    color: var(--text-sec);
    font-size: 12px;
    cursor: pointer;
    width: 76px;
    min-height: 62px;
    padding: 8px 6px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s;
    line-height: 1.2;
    touch-action: manipulation;
}
.modal-extra-btn i { font-size: 18px; }
.modal-extra-btn span { display: block; font-weight: 600; }
.modal-extra-btn:hover { background: rgba(255, 255, 255, 0.15); color: var(--primary); }

.player-modal-volume {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}
.player-modal-volume i {
    position: relative;
    width: 18px;
    text-align: center;
    cursor: pointer;
}
.player-modal-volume.is-muted i {
    color: #ff6b6b;
}
.player-modal-volume.is-muted i::after {
    content: '';
    position: absolute;
    left: 1px;
    top: 50%;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(-38deg);
    transform-origin: center;
}
.player-modal-volume input {
    --msb-volume-percent: 70%;
    width: 160px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary) var(--msb-volume-percent), rgba(255, 255, 255, 0.2) var(--msb-volume-percent), rgba(255, 255, 255, 0.2) 100%);
    border-radius: 4px;
    accent-color: var(--primary);
    direction: ltr;
}
.player-modal-volume input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(30, 215, 96, 0.7);
}
.player-modal-volume input::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.player-modal-volume input::-moz-range-progress {
    height: 4px;
    background: var(--primary);
    border-radius: 4px;
}
.player-modal-volume input::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(30, 215, 96, 0.7);
}

/* لیست پخش مودال */
.player-modal-playlist,
.player-modal-details {
    position: absolute;
    right: -380px;
    top: 0;
    bottom: 0;
    width: 380px;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    border-radius: 20px 0 0 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2001;
}
.player-modal-playlist.show,
.player-modal-details.show { right: 0; }
.player-modal-playlist.show,
.player-modal-details.show,
.player-modal-lyrics.show {
    z-index: 2004;
}
.player-modal-lyrics {
    position: absolute;
    left: -380px;
    top: 0;
    bottom: 0;
    width: 380px;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    border-radius: 0 20px 20px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2001;
}
.player-modal-lyrics.show { left: 0; }
.player-modal-side-tab {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2002;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 5px;
    min-width: 58px;
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid rgba(30, 215, 96, 0.35);
    background: rgba(18, 18, 18, 0.92);
    color: var(--text-sec);
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(14px);
    transition: all 0.2s;
    touch-action: manipulation;
}
.player-modal-side-tab i { font-size: 16px; }
.player-modal-side-tab.show { display: flex; }
@media (max-width: 991px) {
    .player-modal.has-side-panel-open .player-modal-side-tab {
        display: none !important;
    }
}
.player-modal-side-tab:hover {
    color: var(--primary);
    background: rgba(30, 215, 96, 0.12);
    transform: translateY(-50%) scale(1.03);
}
.player-modal-lyrics-toggle {
    left: 0;
    border-radius: 0 16px 16px 0;
    border-left: none;
}
.player-modal-playlist-toggle {
    right: 0;
    border-radius: 16px 0 0 16px;
    border-right: none;
}
@media (max-width: 991px) {
    .player-modal-playlist,
    .player-modal-details {
        width: 100%;
        right: -100%;
        border-radius: 28px 28px 0 0;
        bottom: 0;
        top: auto;
        height: 60%;
    }
    .player-modal-lyrics {
        width: 100%;
        left: -100%;
        border-radius: 28px 28px 0 0;
        bottom: 0;
        top: auto;
        height: 60%;
        display: flex;
        border-right: none;
        border-top: 1px solid var(--border);
    }
    .player-modal-lyrics.show {
        left: 0;
    }
    .player-modal-side-tab {
        top: auto;
        bottom: 92px;
        min-width: 48px;
        min-height: 44px;
        padding: 7px 9px;
        font-size: 11px;
        transform: none;
    }
    .player-modal-side-tab:hover {
        transform: none;
    }
}
@media (min-width: 992px) and (max-width: 1279px) {
    .player-modal-content { max-width: 420px; }
    .player-modal-playlist,
    .player-modal-details,
    .player-modal-lyrics {
        width: 320px;
    }
    .player-modal-playlist,
    .player-modal-details { right: -320px; }
    .player-modal-lyrics { left: -320px; }
    .player-modal-playlist.show,
    .player-modal-details.show { right: 0; }
    .player-modal-lyrics.show { left: 0; }
}
@media (min-width: 992px) and (max-width: 1099px) {
    .player-modal-content { max-width: 360px; }
    .player-modal-playlist,
    .player-modal-details,
    .player-modal-lyrics {
        width: 280px;
    }
    .player-modal-playlist,
    .player-modal-details { right: -280px; }
    .player-modal-lyrics { left: -280px; }
    .player-modal-playlist.show,
    .player-modal-details.show { right: 0; }
    .player-modal-lyrics.show { left: 0; }
}
.playlist-header-modal {
    padding: 16px 20px;
    direction: rtl;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    background: rgba(0,0,0,0.3);
    font-size: 16px;
    flex-shrink: 0;
}
.playlist-header-modal button {
    background: none;
    border: none;
    color: var(--text-sec);
    cursor: pointer;
    font-size: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}
.playlist-header-modal button:hover { background: var(--hover); color: var(--primary); }
.playlist-list-modal { flex: 1; overflow-y: auto; padding: 8px 0; }
.details-header-modal {
    padding: 16px 20px;
    direction: rtl;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    background: rgba(0,0,0,0.3);
    font-size: 16px;
    flex-shrink: 0;
}
.details-header-modal button {
    background: none;
    border: none;
    color: var(--text-sec);
    cursor: pointer;
    font-size: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}
.details-header-modal button:hover { background: var(--hover); color: var(--primary); }
.details-content-modal {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px 22px;
    direction: rtl;
    text-align: right;
}
.details-modal-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.details-modal-label {
    color: var(--text-sec);
    font-size: 12px;
    flex-shrink: 0;
}
.details-modal-value {
    color: var(--text);
    font-size: 14px;
    line-height: 1.8;
    text-align: left;
    direction: rtl;
}
.details-modal-note {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
    text-align: justify;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.82);
    line-height: 1.9;
    font-size: 13px;
    white-space: pre-wrap;
}
.details-empty-modal {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-sec);
    line-height: 1.8;
}
.lyrics-header-modal {
    padding: 16px 20px;
    direction: rtl;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    background: rgba(0,0,0,0.3);
    font-size: 16px;
    flex-shrink: 0;
}
.lyrics-header-modal button {
    background: none;
    border: none;
    color: var(--text-sec);
    cursor: pointer;
    font-size: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}
.lyrics-header-modal button:hover { background: var(--hover); color: var(--primary); }
.lyrics-content-modal {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px 24px;
    color: rgba(255, 255, 255, 0.88);
    direction: rtl;
    text-align: center;
    line-height: 2.05;
    font-size: 14px;
    white-space: pre-wrap;
}
.lyrics-content-modal p { margin: 0 0 10px; }
.lyrics-loading-modal,
.lyrics-empty-modal {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-sec);
    line-height: 1.8;
}
.playlist-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border);
}
.playlist-modal-item:hover { background: var(--hover); padding-right: 20px; }
.playlist-modal-item.active {
    background: linear-gradient(90deg, rgba(29, 185, 84, 0.15), transparent);
    border-right: 3px solid var(--primary);
}
.playlist-modal-item img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.playlist-modal-item-info { flex: 1; min-width: 0; }
.playlist-modal-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: right;
}
.playlist-modal-item-artist {
    font-size: 12px;
    color: var(--text-sec);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: right;
}

/* ========== تایمر خواب ========== */
.sleep-timer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    z-index: 2100;
    display: none;
    align-items: center;
    justify-content: center;
}
.sleep-timer-modal.active { display: flex; }
.sleep-timer-content {
    background: var(--bg-elevated);
    border-radius: 32px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
.sleep-timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: linear-gradient(135deg, var(--primary), #0e8e3e);
    color: #000;
}
.sleep-timer-header h3 { font-size: 18px; font-weight: 700; margin: 0; }
.sleep-timer-close {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #000;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
}
.sleep-timer-body { padding: 24px; }
.sleep-timer-body > p { text-align: center; margin-bottom: 20px; font-size: 13px; color: var(--text-sec); }
.quick-label { display: block; font-size: 12px; color: var(--text-sec); margin-bottom: 10px; text-align: right; }
.sleep-timer-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.sleep-preset {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}
.sleep-preset:hover { background: var(--hover); border-color: var(--primary); }
.slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: 60px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
}
.slider-container input {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.slider-container input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}
.slider-value {
    background: var(--primary);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    min-width: 75px;
    text-align: center;
}
.slider-set-btn {
    width: 100%;
    background: var(--primary);
    border: none;
    border-radius: 40px;
    padding: 12px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
}
.sleep-manual-hours {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 10px 12px;
    margin-bottom: 12px;
    direction: rtl;
}
.sleep-manual-label,
.sleep-manual-unit {
    color: var(--text-sec);
    font-size: 12px;
    white-space: nowrap;
}
.sleep-manual-hours input {
    width: 100%;
    min-width: 0;
    height: 40px;
    border: 1px solid rgba(30, 215, 96, 0.25);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    outline: none;
}
.sleep-manual-hours input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 215, 96, 0.12);
}
.sleep-timer-status {
    background: rgba(29, 185, 84, 0.1);
    border-radius: 20px;
    padding: 16px;
    margin-top: 20px;
    border-right: 3px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}
.status-icon i { font-size: 32px; color: var(--primary); }
.status-text { flex: 1; }
.status-text span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.cancel-sleep-btn {
    background: rgba(231, 76, 60, 0.15);
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 12px;
    font-family: 'Vazirmatn', sans-serif;
    color: #e74c3c;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
}
.cancel-sleep-btn:hover { background: #e74c3c; color: white; }

/* ========== جستجو ========== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: 70px 20px;
    overflow-y: auto;
}
.search-overlay.open { transform: translateY(0); }
.search-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}
.close-search {
    background: none;
    border: none;
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
}
#searchInput {
    flex: 1;
    padding: 12px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.search-result-item:hover { background: var(--hover); }
.search-result-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.search-result-info { flex: 1; }
.search-result-title { font-size: 14px; font-weight: 600; }
.search-result-artist { font-size: 12px; color: var(--text-sec); }

/* ========== دکمه نصب و لودینگ ========== */
.install-btn {
    position: fixed;
    bottom: 20px;
    right: 280px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 40px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    display: none;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 1000;
    font-family: 'Vazirmatn', sans-serif;
}
@media (max-width: 991px) { .install-btn { right: 20px; bottom: 80px; } }

.app-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== اسکرول ========== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-card); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

/* ========== ریسپانسیو اضافی ========== */
@media (max-width: 380px) {
    .app-header-title { font-size: 15px; }
    .app-songs-header { flex-direction: column; align-items: flex-start; }
    .app-header-actions { width: 100%; justify-content: space-between; }
    .app-play-all-btn { padding: 6px 14px; }
    .app-play-all-btn span { font-size: 12px; }
    .sleep-timer-presets { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .sleep-preset { font-size: 11px; padding: 6px 0; }
}

@media (max-width: 480px) {
    .progress-thumb { width: 12px; height: 12px; }
    .modal-progress-thumb { width: 14px; height: 14px; }
    .player-modal-volume input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; }
}

/* ========== پلیر مشکی در صفحات آهنگ ========== */
.app-song-page .new-player {
    background: #000000 !important;
    backdrop-filter: blur(0px) !important;
    border-color: #333 !important;
}

/* ========== دکمه افزودن به پلی‌لیست در پلیر ========== */
.player-add-to-playlist {
    background: rgba(30,215,96,0.15);
    border: 1px solid rgba(30,215,96,0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1ed760;
    font-size: 18px;
    transition: all 0.2s;
    margin-right: 12px;
}

.player-add-to-playlist:hover {
    background: #1ed760;
    color: #000;
    transform: scale(1.05);
}

.recently-play-btn.playing,
.continue-play-btn.playing,
.suggestion-play-btn.playing,
.play-song-trigger.playing {
    background: var(--primary);
    color: #000;
}

@media (max-width: 991px) {
    .new-player-mini {
        gap: 10px;
    }

    .new-player-info {
        flex: 1 1 auto;
    }

    /* در پلیر کوچک موبایل، دکمه افزودن به پلی‌لیست جای نوار تایم‌لاین را می‌گیرد. */
    .new-player-progress {
        display: none;
    }

    .player-add-to-playlist {
        display: flex !important;
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        margin: 0;
        font-size: 17px;
        order: 4;
    }
}

@media (max-width: 480px) {
    .player-add-to-playlist {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
}

/* ========== گرافیک پیغام‌ها (Toast Notification) ========== */
#toastNotification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1ed760;
    color: #000;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    z-index: 10003;
    transform: translateX(450px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Vazirmatn', sans-serif;
    backdrop-filter: blur(8px);
}

#toastNotification i {
    font-size: 18px;
}

#toastNotification.show {
    transform: translateX(0);
}

#toastNotification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}

#toastNotification.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
}

#toastNotification.info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
}

#toastNotification a {
    color: inherit;
    text-decoration: underline;
}

/* مودال لاگین گرافیکی (به جای confirm) */
.login-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2700;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.login-prompt-modal.open {
    visibility: visible;
    opacity: 1;
}

.login-prompt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
}

.login-prompt-card {
    position: relative;
    background: linear-gradient(145deg, #1a1a1a, #121212);
    border-radius: 32px;
    padding: 32px 28px;
    width: 90%;
    max-width: 340px;
    text-align: center;
    border: 1px solid rgba(30, 215, 96, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.login-prompt-modal.open .login-prompt-card {
    transform: scale(1);
}

.login-prompt-icon {
    width: 70px;
    height: 70px;
    background: rgba(30, 215, 96, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.login-prompt-icon i {
    font-size: 32px;
    color: #1ed760;
}

.login-prompt-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.login-prompt-card p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
    line-height: 1.6;
}

.login-prompt-buttons {
    display: flex;
    gap: 12px;
}

.login-prompt-buttons button {
    flex: 1;
    padding: 12px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 14px;
    transition: all 0.2s;
    font-family: 'Vazirmatn', sans-serif;
}

.login-prompt-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.login-prompt-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.login-prompt-confirm {
    background: linear-gradient(135deg, #1ed760, #0e8e3e);
    color: #000;
}

.login-prompt-confirm:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

/* ========== پاپ‌آپ پلی‌لیست‌های کاربر (طراحی مدرن) ========== */
.user-playlists-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-playlists-popup.open {
    visibility: visible;
    opacity: 1;
}

.user-playlists-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
}

.user-playlists-container {
    position: relative;
    width: 90%;
    max-width: 520px;
    background: linear-gradient(145deg, #121212, #0d0d0d);
    border-radius: 24px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(30, 215, 96, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.user-playlists-popup.open .user-playlists-container {
    transform: scale(1);
}

.user-playlists-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1ed760 0%, #0e8e3e 100%);
}

.user-playlists-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000;
}

.close-playlists-popup {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.close-playlists-popup:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: rotate(90deg);
}

.user-playlists-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.user-playlists-body::-webkit-scrollbar {
    width: 4px;
}

.user-playlists-body::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 10px;
}

.user-playlists-body::-webkit-scrollbar-thumb {
    background: #1ed760;
    border-radius: 10px;
}

.current-song-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(30, 215, 96, 0.08);
    border-radius: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(30, 215, 96, 0.15);
}

.current-song-info img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.popup-song-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.popup-song-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.playlists-list-container {
    max-height: 360px;
    overflow-y: auto;
}

.playlists-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.playlists-list-header span {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.create-playlist-mini {
    background: none;
    border: none;
    color: #1ed760;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 30px;
    transition: all 0.2s;
    font-weight: 500;
}

.create-playlist-mini:hover {
    background: rgba(30, 215, 96, 0.15);
    transform: scale(1.02);
}

.user-playlists-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding: 10px;
}

.user-playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.user-playlist-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(30, 215, 96, 0.3);
    transform: translateX(-4px);
}

.user-playlist-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.user-playlist-info i {
    font-size: 24px;
    color: #1ed760;
}

.user-playlist-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.user-playlist-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.user-playlist-add {
    width: auto;
    min-width: 82px;
    height: 38px;
    padding: 0 12px;
    background: rgba(30, 215, 96, 0.15);
    border: none;
    border-radius: 22px;
    color: #1ed760;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Vazirmatn', sans-serif;
    flex-shrink: 0;
    touch-action: manipulation;
}

.user-playlist-add:hover {
    background: #1ed760;
    color: #000;
    transform: scale(1.08);
}

.empty-playlists-msg {
    text-align: center;
    padding: 50px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-playlists-msg i {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.6;
}

.empty-playlists-msg p {
    margin-bottom: 16px;
}

.create-playlist-btn,
.empty-playlists-msg button {
    background: #1ed760;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.create-playlist-btn:hover,
.empty-playlists-msg button:hover {
    transform: scale(1.02);
}

.new-playlist-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(20px);
    z-index: 2600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.new-playlist-modal.hidden {
    display: none;
}

.new-playlist-card {
    background: linear-gradient(145deg, #1a1a1a, #121212);
    border-radius: 32px;
    padding: 28px 24px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    border: 1px solid rgba(30, 215, 96, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.new-playlist-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    color: #1ed760;
}

.new-playlist-card input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    color: #fff;
    margin-bottom: 24px;
    font-size: 15px;
    transition: all 0.2s;
}

.new-playlist-card input:focus {
    outline: none;
    border-color: #1ed760;
    background: rgba(30, 215, 96, 0.05);
}

.new-playlist-buttons {
    display: flex;
    gap: 12px;
}

.new-playlist-buttons button {
    flex: 1;
    padding: 12px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 14px;
    transition: all 0.2s;
}

.new-playlist-buttons .cancel-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.new-playlist-buttons .cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.new-playlist-buttons .confirm-btn {
    background: linear-gradient(135deg, #1ed760, #0e8e3e);
    color: #000;
}

.new-playlist-buttons .confirm-btn:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

.sleep-timer-status.is-hidden {
    display: none;
}

@media (max-width: 768px) {
    .user-playlists-container {
        width: 95%;
        max-width: 380px;
        border-radius: 28px;
    }
    .user-playlists-header {
        padding: 16px 20px;
    }
    .current-song-info img {
        width: 48px;
        height: 48px;
    }
    .user-playlist-item {
        padding: 12px;
    }
    .user-playlist-add {
        min-width: 74px;
        height: 36px;
        padding: 0 10px;
    }
    .new-playlist-card {
        padding: 24px 20px;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .user-playlists-container {
        width: 98%;
        max-width: 340px;
        border-radius: 24px;
    }
    .current-song-info img {
        width: 42px;
        height: 42px;
    }
    .popup-song-title {
        font-size: 13px;
    }
    .user-playlist-title {
        font-size: 12px;
    }
}

.loading-playlists {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.loading-playlists i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

/* ========== اسلایدر مدرن صفحه اصلی ========== */
.hero-slider-3d.msb-hero-slider {
    margin: 8px 0 30px;
    direction: ltr;
    padding: 0 2px;
    position: relative;
}

.msb-hero-slider .slider-3d-container {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    cursor: grab;
    isolation: isolate;
    background: linear-gradient(180deg, rgba(18,18,18,0.82), rgba(18,18,18,0.26));
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    user-select: none;
    -webkit-user-select: none;
}

.msb-hero-slider .slider-3d-container:active { cursor: grabbing; }
.msb-slider-glow,
.slide-gradient,
.slide-shine,
.slide-content,
.slide-badge,
.slide-cta,
.slider-arrow { display: none !important; }

.msb-hero-slider .slider-3d-track {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 8px 28px;
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.msb-hero-slider .slide-3d {
    flex: 0 0 31.6%;
    cursor: pointer;
    transition: transform 0.35s ease, opacity 0.35s ease, filter 0.35s ease;
}

.msb-hero-slider .slide-3d-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.msb-hero-slider .slide-3d-inner {
    position: relative;
    overflow: hidden;
    aspect-ratio: 14 / 8.3;
    min-height: 150px;
    border-radius: 22px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    transform: scale(0.92);
    opacity: 0.72;
    filter: saturate(0.84) brightness(0.82);
    transition: transform 0.46s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, filter 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.msb-hero-slider .slide-3d.active .slide-3d-inner {
    transform: scale(1);
    opacity: 1;
    filter: saturate(1.02) brightness(1);
    border-color: rgba(30, 215, 96, 0.2);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(30,215,96,0.08);
}

.msb-hero-slider .slide-3d-inner:hover {
    border-color: rgba(30, 215, 96, 0.16);
}

.msb-hero-slider .slide-3d:not(.active) {
    opacity: 0.92;
}

.msb-hero-slider .slide-3d-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.msb-hero-slider .slide-3d.active .slide-3d-inner:hover img {
    transform: scale(1.035);
}

.msb-hero-slider .slider-dots {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(12, 12, 12, 0.44);
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.msb-hero-slider .slider-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.28);
    cursor: pointer;
    transition: all 0.25s ease;
}

.msb-hero-slider .slider-dot.active {
    width: 18px;
    background: var(--primary);
    box-shadow: 0 0 12px rgba(30, 215, 96, 0.35);
}

@media (min-width: 1400px) {
    .msb-hero-slider .slide-3d { flex-basis: 30.8%; }
}

@media (max-width: 1199px) {
    .hero-slider-3d.msb-hero-slider {
        padding: 0;
        margin-bottom: 24px;
    }
    .msb-hero-slider .slider-3d-container { border-radius: 22px; }
    .msb-hero-slider .slider-3d-track { gap: 12px; padding: 12px 6px 24px; }
    .msb-hero-slider .slide-3d { flex-basis: 44.5%; }
    .msb-hero-slider .slide-3d-inner {
        aspect-ratio: 16 / 8;
        min-height: 136px;
        border-radius: 20px;
        transform: scale(0.94);
    }
}

@media (max-width: 767px) {
    .hero-slider-3d.msb-hero-slider {
        padding: 0;
        margin-bottom: 20px;
    }
    .msb-hero-slider .slider-3d-container {
        border-radius: 18px;
        background: transparent;
        border: 0;
        box-shadow: none;
    }
    .msb-hero-slider .slider-3d-track {
        gap: 10px;
        padding: 4px 0 16px;
    }
    .msb-hero-slider .slide-3d { flex-basis: 82.5%; }
    .msb-hero-slider .slide-3d-inner {
        aspect-ratio: 16 / 8.7;
        min-height: 98px;
        border-radius: 18px;
        transform: scale(0.965);
        opacity: 0.84;
        box-shadow: 0 10px 24px rgba(0,0,0,0.2);
    }
    .msb-hero-slider .slide-3d.active .slide-3d-inner {
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(30,215,96,0.08);
    }
    .msb-hero-slider .slider-dots {
        bottom: -2px;
        padding: 4px 8px;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .msb-hero-slider .slide-3d { flex-basis: 84%; }
    .msb-hero-slider .slide-3d-inner {
        aspect-ratio: 16 / 8.9;
        min-height: 92px;
        border-radius: 16px;
    }
    .msb-hero-slider .slider-dot {
        width: 5px;
        height: 5px;
        min-width: 5px;
    }
    .msb-hero-slider .slider-dot.active { width: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .msb-hero-slider .slider-3d-track,
    .msb-hero-slider .slide-3d,
    .msb-hero-slider .slide-3d-inner,
    .msb-hero-slider .slide-3d-inner img,
    .slide-shine,
    .slider-arrow,
    .msb-hero-slider .slider-dot {
        transition: none !important;
    }
}



/* ===== MSB Offline Music v8: stable, no-flicker UI ===== */
.msb-offline-action,
.msb-page-offline-save,
.msb-offline-save-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0 3px;
    background: rgba(255,255,255,.08);
    color: #b3b3b3;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .18s ease,color .18s ease,transform .18s ease;
    contain: layout style;
}
.msb-offline-action:hover,.msb-page-offline-save:hover,.msb-offline-save-btn:hover {background:rgba(30,215,96,.14);color:#1ed760;transform:translateY(-1px)}
.msb-offline-action.is-saved,.msb-page-offline-save.is-saved,.msb-offline-save-btn.is-saved {background:rgba(30,215,96,.16);color:#1ed760}
.msb-offline-action.is-loading,.msb-page-offline-save.is-loading,.msb-offline-save-btn.is-loading {pointer-events:none;opacity:.75}
.msb-offline-action.is-loading i,.msb-page-offline-save.is-loading i,.msb-offline-save-btn.is-loading i {animation:msbOfflineSpin .8s linear infinite}
@keyframes msbOfflineSpin {to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.msb-offline-action,.msb-page-offline-save,.msb-offline-save-btn{transition:none}.msb-offline-action.is-loading i{animation:none}}
.msb-pwa-offline-settings-card input[type=number]{font-variant-numeric:tabular-nums}


/* ========== MSB stability & cross-platform media safeguards ========== */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; }
video:not(.vjs-tech) { height: auto; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

.new-player {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    contain: layout paint;
}
.player-modal {
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.player-modal-content {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 8px 4px 14px;
}
.video-player-wrapper,
.app-video-player-inline,
.msb-watch-player-shell,
.artist-video-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.video-player-wrapper video,
.app-video-player-inline video,
.msb-watch-player-shell video,
.artist-video-shell video,
.video-js {
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 767px) {
    .new-player { padding-left: 10px; padding-right: 10px; }
    .new-player-mini { gap: 7px; }
    .new-player-controls { gap: 5px; flex: 0 0 auto; }
    .new-player-info { min-width: 0; }
    .new-player-details { max-width: min(38vw, 170px); }
    .player-modal-content { width: min(94%, 480px); }
    .player-modal-cover {
        width: min(48vw, 190px);
        height: min(48vw, 190px);
        margin-top: 4px;
    }
    .player-modal-controls { gap: clamp(8px, 4vw, 18px); margin: 16px 0; }
    .modal-control-btn { width: 44px; height: 44px; }
    .modal-play-btn { width: 58px; height: 58px; }
    .player-modal-extra { gap: 6px; }
    .modal-extra-btn { min-width: 0; flex: 1 1 0; padding-inline: 5px; }
    .player-modal-playlist,
    .player-modal-details,
    .player-modal-lyrics { height: min(72dvh, 640px); }
}

@media (max-width: 380px) {
    .new-player { padding-left: 6px; padding-right: 6px; }
    .new-player-details { max-width: 31vw; }
    .new-player-btn { width: 30px; height: 30px; }
    .new-player-play { width: 34px; height: 34px; }
    .player-add-to-playlist { flex-basis: 32px; width: 32px; height: 32px; }
    .player-modal-title { margin-top: 10px; }
    .player-modal-artist { margin-bottom: 12px; }
    .player-modal-controls { margin: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .new-player *, .player-modal *, .video-js * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* ===== MSB download popup + video + offline icon corrections 2026.07.10 ===== */
body.msb-download-popup-open {
    overflow: hidden !important;
    touch-action: none;
}

.app-download-popup {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)) !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    direction: rtl !important;
    z-index: 2147482500 !important;
    isolation: isolate;
}
.app-download-popup:not(.open) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.app-download-popup.open {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
.app-download-popup .download-popup-overlay {
    position: absolute !important;
    inset: 0 !important;
    border: 0 !important;
    background: rgba(2, 4, 8, .78) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    cursor: default;
}
.app-download-popup .download-popup-container {
    position: relative !important;
    z-index: 1 !important;
    width: min(100%, 420px) !important;
    max-width: 420px !important;
    max-height: min(680px, calc(100dvh - 28px)) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, .09) !important;
    border-radius: 24px !important;
    background: #15181d !important;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .68) !important;
    transform: translateZ(0) !important;
}
.app-download-popup .download-popup-header {
    flex: 0 0 auto !important;
    min-height: 62px !important;
    padding: 14px 16px !important;
    background: linear-gradient(135deg, rgba(30, 215, 96, .12), rgba(255, 255, 255, .025)) !important;
}
.app-download-popup .download-popup-header span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 850 !important;
}
.app-download-popup .download-popup-header span i {
    color: #1ed760 !important;
}
.app-download-popup .close-popup-btn {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, .055) !important;
    color: #c6cbd2 !important;
}
.app-download-popup .download-popup-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding: 14px !important;
}
.app-download-popup .download-popup-item {
    min-height: 66px !important;
    margin: 0 0 9px !important;
    padding: 10px 12px !important;
    gap: 12px !important;
    border: 1px solid rgba(255, 255, 255, .055) !important;
    border-radius: 15px !important;
    background: rgba(255, 255, 255, .045) !important;
    color: #fff !important;
    box-sizing: border-box !important;
    transform: none !important;
}
.app-download-popup .download-popup-item:last-child { margin-bottom: 0 !important; }
.app-download-popup .download-popup-item:hover,
.app-download-popup .download-popup-item:focus-visible {
    border-color: rgba(30, 215, 96, .34) !important;
    background: rgba(30, 215, 96, .105) !important;
    transform: none !important;
}
.app-download-popup .download-popup-item > i:first-child {
    flex: 0 0 42px !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    background: rgba(30, 215, 96, .12) !important;
    color: #1ed760 !important;
}
.app-download-popup .download-popup-item > div {
    min-width: 0 !important;
}
.app-download-popup .download-popup-item .quality,
.app-download-popup .download-popup-item .size {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.app-download-popup .download-popup-item > i:last-child {
    flex: 0 0 auto;
    color: #7d858f !important;
    font-size: 12px !important;
}

/* Video.js: نمایش کامل تصویر بدون برش و زوم */
.video-player-wrapper,
.app-video-player-inline,
.msb-watch-player-shell {
    background-color: #000 !important;
}
.video-js,
.video-js .vjs-tech,
.video-js .vjs-poster,
.video-js .vjs-poster img {
    max-width: 100% !important;
    transform: none !important;
}
.video-js .vjs-tech,
.video-js .vjs-poster img,
.video-player-wrapper .video-js .vjs-tech,
.msb-watch-player-shell .video-js .vjs-tech {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #000 !important;
}
.video-js .vjs-poster {
    background-color: #000 !important;
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* کنترل آفلاین در ردیف‌های آهنگ باید دقیقاً هم‌اندازه سایر آیکون‌ها باشد */
.app-list-actions .msb-offline-action {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    contain: none !important;
    line-height: 1 !important;
}
.app-list-actions .msb-offline-action i {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
}
.song-actions .msb-offline-action,
.song-actions .song-offline-save,
.song-actions .song-download.msb-offline-action {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    contain: none !important;
    line-height: 1 !important;
}
.song-actions .msb-offline-action i,
.song-actions .song-offline-save i,
.song-actions .song-download.msb-offline-action i {
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1 !important;
}

@media (max-width: 768px) {
    .app-download-popup {
        padding: max(9px, env(safe-area-inset-top)) max(9px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left)) !important;
        align-items: center !important;
    }
    .app-download-popup .download-popup-container {
        width: 100% !important;
        max-width: 520px !important;
        max-height: min(78dvh, 620px) !important;
        border-radius: 22px !important;
    }
    .song-actions .msb-offline-action,
    .song-actions .song-offline-save,
    .song-actions .song-download.msb-offline-action {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
    }
}
@media (max-width: 480px) {
    .app-download-popup .download-popup-header { min-height: 58px !important; padding: 11px 13px !important; }
    .app-download-popup .download-popup-body { padding: 11px !important; }
    .app-download-popup .download-popup-item { min-height: 61px !important; padding: 9px 10px !important; }
    .song-actions .msb-offline-action,
    .song-actions .song-offline-save,
    .song-actions .song-download.msb-offline-action {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }
}


/* ===== فریم واقعی ویدیو به‌جای تصویر شاخص ===== */
.music-thumbnail video.msb-video-frame-thumb,
.app-song-cover video.msb-video-frame-thumb,
.app-list-cover video.msb-video-frame-thumb,
.related-list-cover video.msb-video-frame-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    background: #000;
    border: 0;
    pointer-events: none;
}
.music-thumbnail > a,
.app-song-cover > a,
.app-list-cover > a,
.related-list-cover > a {
    display: block;
    width: 100%;
    height: 100%;
}
