/* استایل پایه پلی‌لیست */
.dpp-playlist-container {
    background: #f5f5f5;
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #e0d0ff;
    border-radius: 12px;
    direction: rtl;
}
.dpp-playlist-stats {
    font-size: 13px;
    color: #6a4e9e;
    background: #f0eaff;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
}
.dpp-playlist-play-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    border: 1px solid #c0a0f0;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
.dpp-playlist-play-btn:hover {
    background: #d4c4fc;
    border-color: #9b7bdf;
}
.dpp-playlist-play-icon svg {
    width: 40px;
    height: 40px;
    fill: #6a4e9e;
}
.dpp-playlist-play-text {
    margin-top: 6px;
    font-size: 14px;
    color: #4a2e7a;
    font-weight: 500;
}
.dpp-playlist-tracks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* هر ردیف آهنگ – دسکتاپ (عنوان در چند خط) */
.dpp-track-row {
    display: flex;
    align-items: flex-start; /* تغییر از center به flex-start برای همراستایی بالا */
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.dpp-track-row:hover {
    transform: scale(1.01);
    background-color: #fafafa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
}
.dpp-track-row.playing {
    background: #f0eaff;
    border-right: 3px solid #9b7bdf;
}
.dpp-track-number {
    min-width: 35px;
    font-size: 14px;
    color: #6a4e9e;
    text-align: center;
    flex-shrink: 0;
    font-weight: 500;
    margin: 0;
    margin-left: -2px;
    line-height: 1.4;
}
.dpp-track-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: normal;
    color: #222;
    text-align: right;
    /* نمایش چند خطی کامل */
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.4;
    padding-left: 10px;
}
.dpp-playing-wave {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z'/%3E%3C/svg%3E") no-repeat center;
    mask-size: contain;
    animation: dpp-wave-animation 1s infinite;
}
@keyframes dpp-wave-animation {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}
.dpp-track-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-right: auto;
    align-items: center;
}
.dpp-track-actions button {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: #4a2e7a;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}
.dpp-track-actions button svg {
    width: 14px;
    height: 14px;
    fill: #6a4e9e;
}
.dpp-track-actions button:hover {
    background: #d4c4fc;
    border-color: #9b7bdf;
    color: #3a1e6a;
}

/* ========== پلیر شناور (همان نسخه قبلی با عرض بیشتر عنوان) ========== */
.dpp-floating-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c2c2c;
    background: linear-gradient(135deg, #2a2a2a, #3e3e3e);
    color: #f0f0f0;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    direction: ltr;
}
.dpp-floating-player.active {
    transform: translateY(0);
}
.dpp-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
.dpp-player-left,
.dpp-player-right {
    flex: 0 0 auto;
}
.dpp-player-title-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    direction: rtl;
    overflow: hidden;
}
.dpp-music-icon {
    width: 18px;
    height: 18px;
    fill: #d0b0ff;
    flex-shrink: 0;
}
.dpp-player-title {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}
.dpp-player-close {
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}
.dpp-player-close:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}
.dpp-theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.dpp-theme-toggle:hover {
    background: rgba(255,255,255,0.2);
}
.dpp-theme-icon {
    width: 22px;
    height: 22px;
    fill: #ffffff;
}
.dpp-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.dpp-player-controls button {
    background: transparent;
    border: none;
    color: #f0f0f0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.dpp-player-controls button:hover {
    background: rgba(160, 120, 220, 0.3);
}
.dpp-player-controls button svg {
    width: 22px;
    height: 22px;
    fill: #f0f0f0;
}
.dpp-player-controls .dpp-play-pause-btn svg {
    width: 28px;
    height: 28px;
}
.dpp-time-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
}
.dpp-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}
.dpp-progress-filled {
    width: 0%;
    height: 100%;
    background: #b79af0;
    border-radius: 10px;
    position: relative;
}
.dpp-current-time, .dpp-duration {
    font-size: 12px;
    min-width: 40px;
}

/* ========== تم روشن ========== */
body.dpp-light-player .dpp-floating-player {
    background: #f5f5f5;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    color: #333;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
}
body.dpp-light-player .dpp-player-title,
body.dpp-light-player .dpp-player-controls button svg,
body.dpp-light-player .dpp-player-close {
    color: #333;
    fill: #333;
}
body.dpp-light-player .dpp-progress-bar {
    background: rgba(0,0,0,0.2);
}
body.dpp-light-player .dpp-progress-filled {
    background: #007cba;
}
body.dpp-light-player .dpp-music-icon {
    fill: #007cba;
}
body.dpp-light-player .dpp-player-controls button:hover {
    background: rgba(0,0,0,0.1);
}
body.dpp-light-player .dpp-theme-toggle:hover {
    background: rgba(0,0,0,0.1);
}
body.dpp-light-player .dpp-theme-icon {
    fill: #333333;
}

/* ========== موبایل (حفظ چیدمان دو سطری قبلی) ========== */
@media (max-width: 768px) {
    .dpp-playlist-container {
        padding: 8px;
        margin: 15px auto;
        text-align: center;
    }
    .dpp-playlist-stats {
        font-size: 11px;
        padding: 3px 10px;
        margin-bottom: 10px;
        display: inline-block;
    }
    .dpp-playlist-play-icon svg {
        width: 32px;
        height: 32px;
    }
    .dpp-playlist-play-text {
        font-size: 12px;
    }
    .dpp-playlist-play-btn {
        padding: 10px;
        margin-bottom: 12px;
        border-radius: 14px;
    }
    .dpp-track-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        padding: 8px;
        text-align: center;
        align-items: center;
    }
    .dpp-track-row:hover {
        transform: none;
        box-shadow: none;
    }
    .dpp-track-number {
        margin-left: 0;
        min-width: 28px;
        font-size: 14px;
    }
    .dpp-track-title {
        flex: 0 1 auto;
        max-width: 90%;
        white-space: normal;
        word-break: break-word;
        font-size: 14px;
        text-align: center;
        justify-content: center;
        padding-left: 0;
    }
    .dpp-track-actions {
        width: 100%;
        justify-content: center;
        margin-right: 0;
        gap: 12px;
    }
    .dpp-track-actions button {
        padding: 6px 14px;
        font-size: 12px;
        min-width: 70px;
        border-radius: 8px;
    }
    .dpp-player-header {
        gap: 8px;
    }
    .dpp-player-title {
        max-width: 180px;
        font-size: 12px;
    }
    .dpp-theme-toggle {
        width: 34px;
        height: 34px;
    }
    .dpp-theme-icon {
        width: 18px;
        height: 18px;
    }
    .dpp-player-controls {
        gap: 6px;
    }
    .dpp-player-controls button {
        width: 34px;
        height: 34px;
    }
    .dpp-time-bar {
        gap: 5px;
    }
    .dpp-current-time, .dpp-duration {
        font-size: 10px;
        min-width: 35px;
    }
}

/* پیام اعلان */
.dpp-notification {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #e53935;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 10000;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    direction: rtl;
    font-family: inherit;
}
@media (max-width: 768px) {
    .dpp-notification {
        bottom: 70px;
        right: 10px;
        left: 10px;
        text-align: center;
        font-size: 12px;
        padding: 8px 12px;
    }
}