.fw-musicplayer-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 9999;
}

.fw-musicplayer-container.show {
    display: block;
}

.fw-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 30px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: color 0.3s ease;
}

.fw-close-btn:hover {
    color: #000;
}

.fw-musicplayer-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.fw-musicplayer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.fw-album-cover {
    flex-shrink: 0;
}

.fw-album-cover img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.fw-album-cover img[src=""] {
    display: none;
}

.fw-track-info {
    text-align: center;
    width: 100%;
    max-width: 200px;
}

.fw-track-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.fw-track-name:empty {
    display: none;
}

.fw-musicplayer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.fw-waveform {
    flex: 1;
    cursor: pointer;
    height: 60px;
    min-height: 60px;
    min-width: 200px;
}

.fw-play-btn {
    background: #f2d128;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    text-indent: 0;
    overflow: visible;
    outline: none;
    font-family: Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
}

.fw-play-btn:hover {
    background: #f2d128;
}

.fw-play-btn .fw-play-icon,
.fw-play-btn .fw-pause-icon {
    display: inline-block;
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
    position: relative;
    width: 20px;
    height: 20px;
    font-size: 0;
    color: transparent;
    overflow: visible;
}

/* Icono de play con CSS puro - oculta caracteres Unicode y crea icono con CSS */
.fw-play-btn .fw-play-icon::before {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-left: 10px solid white;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

/* Icono de pause con CSS puro - oculta caracteres Unicode y crea icono con CSS */
.fw-play-btn .fw-pause-icon::before {
    content: '';
    display: block;
    position: absolute;
    left: 40%;
    top: 50%;
    transform: translate(-70%, -50%);
    width: 3px;
    height: 14px;
    background: white;
}

.fw-play-btn .fw-pause-icon::after {
    content: '';
    display: block;
    position: absolute;
    left: 60%;
    top: 50%;
    transform: translate(-30%, -50%);
    width: 3px;
    height: 14px;
    background: white;
}

.fw-time-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.fw-current-time {
    min-width: 40px;
    text-align: right;
}

.fw-separator {
    color: #999;
}

.fw-duration {
    min-width: 40px;
    text-align: left;
}

.track.tracklist_track_title a {
    cursor: pointer;
}

.fw-pitch-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 5px;
    background: #b3b3b3;
    margin-right: 50px;
    margin-left: 50px;
    border-radius: 3px;
    width: 100px;
}

.fw-bpm-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.fw-bpm-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1;
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.fw-pitch-slider-wrapper {
    position: relative;
    width: 20px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px 0;
}

.fw-pitch-slider {
    width: 160px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    cursor: pointer;
    position: absolute;
    transform: rotate(-90deg);
    transform-origin: center;
}

.fw-pitch-slider::-webkit-slider-runnable-track {
    width: 120px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}

.fw-pitch-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #000000;
    cursor: pointer;
    border-radius: 50%;
    margin-top: -7px;
    transition: background 0.2s ease;
    transform: rotate(90deg);
}

.fw-pitch-slider::-webkit-slider-thumb:hover {
    background: #f2d128;
}

.fw-pitch-slider::-moz-range-track {
    width: 120px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    border: none;
    transform: rotate(90deg);
}

.fw-pitch-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #000000;
    cursor: pointer;
    border: none;
    border-radius: 50%;
    transition: background 0.2s ease;
    transform: rotate(90deg);
}

.fw-pitch-slider::-moz-range-thumb:hover {
    background: #f2d128;
}

.fw-pitch-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
}

.fw-pitch-label {
    font-size: 9px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fw-pitch-value {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    display: inline-block;
    min-width: 30px;
    text-align: center;
    position: absolute;
    left: -30px;
    top: -8.4rem;
    background: #000000;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.fw-pitch-value.active {
    background: #000000;
}

body.fw-player-active {
    padding-bottom: 150px;
}

@media (max-width: 768px) {
    .fw-musicplayer-container {
        padding: 10px;
        gap: 10px;
    }
    
    .fw-musicplayer-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        align-items: start;
    }
    
    .fw-musicplayer-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    
    .fw-album-cover {
        width: 100%;
        max-width: 143px;
    }
    
    .fw-album-cover img {
        width: 100%;
        height: auto;
    }
    
    .fw-track-info {
        text-align: center;
        width: 100%;
        max-width: 120px;
        margin-top: 0;
    }
    
    .fw-track-name {
        font-size: 15px;
        line-height: 1.3;
    }
    
    .fw-musicplayer-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        margin-top: 5px;
    }
    
    .fw-play-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        -webkit-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Ajustar tamaño de iconos en móvil */
    .fw-play-btn .fw-play-icon,
    .fw-play-btn .fw-pause-icon {
        width: 16px;
        height: 16px;
    }
    
    .fw-play-btn .fw-play-icon::before {
        border-left-width: 8px;
        border-top-width: 6px;
        border-bottom-width: 6px;
    }
    
    .fw-play-btn .fw-pause-icon::before,
    .fw-play-btn .fw-pause-icon::after {
        width: 2.5px;
        height: 12px;
    }
    
    .fw-time-info {
        font-size: 14px;
    }
    
    .fw-pitch-control {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 8px;
        background: #b3b3b3;
        border-radius: 3px;
        width: 80px;
        height: auto;
        flex-shrink: 0;
    }
    
    .fw-bpm-display {
        flex-shrink: 0;
    }
    
    .fw-bpm-value {
        font-size: 14px;
        min-height: 18px;
    }

    .fw-pitch-slider-wrapper {
        width: 30px;
        margin: 5px 0;
        padding: 10px 0;
    }
    
    .fw-pitch-slider {
        height: 8px;
        transform: rotate(-90deg);
        transform-origin: center;
        position: absolute;
        cursor: pointer;
        touch-action: none;
    }
    
    .fw-pitch-slider::-webkit-slider-runnable-track {
        width: 120px;
        height: 8px;
        background: #ddd;
        border-radius: 4px;
    }
    
    .fw-pitch-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 28px;
        height: 28px;
        background: #000000;
        cursor: pointer;
        border-radius: 50%;
        margin-top: -10px;
        transition: background 0.2s ease;
        transform: rotate(90deg);
    }
    
    .fw-pitch-slider::-webkit-slider-thumb:hover,
    .fw-pitch-slider::-webkit-slider-thumb:active {
        background: #f2d128;
    }
    
    .fw-pitch-slider::-moz-range-track {
        width: 120px;
        height: 8px;
        background: #ddd;
        border-radius: 4px;
        border: none;
    }
    
    .fw-pitch-slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
        background: #000000;
        cursor: pointer;
        border: none;
        border-radius: 50%;
        transition: background 0.2s ease;
        transform: rotate(90deg);
    }
    
    .fw-pitch-slider::-moz-range-thumb:hover,
    .fw-pitch-slider::-moz-range-thumb:active {
        background: #f2d128;
    }
    
    .fw-pitch-display {
        flex-shrink: 0;
    }
    
    .fw-pitch-value {
        font-size: 11px;
        min-width: 25px;
    }
    
    .fw-pitch-label {
        font-size: 8px;
    }
    
    .fw-close-btn {
        top: 5px;
        right: 5px;
        font-size: 24px;
        width: 25px;
        height: 25px;
    }
    
    .fw-waveform {
        display: block;
        grid-column: 1 / -1;
        width: 100%;
        height: 60px;
        min-height: 60px;
        margin-top: 10px;
        margin-bottom: 30px;
    }
    
    body.fw-player-active {
        padding-bottom: 180px;
    }
    
    audio[controls] {
        display: none !important;
    }
}

.fw-waveform {
    position: relative;
}

.fw-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f2d128;
    border-radius: 50%;
    animation: fw-spin 1s linear infinite;
    z-index: 10000;
    display: none;
}

.fw-waveform.loading .fw-spinner {
    display: block;
}

.fw-waveform.loading {
    opacity: 0.5;
}

@keyframes fw-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
