/* ===== پلیر ===== */
#player {
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(20,20,20,0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    gap: 10px;
    z-index: 9999;
    flex-wrap: wrap;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(120%);
    transition: all 0.4s ease;
}

/* فعال */
#player.active {
    opacity: 1;
    transform: translateY(0);
}

/* کاور پلیر */
#player-cover {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s ease-in-out;
}

/* چرخش کاور */
#player-cover.playing {
    animation: rotateCover 8s linear infinite;
}

@keyframes rotateCover {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* اطلاعات مداح */
.player-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 10px;
    color: #fff;
}

#player-title {
    font-weight: bold;
    font-size: 16px;
}

#player-singer {
    font-size: 13px;
    color: #ccc;
    margin-top: 2px;
}

/* دکمه‌های پلیر شیشه‌ای */
.player-controls {
    display: flex;
    gap: 8px;
}

.player-btn,
#playBtn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}

.player-btn:hover,
#playBtn:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

/* نوار پیشرفت */
#progress {
    flex: 1;
    margin-top: 5px;
    height: 5px;
    border-radius: 3px;
    appearance: none;
    background: #333;
}

#progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    cursor: pointer;
}

#progress::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    cursor: pointer;
}

/* موبایل */
@media screen and (max-width: 768px) {
    #player {
        flex-direction: column;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .player-meta {
        text-align: center;
        margin: 6px 0;
        width: 100%;
    }

    .player-controls {
        margin-top: 6px;
    }

    #progress {
        width: 90%;
    }
}

/* حالت در حال درگ */
#player.dragging {
    transition: none !important;
}

/* وقتی بسته می‌شود */
#player.hidden {
    transform: translateY(120%);
}
