/* jQuery Audio Player Library Styles */
.jqap-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    direction: ltr;
    max-width: 100%;
    min-width: 300px;
    position: relative;
}

.jqap-waveform {
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.jqap-waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.jqap-waveform-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    transition: width 0.05s linear;
}

.jqap-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 15px 0;
    gap: 10px;
}

.jqap-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jqap-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.jqap-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.jqap-btn:active {
    transform: translateY(0);
}

.jqap-btn-play {
    background: rgba(46, 204, 113, 0.8);
    padding: 12px 16px;
    border-radius: 50%;
    font-size: 16px;
}

.jqap-btn-play:hover {
    background: rgba(46, 204, 113, 1);
}

.jqap-progress-container {
    flex: 1;
    margin: 0 15px;
}

.jqap-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.jqap-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #feca57);
    border-radius: 3px;
    transition: width 0.05s linear;
}

.jqap-time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.8;
}

.jqap-volume-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.jqap-volume-slider {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.jqap-volume-fill {
    height: 100%;
    background: #3498db;
    border-radius: 2px;
    transition: width 0.1s ease;
}

.jqap-speed-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.jqap-speed-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 5px;
    padding: 5px 8px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.jqap-speed-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.jqap-speed-btn.active {
    background: #e74c3c;
}

.jqap-playlist {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.jqap-playlist-item {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jqap-playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.jqap-playlist-item.active {
    background: rgba(46, 204, 113, 0.3);
}

.jqap-playlist-item:last-child {
    border-bottom: none;
}

.jqap-track-info {
    flex: 1;
}

.jqap-track-title {
    font-weight: bold;
    margin-bottom: 2px;
}

.jqap-track-duration {
    font-size: 12px;
    opacity: 0.7;
}

.jqap-loading {
    text-align: center;
    padding: 20px;
    opacity: 0.8;
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    display: flex;
    background: #2c3e50 ;
    border-radius: 10px;
    justify-content: space-around;
    align-items: center;
}

.jqap-spinner {
    border: 4px solid rgba(203, 72, 42, 0.3);
    border-top: 4px solid rgb(203, 72, 42);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: jqap-spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes jqap-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* نسخه ساده پلیر */
.jqap-simple {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 12px;
    padding: 5px;
    margin: 10px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    min-width: 250px;
}

.jqap-simple .jqap-waveform {
    height: 30px;
    margin: 0;
}

.jqap-simple .jqap-controls {
    justify-content: center;
    gap: 10px;
    margin: 5px 0 0 0;
}

.jqap-simple .jqap-btn-play {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    padding: 10px 0 10px 2px;
}

.jqap-simple .jqap-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.jqap-simple .jqap-speed-control {
    gap: 8px;
}

.jqap-simple .jqap-speed-btn {
    padding: 6px 10px;
    font-size: 11px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jqap-container {
        padding: 15px;
        margin: 5px 0;
    }

    .jqap-controls {
        flex-wrap: wrap;
        gap: 5px;
    }

    .jqap-control-group {
        gap: 5px;
    }

    .jqap-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .jqap-volume-slider {
        width: 40px;
    }

    .jqap-waveform {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .jqap-container {
        padding: 10px;
    }

    .jqap-progress-container {
        margin: 0 10px;
    }

    .jqap-controls {
        flex-direction: row;
        justify-content: space-between !important;
        gap: 5px !important;
    }

    .jqap-control-group {
        justify-content: center;
    }

    .jqap-simple .jqap-speed-control {
        gap: 2px !important;
    }

    .jqap-simple .jqap-speed-btn,
    .jqap-simple .jqap-btn,
    .jqap-simple .jqap-btn-play {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .jqap-simple .jqap-speed-btn {
        width: 40px;
        height: 32px;
        font-size: 10px;
        text-align: center;
    }
}