/* استایل‌های افزونه نمایش آهنگ - مطابق طراحی ارائه شده */

.music-player-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.music-card {
    background: linear-gradient(135deg, #8B5A9F 0%, #6B4C93 50%, #4A3B7A 100%);
    border-radius: 20px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(139, 90, 159, 0.4);
    transition: all 0.3s ease;
    width: calc(25% - 12px);
    min-width: 260px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
}

.music-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(139, 90, 159, 0.4);
}

.music-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* کاور آهنگ */
.music-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.music-card:hover .cover-image {
    transform: scale(1.05);
}

.default-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    color: rgba(255, 255, 255, 0.7);
    font-size: 4rem;
}

/* اورلی پخش */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.music-cover:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #8B5A9F;
}

.play-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* اطلاعات آهنگ */
.music-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    color: white;
}

.music-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: white;
    text-align: center;
    line-height: 1.3;
    direction: rtl;
}

.music-artist {
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 20px 0;
    color: #FFD700;
    text-align: center;
    direction: rtl;
}

/* نوار پیشرفت */
.progress-container {
    margin: 20px 0;
}

.progress-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* کنترل‌ها */
.music-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: #FFD700;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.control-btn:hover {
    background: #FFC107;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
    color: #333;
    text-decoration: none;
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.play-pause-btn {
    width: 50px;
    height: 50px;
    font-size: 18px;
}

.download-btn {
    width: 45px;
    height: 45px;
    font-size: 14px;
}

/* حالت پخش */
.music-card.playing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 10px 30px rgba(139, 90, 159, 0.3); }
    50% { box-shadow: 0 15px 40px rgba(139, 90, 159, 0.5); }
    100% { box-shadow: 0 10px 30px rgba(139, 90, 159, 0.3); }
}

.music-card.playing .progress-fill {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    to { box-shadow: 0 0 15px rgba(255, 215, 0, 0.8); }
}

/* المان صوتی مخفی */
.music-audio {
    display: none;
}

/* ریسپانسیو */
@media (min-width: 1200px) {
    .music-player-container {
        max-width: 1180px;
    }
    
    .music-card {
        width: calc(25% - 12px);
        max-width: 280px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .music-player-container {
        max-width: 960px;
    }
    
    .music-card {
        width: calc(25% - 12px);
        max-width: 230px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .music-player-container {
        max-width: 720px;
    }
    
    .music-card {
        width: calc(50% - 8px);
        max-width: 350px;
    }
}

@media (max-width: 767px) {
    .music-player-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 15px;
        max-width: 100%;
    }
    
    .music-card {
        width: 100%;
        max-width: 350px;
        padding: 15px;
        min-height: 380px;
    }
    
    .music-title {
        font-size: 1.2rem;
    }
    
    .music-artist {
        font-size: 0.9rem;
    }
    
    .progress-section {
        gap: 10px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .play-pause-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .music-player-container {
        padding: 10px;
    }
    
    .music-card {
        padding: 12px;
        min-height: 350px;
    }
    
    .music-title {
        font-size: 1.1rem;
    }
    
    .progress-section {
        gap: 8px;
    }
}

/* انیمیشن‌های اضافی */
.music-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تاخیر انیمیشن برای کارت‌های مختلف */
.music-card:nth-child(1) { animation-delay: 0.1s; }
.music-card:nth-child(2) { animation-delay: 0.2s; }
.music-card:nth-child(3) { animation-delay: 0.3s; }
.music-card:nth-child(4) { animation-delay: 0.4s; }

/* بهبود دسترسی */
.control-btn:focus,
.play-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* اسکرول بار سفارشی برای موبایل */
.music-player-container::-webkit-scrollbar {
    display: none;
}

.music-player-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

